1. Introduction
In the dynamic landscape of 2021, renewable energy faced several complex challenges due to the ongoing impact of the COVID19 pandemic, economic volatility and geopolitical tensions. The impact of the pandemic and the rise in commodity prices have disrupted renewable energy supply chains and led to delays in projects. However, amidst these challenges, the discussion on the role of renewables in improving energy security gained momentum, fuelled by a sharp rise in energy prices. Despite these hurdles, the renewable energy sector exhibited robust growth, reaching record highs in power capacity. Investment in renewable power and fuels saw a fourth consecutive year of increase, resulting in solar and wind power jointly contributing over 10% to the world’s electricity generation for the first time [1].
In 2021, the International Energy Agency’s Net Zero by 2050 scenario set ambitious targets, influencing 17 countries’ pledges for netzero emissions by COP26. The Glasgow Climate Pact emphasized reducing fossil fuel usage, with 140 countries committing to "phasing down" coal power. Notable exceptions like Australia, China, India, and the U.S. did not join in stopping financing for new coal plants.
The renewable energy sector progressed, with a 17% surge in capacity additions in 2021, reaching 314 GW. Global renewable capacity rose to 3,146 GW, but urgent deployment is needed to meet IEA and IRENA benchmarks, requiring 825 GW annually until 2050. With increasing energy demand, microgrids play a pivotal role in the future energy landscape. They offer decentralized and resilient solutions, aligning with global sustainability goals. To address energy wastage, optimize existing microgrids, and transform grids into smart grids, "Smart Microgrids" link users to production systems, balancing supply and consumption in real time. Collaborating with energy communities, microgrids create virtuous urban districts using renewable selfproduction. Microgrids usually consist of lowvoltage distribution networks with distributed energy resources, operating in islanded mode or connected to the main grid [1,2,3,4,5,6,7,12]. Intelligent microgrids enable the minimization of energy exchange with the external grid. It is important to mention that Districts, where annual selfproduction surpasses consumption on a global scale, are referred to as "Positive Energy Districts" (PEDs) [9].
Microgrids (MGs) face several challenges, including the high investment costs associated with Renewable Energy Sources (RES), the need for optimal energy source utilization, control complexities, a lack of system protection and regulatory standards, and concerns related to customer privacy. Given the prevalent deployment of inherently intermittent RESs and the growing integration of probabilistic controllable loads into MGs, researchers have concentrated on addressing energy management issues.
1.1. Fundamentals, Evolution, and Classification of
Energy Management Systems
The International Electrotechnical Commission, through its standard IEC 61970, which pertains to the EMS application program interface in power systems management, defines an Energy Management System (EMS) as "a computer system that comprises a software platform providing fundamental support services and a suite of applications delivering the necessary functionality for the effective operation of electrical generation and transmission facilities, ensuring sufficient security of energy supply at minimal cost" [10]. Similarly, an MG EMS, encompassing these attributes, typically consists of modules designed to execute decisionmaking strategies. Modules such as DERs/load forecasting, Human Machine Interfaces (HMI), and supervisory control and data acquisition (SCADA), among others, play a crucial role in ensuring the efficient implementation of EMS decisionmaking strategies by transmitting optimal decisions to each generation, storage, and load unit [11]. Leveraging energy from RES has become standard for enhancing grid resilience and achieving emission reduction goals. As energy demand rises, ensuring a reliable supply is crucial. However, integrating RES presents challenges, necessitating the storage of excess energy, notably in gridconnected Battery Energy Storage Systems (BESS). The sustainability and reliability of grids face hurdles with RES integration, emphasizing the pivotal role of gridconnected BESS in managing surplus energy. In microgrids, whether gridconnected or islanded, effective power flow management is critical. This is particularly crucial given the unpredictable nature of RES, characterized by intermittency and varying availability. To enhance the reliability of microgrids, the integration of BESS is crucial. However, this integration introduces complexity, prompting the need for an EMS to orchestrate and optimize the whole energy system. The EMS acts as the operational brain, ensuring the efficient and effective functioning of microgrids in the face of dynamic and unpredictable energy inputs from renewable sources.
In recent times [26], there has been a substantial upswing in the adoption of largescale energy storage systems. This surge is propelled by advancements in both the costefficiency and performance of energy storage technologies. Furthermore, the necessity to integrate distributed generation, alongside government incentives and mandates, has significantly contributed to this growth. To harness the full potential of energy storage as a flexible grid asset capable of delivering multiple grid services, the implementation of EMSs and optimization methods is imperative. These systems must exhibit adaptability to a spectrum of use cases and regulatory landscapes, ensuring their efficacy and safe utilization in diverse energy storage scenarios.
Energy management strategy can be applied to either gridconnected or islanded microgrids comprising RES and BESS. The optimization can be focused on either cost optimization or minimizing the cash flow of the system as well as power exchange with the main grid in gridconnected mode or in the case of islanded mode to minimize the operation cost and to reduce emissions by scheduling DER in a microgrid [13]. The Energy Management System (EMS) of an MG encompasses both supply and demandside management, aiming to satisfy system constraints and achieve economical, sustainable, and reliable MG operation [10]. The EMS offers numerous advantages, ranging from efficient generation dispatch and energy savings to reactive power support and frequency regulation. It contributes to enhancing reliability, reducing loss costs, maintaining energy balance, lowering greenhouse gas (GHG) emissions, and fostering customer participation while respecting customer privacy.
EMS with a classical approach as described in [14] is one way to effectively model and manage the MG. The microgrid energy management described here is formulated as a unit commitment problem about the distribution network and the corresponding constraints leading to a mixedinteger nonlinear programming (MINLP) formulation to reduce the computational time, the distribution power flow equations and nonlinear constraints are simplified by linearizing the MINLP formulation to mixedinteger linear programming (MILP).
This paper aims to decribes the MILPbased EMS designed for the effective control of active and reactive power in a microgrid intended for integration into the SPEED2030 (Savona Positive Energy & Environment District). This district is envisioned as an extension of the existing University Savona Campus in Italy. The document is structured as follows: Section II accentuates the distinctive features of PEDs and provides an overview of the ALPGRIDS project. Section III outlines the proposed microgrid by detailing the employed technologies and the EMS model its main constraints, the architecture of the optimization model, and the objective function related to it. The input data is briefly outlined in Section IV, presenting its key inputs and assumptions. Section V presents the primary outcomes of EMS and the results, and Section VI concludes the paper.
2. PED and Alpgrids Project
2.1. Positive Energy Districts (PED)
In the last decade, the concept of PEDs has garnered increasing attention as a typical approach to reducing CO2 emissions globally. PEDs are recognized as effective tools for emission reduction in Europe and other parts of the world [15]. Scientific projects and regulatory bodies are actively investigating PEDs to encourage the use of renewable energy sources, reduce GHG emissions, enhance energy flexibility in buildings, and improve overall user comfort [16,17].
A PED is an energyefficient urban district achieving zero net greenhouse gas emissions through active management of bidirectional energy flows and annual surplus energy generation [15,18]. PEDs, comprised of interconnected buildings linked to the power grid, employ various energy management techniques such as balancing, peak shaving, and demand response. These districts aim to create integrated environments fostering sustainable production, consumption, and mobility, reducing primary energy use and greenhouse gas emissions while providing added value and incentives for consumers.
Aligned with the European Strategic Energy Technology Plan, the ’Positive Energy Districts and Neighborhoods for Sustainable Urban Development’ program, supported by 20 EU Member States and part of JPI Urban Europe [19], strives to establish 100 positive energy neighborhoods by 2025. Engaging diverse stakeholders, including investors, cities, industry players, research organizations, consortia, and private citizens, this initiative aims to contribute significantly to sustainable urban development.
In Italy, several PED projects are already in the planning and development stages across various cities, such as Parma, Milan, Bolzano, Florence, and Lecce [20]. These projects contribute to the broader European effort to advance sustainable urban development and exemplify Italy’s commitment to the goals outlined in the Positive Energy Districts program.
As part of the Interreg Alpine Space ALPGRIDS project [21], an assessment has been conducted to explore the potential of configuring the Savona pilot site as a PED.
2.2. Alpgrids Project
In the Legino district, situated approximately two kilometers from Savona, the ALPGRIDS initiative took root as an extension of the visionary Savona campus.Today, the Savona campus stands as a bustling center for educational institutions, university research laboratories, research centers, and small to mediumsized enterprises [22]. The Savona campus has focused on the ”Energy 2020” project [23], emphasizing sustainable energy principles. Key outcomes include the Smart Polygeneration Microgrid (SPM) and Smart Energy Building (SEB), designed for cost reduction, emissions control, and a comfortable environment [25].
Since 2019, the University of Genoa and IRE Liguria [24] have actively participated in the ALPGRIDS project across five Alpine arc countries. The initiative aims to establish smart microgrids for energy communities through seven pilot projects, including the creation of the urban PED SPEED2030 next to the Savona campus in Legino.
Aligned with PED guidelines [19,20], the Savona ALPGRIDS initiative emphasizes maximizing renewable energy production and optimizing resource utilization at a regional level. Utilizing microgrid configurations and promoting energy sharing through Renewable Energy communities(REC), surplus energy benefits nearby areas, fostering the growth of existing PEDs and inspiring new ones. This approach attracts investments, modernizes infrastructure, and enhances public services [19,20,22].
The available areas for the new Pilot Project areas (SPEED2030) are highlighted in
Figure 1 The district is conceptually divided into four zones devoted to different final uses:
The main football stadium, an outdoor sports area, and the swimming pool;
Commercial activity areas;
University labs, research centers and student accommodation;
Social housing.
The pilot site study centered on meeting the stringent supply reliability needs of research laboratories while addressing diverse energy demands, including electricity, heating, and cooling for various buildings. The primary goal was to reduce primary energy consumption and environmental impact. This paper delves specifically into an indepth analysis of the EMS applied to active and reactive power management within one of the two proposed microgrids for the SPEED2030 project, focusing on a university building within the PED context.
The microgrid is thoroughly investigated, exploring different scenarios that involve both the incorporation and exclusion of the electric mobility component. This comprehensive analysis extends to typical days during both winter and summer seasons. The study aims to assess the microgrid’s performance and resilience under diverse conditions, considering the specific challenges and opportunities posed by electric mobility integration across various seasonal contexts.
3. EMS: Application and Mathematical Model
3.1. Structure and Elements of the Microgrid
The design of the microgrid envisioned for the University’s upcoming structures in SPEED 2030 is illustrated in
Figure 2. This AC microgrid incorporates a range of resources, including a Combined Heat and Power (CHP) unit, rooftopinstalled Photovoltaic (PV) plants, a micro wind turbine, a chiller, a heat pump, storage battery systems, and Electric Vehicle (EV) charging stations (comprising 2 AC, 2 DC, and 2 V2G types). The model utilized for this configuration is succinctly outlined in the following sections.
The microgrid comprises seven buses, each serving a specific role within the system. Bus 1 functions as the Point of Connection (POC) with the grid, facilitating external connectivity. Bus 2 serves as a coupling bus, completing the ring configuration and enhancing the overall stability of the microgrid. Bus 3 is dedicated to the Microgrid Control Center (MCC) building, a centralized control hub housing the control room. This central control facility is intricately linked with the CHP unit, the chiller, and the rooftop PV installations. Bus 4 is designated as the wind station, managing the integration and utilization of power generated by the micro wind turbine. Bus 5 operates as a BESS station, featuring rooftop PV installations for energy generation. Bus 6 serves as a charging station equipped with PV installations positioned over a shed, emphasizing sustainable energy practices in electric vehicle charging. Finally, Bus 7 is associated with the students accommodation building. This building incorporates rooftop PV installations for power generation and employs a heat pump to address cooling or heating requirements.
This diverse bus configuration illustrates the strategic allocation of roles and resources within the microgrid, showcasing a comprehensive and efficient design for meeting the energy needs of the University’s new buildings in the SPEED 2030 project.
3.2. Mathematical Model
3.2.1. Distributed Generation Model
The distributed generation units in the microgrid consist of three types: PV, wind turbine, and CHP. PV and wind are categorized as nondispatchable Distributed Energy Resources (DERs), implying their generation is dependent on environmental conditions and not controllable. On the other hand, CHP is considered a dispatchable DER, allowing for controlled and scheduled power generation to meet specific demand requirements.

Renewable Energy Source (RES) Model
In our model, we consider the contribution of RES to the microgrid system. The active power output of the RES at different buses is denoted as
${P}_{b,r,t}^{\mathrm{RES}}$ in kilowatts [kW] as in (
1). Additionally, the active power curtailment of the RES is represented by
${P}_{b,r,t}^{\mathrm{RES},\mathrm{curt}}$ in [kW] as in (
2), reflecting any reduction in the output due to operational or grid constraints.
${P}_{b,r,t}^{\mathrm{RES},\mathrm{av}}$ represents the available power of RES as in (
3). The equation (
4) limits the maximum power of RES according to (CEI 016 page117).
The main constraints for RES are as follows:
For the reactive power,
${Q}_{b,r,t}^{\mathrm{RES},\mathrm{out}}$ in (
5) represents the reactive power injected into the microgrid by the RES in [kVAR], while in (
6)
${Q}_{b,r,t}^{\mathrm{RES},\mathrm{in}}$ represents the reactive power absorbed by the RES in [kVAR].
${\psi}_{r}$ in (
5) and (
6) limits the inverter operating points considering the rectangular capability curve. Binary variables in (
7)
${y}_{b,r,t}^{\mathrm{RES},\mathrm{out}}$ and
${y}_{b,r,t}^{\mathrm{RES},\mathrm{in}}$ take the value 1 when the RES injects or absorbs reactive power, respectively.
The reactive power constraints are given as follows:
These variables play a crucial role in capturing the dynamic behaviour and impact of RES on the microgrid, enabling an analysis of active and reactive power interactions, as well as the ability to curtail power output when necessary.

CHP Model
The electric power produced is subject to the following constraints:
These constraints in (
8) and (
9)limit the power between a lower threshold (
${P}_{b,t}^{el,CHP,\mathrm{min}}$) and an upper one (
${P}_{b,t}^{el,CHP,\u2033\mathrm{max}\u2033}$). Specifically,
${P}_{t}^{el,CHP,\mathrm{min}}$ represents the minimum technical partload of the microturbine, typically advised by manufacturers to be above 30%50% of the nominal electrical power to maintain efficiency. Regarding the maximum power
${P}_{b,t}^{el,CHP,\mathrm{max}}$, it depends on the time instant
t since the maximum electric power and efficiency are influenced by environmental (temperature, pressure, and humidity) and installation (altitude) conditions.
The thermal power
${P}_{b,t}^{th,CHP}$ produced by the single unit at time
t can either be positive or equal to zero and is correlated with the electric power
${P}_{b,t}^{el,CHP}$ through a linear function as in (
10) describing the partial load behavior of the microturbine:
The primary power of the microturbine
${P}_{b,t}^{f,CHP}$ at time
t is linearly related to the electric power produced
${P}_{b,t}^{el,CHP}$ through equation (
11):
where
${\alpha}_{b}^{f,\mathrm{CHP}}$ and
${\beta}_{b}^{f,\mathrm{CHP}}$ are constant coefficients. Finally, in the following equation (
12) thermal balance is defined:
where
${P}_{b,t}^{\mathrm{th},\mathrm{CHP},\mathrm{heating}}$ and
${P}_{b,t}^{\mathrm{th},\mathrm{CHP},\mathrm{chiller}}$ can assume positive values or be equal to zero.
For the reactive power, the equations (
15) and (
16) are given below which considers the rectangular capability curve and the binary variable in (
17) takes the value 1 if the CHP is producing reactive power or 0 if absorbing the reactive power respectively:
3.2.2. BESS Model
The key variables related to the operation of a Battery Energy Storage System (BESS) are as follows: In (
18)The active power charged into the BESS is denoted as
${P}_{b,t}^{\mathrm{ch},\mathrm{BESS}}$ in kW, while the active power discharged from the BESS as in (
21) is represented by
${P}_{b,t}^{\mathrm{dch},\mathrm{BESS}}$ in kilowatts. Binary variables in (
24) are employed to indicate charging and discharging states, with
${x}_{b,t}^{\mathrm{ch},\mathrm{BESS}}$ equal to 1 when the BESS is charging, and
${x}_{b,t}^{\mathrm{dch},\mathrm{BESS}}$ equal to 1 when the BESS is discharging. The state of charge of the BESS at time
t is denoted as
$SO{C}_{b,t}^{\mathrm{BESS}}$ as in (
27). Additionally, the BESS’s reactive power output and absorption as in (
29) and (
30)are expressed as
${Q}_{b,t}^{\mathrm{BESS},\mathrm{out}}$ and
${Q}_{b,t}^{\mathrm{BESS},\mathrm{in}}$ in [kVAR], respectively. the reference for the inverter operating limits is modified according to CEI. Binary variables
${y}_{b,t}^{\mathrm{BESS},\mathrm{out}}$ and
${y}_{b,t}^{\mathrm{BESS},\mathrm{in}}$ take the value 1 when the BESS provides or absorbs reactive power, respectively in (
31). A rectangular capability curve has been considered for the BESS unit.
The constraints for the Battery energy storage system (BESS) are as follows:
The following equation gives the state of charge of the BESS:
where
${\tau}^{\mathrm{BESS}}$ is the Ideal selfdischarging rate and
${C}_{b}^{\mathrm{BESS}}$ is the Rated Capacity of the storage system in [kWh]
At the first instance T= 1, SOC can be written as:
The reactive power constraints for the BESS are modeled as follows:
3.2.3. Grid Model
The exchange of electrical power with the national grid is characterized by several key parameters. In (
32) and (
33) the active power withdrawn from the national grid is denoted as
${P}_{t}^{\mathrm{buy}}$ in kilowatts (kW), while the active power injected into the national grid is represented by
${P}_{t}^{\mathrm{sell}}$ in kW. The corresponding reactive power components in (
35) and (
36) include
${Q}_{t}^{\mathrm{buy}}$ for reactive power withdrawn and
${Q}_{t}^{\mathrm{sell}}$ for reactive power injected, both measured in\text{[kVAR]}. In (
34) binary variables
${x}_{t}^{\mathrm{buy}}$ and
${x}_{t}^{\mathrm{sell}}$ take the value 1 when active power is withdrawn from or injected into the national grid, respectively. Similarly, in (
37) binary variables
${y}_{t}^{\mathrm{buy}}$ and
${y}_{t}^{\mathrm{sell}}$ are assigned the value 1 when reactive power is withdrawn from or injected into the national grid, respectively. These variables are important in modeling the power exchange dynamics with the grid, enabling a comprehensive analysis of active and reactive power exchange.
The introduced constraints for bought and sold power (exchange with the grid) are as follows:
The rectangular capability curve as in (
36) and (
37) has been considered for the exchange with the grid depending upon the value of
${\mathrm{A}}^{\mathrm{trans},\phantom{\rule{4.pt}{0ex}}\mathrm{max}}$, which is the size of the transformer.
3.2.4. EV and Wall Box Model
In this model, the state of charge of electric vehicles (EVs) is denoted as
${\mathrm{SOC}}_{v,t}^{EV}$. Charging power is categorized into different types, including
${P}_{b,j,v,t}^{\mathrm{ch},\mathrm{AC}}$ for charging with respect to charger
j,
${P}_{b,e,v,t}^{\mathrm{ch},\mathrm{DC}}$ for charging with respect to charger
e,
${P}_{b,f,v,t}^{\mathrm{ch},\mathrm{V}2\mathrm{G}}$ for V2G charging, and
${P}_{b,f,v,t}^{\mathrm{dch},\mathrm{V}2\mathrm{G}}$ for V2G discharging. The maximum power from the charger is defined as a piecewise function harnessing the variable SOC of the vehicle as in (
40),(
42), (
44) and (
46). These constraints make sure the maximum power any charger can provide at time instant t is dependent on the SOC of the vehicle. Reactive power in V2G scenarios is captured by
${Q}_{b,f,v,t}^{\mathrm{in},\mathrm{V}2\mathrm{G}}$ for absorbed reactive power and
${Q}_{b,f,v,t}^{\mathrm{out},\mathrm{V}2\mathrm{G}}$ for produced reactive power, both for charger
f and vehicle
v at time
t. Binary variables are introduced in (
39),(
41),(
43) to indicate charging and discharging states, with
${y}_{b,j,v,t}^{\mathrm{ch},\mathrm{AC}}$,
${y}_{b,e,v,t}^{\mathrm{ch},\mathrm{DC}}$, and
${y}_{b,f,v,t}^{\mathrm{ch},\mathrm{V}2\mathrm{G}}$ taking the value 1 when chargers
j,
e, and
f are charging the vehicle
v, respectively. Similarly,
${y}_{b,f,v,t}^{\mathrm{dch},\mathrm{V}2\mathrm{G}}$,
${y}_{b,f,v,t}^{\mathrm{in},\mathrm{V}2\mathrm{G}}$, and
${y}_{b,f,v,t}^{\mathrm{out},\mathrm{V}2\mathrm{G}}$ are binary variables as in (
45), (
54), (
55), (
56) indicating discharging, reactive power absorption, and reactive power production, respectively, for charger
f and vehicle
v at time
t.
The constraints are as follows:
To ensure the dedicated connection of each car to a specific charger at time t, binary variables are introduced and aggregated across chargers belonging to AC (designated as
j), DC (
e), and V2G (
f) as in equation (
46). The summation has to be lower or equal to the binary variable
${y}_{v,t}^{\mathrm{EV}}$, which represents the presence of the electric vehicle at the facility.
Below, in equations (
47),(
48),(
49) you will find binary variables designed to ensure that each charger can be exclusively connected to a single car at a given time instant t.
The constraints (
50),(
51),(
52) and show the total power supplied by AC, DC and V2G chargers respectively and (
53) represent the total discharging power supplied to V2G chargers.
The constraints (
54),(
55) define the reactive power capability of the V2G chargers and equation (
56) has the binary variable to make sure either the reactive power is produced or supplied at time instant t.
The Constraints for SOC of EV are given in equations (
57),(
58),(
59),(
60),(
61). The first two are related to maximum and minimum SOC for time period t and the other two are maximum and minimum SOC limit for the time T.
The state of charge of each vehicle is given by the following equation (
62):
where
${F}_{v}^{\mathrm{EV}}$ is Vehicle Consumption in [kWh/km] and
${D}_{v,t}^{\mathrm{EV}}$ is a vehicle demand in [km].
3.2.5. Heating and Cooling System Modeling
The fulfilment of heating and cooling requirements for specific buildings, such as student accommodation and the MCC building, is achieved through dedicated systems. In the student accommodation, a heat pump serves dual purposes by fulfilling both heating and cooling requests. Conversely, in the MCC building, a chiller is installed. This chiller utilizes the CHP system to provide cooling, while the heating requirements are directly supplied by the CHP system. The specific configuration of the model for each technology is elaborated upon in the subsequent section.
Heat Pump Model In our research, we consider the thermal and electrical aspects of a Heat Pump (HP) system. The thermal power produced by the HP is denoted as
${P}_{b,t}^{\mathrm{th},\mathrm{HP}}$, while the corresponding electrical power consumed to generate the required thermal power is represented as
${P}_{b,t}^{\mathrm{el},\mathrm{HP},\mathrm{th}}$ as in (
63). Additionally, the cooling power (
65) produced by the HP is captured by
${P}_{b,t}^{\mathrm{cool},\mathrm{HP}}$, with the associated electrical power consumption denoted as
${P}_{b,t}^{\mathrm{el},\mathrm{HP},\mathrm{cool}}$. The constraints (
64) and (
66) are for the cooling and heating power of the heat pump. Binary variables
${x}_{b,t}^{\mathrm{HP},\mathrm{th}}$ and
${x}_{b,t}^{\mathrm{HP},\mathrm{cool}}$ in (
67) take the value 1 if the HP is in heating or cooling mode, respectively. These variables play a crucial role in modeling the operational states of the HP system, allowing for a comprehensive analysis of its thermal and electrical performance. The key constraints for the heat pump are as follows:
Absorption Chiller Model Our investigation for a chiller system as in (
68), where the thermal power required by the chiller is denoted as
${P}_{b,t}^{\mathrm{th},\mathrm{chiller}}$. The corresponding electrical power consumed by the chiller as in (
70) is to generate the necessary cooling power is represented by
${P}_{b,t}^{\mathrm{el},\mathrm{chiller}}$. Additionally, the cooling power produced by the chilleras in (
71) is captured by
${P}_{b,t}^{\mathrm{cool},\mathrm{chiller}}$. These variables are essential in characterizing the operational dynamics of the chiller system, providing insights into the interplay between thermal and electrical components. The main constraints for the chiller system are as follows:
the equation (
71) defines the relation between the heating power required by the chiller to produce the required cooling power.

The equation (
72) expresses the thermal balance, ensuring that the sum of thermal power produced by the CHP system for heating (
${P}_{b,t}^{\mathrm{th},\mathrm{CHP},\mathrm{heating}}$) and the thermal power produced by the Heat Pump (HP) (
${P}_{b,t}^{\mathrm{th},\mathrm{HP}}$) is used to satisfy the thermal load (
${L}_{b,t}^{\mathrm{th}}$) in bus
b at time
t. The parameter
${\epsilon}_{b}^{\mathrm{heating}}$ is a factor to consider heating losses.

The equation (
73) represents the cooling balance, ensuring that the sum of cooling power produced by a chiller (
${P}_{b,t}^{\mathrm{cool},\mathrm{chiller}}$) and the cooling power produced by the Heat Pump (HP) (
${P}_{b,t}^{\mathrm{cool},\mathrm{HP}}$) to satisfy the cooling load (
${L}_{b,t}^{\mathrm{cool}}$) in bus
b at time
t. The parameter
${\epsilon}_{b}^{\mathrm{cool}}$ is a factor that is used to consider cooling losses.

The equation (
74) represents the trigeneration balance, stating that the cooling power produced by a chiller (
${P}_{b,t}^{\mathrm{th},\mathrm{CHP},\mathrm{chiller}}$) is equal to the thermal power consumed by the chiller (
${P}_{b,t}^{\mathrm{th},\mathrm{chiller}}$) in bus
b at time
t. The parameter
${\epsilon}_{b}^{\mathrm{chiller}}$ is introduced to consider the losses of the chiller in trigeneration considering heat being supplied by CHP.
3.2.6. Active & Reactive Power Balance
The equations (
75) and (
76) represent the active and reactive power balance for the generic bus b at time t of the microgrid. The power factor for the chiller and heat pump systems is assumed to be constant and the unitary power factor for AC and DC chargers.
3.2.7. Load Flow Constraints
3.2.8. Objective Function: Minimization of Operating Costs
The objective function in (
79) models the total cost of operating the microgrid over a specified time period namely one day divided into T time intervals each one having a duration of
$\Delta $. The total costs consist of various components:
The cost associated with buying and selling active power at each time interval.
The cost related to buying and selling reactive power and the associated quantities at each time interval.
The cost of fuel consumption for a CHP unit, which is dependent on the power generated.
The costs associated with curtailing power from PV and wind sources at each time interval.
The revenue from selling power to EVs by charging them with different technologies, including AC, DC, and V2G systems.
The cost associated with remunerating the discharging of V2G technology.
4. Input Data: Acquisition and Processing
The development of an EMS for the Speed 2030 Minicampus microgrid has been grounded in meticulous attention to locationspecific data. To ensure the reliability of our EMS modeling, we have sourced data from reputable platforms, such as PVgis [8], an online database maintained by the European Union that provides comprehensive information on irradiance, temperature, and humidity for photovoltaic systems. Additionally, wind data has been procured from the Region Liguria’s official website, where a database containing essential information like wind speed, temperature, and humidity for the Liguria region, where our microgrid is situated.
For electrical load profiles, we have conducted a detailed analysis of the realtime data from the existing microgrid of the savona campus. This information has been carefully customized and manipulated to align with the specific requirements of the new microgrid. In determining the thermal and cooling load of the building, we have referred to ASHRAE’s building standards manual and adhered to EU norms for Agrade sustainable buildings within PED. These standards are in accordance with the United Nations’ sustainability goals.
The amalgamation of data from reliable sources and the customization of electrical load profiles ensures a comprehensive and accurate foundation for microgrid EMS modeling. This commitment to precision aligns with our objective of creating a reliable and efficient microgrid system. Before the modeling of EMS, continuous validation and calibration of data were performed based on realworld observations to further enhance the accuracy and reliability of the EMS model.
4.1. Electric Mobility
In the Electric Mobility segment of the EMS for the microgrid, a diverse selection of 14 vehicles has been meticulously incorporated into the model. These vehicles represent various models available in the market, each with unique charging capabilities. The chosen electric cars include models that support AC charging, DC charging, and some even offer V2G capabilities.
The technical specifications of these vehicles, encompassing power consumption, range capacity, battery type, and charging and discharging powers for V2Genabled cars, are detailed in
Table 1. The chosen usage types for these vehicles are deliberately diverse, reflecting the microgrid’s dynamic nature. Some vehicles are designated for university use, others are allocated for professors, while additional units serve technicians and students alike. This comprehensive approach ensures a nuanced representation of electric vehicle usage within the microgrid
The demand profiles for various cars are meticulously chosen, aligning with the daily habits of campus residents, employees, and universityassigned EVs. The selection of these demand profiles is grounded in a justifiable consideration of the everyday travel requirements of the respective owners.
Figure 3 illustrates the typical demand profiles tailored to different usage types, offering a visual representation of the nuanced energy needs associated with the diverse activities and travel patterns within the campus.
4.2. Specifications of Charging Stations
The charging infrastructure as in table
Table 2 consists of six types of chargers available, consisting of two each for AC, DC, and V2G. The maximum power outputs for these chargers are 22 kW for AC, 50 kW for DC, and 15 kW for V2G.
The Level 2 or Type 2 chargers, commonly found in homes and garages, are associated with AC chargers. On the other hand, DC chargers, known as Level 3 or DC Fast Chargers (DCFC), represent the quickest way to charge a vehicle. It’s important to note that not every electric vehicle can charge at Level 3 chargers, highlighting the need for diverse charging infrastructure to cater to different EV models and charging capabilities. For bidirectional charging (V2G) the cars are equipped with CCS connection ports for the purpose right now only a handful of models are available in the market for V2G [27].
The charger’s maximum power delivery to the electric vehicle battery is determined through a piecewise function depending upon the State of Charge (SOC) of the battery. This dynamic function is used, adapting to variations in SOC and distinctively accommodating the charging process for both AC and DC types.
4.3. Different Technologies Size Estimation
In determining the optimal sizing of various technologies for the microgrid, a comprehensive research paper focusing on the optimal design of microgrids for the mini campus [9] was consulted. The analysis of results from this paper played a pivotal role in guiding the selection of technology sizes. The overarching goal was to design a microgrid that not only ensures the sustainability and selfreliance of the mini campus but also contributes to providing grid support services within the PED.
The chosen sizes of different technologies are systematically presented in
Table 3, reflecting a careful consideration of factors to achieve an efficient and effective microgrid configuration. This approach aims to strike a balance between meeting the energy needs of the mini campus and optimizing the microgrid’s capability to contribute to the larger power infrastructure within PED.
Tailoring the microgrid components to meet specific requirements and calculated thermal and cooling needs of the building, the sizes of the CHP system, chiller, and heat pump have been carefully selected. The chosen sizes are presented in
Table 4, reflecting a precise alignment with the thermal and cooling demands of the buildings. This strategic approach ensures an optimal configuration of the CHP system, chiller, and heat pump, tailored to the unique energy needs of the mini campus.
4.4. Load Profile Estimation
The estimation of electrical, thermal, and cooling loads in
Table 5 for the campus buildings has been meticulously conducted, taking into account the Agrade classification in building standards. Emphasizing our commitment to sustainability goals and contemporary building standards, the calculations for thermal and cooling loads have been referenced from ASHRAE’s manual. Specifically, the guidelines outlined in ASHRAE Standard 169 and the ASHRAE Handbook of Fundamentals have been instrumental in ensuring that our campus aligns with the latest industry benchmarks.
5. Results
The microgrid designed for the minicampus has been specifically optimized to cater to typical conditions throughout the year, including summer, winter, and offseason days. The findings of this study, detailed in this paper, provide valuable insights into the effective management of the microgrid, particularly in response to seasonal variations. This comprehensive optimization approach enhances our understanding of how the microgrid adapts and performs under different climatic conditions, allowing for more informed and efficient operational strategies.
5.1. Analysis of Different Cases (Typical Days)
5.1.1. Typical Summer Day

Case considering Emobility Active and reactive power flowing in and out of the microgrid are considered here. On a typical summer day, the microgrid exhibits a dynamic and adaptive energy distribution pattern, as illustrated by the active and reactive power flow graph below in
Figure 4. During daylight hours, the availability of sunlight allows the PV system to significantly contribute to the power supply, covering a substantial portion of the energy demand. The CHP unit efficiently operates during the day due to the request from the grid to satisfy the load and at night when solar power is unavailable. As the sun sets, the graph reveals a shift in energy sources, with a notable presence of the CHP unit and an increasing contribution from the grid. Interestingly, the demand for electric mobility charging emerges, either directly from the grid or supplied by the CHP unit at night. An interesting trend can be seen for the reactive power request as we can see the photovoltaics are supplying reactive power services even at night with significant contributions from CHP and some from the wind turbine for the reactive power request.
Voltage profiles in
Figure 5 for all 7 buses are coherent with the above
Figure 4 as we can see the drop in the voltage when the request suddenly shoots giving rise to the voltage drop. Instead, if there is a drop in the request or an increase in the production of power, contributes to a voltage rise. The voltage fluctuations observed show a voltage drop during periods of elevated power requests and a voltage rise when production exceeds demand. Notably, the EMS adeptly maintained the voltage within the desired range of 0.9 to 1.1 [p.u.], effectively mitigating any adverse effects from the observed drops or rises in voltage.
The PV inverters semicircular capability curve has been shown in
Figure 6 with the real operating points. The figure doesn’t show points in the second quadrant as there is no absorption of inductive reactive power by RES plants in the presented case study:
Active and Reactive power flowing in and out of the different buses is shown in
Figure 7 respectively with some three buses out of 7 buses, it can be seen that bus 2 practically acts as a transition bus which completes the ring topology. The other two buses three and seven are the buses corresponding to the MCC building and Student accommodation respectively.
The profile of the car used by the professors and by the technician’s is shown in
Figure 8 The cars used by professors are typically present only in the daytime when the university is open and can be charged only at that time at the campus. Instead, the other car is owned by the university and used by technicians for office work and this car is V2G enabled.

Case without considering Emobility Active and reactive power flowing in and out of the microgrid in different buses on a typical summer day without considering Emobility is shown in
Figure 9. On a typical summer day, excluding the EV scenario, it is evident that the majority of the load demand is met by PV generation. In certain instances, there is even surplus energy available for sale to the external grid. Additionally, a portion of the load demand is fulfilled by CHP, contributing to a scenario where minimal energy is procured from the external grid.
Active and Reactive power flowing in different busses is shown in
Figure 9
5.1.2. Typical Winter Day
5.1.3. OffSeason Day
The offseason days, occurring between summer and winter, such as during spring or autumn, are characterized by minimal demand for heating and cooling in buildings. In this evaluation, we examined how the absence of heating and cooling requests during these transitional periods impacts the EMS operation.
6. Conclusions
The proposed EMS permits precise control over both active and reactive power generated from diverse sources within the microgrid. It intricately examines power flows, with a focus on controllable inverters for RES and storage systems. This integration offers the potential to optimize the management of both active and reactive power, leading to improved voltage profiles and enhanced efficiency in power exchange with the external network.
The introduction of electric mobility into the microgrid infrastructure introduces potential challenges, including voltage drops and overloaded branches, especially in unregulated EV charging scenarios. The EMS steps in as a solution by implementing intelligent charging strategies and harnessing V2G technology. Through the EMS, the microgrid gains the ability to utilize electric vehicles strategically, mitigating the variability associated with RES and elevating overall grid reliability.
Efficiently coupling RES sources and electric mobility within the microgrid has the potential to render it quasiindependent from the external network, leading to reduced operating costs and emissions. As a prospect for future research, a sensitivity analysis will be conducted to evaluate the impact of different technologies on microgrid functionality.
Author Contributions
Conceptualization, A.S., S.B. and B.B.; methodology, A.S., S.B. and B.B.; software, A.S.; data curation, A.S.; writing—original draft preparation, A.S.; writing—review and editing, S.B.; visualization, A.S.; supervision, F.D., S.B.; project administration, F.D.; funding acquisition, F.D., S.B. All authors have read and agreed to the published version of the manuscript.
Data Availability Statement
Data cannot be disclosed due to confidentiality reasons.
Conflicts of Interest
The authors declare no conflict of interest.
Abbreviations
The following abbreviations are used in this manuscript:
EMS 
Energy Management System 
RES 
Renewable Energy Sources 
MILP 
Mixed Integer Linear Programming 
MINLP 
Mixed Integer NonLinear Programming 
LF 
Load Flow 
PED 
Positive Energy District 
REC 
Renewable Energy communities 
CHP 
Combined Heat and Power 
AC 
alternating Current 
DC 
Direct Current 
V2G 
Vehicle To Grid 
PV 
Photo Voltaic 
SOC 
State of Charge 
COP 
Coefficient of performance 
EER 
Energy Efficiency Ratio 
EV 
Electric vehicle 
MCC 
Microgrid Control Centre 
DCFC 
DC Fast Chargers 
HP 
Heat Pump 
CEI 
Comitato Elettrotecnico Italiano 
BESS 
Battery Energy Storage System 
SEB 
Smart Energy Building 
SET 
Strategic Energy Technology Plan 
GHG 
Green House Gas 
DER 
Distributed Energy sources 
MG 
Microgrid 
IRENA 
International Renewable Energy Agency 
IEA 
International Energy Agency 
Appendix A
Appendix A.1. Mathematical Formulas and Definitions
The following section presents the supplementary data and formulas essential for the MILP model.
${P}_{b,r,t}^{\mathrm{RES},\phantom{\rule{4.pt}{0ex}}\mathrm{av}}$: Available Power from RES [kW]
${A}_{b,r}^{\mathrm{RES}}$: Nominal apparent power of the RES inverter [kVA]
${A}_{b}^{\mathrm{CHP}}$: Nominal apparent power of the CHP inverter [kVA]
${f}_{b}^{P,\mathrm{CHP},\mathrm{alt}}$: Electrical power correction factor (altitude dependent)
${f}_{b,t}^{P,\mathrm{CHP},\mathrm{T}}$: Electrical power correction factor (temperature dependent)
${\lambda}_{b}^{\mathrm{th},\mathrm{CHP}}$ and ${\gamma}_{b}^{\mathrm{th},\mathrm{CHP}}$: Constant coefficients (experimentally evaluated)
${\alpha}_{b}^{f,CHP}$ and ${\beta}_{b}^{f,CHP}$: Constant coefficients related to partial load behavior
${C}^{\mathrm{Fuel},\mathrm{CHP}}$: Cost of Fuel for CHP [€/kWh]
It was decided to relate the maximum power
${P}_{b,t}^{\mathrm{el},\mathrm{CHP},\mathrm{max}}$ to the nominal electrical power
${P}_{b}^{\mathrm{el},\mathrm{CHP},\mathrm{nom}}$ as follows:
where
${f}_{b}^{P,\mathrm{CHP},\mathrm{alt}}$ and
${f}_{b,t}^{P,\mathrm{CHP},\mathrm{T}}$ are two correction factors:
${f}_{b}^{P,\mathrm{CHP},\mathrm{alt}}$ depends on the altitude of the installation site, while
${f}_{b,t}^{P,\mathrm{CHP},\mathrm{T}}$ depends on the ambient temperature
${T}_{t}^{\mathrm{amb}}$.
${P}_{b,t}^{\mathrm{th},\mathrm{CHP},\mathrm{max}}$ represents the maximum thermal power which can be produced by the unit and is calculated as a function of the temperature (
${T}_{b,t}^{w,in,CHP}$) of the water coming back from the users:
${P}_{b,t}^{\mathrm{f},\mathrm{CHP},\mathrm{max}}$ is the maximum primary power which can be absorbed, calculated as follows:
where
${\eta}_{b,t}^{\mathrm{el},\mathrm{CHP},\mathrm{max}}$ represents the electrical efficiency of the CHP when it works at the maximum power. It depends on the altitude of the site and environmental conditions:
where
${f}_{b}^{\eta ,\mathrm{CHP},\mathrm{alt}}$ and
${f}_{b,t}^{\eta ,\mathrm{CHP},\mathrm{T}}$ are two reduction factors. Specifically,
${f}_{b}^{\eta ,\mathrm{CHP},\mathrm{alt}}$ considers the altitude of the site, while
${f}_{b,t}^{\eta ,\mathrm{CHP},\mathrm{T}}$ deals with the influence of ambient temperature
${T}_{t}^{\mathrm{amb}}$.
${\eta}_{b}^{\mathrm{el},\mathrm{CHP},\mathrm{nom}}$ indicates the nominal electrical efficiency of the CHP, evaluated at 15 °C ambient temperature, 101325 Pa ambient pressure, and 60% ambient relative humidity.
${P}_{b,t}^{\mathrm{el},\mathrm{active}}$: Active Power Electrical demand [kW]
${Q}_{b,t}^{\mathrm{el},\mathrm{reactive}}$: Reactive Power Electrical demand [kVAR]
${P}_{\mathrm{buy},\mathrm{max}}$: Maximum power bought from the national grid [kW]
${P}_{\mathrm{sell},\mathrm{max}}$: Maximum power sold to the national grid [kW]
${B}_{t}^{\mathrm{el}}$: Price of electricity bought [€/kWh] the price of the electricity to be bought has dynamic pricing depending upon the time slots set by the distribution company based on the F1, F2, and F3 slots as shown below in
Figure A1:
${r}_{t}^{\mathrm{el}}$: Revenue for electricity sold [€/kWh]
${q}_{t}^{\mathrm{el}}$: Price of Reactive power bought [€/kVAR]
${s}_{t}^{\mathrm{el}}$: Revenue for Reactive power sold [€/kVAR]

${C}^{\mathrm{curt},\mathrm{RES}}$: Cost of curtailment for RES [€/kWh]
To assess the costs specified in the objective function of the optimization model, certain input data must be supplied. Curtailment costs for the RESs have been considered equal to the LCOE for the respective technology and the price of the fuel is at par with the market price:
${C}^{\mathrm{curt}\_\mathrm{PV}}=0.128\phantom{\rule{0.166667em}{0ex}}\left[\u20ac/\mathrm{kWh}\right]$, ${C}^{\mathrm{curt}\_W}=0.6\phantom{\rule{0.166667em}{0ex}}\left[\u20ac/\mathrm{kWh}\right]$, ${C}^{\mathrm{fuel}\_\mathrm{CHP}}=0.1137\phantom{\rule{0.166667em}{0ex}}\left[\u20ac/\mathrm{kWh}\right]$
Figure A1.
Reference for the dynamic pricing for active power bought where F1=0.35[€/kWh], F2=0.25[€/kWh], F3=0.15[€/kWh].
Figure A1.
Reference for the dynamic pricing for active power bought where F1=0.35[€/kWh], F2=0.25[€/kWh], F3=0.15[€/kWh].
${A}^{T}$: Nominal apparent power of the transformer [kVA]
${V}^{N1}$: Nominal voltage (line to line) primary side [kV]
${V}^{N2}$: Nominal voltage (line to line) secondary side [kV]
${P}^{\mathrm{CC}}$: On Load loss of the transformer [W]

${v}^{\mathrm{SC}}$: Short circuit voltage of the transformer []
The parameters for the transformer system are as follows: ${A}^{T}=800\phantom{\rule{0.166667em}{0ex}}\mathrm{kVA}$, ${V}^{N1}=15\phantom{\rule{0.166667em}{0ex}}\mathrm{kV}$, ${V}^{N2}=0.4\phantom{\rule{0.166667em}{0ex}}\mathrm{kV}$, ${P}^{CC}=8000\phantom{\rule{0.166667em}{0ex}}\mathrm{W}$, and ${v}^{SC}=0.06$.
${\eta}^{\mathrm{ch},\mathrm{ESS}}$, ${\eta}^{\mathrm{dch},\mathrm{ESS}}$: Charging and discharging efficiencies
${P}_{b}^{\mathrm{max},\mathrm{ch},\mathrm{ESS}}$, ${P}_{b}^{\mathrm{max},\mathrm{dch},\mathrm{ESS}}$: Max charging and discharging power [kW]
${P}_{b}^{\mathrm{min},\mathrm{ch},\mathrm{ESS}}$, ${P}_{b}^{\mathrm{min},\mathrm{dch},\mathrm{ESS}}$: Min charging and discharging power [kW]
${A}_{b}^{\mathrm{ESS}}$: Nominal apparent power of the electrical storage inverter [kVA]
${C}_{b}^{\mathrm{ESS}}$: Rated capacity of the storage system [kWh]
${N}^{\mathrm{ESS}}$: Number of batteries
${\mathrm{SOC}}^{\mathrm{min},\mathrm{ESS}}$, ${\mathrm{SOC}}^{\mathrm{max},\mathrm{ESS}}$: Min and max state of charge [
${\tau}^{\mathrm{ESS}}$: Ideal selfdischarging rate
$\Delta $: Time interval, where $\Delta $=0.25
${P}_{b,j,v}^{\mathrm{max},\mathrm{ch},\mathrm{AC}}$, ${P}_{b,e,v}^{\mathrm{max},\mathrm{ch},\mathrm{DC}}$, ${P}_{b,f,v}^{\mathrm{max},\mathrm{ch},\mathrm{V}2\mathrm{G}}$: Max charging powers [kW]
${P}_{b,f,v}^{\mathrm{max},\mathrm{dch},\mathrm{V}2\mathrm{G}}$: Max discharging power V2G [kW]
${y}_{v,t}^{\mathrm{EV}}$: EV availability
${\mathrm{SOC}}_{v}^{\mathrm{min},\mathrm{EV}}$, ${\mathrm{SOC}}_{v}^{\mathrm{max},\mathrm{EV}}$: Min and max state of charge [%]
${\mathrm{SOC}}_{v}^{\mathrm{ini}}$: Initial state of charge
${\mathrm{SOC}}_{v}^{*}$, ${\mathrm{SOC}}_{v}^{**}$: State of charge at arrival and departure [%]
${C}_{v}^{\mathrm{EV}}$: Capacity of EV battery [kWh]
${\eta}^{\mathrm{ch},\mathrm{AC}}$, ${\eta}^{\mathrm{ch},\mathrm{DC}}$: Charging efficiencies for AC and DC chargers
${\eta}^{\mathrm{ch},\mathrm{V}2\mathrm{G}}$, ${\eta}^{\mathrm{dch},\mathrm{V}2\mathrm{G}}$: Charging and discharging efficiencies for V2G chargers
${F}_{v}^{\mathrm{EV}}$: Vehicle Consumption [kWh/km]
${D}_{v,t}^{\mathrm{EV}}$: Vehicle demand [km]
${\tau}^{\mathrm{dis}}$: Factor for calculating selfdischarging
${\gamma}_{b}^{\mathrm{HP}}$, ${\sigma}_{b}^{\mathrm{HP}}$, ${\psi}_{b}^{\mathrm{HP}}$: Constants from product data sheets
${T}_{b,t}^{\mathrm{amb}}$: Ambient temperature
${\pi}_{b}^{\mathrm{HP}}$: Constant from product data sheets
${\mathrm{COP}}_{b,t}^{\mathrm{HP}}={\gamma}_{b}^{\mathrm{HP}}\xb7{T}_{b,t}^{\mathrm{amb}}+{\sigma}_{b}^{\mathrm{HP}}$: COP of Heat pump
${\mathrm{EER}}_{b,t}^{\mathrm{HP}}={\psi}_{b}^{\mathrm{HP}}\xb7{T}_{b,t}^{\mathrm{amb}}+{\pi}_{b}^{\mathrm{HP}}$: EER of Heat pump
${P}_{b,t}^{\mathrm{th},\mathrm{HP},\mathrm{max}}\left({T}_{b,t}^{\mathrm{amb}}\right)$: Max thermal power by Heat pump (temperature dependent)

${P}_{b,t}^{\mathrm{cool},\mathrm{HP},\mathrm{max}}\left({T}_{b,t}^{\mathrm{amb}}\right)$: Max cooling power by Heat pump (temperature dependent)
The values of the required variables for the heat pump that are required for the optimization are as follows:
${\gamma}_{b}^{\mathrm{HP}}=0.07$, ${\sigma}_{b}^{\mathrm{HP}}=2.6$, ${\psi}_{b}^{\mathrm{HP}}=0.1$, and ${\pi}_{b}^{\mathrm{HP}}=5$.
${P}_{b}^{\mathrm{th},\mathrm{chiller},\mathrm{min}}$: Min thermal output of chiller
${P}_{b}^{\mathrm{th},\mathrm{chiller},\mathrm{max}}\left({T}_{b,t}^{\mathrm{amb}}\right)$: Max output of chiller (temperature dependent)
${\rho}_{b}^{\mathrm{chiller}}$: Factor for converting cooling energy to electrical energy

Additional data: ${\epsilon}_{b}^{\mathrm{heating}}$, ${\epsilon}_{b}^{\mathrm{cool}}$, ${\epsilon}_{b}^{\mathrm{chiller}}$, ${L}_{b,t}^{\mathrm{th}}$, ${L}_{b,t}^{\mathrm{cool}}$
The values of the required variables for the chiller that are required for the optimization are as follows:
${\rho}_{b}^{\mathrm{chiller}}=0.10$. The efficiencies for heating, cooling, and the chiller are ${\u03f5}_{b}^{\mathrm{heating}}=0.92$, ${\u03f5}_{b}^{\mathrm{cool}}=0.92$, and ${\u03f5}_{b}^{\mathrm{chiller}}=0.95$ respectively.
References
 GSR2022full report, “RENEWABLES 2022 GLOBAL STATUS REPORT,” January 20, 2022, https://www.ren21.net/wpcontent/uploads/2019/05/GSR2022_Full_Report.pdf.
 Net Zero Tracker, “PostCOP26 Snapshot”, Available online: https://zerotracker.net/analysis/postcop26snapshot, accessed January 19, 2022.
 Ibid.; T. Gillespie, J. Starn and I. Almeida, “Europe’s Power Crunch Shuts Down Factories as Prices Hit Record,” Bloomberg, December 22, 2021, https://www.bloomberg.com/news/articles/20211222/europeanpowersurgestorecordasfrancefaceswintercrunch; US Energy Information Administration (EIA),“Wholesale Electricity Prices Trended Higher in 2021 Due to Increasing Natural Gas Prices,” Today in Energy, January 7, 2022, https://www.eia.gov/todayinenergy/detail.php?id=50798.
 Carbon Brief, “COP26: Key Outcomes Agreed at the UN Climate Talks in Glasgow”, November 15, 2021, https://www.carbonbrief.org/cop26keyoutcomesagreedattheunclimatetalksinglasgow.
 COP26, “COP26 Presidency Outcomes: The Climate Pact,” November 2021, https://ukcop26.org/wpcontent/uploads/2021/11/COP26PresidencyOutcomesTheClimatePact.pdf.
 F. Harvey, J. Ambrose and P. Greenfield, “More than 40 Countries Agree to Phase out CoalFired Power,” The Guardian, November 3, 2021, https://www.theguardian.com/environment/2021/nov/03/morethan40countriesagreetophaseoutcoalfiredpower; Global Energy Monitor, “Global Ownership of Coal Plants,” Global Coal Plant Tracker, https://globalenergymonitor.org/projects/globalcoalplanttracker/summarytables, accessed February 18, 2022.
 IEA, op. cit. note 41; IRENA, World Energy Transitions Outlook 2021, 2021, https://irena.org/publications/2021/Jun/WorldEnergyTransitionsOutlook.

https://re.jrc.ec.europaeu/pvg_tools/en/.
 A. Sawhney, S. Bracco, F. Delfino and B. Bonvini, "Optimal planning and operation of a small size Microgrid within a Positive Energy District," 2022 AEIT International Annual Conference (AEIT), Rome, Italy, 2022, pp. 16. [CrossRef]
 Zia MF, Elbouchikhi E, Benbouzid M. Microgrids energy management systems: A critical review on methods, solutions, and prospects. Appl Energy 2018;222:1033–55. [CrossRef]
 Chen C, Duan S, Cai T, Liu B, Hu G. Smart energy management system for optimal microgrid economic operation. IET Renew Power Gener 2011;5(3):258–67.
 F. Katiraei, R. Iravani, N. Hatziargyriou, and A. Dimeas, “Microgrids management,” IEEE Power Energy Mag., vol. 6, no. 3, pp. 54–65, May 2008. [CrossRef]
 L. N. An and N.T. Lam T. Q. Tuan, "Optimal energy management strategies of microgrids", IEEE Computational Intelligence (SSCI), 69 Dec. 2016. [CrossRef]
 N. Zaree and V. Vahidinasab, "An MILP formulation for centralized energy management strategy of microgrids," 2016 Smart Grids Conference (SGC), Kerman, Iran, 2016, pp. 18. [CrossRef]
 E. Derkenbaeva, S. Halleck Vega, G.J. Hofstede and E. van Leeuwen, "Positive energy districts: Mainstreaming energy transition in urban areas", Renewable and Sustainable Energy Reviews, vol. 153, pp. 111782, 2022. [CrossRef]
 IEA EBC Annex 83. Positive energy districts, 2020. [CrossRef]
 S. Bossi, C. Gollner and S. Theierling, "Towards 100 positive energy districts in europe: Preliminary data analysis of 61 european cases", Energies, vol. 13, no. 22, 2020. [CrossRef]
 O. Lindholm, H. u. Rehman and F. Reda, "Positioning positive energy districts in european cities", Buildings, vol. 11, no. 1, 2021. [CrossRef]
 "Urban Europe", Available online:: https://jpiurbaneurope.eu/.
 "Urban Europe – Europe towards positive energy districts: A compilation of projects towards sustainable urbanization and the energy transition – First Update", February 2020.
 Alpine Space EU, Available online: https://www.alpinespace.eu/projects/alpgrids/en/home.
 "Savona Campus", Available online: https://campussavona.unige.it/en/.
 "Energia 2020 project", Available online: http://www.energia2020.unige.it/en/home/.
 IRE Liguria, Available online: http://www.ireliguria.it/eng.html.
 G. Bianco, B. Bonvini, S. Bracco, F. Delfino, P. Laiolo and G. Piazza, "Key Performance Indicators for an Energy Community based on sustainable technologies", Sustainability, vol. 13, no. 16, 2021. [CrossRef]
 R. H. Byrne, T. A. Nguyen, D. A. Copp, B. R. Chalamala and I. Gyuk, "Energy Management and Optimization Methods for Grid Energy Storage Systems," in IEEE Access, vol. 6, pp. 1323113260, 2018. [CrossRef]
 European Alternative Fuels Observatory, Available online: https://alternativefuelsobservatory.ec.europa.
Figure 1.
Exsisting Savona campus and Pilot project site.
Figure 1.
Exsisting Savona campus and Pilot project site.
Figure 2.
The microgrid’s architecture with its components.
Figure 2.
The microgrid’s architecture with its components.
Figure 3.
Cars Demand profile graphs.
Figure 3.
Cars Demand profile graphs.
Figure 4.
Active and Reactive power flow on a typical summer day.
Figure 4.
Active and Reactive power flow on a typical summer day.
Figure 5.
Voltage profiles of all the 7 buses.
Figure 5.
Voltage profiles of all the 7 buses.
Figure 6.
PV inverter capability curve. Pink stars represent the hourly operating points of the inverter. The yellow semicircular line represents the nonlinearized capability curve of the inverter. The blue dashed line represents the rectangular capability curve chosen for the PV technology.
Figure 6.
PV inverter capability curve. Pink stars represent the hourly operating points of the inverter. The yellow semicircular line represents the nonlinearized capability curve of the inverter. The blue dashed line represents the rectangular capability curve chosen for the PV technology.
Figure 7.
Active and Reactive power flow across different buses in [kW] and [kVAR] respectively.
Figure 7.
Active and Reactive power flow across different buses in [kW] and [kVAR] respectively.
Figure 8.
EV 1 and 9 Demand, SOC and EV’s charging and discharging power.
Figure 8.
EV 1 and 9 Demand, SOC and EV’s charging and discharging power.
Figure 9.
Active and reactive power flow in the bus 2, bus 3, bus 7.
Figure 9.
Active and reactive power flow in the bus 2, bus 3, bus 7.
Figure 10.
Active and reactive power balance of microgrid on typical winter day with Emobility.
Figure 10.
Active and reactive power balance of microgrid on typical winter day with Emobility.
Figure 11.
Voltage profile of different buses on typical winter day With EV.
Figure 11.
Voltage profile of different buses on typical winter day With EV.
Figure 12.
Active and Reactive power flow in different buses with EV on typical winter day.
Figure 12.
Active and Reactive power flow in different buses with EV on typical winter day.
Figure 13.
Profile of car 1 and car 8 with demand, SOC and charging and discharging power.
Figure 13.
Profile of car 1 and car 8 with demand, SOC and charging and discharging power.
Figure 14.
Active and Reactive power flow in different buses without EV on typical winter day.
Figure 14.
Active and Reactive power flow in different buses without EV on typical winter day.
Figure 15.
Active and reactive power balance of microgrid on typical offseason day with Emobility.
Figure 15.
Active and reactive power balance of microgrid on typical offseason day with Emobility.
Figure 16.
Voltage profile for different buses for a typical offseason day.
Figure 16.
Voltage profile for different buses for a typical offseason day.
Figure 17.
Car 9 and car 13 Demand profile, SOC and charging and discharging power.
Figure 17.
Car 9 and car 13 Demand profile, SOC and charging and discharging power.
Figure 18.
Active and reactive power flow across different profiles on an offseason day.
Figure 18.
Active and reactive power flow across different profiles on an offseason day.
Table 1.
Selected Cars and their specifications.
Table 1.
Selected Cars and their specifications.
Car Model number 
Charging Mode 
Battery Type 
Total no
of Cars 
Battery
useable capacity
[kWh] 
Range
[km] 
Vehicle
Consumption
[Wh/km] 
AC
charging
[kW] 
DC Fast
charging
[kW] 
V2G
charging
[kW] 
V2G
discharging
[kW] 
Audi Q8 etron 55 quattro 
AC/DC 
Lithiumion 
1 
106 
495 
214 
22 
50 
15 
0 
Nissan Leaf e+ 
AC/DC/V2G 
Lithiumion 
3 
59 
340 
174 
7 
46 
15 
7 
Tesla Model X Plaid 
AC/DC 
Lithiumion 
1 
95 
455 
209 
11 
50 
15 
0 
Renault Kangoo ETech Electric 
AC/DC 
Lithiumion 
2 
44 
215 
205 
22 
50 
15 
0 
Fiat 500e Cabrio 
AC/DC 
Lithiumion 
2 
21 
135 
158 
11 
50 
15 
0 
Renault Zoe ZE50 R135 
AC/DC 
Lithiumion 
1 
52 
310 
135 
22 
46 
15 
0 
Nissan eNV200 Evalia 
AC/DC/V2G 
Lithiumion 
1 
22 
105 
210 
7 
46 
15 
7 
Smart EQ fortwo coupe 
AC 
Lithiumion 
3 
17 
100 
167 
22 
0 
0 
0 
Table 2.
Charging Station Data.
Table 2.
Charging Station Data.
Charging Station 
No of Chargers 
Max Power [kW] 
AC 
2 
22 
DC 
2 
50 
V2G^{4}

2 
15 
Table 3.
Size of different Technologies.
Table 3.
Size of different Technologies.
Bus Number 
Size of PV plant [kWp] 
Size of CHP engine [kWel] 
Size of $\mathit{\mu}$ Wind turbine [kW] 
BESS Size [kWh] 
BUS 1 
0 
0 
0 
0 
BUS 2 
0 
0 
0 
0 
BUS 3 
45.57 
35 
0 
0 
BUS 4 
0 
0 
10 
0 
BUS 5 
12.06 
0 
0 
360 
BUS 6 
12.06 
0 
0 
0 
BUS 7 
81.07 
0 
0 
0 
Table 4.
Technology Data
Technology 
Thermal Capacity [kWth] 
Cooling Capacity [kWcool] 
Absorption Chiller 
0 
52.7 
CHP^{1}

74 
0 
Heat Pump^{2,3}

43.4 
49 
Table 5.
Building Data
Building 
Electrical Peak Load (kWel) 
Thermal Peak Load [kWth] 
Cooling peak Load [kWcool] 
MCC Building 
99 
16.05 
40.3 
Students Accommodation 
30 
30.44 
35.8 

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. 
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).