Next Article in Journal
The Post-Harvest Application of UV-C Rays: Effects on the Shelf Life and Antioxidants of Fresh Green Asparagus (Asparagus officinalis L.)
Previous Article in Journal
Synthetic Data Generation for Machine Learning-Based Hazard Prediction in Area-Based Speed Control Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Sizing of Battery Energy Storage System for Implicit Flexibility in Multi-Energy Microgrids

by
Andrea Scrocca
,
Maurizio Delfanti
and
Filippo Bovera
*
Department of Energy, Politecnico di Milano, Via Lambruschini 4a, 20156 Milan, Italy
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(15), 8529; https://doi.org/10.3390/app15158529
Submission received: 27 June 2025 / Revised: 27 July 2025 / Accepted: 29 July 2025 / Published: 31 July 2025
(This article belongs to the Special Issue Innovative Approaches to Optimize Future Multi-Energy Systems)

Abstract

Featured Application

The proposed mixed-integer linear programming (MILP) model can be flexibly applied to a wide range of multi-energy systems to assess their techno-economic performance under optimal scheduling. By relying solely on the billing structure, it is particularly well-suited for real-world distributed applications, such as urban districts that do not actively participate in electricity markets.

Abstract

In the context of urban decarbonization, multi-energy microgrids (MEMGs) are gaining increasing relevance due to their ability to enhance synergies across multiple energy vectors. This study presents a block-based MILP framework developed to optimize the operations of a real MEMG, with a particular focus on accurately modeling the structure of electricity and natural gas bills. The objective is to assess the added economic value of integrating a battery energy storage system (BESS) under the assumption it is employed to provide implicit flexibility—namely, bill management, energy arbitrage, and peak shaving. Results show that under assumed market conditions, tariff schemes, and BESS costs, none of the analyzed BESS configurations achieve a positive net present value. However, a 2 MW/4 MWh BESS yields a 3.8% reduction in annual operating costs compared to the base case without storage, driven by increased self-consumption (+2.8%), reduced thermal energy waste (–6.4%), and a substantial decrease in power-based electricity charges (–77.9%). The performed sensitivity analyses indicate that even with a significantly higher day-ahead market price spread, the BESS is not sufficiently incentivized to perform pure energy arbitrage and that the effectiveness of a time-of-use power-based tariff depends not only on the level of price differentiation but also on the BESS size. Overall, this study provides insights into the role of BESS in MEMGs and highlights the need for electricity bill designs that better reward the provision of implicit flexibility by storage systems.

1. Introduction

In recent years, regulatory initiatives have increasingly focused on promoting distributed renewable energy generation, enhancing energy efficiency, and electrifying sectors such as transportation and space heating [1,2]. Within this framework, multi-energy systems (MESs) have emerged as a key enabler of an efficient and sustainable energy transition. MESs are defined as integrated systems that simultaneously coordinate the generation, conversion, transmission, distribution, storage, and consumption of multiple energy carriers—such as electricity, thermal energy, natural gas, and hydrogen—across both planning and operational timeframes [3]. This systemic integration enhances the flexibility and efficiency of energy infrastructures, facilitating the effective utilization of renewable energy sources (RESs), strengthening energy supply security, and reducing greenhouse gas (GHG) emissions.
Among the various implementations of MESs, district multi-energy systems (D-MESs) and multi-energy microgrids (MEMGs) have attracted significant attention due to their ability to harness local synergies at the community or district scale—an especially relevant aspect given that urban areas account for approximately 75% of global energy consumption [4]. D-MESs typically serve in mixed-use urban or semi-urban zones by coordinating diverse energy demands—residential, commercial, and industrial—through integrated multi-vector infrastructures [5]. MEMGs, on the other hand, are distributed energy systems that combine local renewable generation, energy storage, and flexible loads to efficiently meet both electrical and thermal requirements. They offer high operational flexibility and resilience, with the optional added capability of functioning autonomously from the main grid if needed [6].
By implementing smart scheduling algorithms and advanced control systems, MESs enable the coordinated and dynamic management of multiple energy vectors, delivering different benefits [7]:
  • Efficient resource utilization, achieved through cogeneration, energy storage integration, and waste heat recovery.
  • Decarbonization of transportation, supported by sustainable charging infrastructures for electric vehicles (EVs) powered by renewable distributed energy resources (DERs).
  • Economic advantages, derived from economies of scale, improved operational efficiency, and reduced energy costs through demand-side management.
  • Environmental and air quality improvements, facilitated by the substitution of fossil fuels with clean energy sources and enhanced system-wide energy efficiency.
The optimization of MES planning, design, and operations has been widely studied, with numerous works analyzing different configurations, technologies, and control strategies to maximize system performance and support energy transition objectives.

1.1. Literature Review

Several studies in the literature investigate the optimal planning of MES deployment. For instance, Rowe et al. [8] propose a bi-level optimization framework for the joint siting, sizing, and operation of multiple interconnected MES within a large-scale integrated energy system (IES) comprising coupled electricity, gas, and heat networks. Their work addresses the theme of co-optimizing the deployment of multiple MES units across hybrid energy infrastructures while explicitly considering peer-to-peer (P2P) energy trading and demand response (DR) programs. The proposed model aims to minimize both investment and operational costs while enhancing the overall IES performance. To validate their approach, the authors apply it to a case study involving a 16-bus, 33 kV electricity distribution network, a 30-node district heating network, and a 20-node gas network. The results highlight the model’s ability to identify optimal locations, component sizes, and configurations for energy hubs, achieving substantial cost savings and improved network performance. Similarly, Xu et al. [9] develop a resilience-oriented multi-agent planning framework for interconnected microgrid clusters, incorporating P2P energy trading and the impact of extreme events. Their model minimizes planning costs while ensuring resilience against both internal uncertainties (e.g., renewable variability, load fluctuations) and external transaction disruptions. Key contributions include a linearized formulation, an incentive-compatible P2P pricing strategy derived from the dual problem, and a privacy-preserving distributed solution method. Case studies on islanded microgrids show that the proposed framework achieves economic efficiency, enhanced resilience, and stakeholder privacy.
Several studies specifically address the optimal sizing of MES components. Rajendran et al. [10] develop a multi-objective planning framework for sizing components (PV, wind, electric and thermal storage, CHP, and heat pumps) in a standalone MEMG. The model aims to balance system costs, renewable energy integration, and curtailment shares while considering the interaction between electric and thermal networks. The optimization problem is solved using NSGA-II to generate Pareto-optimal solutions, with TOPSIS helping to select the best configuration based on weighted criteria. A novel indicator, the relative grid size (RGS), is introduced to quantify the balance between electric and thermal infrastructure. The model is applied to a Norwegian case study with 30 households, and the results reveal that high renewable shares (>70%) significantly increase curtailment and costs, while a balanced RGS (~1.11) improves system resilience. The optimal renewable share is found to lie between 50% and 70%, achieving a balanced trade-off among cost, sustainability, and efficiency. Glücker et al. [11] investigate the impact of explicitly modeling the thermal vector on the optimal sizing of battery energy storage systems (BESSs) in a local MES. Using a non-convex, mixed-integer, quadratically constrained programming formulation and the COMANDO framework, they compare two system architectures: one that includes explicit thermal modeling (covering heat pump behavior, building thermal inertia, and the heating network) and one that assumes an all-electric demand. Based on two case studies in Germany (a single building and a local energy community), under varying electricity tariffs and solar irradiation levels, the results show that neglecting the thermal vector leads to BESS oversizing, higher annual costs (up to 8%), and a greater environmental impact. The oversizing effect is particularly pronounced under time-varying tariffs and high solar scenarios. Similarly, Bruno et al. [12] address the challenge of optimal sizing and operation of electric and thermal storage within a net-zero multi energy system (NZMES), investigating how different storage technologies and renewable energy mixes influence overall system costs and self-sufficiency. Their study couple long-term planning with short-term operational optimization through a predictive control strategy, formulating daily dispatch problems as MILP models. A case study of a Polish rural village demonstrates that combining diverse RES sources (PV and wind) generally yields lower levelized costs of energy and higher self-sufficiency compared to PV-only scenarios due to more stable generation profiles. The results highlight that thermal energy storage (TES) often proves more cost-effective than BESS when excess electricity can be sold, while BESS becomes complementary in PV-dominant or zero-export price contexts in managing higher intermittency and enhance self-consumption. The study underlines the trade-off between pursuing high self-sufficiency and managing energy costs, emphasizing that energy policy frameworks and export incentives significantly affect the optimal sizing of storage technologies in an NZMES.
Many studies in the literature focus on optimizing the operation of already-designed MESs from both economic and environmental perspectives. Liu et al. [13] propose a multi-objective optimization approach for IES, incorporating exergy analysis to account for both the quantity and quality of energy. The approach aims to optimize economics, environmental impact, and energy efficiency while addressing the challenge of long solution times in multi-objective optimization. To overcome this, they introduce a variable step-size approximation method, reducing solution time by up to 97.84% compared to the traditional methods. The TOPSIS method is used for decision-making to select the optimal solution. A case study demonstrates that including exergy efficiency in the optimization process provides a more comprehensive solution, balancing energy efficiency, operational costs, and GHG emissions. Li et al. [14] focus on optimizing the coordinated energy dispatch of a MEMG, highlighting the lack of studies on multi-energy scheduling in islanded mode. They propose an optimal scheduling method using MILP models to minimize net operational costs in the grid-connected mode and consider objectives such as minimizing fuel costs and emissions in islanded mode. A case study of the Semakau Island microgrid in Singapore demonstrates that the proposed method is effective in both modes, with distinct objectives for each. Dong et al. [15] develop a min–max optimization strategy to improve the operation of renewable energy-based combined cooling, heating, and power (CCHP) systems by addressing forecast errors in renewable energy sources and load. The goal is to minimize operational costs while enhancing system robustness under prediction errors. They introduce a model predictive control (MPC) approach, incorporating prediction errors into the optimization model. This strategy accounts for the dynamic behavior of storage units (batteries and thermal storage) and uses statistical and gray models for error forecasting. A case study of a hypothetical CCHP building in China show that the strategy effectively reduces the impact of forecasting uncertainties and minimizes operational costs. In a related context, Wang et al. [16] propose an online energy management strategy for grid-connected residential microgrids based on a prioritized sum-tree experience replay strategy with a double-delayed deep deterministic policy gradient (PSTER-TD3). By formulating the problem as a Markov decision process, they enhance convergence speed and achieve reliable optimization of electricity cost, thermal comfort, and electric vehicle charging, demonstrating the potential of advanced deep reinforcement learning for real-time multi-energy system control.
The concept of flexibility in MES is addressed from various perspectives in recent literature. Capuder et al. [17] propose a techno-economic and environmental framework for distributed multi-generation systems, demonstrating how the integration of technologies such as CHP, electric heat pumps, and TES allows systems to respond to electricity price signals while reducing emissions and improving energy savings. Vandermeulen et al. [18] focus on thermal networks, identifying the flexibility potential embedded in the thermal inertia of buildings and highlighting the role of hybrid control strategies—combining centralized optimization and decentralized decision-making—as an effective means to managing complex heating and cooling systems. Yang et al. [19] advance the discussion on dynamic flexibility by proposing a two-timescale MPC strategy to operate CHP units within IES, enabling the system to quickly respond to electrical fluctuations while maintaining indoor thermal comfort. Finally, Chicco et al. [20] introduce a conceptual and mathematical modeling approach based on multi-energy nodes and flexibility maps to quantify and visualize the flexibility potential of distributed MESs, highlighting how different forms of arbitrage and operational constraint relaxation can be exploited to support low-carbon energy systems.
Building on the flexibility potential highlighted in previous studies, several works have explored the economic benefits and technical challenges of providing ancillary services with MES. Mancarella and Chicco [21] develop a techno-economic framework to evaluate the participation of MESs in the provision of ancillary services, focusing on how these systems can explicitly offer flexibility to the electrical grid. Through numerical applications involving trigeneration systems in tertiary buildings and aggregated district heating loads, the authors illustrate how profitability maps can effectively visualize the conditions under which ancillary services provision becomes economically attractive. This approach shows that internal energy source switching within MESs can be leveraged to unlock new value streams in energy markets. Ceseña et al. [22] develop a techno-economic framework to assess the business case for an MEMG that simultaneously provides energy, frequency reserve, and reliability services. Their methodology combines a MILP model with sequential Monte Carlo simulations to account for dynamic, non-linear pricing signals, particularly for reliability services. Through application to two representative configurations—one with CHP and TES, the other with PV and BESS—connected to a real 11 kV distribution network, the study evaluates performances across various pricing scenarios. The results show that MEMGs can co-optimize service provision effectively, as synergies between energy arbitrage, reserve provision, and reliability support often emerge. Mancarella et al. [23] propose a techno-economic framework to assess the arbitrage potential of distributed MESs in providing explicit flexibility to the power grid via ancillary services, without compromising end-user comfort. The approach leverages energy shifting across electricity, heating, and cooling vectors. A novel indicator, the maximum profit electricity reduction (MPER), is introduced to quantify the optimal reduction in grid electricity input that maximizes profit under given availability and utilization fee structures. The framework relies on efficiency matrices and black-box modeling to simulate MES behavior and applies profit functions based on ancillary services remuneration. Through two case studies—one during winter and one during summer—the work demonstrates that significant economic gains can be achieved even with moderate electricity reductions, particularly in summer conditions with flexible cooling options. Overall, the results highlight the value of multi-vector flexibility for grid services, with MPER serving as a key metric for decision-making.

1.2. Contribution and Novelty

The literature review clearly shows that the economic potential of MESs to provide explicit flexibility—defined as the request from system operators to vary the scheduled power exchange through ancillary services or DR programs—has been extensively investigated. Likewise, the implicit flexibility of MESs, defined as the ability to optimize internal operations to reduce electricity bill costs mainly through energy arbitrage and peak shaving, has also been examined. However, to the best of the authors’ knowledge, no existing study has specifically assessed the economic value of implicit flexibility in an MES and how this value may vary under different system designs or operational strategies. While some studies (e.g., [24,25,26]) have addressed similar questions, they are limited to electric-only configurations and do not consider the multi-energy dimension. This study aims to fill that gap by investigating the optimal sizing of a BESS integrated into a real MEMG when considering the provision of implicit flexibility. To achieve this, a block-structured MILP model is developed to simulate the operation of all system components. The optimization framework, called HOMES (hierarchical optimization for multi-energy systems), is implemented in Python 3.11, using Pyomo library [27] for mathematical modeling and Gurobi [28] as the solver. The MEMG at the Leonardo Campus of Politecnico di Milano is the case study analyzed in this work [29].
Particular attention is given to accurately representing the structure of the natural gas and electricity bills (hereby referring to Italy), including the modeling of innovative schemes such as a peak shaving tariff linked to the capacity market’s remuneration and a negative electricity injection scheme allowed to storage assets—namely, energy withdrawn from the grid not for self-consumption but for later re-injection. The former has been introduced by Resolution 566/2021 of the Italian Regulatory Authority ARERA [30] and is intended to recover the costs associated to the Italian capacity market in a cost-reflective way. The latter, follows Resolution 109/2021 of ARERA [31] and indicates that withdrawn, stored, and re-injected energy is exempt from network charges, which can significantly impact the profitability of pure BESS arbitrage operations in behind-the-meter operations.
In addition, this paper focuses on the impact of the DAM price signal and the design of the power-based tariff on the MEMG’s optimal scheduling through two specific sensitivity analyses. First, it quantifies how much the DAM price daily spread would need to increase compared to current levels to make pure energy arbitrage economically attractive. Second, it explores how increasing the capacity-based charge during system-wide peak hours could further incentivize the MEMG to limit its maximum power withdrawal during those specific hours.
The focus on implicit flexibility is particularly relevant in real-world scenarios where access to the ancillary services market may be restricted, complex or economically unattractive for distributed MES. Moreover, by analyzing a real MEMG and incorporating the actual structure of the Italian gas and electricity bills, the study provides actionable insights that can support investment decisions and policy evaluations in the context of emerging prosumer-driven systems.
The main contributions of this study are threefold. First, it quantifies the economic value of integrating a BESS into an MEMG to provide implicit flexibility under the current Italian electricity bill scheme, highlighting how this value evolves with the battery’s size. Second, it proposes a novel modeling approach for negative injected electricity (NIE), offering insights into how regulatory changes may enhance the profitability of BESS energy arbitrage and prompt the self-dispatching capacity of MESs. Finally, it examines how modifications to the DAM price signal and power-based tariff design can incentivize grid-connected users to better respond to system needs.
The remainder of the paper is organized as follows. Section 2 describes the optimization model, detailing the representation of each MEMG component as well as the electric, thermal, and gas networks. Section 3 presents the case study and discusses the simulation results. Finally, Section 4 summarizes the key conclusions.

2. Methodology

In this study, we develop an energy management system (EMS) for the optimal daily scheduling of a multi-energy system (MES), named HOMES. HOMES adopts a block-based modeling approach, implemented using the Pyomo library [32]. This modeling framework enables the construction of hierarchical models, where components at the base level can be defined individually and independently in terms of sets, parameters, variables, and constraints, reflecting their physical characteristics. At a higher level, these components can be interconnected according to the physical and operational logic of the system under analysis.
Figure 1 provides a graphical representation of how the block-based modeling approach can be applied to an MES encompassing multiple energy vectors, such as electricity, heat, cooling, and natural gas.
On the right-hand side of the figure, we illustrate the base level of the hierarchical model, which includes a block for each type of component that could be present in a generic MES:
  • Loads: EL_LOAD (non-dispatchable electrical load), EV (electric vehicle charging demand), TH_LOAD (non-dispatchable thermal load), and COOL_LOAD (non-dispatchable cooling load).
  • Generation units: PV (photovoltaic power plant), WIND (wind turbine), BOILER (industrial boiler), CHP (combined heat and power; e.g., cogenerating internal combustion engine), GENSET (fossil-fuel-based electric generator), CCHP (combined cooling, heat, and power unit; e.g., cogenerating internal combustion engine combined with an absorption chiller), and HP (heat pump).
  • Storage units: BESS (electrochemical battery storage) and TES (thermal energy storage).
  • Interface units with external networks: POD (point of delivery), which represents the connection with the electricity grid and enables the modeling of electricity market interactions, and PDR (“Punto Di Riconsegna”) which represents the connection with the natural gas grid, similarly supporting market modeling for gas exchanges.
Each of these blocks can be defined independently using a dedicated collection of sets, parameters, variables, and constraints. The operational logic of each component is fully modular and does not depend on the definition of other components.
On the left-hand side of Figure 1, we illustrate a set of higher-level blocks that define the specific configuration of the MES under consideration. These blocks establish the interconnections between the base-level components for each energy vector:
  • EL_Circuit models the electricity balances, at a physical and commercial level.
  • TH_Circuit models the thermal energy balances.
  • COOL_Circuit models the cooling energy flows.
  • NG_Circuit models the natural gas flows.
The key variables from both the device blocks and the circuit blocks are incorporated into an objective function, which is formulated to either minimize (e.g., operational costs, CO2, or pollutant emissions) or maximize (e.g., self-consumption, revenues, comfort) a given performance metric depending on the specific optimization goals of the EMS.
The adoption of this block-based modeling approach is motivated by its high degree of flexibility, which allows the physical behavior of each component to be described generically and then integrated into a wide range of MES configurations. This enables the evaluation of the operational and economic impacts of adding or removing a component with minimal effort. For instance, it becomes straightforward to assess how the system’s performance and costs would change if a new technology were introduced or an existing one removed.
In the following sections, we provide a detailed description of HOMES, presenting the main equations used to model each component and circuit of the block-based framework developed for our case study, which will be introduced in Section 3.

2.1. Loads

In our case study, we only consider non-dispatchable electric, thermal, and cooling loads. From a modeling perspective, these loads are represented by the parameters P u , t E L l o a d , P u , t T H l o a d and P u , t C O O L l o a d , respectively, which are indexed by both unit u and time t. These parameters are treated as fixed inputs to the problem since their daily profiles are predefined and not subject to optimization. Consequently, to enable the use of HOMES for day-ahead scheduling, a dedicated forecasting model for energy loads or appropriate assumptions, must be adopted.

2.2. Generation Units

In our case study, the generation units considered are CHP systems, boilers, and PV power plants. The main equations used to model their operation are presented below.

2.2.1. CHP

First, we assume that the electrical and thermal efficiency curves could be approximated using piecewise linearization for each CHP unit u. Given the slope and intercept of each linear segment, Equation (1) and Equation (2) describe how the electrical and thermal outputs are related to the natural gas input, respectively:
p u , t E L C H P = i = 1 N p i e c e s C H P u Φ u , i E L C H P × p u , t F U E L C H P + Ω u , i E L C H P × y u , t i s O n C H P × y u , t , i e f f C H P ,
p u , t T H C H P = i = 1 N p i e c e s C H P u Φ u , i T H C H P × p u , t F U E L C H P + Ω u , i T H C H P × y u , t i s O n C H P × y u , t , i e f f C H P .
The selection of the specific linear segment of the CHP efficiency curves for each unit u at each time step t is governed by the set of binary variables y u , t , i e f f C H P , which are included in the following constraints to ensure modeling consistency:
i = 1 N p i e c e s C H P u y u , t , i e f f C H P = 1 ,
p u , t F U E L C H P Θ u , i L B f u e l C H P b i g M × 1 y u , t , i e f f C H P ,
p u , t F U E L C H P Θ u , i U B f u e l C H P + b i g M × 1 y u , t , i e f f C H P .
Additional constraints are imposed to ensure CHP units operate within their minimum and maximum allowable load limits:
P u M I N e l C H P × y u , t i s O n C H P p u , t E L C H P P u M A X e l C H P × y u , t i s O n C H P .
Furthermore, a CHP unit may be subject to operational constraints such as a minimum uptime—once switched on, it must remain operational for a certain period—and a minimum downtime—once switched off, it cannot be restarted immediately. To account for this behavior, two parameters have been introduced: t u m i n T i m e O n C H P and t u m i n T i m e O f f C H P . These are incorporated into the following constraints, which affect the binary variable indicating whether the CHP unit is shutting down or turning up during the time interval t:
y u , t i s S h u t t i n g D o w n C H P t t = t t u m i n T i m e O n C H P t y u , t t i s O n C H P t u m i n T i m e O n C H P ,
y u , t i s S t a r t i n g U p C H P 1 t t = t t u m i n T i m e O f f C H P t y u , t t i s O n C H P t u m i n T i m e O f f C H P .
It is also necessary to define a constraint that links the different binary variables used to model the CHP unit’s operational status, specifically its ON/OFF state, start-up, and shut-down phases:
y u , t i s S t a r t i n g U p C H P y u , t i s S h u t t i n g D o w n C H P = y u , t i s O n C H P y u , t 1 i s O n C H P ,
y u , t i s S t a r t i n g U p C H P + y u , t i s S h u t t i n g D o w n C H P 1 .
It is important to note that Equations (9) and (10) assume that the unit’s start-up and shut-down times are significantly shorter than are the model’s time resolution. In other terms, CHP power output variations are treated as instantaneous, allowing the unit to ramp its power output from minimum to maximum, or vice versa, within a single time step. This assumption is consistent with the operational behavior of internal combustion engines (ICEs) commonly used in CHP systems, which are characterized by fast response times and high operational flexibility. Finally, two additional constraints are introduced to account for the system’s operational cost evaluation:
c u O & M C H P = t = 1 T C u O & M C H P × y u , t i s O n C H P ,
e u , t F U E L e l P r o d C H P = p u , t E L C H P × Δ t × Υ u F U E L e l P r o d C H P .
Equation (11) computes the daily operation and maintenance (O&M) costs of each CHP unit based on the number of time steps during which the unit is operating. Equation (12), on the other hand, defines a variable representing the portion of fuel input to the CHP that is attributable solely to electricity production. This is particularly relevant in the Italian regulatory context, as this amount of natural gas benefits from reduced excise duties under Article 19 of Legislative Decree 119/2018 [33].

2.2.2. Boiler

Boiler modeling closely follows the approach described for the CHP unit. However, the boiler’s efficiency curve, which relates fuel input p u , t F U E L b o i l e r to thermal output p u , t T H b o i l e r , can be modeled using a simple linear approximation:
p u , t T H b o i l e r = Φ u b o i l e r × p u , t F U E L b o i l e r + Ω u b o i l e r × y u , t i s O n b o i l e r .
Like the CHP unit, boiler is subject to minimum and maximum load constraints, as well as minimum uptime and downtime requirements. O&M costs are calculated based on the boiler’s usage and a fixed cost-per-time step, as in (11). In this case, no fuel auxiliary variable is required, as all fuel consumption is dedicated solely to thermal energy production.

2.2.3. PV

In HOMES, the electrical power generation from each PV system u is treated as a parameter P u , t P V provided as input to the optimization model, similar to the treatment of non-dispatchable loads. As a result, to enable the use of HOMES for day-ahead scheduling, a dedicated forecasting model for PV generation or appropriate assumptions must be adopted.

2.3. Storage Units

In our case study, the only energy storage system considered is an electrochemical battery. For simplicity, a single BESS unit is modeled; therefore, none of the related parameters or variables are indexed over the unit set u. A fast piecewise model based on experimentally derived look-up tables (LUTs) is implemented. As demonstrated in [34], this approach significantly reduces computational time compared to other similar modeling methods while still ensuring a reliable and accurate representation of BESS operation.

BESS

The employed BESS model relies on four LUTs built from experimental data. Specifically, two LUTs derived from performance maps describe how AC-side power varies with the state of charge (SOC) and DC-side power—one for charging and one for discharging. Two additional capability LUTs capture how the maximum charging and discharging power changes across different SOC intervals. While a finer discretization improves the accuracy of BESS operation modeling, it also increases the computational load. A simplified version of the performance LUTs used in this study and the employed capability LUTs are provided in Figure 2 for illustrative purposes.
The performance LUTs implemented in this study use a 5% SOC discretization, with 299 data points for charging and 219 for discharging. The capability LUT is defined over just four SOC intervals, reflecting the fact that maximum charging power is limited only when SOC > 95% and that maximum discharging power is constrained only when SOC < 5%.
The equations below describe the implementation of the fast piecewise linear modeling approach. In this formulation, the AC-side and DC-side charge/discharge power variables are modeled as linear combinations of support points from the previously introduced LUTs, as shown in Equations (14)–(17). These constraints ensure that the same set of weighting coefficients y k , t c h a L U T and y k , t d i s L U T , treated as time-dependent decision variables in the optimization, is applied to both the AC and DC side variables, effectively selecting a specific charging or discharging operating point of the BESS. Equations (18) and (19) enforce that the sum of these coefficients equals one when the battery is charging or discharging, ensuring a valid convex combination of the corresponding LUT support points and zero otherwise. This behavior is controlled by the binary variables y t B E S S i s C h a r g i n g , y t B E S S i s D i s c h a r g i n g , and y t B E S S i s I d l e , which are constrained in Equation (20) to guarantee that the BESS is in exactly one operational mode—charging, discharging, or idle—at each time step t.
p t B E S S c h a D C = k = 1 K c h a L U T P k c h a D C L U T × y k , t c h a L U T ,
p t B E S S c h a A C = k = 1 K c h a L U T P k c h a A C L U T × y k , t c h a L U T ,
p t B E S S d i s D C = k = 1 K d i s L U T P k d i s D C L U T × y k , t d i s L U T ,
p t B E S S d i s A C = k = 1 K d i s L U T P k d i s A C L U T × y k , t d i s L U T ,
k = 1 K c h a L U T y k , t c h a L U T = y t B E S S i s C h a r g i n g ,
k = 1 K d i s L U T y k , t d i s L U T = y t B E S S i s D i s c h a r g i n g ,
y t B E S S i s C h a r g i n g + y t B E S S i s D i s c h a r g i n g + y t B E S S i s I d l e = 1 .
The charging and discharging power flows of the BESS are linked to its SOC through the following constraints. The same sets of coefficients used to represent the BESS operating point as a convex combination of the LUT support points y k , t c h a L U T and y k , t d i s L U T are also used to compute the SOC at each time step, as shown in Equation (21). The variable s o c t B E S S i d l e is introduced to represent the SOC during idle periods and is constrained to zero whenever the binary variable y t B E S S i d l e is zero. To ensure temporal consistency, Equation (22) enforces the SOC update by linking the SOC at the current time step to the SOC from the previous time step and the current DC power flow. In this formulation, t denotes the time step duration in hours, while P B E S S n o m and E B E S S n o m represent the nominal installed power and energy capacity of the BESS, respectively. Additionally, constraints are imposed to ensure that the SOC at the end of the day equals that at the beginning of the day, and that the SOC remains within predefined lower and upper bounds at all times.
s o c t B E S S = k = 1 K d i s L U T S O C k d i s L U T × y k , t d i s L U T + k = 1 K c h a L U T S O C k c h a L U T × y k , t c h a L U T + s o c t B E S S i d l e ,
s o c t B E S S = s o c t 1 B E S S + p t B E S S c h a D C p t B E S S d i s D C × P B E S S n o m × t E B E S S n o m .
The constraints reported in Equations (23)–(30) are used to model the BESS capability curves shown in Figure 2. In this case, the maximum charge and discharge powers are not fixed values but depend on the SOC range and are expressed as functions of the support points defined in the corresponding capability LUT, as shown in Equations (23) and (24). Unlike the previous LUT formulation, the variables y k , t c h a C a p L U T and y k , t d i s C a p L U T are binary, reflecting the fact that the BESS operating point must lie within one and only one of the SOC intervals into which the capability curve has been discretized. This is enforced by Equations (25) and (26), which require that the sum of the binary variables over the LUT support points equals one. Equations (27) and (28) ensure that the selected segment of the capability curve is consistent with the current SOC value. Finally, Equations (29) and (30) impose upper bounds on the BESS charge and discharge AC power flows, according to the selected segment of the capability curve.
p t B E S S c h a A C M A X = k = 1 K c h a C a p L U T P k c h a C a p L U T × y k , t c h a C a p L U T ,
p t B E S S d i s A C M A X = k = 1 K d i s C a p L U T P k d i s C a p L U T × y k , t d i s C a p L U T ,
k = 1 K c h a C a p L U T y k , t c h a C a p L U T = 1 ,
k = 1 K d i s C a p L U T y k , t d i s C a p L U T = 1 ,
k = 1 K c h a C a p L U T S O C k c h a C a p L U T × y k , t c h a C a p L U T s o c t B E S S k = 1 K c h a C a p L U T S O C k + 1 c h a C a p L U T × y k , t c h a C a p L U T ,
k = 1 d i s C a p L U T S O C k d i s C a p L U T × y k , t d i s C a p L U T s o c t B E S S k = 1 K d i s C a p L U T S O C k + 1 d i s C a p L U T × y k , t d i s C a p L U T ,
p t B E S S c h a A C p t B E S S c h a A C M A X ,
p t B E S S d i s A C p t B E S S d i s A C M A X .
As for the BESS O&M costs, we assume an annual cost of EUR 5 per installed kWh, consistent with the assumption made in [35]. This annual value is then scaled and expressed as a daily O&M cost C O & M B E S S .
Finally, the power consumed by the battery’s auxiliary systems is modeled through Equation (31). As shown, it depends on both the external temperature and the power flow processed by the BESS.
p t B E S S A u x = α B E S S A u x × T t e x t + β B E S S A u x + δ B E S S A u x × p t B E S S c h a A C + p t B E S S d i s A C × P B E S S n o m + γ B E S S A u x .

2.4. Interface Units with External Networks

In our case study, it is essential to model both the economic settlement of electricity exchanges with the grid and the costs associated with natural gas withdrawals. These modeling blocks are developed in HOMES based on the structure of actual electricity and gas bills, ensuring consistency with the Italian tariff framework regulated by ARERA [36].

2.4.1. POD

In HOMES, we assume that the system is regulated as a single POD for both injection and withdrawal of electricity. Accordingly, it is subjected to tariffs for energy consumption, transportation and metering services, system charges, and total taxes related to its withdrawal activities, while the injected power fed back into the grid is remunerated at the zonal market price of the Italian DAM, specifically for the NORD market zone in this case.
In this study, we consider the recently introduced peak shaving tariff in Italy, aimed at recovering the costs of the national capacity market. Introduced by ARERA through Resolution 566/2021 [30], this tariff is applied to all consumers and is composed of two parts: a primary component, applied during 500 peak hours annually identified by the Transmission System Operator (TSO), which covers the majority of the cost; and a secondary, lower-rate component, applied during all other hours of the year. This tariff is broadly aligned with Article 7a of EU Regulation 1747/2024 [37], which requires national system operators to define a peak shaving product to be procured within the ancillary services market under emergency conditions. While both instruments aim to ensure system adequacy during peak hours, the Italian tariff operates as a permanent and implicit mechanism, whereas the EU regulation introduces a temporary and explicit flexibility procurement scheme. Additionally, when considering a BESS, this study follows the principles set by ARERA’s Resolution 109/21, which defines a negative electricity injection scheme [31]. According to this regulation, the energy withdrawn by the storage system for the sole purpose of subsequent reinjection into the grid is not classified as consumed energy. As such, it is exempt from the standard withdrawal tariffs typically applied in electricity bills. Instead, this energy is treated as a negative injection and is settled at the zonal DAM price.
The first part of the modeling involves formulating constraints that for each time step t, identify the portion of power withdrawn from the grid that can be classified as negative injected electricity (NIE). The principle adopted in this study is based on comparing the battery’s power flows with the internal energy balance of the system. Specifically, during each time step t in which the BESS is charging, the model compares the battery’s charging power with the internally generated electricity p t P O D p r o d , which may originate from sources such as CHP units and/or PV systems. If the internal generation at time t is greater than or equal to the charging power, it is assumed that charging is entirely supplied by self-generation. Only when the charging power exceeds internal generation, the surplus is considered as withdrawn from the grid. Similarly, during each time step in which the BESS is discharging, the model compares the power discharged with the internal electrical load P t P O D l o a d . If the internal load is greater than or equal to the BESS discharging power, it is assumed that the discharged energy is entirely used to serve internal demand. Only when the discharging power exceeds the internal load, the surplus is considered as injected into the grid.
Formally, the portions of BESS power flows that may be classified as NIE are defined as follows:
  • If the battery is charging at time t, the portion of charging power intended as withdrawn from the grid is given by the following:
p t P O D c h a i n j = 0 ,   if   p t B E S S c h a A C × P B E S S n o m p t P O D p r o d p t P O D c h a i n j = p t B E S S c h a A C × P B E S S n o m p t P O D p r o d ,   otherwise .
  • If the battery is discharging at time t, the portion of discharging power associated with grid injection is defined as follows:
p t P O D d i s i n j = 0 ,   if   p t B E S S d i s A C × P B E S S n o m P t P O D l o a d p t P O D d i s i n j = p t B E S S d i s A C × P B E S S n o m P t P O D l o a d ,   otherwise .
To ensure that p t P O D c h a i n j represents only the portion of charging power withdrawn from the grid and intended for future grid injection, a constraint is imposed such that the total sum of p t P O D c h a i n j over the optimization horizon must be less than or equal to the total sum of p t P O D d i s i n j . This ensures that only the portion of grid-supplied charging power that is actually reinjected can be valued as NIE.
The full framework is implemented in HOMES using a set of mixed-integer linear constraints reported below. Equation (32) shows the decomposition of the actual BESS charging power into two components: one that can be classified as NIE and a residual (fictitious) component representing the remaining portion of charging power. Equation (33) ensures that the portion of the charging power that is classified as negative injection complies with the criteria described above, based on the comparison with internally generated power. Similarly, Equations (34) and (35) apply the same logic to the discharging power. Finally, Equation (36) ensures that the variable p t P O D c h a i n j represents only the charging power withdrawn from the grid that has been subsequently re-injected into the grid.
p t B E S S c h a A C × P B E S S n o m = p t P O D c h a i n j + p t P O D c h a p r o d ,
p t P O D c h a p r o d p t B E S S c h a A C × 1 y t P O D c h a i n j + p t P O D p r o d × y t P O D c h a i n j ,
p t B E S S d i s A C × P B E S S n o m = p t P O D d i s i n j + p t P O D d i s c o n s ,
p t P O D d i s c o n s p t B E S S d i s A C × 1 y t P O D d i s i n j + P t P O D l o a d × y t P O D d i s i n j ,
t = 1 T p t P O D c h a i n j × t   t = 1 T p t P O D d i s i n j × t .
Subsequently, it is necessary to define a set of constraints to model the cost components of the electricity bill in accordance with the Italian tariff regulatory framework. Specifically, the bill is divided into three main components:
  • An energy-based component expressed in EUR/kWh.
  • A power-based component related to the monthly peak power, expressed in EUR/kW,
  • A fixed component expressed in EUR/POD.
The variable tariffs in EUR/kWh include energy consumption charges, variable system charges, and capacity market charges, as detailed in Equation (37). Equation (38) shows that the energy withdrawn from the grid (including associated losses) is subject to a time-of-use (ToU) tariff structure. Conversely, negative injection (NIE) is valued at the zonal DAM price. Equation (39) models the application of EUR/kWh tariffs to the net withdrawn energy (i.e., grid imports net of negative injection) for dispatching costs, network charges, and metering services. Finally, Equation (40) accounts for the capacity market charges, which are applied based on a tariff set every three months by Terna. This peak shaving tariff distinguishes between system peak and off-peak hours, with significantly different rates.
c t P O D k W h = c t P O D k W h s u p p l y + c t P O D k W h o t h e r + c t P O D k W h c a p a c i t y ,
c t P O D k W h s u p p l y = t P O D k W h s u p p l y × p t P O D w i t h p t P O D c h a i n j × 1 + ϵ l o s s e s × t + t D A M z o n a l × p t P O D c h a i n j × t ,
c t P O D k W h o t h e r = P O D k W h d i s p × p t P O D w i t h p t P O D c h a i n j × 1 + ϵ l o s s e s × t + P O D k W h m e t e r i n g + P O D k W h n e t w o r k × p t P O D w i t h p t P O D c h a i n j × t ,
c t P O D k W h c a p a c i t y = t P O D k W h c a p a c i t y × p t P O D w i t h p t P O D c h a i n j × t .
The costs related to peak power demand refer to network obligations and metering service charges, as defined in Equation (41). In this constraint, p P O D M A X w i t h represents the maximum power withdrawn from the grid over the month, as expressed by Equation (42). Since these costs are applied based on the monthly peak, an auxiliary parameter P P O D M A X w i t h o l d is introduced to carry forward the highest power withdrawal recorded within the same month up to the currently optimized day. This allows only the incremental increase in peak demand to be economically accounted for. As in previous cases, the power considered as negative injection is subtracted, as it refers to a POD that is regulated for injection and therefore exempt from any system charges.
c P O D k W = P O D k W m e t e r i n g + P O D k W n e t w o r k × p P O D M A X w i t h P P O D M A X w i t h o l d ,
p P O D M A X w i t h p t P O D w i t h p t P O D c h a i n j ;   p P O D M A X w i t h P P O D M A X w i t h o l d .
The fixed costs in the electricity bill consist of two components: one related to network charges and another associated with metering service costs, as shown below:
c P O D f i x e d = P O D f i x e d m e t e r i n g + P O D f i x e d n e t w o r k .
Additionally, it is also necessary to model the excise taxes applied to electricity consumption in Italy, as shown below:
c t P O D e x c i s e = P O D e x c i s e × P t P O D l o a d .
Finally, the cost components modeled in Equations (37), (41), (43) and (44) must be subjected to the Italian VAT (value-added tax) in order to comprehensively represent the total cost associated with electricity withdrawal from the grid:
c P O D = t = 1 T c t P O D k W h + c t P O D e x c i s e + c P O D k W + c P O D f i x e d × 1 + V A T .
In parallel, we must also account for the revenues from electricity injections into the grid, modeled as follows:
r P O D = t = 1 T t D A M z o n a l × p t P O D i n j .

2.4.2. PDR

The final component modeled in HOMES is the PDR, which represents the economic settlement of natural gas withdrawals. As with electricity, the modeling approach follows the tariff structure defined by ARERA in Italy, as outlined in Equation (47). The cost structure for natural gas includes a variable component, detailed in Equation (48), which comprises the cost of the raw material P D R S m c s u p p l y and variable network-related charges P D R S m c n e t w o r k . Additionally, it includes a fixed component per connection point, covering fixed network charges P D R f i x e d n e t w o r k . Furthermore, the model accounts for excise duties imposed on natural gas consumption, expressed by Equations (49) and (50). These duties vary depending on whether the gas is used for thermal or electrical energy production, as specified in Legislative Decree 119/2018 [33].
c P D R = t = 1 T c t P D R S m c + c t P D R e x c i s e + P D R f i x e d n e t w o r k × 1 + V A T ,
c t P D R S m c = P D R S m c s u p p l y + P D R S m c n e t w o r k × e t P D R w i t h ,
c t P D R e x c i s e = P D R e x c i s e e l × e t P D R w i t h e l + P D R e x c i s e o t h e r × e t P D R w i t h o t h e r ,
e t P D R w i t h = e t P D R w i t h e l + e t P D R w i t h o t h e r .

2.5. System Modeling and Objective Function

This section outlines the upper-level blocks developed to model the system under analysis, with the aim of capturing both the energy and economic interactions among the lower-level blocks representing the individual system components described in the previous sections. Specifically, it presents the key constraints implemented in HOMES to ensure the physical and economic balance of the four energy vectors considered: electricity, thermal energy, cooling energy, and natural gas. Finally, the objective function defined for the optimization problem is introduced.

2.5.1. Electrical Circuit

If one of the blocks at the lower level uses variables that belong to other blocks within the same level, it is necessary to rely on upper-level blocks to link the two lower-level components and ensure model consistency. For instance, Equation (51) defines the constraint that links the variable in the POD block representing the system’s total self-produced electricity with the electrical outputs of the CHP and PV units. Similarly, Equation (52) connects the POD variable representing total self-consumption with the system’s electrical loads.
p t P O D p r o d = u = 1 U C H P p u , t E L C H P + u = 1 U P V p u , t P V ,
p t P O D l o a d = u = 1 U E L l o a d   P u , t E L l o a d .
Finally, it is necessary to define a constraint that enforces the physical balance of the electrical quantities introduced in each block, as shown in the following equation:
p t P O D w i t h + p t P O D p r o d + p t B E S S d i s A C × P B E S S n o m = p t P O D i n j + p t P O D l o a d + p t B E S S c h a A C × P B E S S n o m + p t B E S S A u x .

2.5.2. Thermal and Cooling Circuit

For simplicity, the cooling power demand P u , t C O O L l o a d is converted into its thermal equivalent P u , t C O O L l o a d ~ . This assumption reflects the configuration of the system under analysis, which includes an absorption chiller that although not explicitly modeled in this study, can utilize the CHP’s thermal output to produce cooling power. This potential use improves the overall efficiency of CHP self-production during summer and must be considered when optimizing system operations. Accordingly, Equation (54) ensures that the sum of the thermal load and the cooling demand (converted into thermal equivalent) is covered by the CHP and boiler units. Unlike the electricity vector, the thermal balance allows for excess production, accounting for the practical possibility of dissipating CHP heat surplus into the atmosphere:
u = 1 U T H l o a d   P u , t T H l o a d + u = 1 U C O O L l o a d   P u , t C O O L l o a d ~ u = 1 U C H P p u , t T H C H P + u = 1 U b o i l e r   P u , t T H b o i l e r .

2.5.3. Natural Gas Circuit

First, in order to properly model the PDR excise costs applied to natural gas consumption, it is necessary to define a constraint that accurately links these costs to the portion of gas withdrawn by the CHP and used for electricity production. This is achieved through the following equation:
e t P D R w i t h e l = u = 1 U C H P e u , t F U E L e l P r o d C H P .
Then, as with the other energy vectors, a power balance must be imposed, taking into account the proper conversion of the withdrawn gas volume into power using its lower heating value (LHV):
u = 1 U C H P p u , t F U E L C H P + u = 1 U b o i l e r p u , t F U E L b o i l e r = e t P D R w i t h × L H V n g t .

2.5.4. Objective Function

The final step in building HOMES consists of defining an objective function. In this problem, we formulate the cost function shown in Equation (57), seeking the set of variables that minimizes the overall system costs over each considered time horizon:
min c P O D r P O D + c P D R + u = 1 U C H P c u O & M C H P + u = 1 U b o i l e r c u O & M b o i l e r + C O & M B E S S .

3. Results

The aim of this section is to present the case study under analysis and discuss the obtained results. First, the analyzed MEMG is introduced, highlighting its main components and their interconnections within the three energy domains considered—namely, electricity, thermal energy, and natural gas—as described in Section 2. The data used for modeling each subsystem are then presented, along with their respective sources. Subsequently, the methodological assumptions adopted to evaluate the techno-economic performance of the MEMG with and without a BESS are outlined. The analysis considers a matrix of BESS configurations with varying power and energy ratings to assess the incremental economic value brought by storage and to identify the optimal BESS size. The results are then discussed in terms of economic indicators—such as net present value (NPV) and annual cost savings—as well as the resulting energy flows within the system. Finally, for a selected BESS configuration, a sensitivity analysis is carried out on two key drivers of the electricity bill: the DAM price and the power-based tariff design. Regarding the DAM price, the analysis explores how increasing the daily price spread affects the system’s incentive to perform pure energy arbitrage and whether, at certain levels, the system begins to exploit the incentives associated with NIE. In parallel, a sensitivity analysis is conducted on the power-based tariff structure. In the current electricity bill, the capacity component includes metering and network charges applied to the monthly peak power withdrawal, but this flat structure does not accurately reflect the real costs of grid development, which are mainly driven by the system-wide annual peak demand. In response to this issue, several European countries—such as Belgium, Spain, and Slovenia [38]—have recently adopted differentiated power-based tariffs that vary according to the season and time of day, introducing a ToU capacity-based charge. This means that peaks occurring during system-wide peak hours are charged at a higher EUR/kW rate than those during off-peak periods when the grid is less stressed. Following this approach, the analysis examines how the MEMG’s optimal scheduling responds to varying degrees of power-based tariff differentiation, specifically observing how strongly the MEMG is incentivized to shift its peak power withdrawal away from system peak hours.

3.1. Case Study and Data

The MEMG analyzed in this study is located on the Leonardo campus of Politecnico di Milano [29]. A simplified schematic representation of the system is provided in Figure 3. The electrical network operates at medium voltage (MV) and includes 11 substations, 10 of which are currently interconnected, while the remaining one is planned for future integration. The entire microgrid is connected to the city’s distribution grid through a single POD. Connected to the electrical network are 10 PV systems, with a total installed capacity of approximately 1 MW. The campus also hosts several EV charging stations operating in vehicle-one-grid (V1G) mode, allowing unidirectional charging from the grid to vehicles. On the thermal side, the system includes a district heating network composed of 29 thermal exchange substations, which supplies heating to the campus buildings during the winter season. The core of the combined heat and power generation is an ICE unit with an installed capacity of 2 MW electric and 1.7 MW thermal. In parallel, two industrial gas-fired boilers provide an additional 12 MW of thermal capacity, ensuring adequate heat supply during thermal peak demand periods. For space cooling during the summer season, the campus does not rely on a centralized cooling network. Instead, cooling is provided by distributed units across the campus buildings, predominantly consisting of electric heat pumps. Additionally, an absorption chiller is in place, which utilizes waste heat from the CHP unit to generate cooling energy, thereby improving overall system efficiency through trigeneration. Finally, the system includes two diesel-fueled gensets, which are only activated in emergency islanding scenarios.
In this study, it was not possible to model all the loads and energy generation units present on the campus due to the lack of reliable and sufficiently long-term historical data. Figure 4 provides a schematic representation of the components that are included in the block-based modeling framework used in following analysis. Specifically, we consider the electricity demand associated with the 10 substations currently connected to the MV microgrid, the power production from seven PV plants, for a total peak power of around 820 kW, the ICE operating in CHP mode, the two active industrial gas boilers, the total thermal demand of the campus, and the cooling demand served by the absorption chiller. Additionally, the simulation includes the connection points to the external electricity grid (POD) and to the natural gas network (PDR). Based on this MEMG configuration, we hypothesize the installation of a BESS to evaluate its techno-economic impact.
To evaluate the techno-economic performance of the MEMG across different seasons, we consider its operation over a full year, taking 2024 as the reference. The data for electrical demand, thermal demand, and cooling demand (converted into thermal equivalent), plus those referring to PV generation, are obtained from on-site measurement devices installed across the campus. Table 1 reports the annual energy values for the system’s loads and PV generation. It can be observed that PV generation accounts for approximately 7.1% of the total annual electrical demand, with the remaining portion supplied by the ICE or the utility grid. The total thermal load is around 10 GWh per year and is met by the ICE and the two available industrial boilers.
The techno-economic parameters employed for each unit in this study are reported in Appendix A, along with the relevant references used, in Table A1, Table A2 and Table A3. The various tariffs applied to electricity and natural gas are reported in Table A4 and Table A5. Additional parameters used in the analysis are listed in Table A6.

3.2. Optimal BESS Sizing

To assess the techno-economic annual performance of the MEMG described in Section 3.1. the following analysis is conducted. First, a baseline scenario without a BESS is defined and used as a reference. Then, different configurations of the MEMG with a BESS are considered, combining four power ratings ([1, 2, 3, 4] MW) and four energy-to-power (EPR) values ([1, 2, 3, 4] h). For each of the 16 BESS configurations and for the reference scenario, the MILP model presented in Section 2 is solved independently for each day of the year 2024, with a 15-min time resolution. The optimization follows a day-ahead scheduling approach under the assumption of perfect foresight of all uncertain inputs (i.e., PV generation and energy demands). Once the optimal scheduling for each day is obtained, the annual cost for each configuration is computed as the sum of the daily costs output from the optimization model. For every BESS configuration, the cost reduction ΔCosts compared to the reference scenario is then calculated. Assuming that this annual saving is consistently achieved over a 10-year horizon and applying an interest rate r of 5%, the NPV of the BESS investment is computed following the same approach outlined in [35]:
N P V = C A P E X B E S S +   t = 1   10 Δ C o s t s   y e a r ( 1 + r ) t t = 1 10 C A P E X B E S S n e w 1 + r t + R V B E S S .
The capital expenditure C A P E X B E S S is modeled as the sum of two components: an energy-related cost of EUR 250/kWh, representing the cost of the battery banks, and a power-related cost of EUR 80/kW, accounting for the inverter and grid connection. Additional investment costs are included whenever the BESS exceeds its threshold of 5000 cycles [39], requiring battery replacement. Furthermore, a residual economic value R V B E S S is included to account for the remaining economic value of the system at the end of the 10-year period. This residual value is estimated based on the remaining number of cycles and the unused lifetime of the components, assuming a 10-year useful life for the battery banks and 30 years for the power-related components.
After computing the NPV according to Equation (58) for each BESS configuration, the one yielding the highest NPV can be identified. This allow us to estimate the optimal size of the BESS to be installed in the case study, when considering implicit flexibility provision through energy arbitrage and peak shaving strategies.
Table 2 summarizes the annual cost outcomes for each of the BESS configurations analyzed. Specifically, it shows the annual cost reduction ΔCosts compared to the baseline scenario without a BESS, in which the optimized operation of the MEMG results in a total operating cost of EUR 3679 k/year. The results shown in Table 2 suggest that the main economic driver is the installed energy capacity: for each power rating, the optimal energy capacity appears to be around 4 MWh. Increasing the storage capacity beyond this threshold brings lower economic returns and in some cases, even leads to higher total costs due to the increased O&M expenses associated with a larger BESS. Notably, the configuration yielding the highest cost savings—EUR 140.2 k per year, corresponding to a 3.8% reduction relative to the benchmark scenario without BESS—is characterized by a power rating of 2 MW and an EPR of 2. At first glance, it may seem counterintuitive that this configuration has lower operational costs than do others with the same energy capacity but a higher power rating, such as the 4 MW/4 MWh BESS. One might expect that increasing the power capacity would add operational flexibility, allowing the system to charge and discharge more quickly, respond to demand peaks more effectively, and thus reduce operating costs further by offering a less constrained optimization. However, the results show that this is not necessarily the case for the MEMG under study. The reason lies in how well the BESS’s rated power aligns with the typical load profile and the operational characteristics of the cogeneration unit. During off-peak periods, the electrical load frequently drops well below 4 MW. If the CHP unit is shut down to minimize fuel consumption and O&M costs during these times, the BESS must fully supply the remaining load. A larger BESS with a 4 MW inverter would, in these conditions, be forced to operate far below its rated output to match the low residual demand. This under-utilization reduces its average round-trip efficiency, because battery inverters and associated power electronics are generally less efficient when operated far from their nominal design point. In addition, surplus energy cannot always be sold back to the grid at attractive prices during these low-demand periods, limiting any potential advantage from excess discharge capacity. In contrast, a 2 MW BESS aligns much more closely with the typical residual demand in off-peak periods. Its inverter can operate nearer to its nominal output, resulting in higher average round-trip efficiency and better overall performance. During peak periods, the total electrical load usually rises to around 4 MW. However, the cogeneration unit is generally dispatched to cover a significant portion of this—typically around 2 MW—to exploit its high thermal and electrical efficiency when demand is high. This leaves only about 2 MW of residual load to be covered by the BESS. Again, a 2 MW BESS is well sized to meet this remaining demand without significant oversizing of its power electronics. A larger 4 MW inverter, in this situation, does not offer meaningful additional benefit. As a result, the 4 MW/4 MWh configuration not only provides no meaningful operational advantage but also suffers from a slightly lower average round-trip efficiency (94.37% compared to 94.81% for the 2 MW/4 MWh BESS). Moreover, the less efficient utilization means that the cogeneration unit must operate more often to compensate, leading to a slight increase in PDR costs (+0.19%) while achieving the same net POD costs as the 2 MW case.
However, it should be noted that the 2 MW, 2 h BESS configuration should not be interpreted as the overall optimal solution since investment costs must also be taken into account alongside the operational cost savings. Additionally, battery degradation due to cycling should be considered, as it may require battery bank replacement before the end of the investment evaluation horizon. To account for these factors, the NPV is computed, as presented in (58).
Figure 5 presents the NPV calculated for each of the BESS configurations considered. As shown, the NPV remains negative across all scenarios, indicating that—under assumed BESS investment costs, and electricity, and gas tariffs—the economic value generated by implicit flexibility services such as energy arbitrage and peak shaving is insufficient to justify the BESS capital expenditure. Therefore, the most cost-effective solution remains the baseline configuration without any BESS installation. This highlights the need for either a reduction in BESS costs or the introduction of additional value streams or incentives (e.g., participation in ancillary service markets, capacity mechanisms, or state grants) to improve the economic viability of the investment in storage systems.
To assess the impact of installing a BESS in the analyzed MEMG, both in terms of the different cost components and the resulting energy flows, the following section focuses on the configuration that achieves the highest annual cost reduction. According to Table 2, this corresponds to the case with a power rating of 2 MW and an EPR of 2 h.

3.3. Techno-Economic Impact of BESS Deployment

Figure 6 shows the variation in the system’s operational cost components between the benchmark case without BESS (reference) and the configuration with the BESS that achieves the lowest annual costs (optimal). The cost items can be grouped into three categories: interactions with the electricity grid, natural gas purchases, and O&M costs for production units and the BESS. As shown in Figure 6, the most significant absolute cost reduction is observed in the PDR-related charges, followed by a decrease in POD-related costs. Additionally, a reduction in O&M costs is observed. Despite the additional expenses associated with BESS operation, the storage system allows the CHP to remain off when not needed, supplying the load directly with stored electricity. This operational shift eliminates the CHP’s variable O&M costs in certain time steps. However, it is worth noting that the greatest relative cost reduction occurs in the POD-related charges, with a 19.9% decrease—compared to a 2.47% reduction for PDR costs and 2.51% for O&M costs. Understanding the mechanisms behind this significant relative decrease in POD costs is essential for interpreting the impact of BESS integration.
Figure 7 provides a detailed breakdown of the POD-related cost components for both the reference and the optimal configuration. This analysis not only identifies the most significant cost items affecting the analyzed MEMG but also demonstrates how the implicit flexibility offered by the BESS can be strategically leveraged to reduce both variable energy charges and monthly peak-related costs. The first key insight is the BESS’s capability to perform effective energy arbitrage. Specifically, it takes advantage of the time-of-use structure of retail electricity prices—leading to a reduction in supply costs—and of the varying capacity market-related charges between peak and off-peak hours, resulting in lower capacity costs. These reductions are driven not only by the arbitrage activity itself but also by the decreased volume of electricity withdrawn from the grid. Notably, the integration of the BESS leads to a non-negligible increase in self-consumption—from 12,638 MWh/year to 12,991 MWh/year, a rise of approximately 2.8%—thereby minimizing interactions with the public grid. As a reference, the total energy exchanged with the external network drops from 1312 MWh/year in the reference scenario to just 243 MWh/year in the BESS-integrated optimal scenario, representing a reduction of approximately 82%. As a result, all consumption-based charges expressed in EUR/kWh also decline proportionally. It is important to emphasize, however, that these reductions are not due to the exploitation of negative electricity injection. For the analyzed MEMG conditions, it is not economically advantageous to perform pure arbitrage by withdrawing and injecting electricity through the BESS at the zonal DAM price. Under the considered modeling assumptions and 2024 Italian DAM prices, the amount of electricity negatively injected into the grid remains negligible over the year. Moreover, the BESS proves to be effective in peak shaving operations, resulting in a reduction of capacity-based charges by approximately EUR 24 k annually, representing a decrease of 77.91%. Finally, Figure 7 shows that the presence of the BESS reduces revenues from electricity exports to the grid. This is primarily due to a shift in operational strategy: instead of injecting surplus energy during high-price periods, it is often more economically advantageous to store that energy for later use. This deferred use enables further arbitrage, contributes to peak reduction, and allows the CHP unit to be turned off more frequently—leading to additional O&M savings. Lastly, the figure shows that excise duties—representing a large portion of the POD costs—remain unchanged, as they are applied per unit of energy consumed and are unaffected by the scheduling strategy. Fixed monthly charges (EUR per POD/month) also remain constant.
The following analysis investigates how the integration of a BESS affects the operation of the conventional gas-fired generation units and their thermal efficiency. Table 3 reports the capacity factor (CF) of the CHP unit and the two gas boilers, along with the amount of heat dissipated to the environment. For completeness, the CF of the BESS is also included for the configuration with storage. In the BESS-integrated scenario, the CHP unit operates less frequently. This is primarily because the BESS enables more efficient use of on-site electricity generation, both from the CHP and from the PV systems. Instead of injecting excess electricity into the grid, the surplus is stored in the BESS and later used to meet local electrical demand. This shift reduces the need to operate the CHP, particularly during periods when only electricity is required and no thermal demand is present. As a result, the system avoids producing heat that cannot be utilized and would otherwise be dissipated into the atmosphere. Consequently, the configuration with the BESS also shows a notable decrease in wasted thermal energy (−6.4%), reflecting a more efficient and flexible use of the existing generation assets.
Lastly, we analyze how the 15-min power flows within the MEMG change in the presence of the BESS compared to the benchmark configuration without storage. To do this, two representative days are selected: 15 July 2024, corresponding to the annual peak in electrical load (around 3.5 MW); and 12 December 2024, the day with the highest hourly zonal DAM price in the NORD bidding zone for the selected period (around EUR 25/MWh).
Figure 8 shows the electrical power flows for 15 July, alongside the DAM price and the SOC profile for the BESS-integrated scenario. The dispatch for this day highlights the BESS’s role in peak shaving. In the early morning hours, the CHP is operated above the electrical load level, charging the BESS with the surplus electricity. This strategy enables the BESS to discharge during the midday period, significantly reducing the power drawn from the grid and maintaining it below a predefined threshold. A similar approach is adopted in the evening: the CHP produces in excess of the local demand, and the surplus is again used to recharge the BESS, restoring its SOC to the initial value of 50%.
Figure 9 displays the 15-min electrical and thermal power flows of the MEMG on 12 December 2024, alongside the DAM price and the battery SOC. This day is particularly insightful to showcase how the BESS plays a crucial role in enhancing synergies between the electrical and thermal vectors. In the reference case, early-morning peaks in campus thermal demand are optimally met by operating the CHP, which results in excess electricity generation compared to the load. This surplus is exported to the grid, but such exports are only economically justified when coupled with thermal demand satisfaction. During periods of low thermal demand, exporting electricity becomes suboptimal—except for a few hours in the evening when the zonal DAM price exceeds EUR 250/MWh. For the BESS-integrated scenario, the CHP still follows thermal peaks, especially during the night, but in this case, recharges the battery rather than injecting electricity into the grid. The stored energy is primarily used for two purposes: enabling temporary CHP shutdowns—thereby saving on O&M costs—and performing peak shaving during midday, reducing grid imports to zero. Moreover, it is used for energy arbitrage by discharging to the grid during the evening price peak, thus maximizing its economic value.

3.4. Sensitivity Analysis of DAM Price Spread to Incentivize Pure BESS Arbitrage

In this section, we investigate how much the DAM price spread within a single day would need to widen to make it economically attractive for the MEMG, with its optimal BESS configuration (2 MW/4 MWh), to engage in pure energy arbitrage. Specifically, we aim to identify the minimum DAM price spread that would incentivize the system to operate the BESS solely to buy electricity from the grid when prices are low and sell it back when prices are high, taking advantage of the benefits offered by the Italian tariff scheme for NIE.
Figure 10 presents the results for 15 July, illustrating how the system’s optimal scheduling evolves as the parameter Δ increases from 2 to 10. This parameter artificially amplifies the daily price spread: First, the average DAM price for the day is calculated. Then, every hourly price above this daily average is multiplied by Δ, while every hourly price below the average is divided by Δ. In this way, higher Δ values simulate increasingly extreme price differences within the day, highlighting when pure arbitrage becomes profitable for the system.
Comparing Figure 10 with Figure 8, which shows the optimal scheduling under the actual DAM prices for 15 July, we observe that when Δ is set to 2—increasing the DAM price spread to around EUR 250/MWh instead of the actual EUR 70/MWh—the optimizer slightly increases the BESS discharge to export additional electricity to the grid during the evening peak. However, as shown in Table A7 in the Appendix B, the total daily energy exported to the grid in this scenario is still only about 87 kWh. Moreover, the price differential is not yet large enough to make it worthwhile to draw additional power from the grid during midday low-price hours and resell it during the high-price peak since this would increase p P O D M A X w i t h , resulting in higher EUR/kW charges on the electricity bill. When Δ is increased to 3, the impact on the MEMG’s optimal scheduling remains similar, with the total electricity exported still limited to about 1 MWh. Pushing the scenario further with Δ = 5, we see that in this case, the peak grid import p P O D M A X w i t h does increase because under these extremely variable DAM prices—which are clearly unrealistic today—it would actually be economically rational to draw more power from the grid during low-price hours and sell it back during peak hours in the evening. This effect becomes even more pronounced when Δ is increased to 10. Interestingly, however, even with Δ = 10, the system does not make use of the incentives related to NIE. This is because, in practice, a 2 MW battery would have to charge at a rate exceeding the on-site generation for the charging energy to qualify as NIE. For this MEMG, which combines a 2 MW CHP and approximately 1 MW of PV, operating in this manner would be highly suboptimal, as it would reduce the benefit of self-generation.
Figure 11 presents the results for 12 December, which is selected as the representative day with the highest DAM price during the year. In this case, even under actual market conditions shown in Figure 9, the DAM price spread reaches approximately EUR 150/MWh. This spread is already sufficient to make it economically optimal for the system to export electricity to the grid during the peak DAM price hours. As Δ increases to 2 and 3, the amount of energy injected into the grid to capture these price peaks also rises, as detailed in Table A8. However, the DAM price spread is still not large enough to justify an increase in the system’s maximum power withdrawal p P O D M A X w i t h , which only becomes economically viable in the more extreme scenarios of Δ = 5 and Δ = 10. Notably, for Δ = 10, the NIE becomes non-zero: during the final hours of the day, the CHP unit is shut down to allow the BESS to charge from the grid and valorize this energy flow as NIE. However, the Δ = 10 scenario is highly unrealistic and would never occur under current Italian electricity market conditions. This confirms that for the system under analysis with a 2 MW/4 MWh BESS, exploiting NIE is not economically viable in practice.
To assess the extent to which the BESS size selected for the MEMG might limit the system’s ability to exploit the incentives related to NIE for pure arbitrage, we also analyzed the scenario with a larger BESS configuration of 4 MW power and 16 MWh energy capacity operating on 12 December under varying Δ values. The results are presented in Appendix B (Figure A1 and Table A9). These show that with this larger storage capacity, when Δ reaches 3, the system starts to find pure arbitrage economically viable. In this case, the system is no longer constrained by the EUR/kW capacity charge in the electricity bill and reaches peak power withdrawals exceeding 5000 kW. However, it should be noted that with Δ = 3, the DAM price spread would reach around EUR 800/MWh, which is still an unrealistic market condition. This highlights the significant challenges of using the DAM price signal alone to incentivize energy shifting under the current Italian electricity billing structure.

3.5. Impact of Power-Based Tariff Design on Peak Power Withdrawal Reduction

In this section, we investigate to what extent the power-based tariff in the electricity bill should be differentiated between peak and off-peak hours to effectively incentivize the analyzed MEMG to reduce its grid power withdrawal during system-wide peak periods. Specifically, since the MEMG is located in the city of Milan, we identify system peak hours based on the time intervals during which the local distribution system operator, Unareti, has launched auctions for upward active power reserves under the MiNDFlex pilot project [40]. MiNDFlex aims to test a local flexibility market in Milan and, to date, has been activated in the summer months of June and July (2024 and 2025), defining flexibility products for the 10:00–23:00 time window. Using the same representative day (15 July) previously analyzed under the current electricity bill structure, we assessed how the optimal scheduling of the MEMG with its optimal BESS configuration changes when different ToU power-based tariffs are applied.
Figure 12 shows the results of this sensitivity analysis. It is important to highlight that under the current electricity bill scheme with a flat power-based tariff, the optimal scheduling for the day considered (as illustrated in Figure 8) requires increasing the maximum power withdrawn from the grid in July from the previous value of 367 kW to 499 kW, resulting in an associated cost of EUR 566. For simplicity, in all ToU capacity tariff scenarios analyzed, the maximum monthly peak demand established by the preceding July days is kept constant at 367 kW for both peak and off-peak periods. The analysis then focuses on how different ToU capacity tariff schemes affect the maximum power withdrawn from the grid relative to the 499 kW reference value.
As a first step, we applied a ToU power-based tariff which allocates the current charge of EUR 4.29/kW by applying three-quarters of it to the peak demand during system peak hours (10:00–23:00) and one-quarter to the peak recorded during the remaining off-peak hours. This tariff structure will hereafter be referred to as ToU level 0. Under this tariff structure, a user with constant demand who is unable to shift consumption away from system peak hours would pay the same as under the current flat tariff, while a user who can shift demand would benefit from minimizing its peak during system peak hours. Interestingly, Figure 12 shows that for the analyzed MEMG with a 2 MW/4 MWh BESS, the resulting optimal scheduling behaves in the opposite way to what the ToU tariff aims to encourage. Specifically, rather than maintaining a peak of 499 kW for both peak and off-peak periods, the analyzed MEMG is incentivized to increase the peak demand during system peak hours to 534 kW and reduce the off-peak peak to 389 kW, thus slightly lowering the total power-based cost to EUR 560. This counterintuitive outcome is mainly due to the fact that the BESS is already operating close to its technical SOC limits to minimize peak grid withdrawals. As a result, it cannot further reduce demand during peak hours without significantly increasing the peak during off-peak hours, which still incurs a charge of EUR 1.07/kW.
To address this, we hypothesized an alternative tariff structure (ToU level 1), in which the charge applied to peak demand during system peak hours is doubled compared to the current value (EUR 8.58/kW), while the off-peak charge is halved (EUR 2.15/kW). In this scenario, any user unable to shift their demand away from peak hours would be penalized compared to the current flat tariff. However, even under the ToU level 1 tariff, the system’s optimal scheduling remains essentially the same as that under the ToU level 0 tariff.
Only when the off-peak tariff is further reduced to one-quarter of its current value (EUR 1.07/kW), as in the ToU level 2 scheme, does the system become incentivized to lower its peak demand during system peak hours.
To assess to what extent the effects of the ToU power-based tariff might be constrained by the size of the BESS, we performed the same analysis for the MEMG equipped with the largest BESS configuration (4 MW/16 MWh). The results are shown in Figure A2 in the Appendix B. In this case, the peak grid withdrawal recorded during previous days of July under the base case of flat power-based tariff—used as a reference for all ToU scenarios—was 87 kW. It can be clearly seen that with this larger BESS, even under the ToU level 0 scheme, the system has sufficient storage capacity available to maintain the peak power withdrawn from the grid during system peak hours (10:00–23:00) at the same level of 87 kW, avoiding any increase in the power-based cost related to peak hours for the day analyzed. This results in a slight increase in the peak withdrawal during off-peak hours, which rises to 397 kW.

4. Discussion

In this study, a block-based MILP framework to optimize the operations of a MEMG is developed, with a specific focus on modeling electricity and natural gas billing structures in Italy. The proposed framework, named HOMES, is applied to a real-world case study to evaluate the added economic value of installing a BESS, under the assumption that the storage system is used exclusively to minimize bill costs, without considering active participation in electricity markets.
The primary finding is that under current tariff schemes, market prices, and BESS costs in Italy, investing in a BESS solely for implicit flexibility provision is not economically viable. For all 16 combinations of power ratings and EPR values considered, the NPV of BESS investment remains negative, indicating that the optimal solution under current conditions is not to install the BESS. However, the economic attractiveness of BESS deployment could be significantly improved by adopting more advanced operational strategies, such as participating in electricity markets through optimized bidding strategies [41] or by enabling service stacking to combine multiple revenue streams [42].
Additionally, a detailed analysis of the operational cost savings associated with each BESS-integrated configuration reveals that the main cost-reduction driver is the energy capacity of the battery, with an optimal value around 4 MWh. Particularly, the configuration achieving the greatest reduction in annual operational costs corresponds to P = 2 MW and EPR = 2 h, yielding a 3.8% cost reduction with respect to the benchmark configuration without BESS.
Further investigation into the cost components most affected by the BESS integration show a significant decrease in PDR (natural gas) costs, primarily due to improved self-consumption efficiency and reduced operation of the CHP unit, whose capacity factor dropped by about 2%. Additionally, a substantial reduction in POD (electricity) costs is observed, driven by the significant decrease in grid interactions. In fact, the BESS maximizes self-consumption, lowering the annual energy exchanged with the grid from 1312 MWh to 243 MWh (an 82% reduction). This reduces the revenue from grid injections but, more importantly, minimizes electricity purchase costs, which are subject to heavy tariffs related to system charges. The BESS is also used for energy arbitrage, taking advantage of the time-of-use electricity tariffs and the capacity market charges that vary between peak and off-peak hours. Moreover, peak shaving plays a crucial role, accounting for nearly 40% of the total POD cost reduction. Finally, BESS operation enables O&M cost savings by covering the electrical load during certain periods and allowing the CHP unit to be turned off. Overall, it is observed that the BESS enhances the exploitation of electric–thermal synergies. During thermal load peaks, instead of being exported as excess electricity from the CHP to the grid, energy is stored in the BESS, where it gains more value through its potential for arbitrage, peak shaving, and CHP shutdowns aimed at minimizing O&M costs.
One of the main focuses of this work is to properly model the negative injected energy (NIE) of the BESS—that is, energy withdrawn from the grid for the purpose of later reinjection. The results show that, under the proposed modeling assumptions, pure price arbitrage against the day-ahead market is not economically favorable.
Finally, the sensitivity analyses reveal important insights into the effectiveness of market signals and tariff structures. First, only under very high and unrealistic DAM price spreads (greater than EUR 1000/MWh) does the MEMG shift from maximizing self-consumption to increasing grid withdrawals for energy arbitrage. Second, the proposed time-of-use power-based tariff could unintentionally encourage the opposite behavior of its intended purpose, potentially shifting peak withdrawals into system peak hours if not properly designed. These findings highlight that the effectiveness of such tariff design is highly user-specific and must be carefully calibrated to achieve the desired demand-side response.
Future developments of this work could address several current limitations and extend its applicability. One key limitation is the absence of uncertainty in the modeling framework. In this study, loads, PV generation, and DAM prices are treated as perfectly known, which does not reflect real-world conditions. Incorporating uncertainty into the optimization—using, for example, stochastic or robust approaches—would allow for a more realistic evaluation of the MEMG’s performance and its economic outcomes under variable conditions and would provide deeper insights into the value of flexibility. Additionally, the model currently focuses on implicit flexibility services. A natural extension would involve the modeling of additional services. In particular, the provision of explicit flexibility to the TSO—such as frequency reserve—could be integrated, as already proposed in [35]. Furthermore, it would be of interest to assess the synergies between services for normal grid operation and emergency services, which have been previously investigated [43] but without considering the role of BESS integration. Finally, HOMES could be extended to incorporate additional components such as electric vehicles, heat pumps, and absorption chillers.

Author Contributions

Conceptualization, A.S., M.D. and F.B.; methodology, A.S. and F.B.; software, A.S. and F.B.; validation, A.S. and F.B.; formal analysis and investigation, A.S.; resources, A.S. and F.B.; data curation, A.S.; writing—original draft preparation, A.S.; writing—review and editing, A.S. and F.B.; visualization, A.S. and F.B.; supervision, M.D. and F.B.; project administration, M.D. and F.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

During the preparation of this manuscript/study, the authors used ChatGPT 4o mini to improve the English fluency and clarity of the text. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
BESSbattery energy storage system
CAPEXcapital expenditure
CCHPcombined cooling, heating, and power
CFcapacity factor
CHPcombined heat and power
DAMday-ahead market
DERdistributed energy resource
D-MESdistrict multi-energy system
DRdemand response
EMSenergy management system
EPRenergy to power ratio
EVelectric vehicle
HOMEShierarchical optimization for multi-energy systems
ICEinternal combustion engine
IESintegrated energy system
GHGgreenhouse gas
LHVlower heating value
LUTlook-up table
MEMGmulti-energy microgrid
MESmulti-energy system
MILPmixed-integer linear programming
MPCmodel predictive control
MPERmaximum profit electricity reduction
MVmedium voltage
NIEnegative injected electricity
NPVnet present value
O&Moperation and maintenance
P2Ppeer-to-peer
PDRunto di riconsegna
PODpoint of delivery
PVphotovoltaic
RESrenewable energy sources
RGSrelative grid sizes
SOCstate of charge
TESthermal energy storage
ToUtime-of-use
V1Gvehicle-one-grid

Nomenclature

Sets
iIndex of a linear segment in piecewise efficiency curves
kIndex of the LUT supporting points
tTimestep index
uUnit index
Parameters
α B E S S A u x ,   β B E S S A u x ,   δ B E S S A u x ,   γ B E S S A u x Experimentally derived BESS parameters used to estimate the power consumption of auxiliary systems
t Timestep length [h]
t u m i n T i m e O n C H P Number of timesteps the CHP must stay ON after starting-up
t u m i n T i m e O f f C H P Number of timesteps the CHP must stay OFF after shutting-down
Θ u , i L B f u e l C H P Lower bound of the fuel power input for the i-th segment of the CHP efficiency curve [kWfuel]
Θ u , i U B f u e l C H P Upper bound of the fuel power input for the i-th segment of the CHP efficiency curve [kWfuel]
Υ u F U E L e l P r o d C H P Fraction of the CHP fuel input assumed to be employed for electricity production [Smc/kWhel]
Φ u b o i l e r Slope of the boiler efficiency curve [kWth/kWfuel]
Φ u , i E L C H P Slope of the CHP electrical efficiency curve in the i-th linear segment [kWel/kWfuel]
Φ u , i T H C H P Slope of the CHP thermal efficiency curve in the i-th linear segment [kWth/kWfuel]
Ω u b o i l e r Intercept of the boiler efficiency curve [kWth]
Ω u , i E L C H P Intercept of the CHP electrical efficiency curve in the i-th linear segment [kWel]
Ω u , i T H C H P Intercept of the CHP thermal efficiency curve in the i-th linear segment [kWth]
ϵ l o s s e s Medium-voltage grid losses [-]
E U R t D A M z o n a l Day-ahead market zonal price [EUR/kWh]
E U R P D R e x c i s e e l ,   E U R P D R e x c i s e o t h e r Excise taxes applied on natural gas employed for electricity production and other uses [EUR/Smc]
E U R P D R f i x e d n e t w o r k Fixed network tariff [EUR/PDR]
E U R P D R S m c n e t w o r k Network tariff applied to withdrawn natural gas [EUR/Smc]
E U R P D R S m c s u p p l y Tariff applied on supplied natural gas [EUR/Smc]
E U R P O D e x c i s e Excise taxes applied on electricity consumption [EUR/kWh]
E U R P O D f i x e d m e t e r i n g Fixed metering tariff [EUR/POD]
E U R P O D f i x e d n e t w o r k Fixed network tariff [EUR/POD]
E U R P O D k W m e t e r i n g Metering tariff applied to the withdrawn peak power [EUR/kW]
E U R P O D k W n e t w o r k Network tariff applied to the withdrawn peak power [EUR/kW]
E U R t P O D k W h c a p a c i t y Capacity market tariff applied to withdrawn energy [EUR/kWh]
E U R P O D k W h d i s p Dispatching tariff applied to withdrawn energy [EUR/kWh]
E U R P O D k W h m e t e r i n g Metering tariff applied to withdrawn energy [EUR/kWh]
E U R P O D k W h n e t w o r k Network tariff applied to withdrawn energy [EUR/kWh]
E U R t P O D k W h s u p p l y Time-of-use tariff applied to withdrawn energy [EUR/kWh]
bigMA sufficiently large constant used for modeling purposes [-]
C u O & M C H P CHP unitary O&M costs [EUR/t]
C O & M B E S S BESS O&M costs over the optimization window [EUR]
E B E S S n o m BESS nominal capacity [kWh]
L H V n g Natural gas lower heating value [KWh/Smc]
K c h a C a p L U T Number of points in the BESS charge capability LUT
K d i s C a p L U T Number of points in the BESS discharge capability LUT
K c h a L U T Number of points in the BESS charge LUT
K d i s L U T Number of points in the BESS discharge LUT
N p i e c e s C H P u Number of linear segments in the CHP piecewise efficiency curves
P k c h a D C L U T ,   P k c h a A C L U T ,   S O C k c h a L U T Points of the BESS charge LUT in terms of DC power, AC power, and SOC [p.u.]
P k d i s D C L U T ,   P k d i s A C L U T ,   S O C k d i s L U T Points of the BESS discharge LUT in terms of DC power, AC power, and SOC [p.u.]
P k c h a C a p L U T ,   S O C k c h a C a p L U T Points of the BESS charge capability LUT in terms of AC power and SOC [p.u.]
P k d i s C a p L U T ,   S O C k d i s C a p L U T Points of the BESS discharge capability LUT in terms of AC power and SOC [p.u.]
P B E S S n o m BESS nominal power [kW]
P u , t C O O L l o a d Cooling load [kW]
P u , t C O O L l o a d ~ Thermal power input to the absorption chiller required to meet the cooling load [kW]
P u , t E L l o a d Electrical load [kW]
P u M A X e l C H P CHP maximum electrical load [kWel]
P u M I N e l C H P CHP minimum electrical load [kWel]
P P O D M A X w i t h o l d Historical monthly peak of withdrawn power up to the current time window [kW]
P u , t P V PV power output [kW]
P u ,   t T H l o a d Thermal load [kW]
T t e x t External temperature [°C]
T Number of time steps in the optimization horizon
VATValue-added tax [-]
Variables
c u O & M b o i l e r Boiler O&M costs over the optimization window [EUR]
c u O & M C H P CHP O&M costs over the optimization window [EUR]
c P D R PDR total cost associated to gas withdrawn [EUR]
c t P D R e x c i s e PDR cost component related to excise taxes on natural gas consumption [EUR/h]
c t P D R S m c PDR cost component proportional to natural gas consumption [EUR/h]
c P O D POD total cost associated to electricity withdrawn [EUR]
c t P O D e x c i s e POD cost component related to excise taxes on electricity consumption [EUR]
c P O D f i x e d POD cost component related to fixed tariffs [EUR]
c P O D k W POD cost component related to power-based tariffs [EUR]
c t P O D k W h POD cost component related to energy-based tariffs [EUR/h]
c t P O D k W h c a p a c i t y Variable cost for capacity market tariffs on withdrawn energy [EUR/h]
c t P O D k W h o t h e r Variable cost for network and metering tariffs on withdrawn energy [EUR/h]
c t P O D k W h s u p p l y Variable cost for supply tariffs on withdrawn energy [EUR/h]
e u , t F U E L e l P r o d C H P Fraction of the CHP fuel input assumed to be employed for electricity production [Smc]
e t P D R w i t h PDR withdrawn natural gas [Smc]
e t P D R w i t h e l ,
e t P D R w i t h o t h e r
PDR auxiliary variables representing the volumes of natural gas withdrawn employed for electricity production and for other uses [Smc]
p t B E S S A u x Power consumption of the BESS auxiliary systems [kW]
p t B E S S c h a A C BESS AC charging power [p.u.]
p t B E S S c h a A C M A X BESS max AC charging power [p.u.]
p t B E S S c h a D C BESS DC charging power [p.u.]
p t B E S S d i s A C BESS AC discharging power [p.u.]
p t B E S S d i s A C M A X BESS max AC discharging power [p.u.]
p t B E S S d i s D C BESS DC discharging power [p.u.]
p u , t E L C H P CHP electrical power output [kW]
p t E L P R O D Total electrical power auto-produced by on-site sources [kW]
p u , t F U E L b o i l e r Boiler fuel power input [kW]
p u , t F U E L C H P CHP fuel power input [kW]
p t P O D i n j POD injected power [kW]
p t P O D w i t h POD withdrawn power [kW]
p t P O D c h a i n j ,
p t P O D c h a p r o d ,   p t P O D d i s i n j ,
p t P O D d i s c o n s
Auxiliary variables representing the portion of BESS charging power accounted as negative injected electricity [kW]
p P O D M A X w i t h Maximum monthly POD withdrawn power [kW]
p u , t T H b o i l e r Boiler thermal power output [kW]
p u , t T H C H P CHP thermal power output [kW]
r P O D POD total revenues associated to electricity injection [EUR]
s o c t B E S S BESS state of charge [p.u.]
s o c t B E S S i d l e Auxiliary variable used to represent the BESS state of charge during idle periods [p.u.]
y t B E S S i s C h a r g i n g ,   y t B E S S i s D i s c h a r g i n g ,   y t B E S S i s I d l e Binary variables defining the operating state of the BESS
y k , t c h a L U T Weighting coefficient associated with the k-th point of the BESS charge LUT at time t
y k , t d i s L U T Weighting coefficient associated with the k-th point of the BESS discharge LUT at time t
y k , t c h a C a p L U T Binary variable associated with the k-th interval of the BESS charge capability LUT at time t
y k , t d i s C a p L U T Binary variable associated with the k-th interval of the BESS discharge capability LUT at time t
y u , t , i e f f C H P Binary variables associated with the i-th linear segment of CHP efficiency curves
y u , t i s O n b o i l e r Binary variable indicating if the boiler is ON or OFF
y u , t i s O n C H P Binary variable indicating if the CHP is ON or OFF
y u , t i s S t a r t i n g U p C H P Binary variable defining if the CHP is starting-up
y u , t i s S h u t t i n g D o w n C H P Binary variable defining if the CHP is shutting-down
y t P O D c h a i n j ,
y t P O D d i s i n j
Auxiliary binary variables to represent the portion of total BESS charging power accounted as negative injected electricity

Appendix A. Data

Table A1. CHP techno-economic parameters employed in this study.
Table A1. CHP techno-economic parameters employed in this study.
CHP
t u m i n T i m e O n C H P 8 qrt-
t u m i n T i m e O f f C H P 3 qrt-
Θ u , i L B f u e l C H P [2247, 2696, 3146, 3595, 4045] kWfuel-
Θ u , i U B f u e l C H P [2696, 3146, 3595, 4045, 4494] kWfuel-
Υ u F U E L e l P r o d C H P 0.220 Smc/KWhelDL 119/2018 [33]
Φ u , i E L C H P [0.438, 0.457, 0.490, 0.426, 0.538] kWel/kWfuelExperimental data
Φ u , i T H C H P [0.335, 0.349, 0.362, 0.449, 0.309] kWth/kWfuelExperimental data
Ω u , i E L C H P [−44.8, −97.0, −201, 30.1, −425] kWelExperimental data
Ω u , i T H C H P [165, 128, 86.8, −225, 342] kWthExperimental data
C u O & M C H P 5 €/qrt-
P u M A X e l C H P 2000 kWelTechnical sheet
P u M I N e l C H P 1000 kWelTechnical sheet
Table A2. Boiler techno-economic parameters employed in this study.
Table A2. Boiler techno-economic parameters employed in this study.
Boiler
t u m i n T i m e O n b o i l e r 2 qrt-
t u m i n T i m e O f f b o i l e r 1 qrt-
Φ u , i T H b o i l e r 0.9348 kWth/kWfuelExperimental data
Ω u , i T H b o i l e r −34.10 kWthExperimental data
C u O & M b o i l e r 2 €/qrt-
P u M A X t h b o i l e r 297 kWthTechnical sheet
P u M I N t h b o i l e r 6125 kWthTechnical sheet
Table A3. BESS techno-economic parameters employed in this study.
Table A3. BESS techno-economic parameters employed in this study.
BESS
α B E S S A u x 25.5 kW/°CExperimental data
β B E S S A u x 38 kWExperimental data
δ B E S S A u x 6.2 [-]Experimental data
γ B E S S A u x 265 kWExperimental data
C O & M B E S S EUR 5/kWhinstalled[35]
E P R B E S S [0.5, 1, 2, 3, 4] h-
P B E S S n o m [1, 2, 3, 4] MW-
S O C B E S S m i n 0%-
S O C B E S S m a x 100%-
S O C t = 0 B E S S = S O C t = T B E S S 50%-
Table A4. Electricity tariffs used in this study based on the 2024 values published by ARERA [36].
Table A4. Electricity tariffs used in this study based on the 2024 values published by ARERA [36].
Month t P O D k W h s u p p l y [*] P O D k W h d i s p P O D k W h m e t e r i n g + P O D k W h n e t w o r k t P O D k W h c a p a c i t y [**] P O D k W m e t e r i n g + P O D k W n e t w o r k P O D f i x e d m e t e r i n g + P O D f i x e d m e t e r i n g
1[0.1654, 0.1587, 0.1356] EUR/kWh0.009505 EUR/kWh0.05690 EUR/kWh[0.001639, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
2[0.1647, 0.1660, 0.1470] EUR/kWh0.009505 EUR/kWh0.05690 EUR/kWh[0.001639, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
3[0.1647, 0.1660, 0.1470] EUR/kWh0.009505 EUR/kWh0.05690 EUR/kWh[0.001639, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
4[0.09262, 0.1083, 0.08759] EUR/kWh0.006869 EUR/kWh0.05690 EUR/kWh[0.002767, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
5[0.1017, 0.1185, 0.09329] EUR/kWh0.006869 EUR/kWh0.05690 EUR/kWh[0.002767, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
6[0.1109, 0.1232, 0.1025] EUR/kWh0.006869 EUR/kWh0.05690 EUR/kWh[0.002767, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
7[0.1157, 0.1377, 0.1118] EUR/kWh0.006384 EUR/kWh0.05690 EUR/kWh[0.002844, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
8[0.1287, 0.1550, 0.1292] EUR/kWh0.006384 EUR/kWh0.05690 EUR/kWh[0.002844, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
9[0.1294, 0.1388, 0.1127] EUR/kWh0.006384 EUR/kWh0.05690 EUR/kWh[0.002844, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
10[0.1308, 0.1357, 0.1123] EUR/kWh0.008227 EUR/kWh0.05690 EUR/kWh[0.002995, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
11[0.1526, 0.1443, 0.1242] EUR/kWh0.008227 EUR/kWh0.05690 EUR/kWh[0.002995, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
12[0.1655, 0.1530, 0.1229] EUR/kWh0.008227 EUR/kWh0.056901 EUR/kWh[0.002995, 0.0449] EUR/kWh4.2922 EUR/kW/month119.88 EUR/POD/month
[*] The time-of-use tariff applied in this study t P O D k W h s u p p l y is structured into three time bands: F1—weekdays from 8 a.m. to 7 p.m.; F2:—weekdays from 7 a.m. to 8 a.m. and from 7 p.m. to 11 p.m. and Saturdays from 7 a.m. to 1 p.m.; F3—weekdays and Saturdays from 12 a.m. to 7 a.m. and from 11 p.m. to 12 a.m. on Sundays and holidays. [**] The capacity market tariff varies depending on whether the hour falls within the 500 peak hours defined annually by the Italian TSO.
Table A5. Natural gas tariffs used in this study, based on 2024 values published by ARERA [36].
Table A5. Natural gas tariffs used in this study, based on 2024 values published by ARERA [36].
Month t P D R S m c s u p p l y P D R S m c n e t w o r k P D R f i x e d n e t w o r k
10.5521 EUR/Smc0.090347 EUR/Smc79.3168 EUR/PDR/month
20.5198 EUR/Smc0.090347 EUR/Smc79.3168 EUR/PDR/month
30.5315 EUR/Smc0.090347 EUR/Smc79.3168 EUR/PDR/month
40.5501 EUR/Smc0.093001 EUR/Smc79.3168 EUR/PDR/month
50.5718 EUR/Smc0.093001 EUR/Smc79.3168 EUR/PDR/month
60.5931 EUR/Smc0.093001 EUR/Smc79.3168 EUR/PDR/month
70.5921 EUR/Smc0.093001 EUR/Smc79.3168 EUR/PDR/month
80.6430 EUR/Smc0.093001 EUR/Smc79.3168 EUR/PDR/month
90.6265 EUR/Smc0.093001 EUR/Smc79.3168 EUR/PDR/month
100.6465 EUR/Smc0.094827 EUR/Smc79.3168 EUR/PDR/month
110.6882 EUR/Smc0.094827 EUR/Smc79.3168 EUR/PDR/month
120.7206 EUR/Smc0.094827 EUR/Smc79.3168 EUR/PDR/month
Table A6. Additional parameters used in the analysis.
Table A6. Additional parameters used in the analysis.
Additional Parameters
ϵ l o s s e s 3.8%-
t D A M z o n a l -GME [44]
P D R e x c i s e e l 0.000135 EUR/SmcDL 119/2018 [33]
P D R e x c i s e o t h e r 0.186 EUR/Smc[35]
P O D e x c i s e 0.0125 €/kWhDL 504/1995 [45]
bigM1,000,000 [-]-
L H V n g 9.6 kWh/Smc-
VAT22%-

Appendix B. Results

Table A7. Impact of increasing the DAM price differential Δ on daily energy injection, maximum power withdrawal from the electrical grid, and net negative injected electricity for the MEMG operating with the optimal BESS configuration (2 MW/4 MWh) on 15 July 2024.
Table A7. Impact of increasing the DAM price differential Δ on daily energy injection, maximum power withdrawal from the electrical grid, and net negative injected electricity for the MEMG operating with the optimal BESS configuration (2 MW/4 MWh) on 15 July 2024.
t = 1 96 p t P O D i n j 1 4 p P O D M A X w i t h t = 1 96 p t P O D c h a i n j 1 4
Δ = 10 kWh504 kW0 kWh
Δ = 287 kWh 499 kW0 kWh
Δ = 31143 kWh499 kW0 kWh
Δ = 51477 kWh520 kW0 kWh
Δ = 107707 kWh1144 kW0 kWh
Table A8. Impact of increasing the DAM price differential Δ on daily energy injection, maximum power withdrawal from the electrical grid, and net negative injected electricity for the MEMG operating with the optimal BESS configuration (2 MW/4 MWh) on 12 December 2024.
Table A8. Impact of increasing the DAM price differential Δ on daily energy injection, maximum power withdrawal from the electrical grid, and net negative injected electricity for the MEMG operating with the optimal BESS configuration (2 MW/4 MWh) on 12 December 2024.
t = 1 96 p t P O D i n j 1 4 p P O D M A X w i t h t = 1 96 p t P O D c h a i n j 1 4
Δ = 1732 kWh152 kW0 kWh
Δ = 22914 kWh 152 kW0 kWh
Δ = 32940 kWh152 kW0 kWh
Δ = 57415 kWh639 kW0 kWh
Δ = 1011,323 kWh1384 kW655 kWh
Table A9. Impact of increasing the DAM price differential Δ on daily energy injection, maximum power withdrawal from the electrical grid, and net negative injected electricity for the MEMG operating with the largest BESS configuration (4 MW/16 MWh) on 12 December 2024.
Table A9. Impact of increasing the DAM price differential Δ on daily energy injection, maximum power withdrawal from the electrical grid, and net negative injected electricity for the MEMG operating with the largest BESS configuration (4 MW/16 MWh) on 12 December 2024.
t = 1 96 p t P O D i n j 1 4 p P O D M A X w i t h t = 1 96 p t P O D c h a i n j 1 4
Δ = 14652 kWh0 kW0 kWh
Δ = 24725 kWh 0 kW0 kWh
Δ = 321,549 kWh5223 kW10,607 kWh
Δ = 531,627 kWh5223 kW15,010 kWh
Δ = 1031,627 kWh5223 kW15,010 kWh
Figure A1. Impact of increasing the DAM price differential on the optimal electrical scheduling of the MEMG with the largest BESS configuration (4 MW/16 MWh) on 12 December 2024.
Figure A1. Impact of increasing the DAM price differential on the optimal electrical scheduling of the MEMG with the largest BESS configuration (4 MW/16 MWh) on 12 December 2024.
Applsci 15 08529 g0a1
Figure A2. Impact of time-of-use power-based charges on the optimal electrical scheduling of the MEMG with the largest BESS configuration (4 MW/16 MWh) on 15 July 2024.
Figure A2. Impact of time-of-use power-based charges on the optimal electrical scheduling of the MEMG with the largest BESS configuration (4 MW/16 MWh) on 15 July 2024.
Applsci 15 08529 g0a2

References

  1. Policy Toolbox for Industrial Decarbonisation. IEA: Paris, France, 2025. Available online: https://www.iea.org/reports/policy-toolbox-for-industrial-decarbonisation (accessed on 12 May 2025).
  2. European Commission. European Climate Law. Available online: https://climate.ec.europa.eu/eu-action/european-climate-law_en (accessed on 12 May 2025).
  3. Cao, Y.; Xu, Y. Secure operation of a multi-energy system: A comprehensive review. Renew. Sustain. Energy Rev. 2025, 211, 115312. [Google Scholar] [CrossRef]
  4. Empowering Urban Energy Transitions—Smart Cities and Smart Grids. IEA: Paris, France, 2024. Available online: https://www.iea.org/reports/empowering-urban-energy-transitions (accessed on 25 November 2024).
  5. Xu, Y.; Leonforte, F.; Del Pero, C. District multi-energy systems: A comprehensive review of configurations, technologies, and performances. Build Environ. 2024, 253, 111318. [Google Scholar] [CrossRef]
  6. Sasidhar, P.R.S.; Gebremedhin, A.; Norheim, I. Multi-energy microgrid design and the role of coupling components—A review. Renew. Sustain. Energy Rev. 2025, 216, 115540. [Google Scholar] [CrossRef]
  7. Alabi, T.M.; Agbajor, F.D.; Yang, Z.; Lu, L.; Ogungbile, A.J. Strategic potential of multi-energy system towards carbon neutrality: A forward-looking overview. Energy Built Environ. 2023, 4, 689–708. [Google Scholar] [CrossRef]
  8. Rowe, K.; Cooke, K.; Mokryani, G.; Campean, F.; Chambers, T. A bi-level multi-node optimal siting, sizing, and operation of multi energy system in an integrated energy network of electricity-gas-heat with peer-to-peer trading. Appl. Energy 2025, 382, 125256. [Google Scholar] [CrossRef]
  9. Xu, Z.; Chen, Y.; Sang, L.; Qiu, H.; Wu, Z.; Ye, H. Resilience-oriented planning for microgrid clusters considering P2P energy trading and extreme events. Appl. Energy 2025, 388, 125560. [Google Scholar] [CrossRef]
  10. Rajendran, S.S.P.; Gebremedhin, A. Holistic planning framework for multi-energy microgrids: A multi-objective perspective on system optimization. Appl. Energy 2025, 392, 125953. [Google Scholar] [CrossRef]
  11. Glücker, P.; Pesch, T.; Benigni, A. Optimal sizing of battery energy storage system for local multi-energy systems: The impact of the thermal vector. Appl. Energy 2024, 372, 123732. [Google Scholar] [CrossRef]
  12. Bruno, S.; Dicorato, M.; La Scala, M.; Sbrizzai, R.; Lombardi, P.A.; Arendarski, B. Optimal Sizing and Operation of Electric and Thermal Storage in a Net Zero Multi Energy System. Energies 2019, 12, 3389. [Google Scholar] [CrossRef]
  13. Liu, S.; Han, S.; Tian, J.; Rong, N. A multi-objective optimization scheduling approach of integrated energy system considering the exergy efficiency using the variable step-size approximation method. Energy 2024, 311, 133370. [Google Scholar] [CrossRef]
  14. Li, Z.; Xu, Y. Optimal coordinated energy dispatch of a multi-energy microgrid in grid-connected and islanded modes. Appl. Energy 2018, 210, 974–986. [Google Scholar] [CrossRef]
  15. Dong, X.; Lu, J.; Sun, B. Min-max Operation Optimization of Renewable Energy Combined Cooling, Heating, and Power Systems Based on Model Predictive Control. IFAC-Pap. 2020, 53, 12809–12814. [Google Scholar] [CrossRef]
  16. Wang, C. Prioritized sum-tree experience replay TD3 DRL-based online energy management of a residential microgrid. Appl. Energy 2024, 368, 123471. [Google Scholar] [CrossRef]
  17. Capuder, T.; Mancarella, P. Techno-economic and environmental modelling and optimization of flexible distributed multi-generation options. Energy 2014, 71, 516–533. [Google Scholar] [CrossRef]
  18. Vandermeulen, A.; van der Heijde, B.; Helsen, L. Controlling district heating and cooling networks to unlock flexibility: A review. Energy 2018, 151, 103–115. [Google Scholar] [CrossRef]
  19. Yang, C.; Zhu, Y.; Zhou, J.; Zhao, J.; Bu, R.; Feng, G. Dynamic flexibility optimization of integrated energy system based on two-timescale model predictive control. Energy 2023, 276, 127501. [Google Scholar] [CrossRef]
  20. Chicco, G.; Riaz, S.; Mazza, A.; Mancarella, P. Flexibility from Distributed Multienergy Systems. Proc. IEEE 2020, 108, 1496–1517. [Google Scholar] [CrossRef]
  21. Mancarella, P.; Chicco, G. Integrated Energy and Ancillary Services Provision in Multi-Energy Systems. In Proceedings of the IREP Symposium: Bulk Power System Dynamics and Control—IX Optimization, Security and Control of the Emerging Power Grid, IREP 2013, Rethymno, Greece, 25–30 August 2013; pp. 1–19. [Google Scholar] [CrossRef]
  22. Ceseña, E.A.M.; Good, N.; Syrri, A.L.; Mancarella, P. Techno-economic and business case assessment of multi-energy microgrids with co-optimization of energy, reserve and reliability services. Appl. Energy 2018, 210, 896–913. [Google Scholar] [CrossRef]
  23. Mancarella, P.; Chicco, G.; Capuder, T. Arbitrage opportunities for distributed multi-energy systems in providing power system ancillary services. Energy 2018, 161, 381–395. [Google Scholar] [CrossRef]
  24. Lin, Y. Evaluation and optimization for integrated photo-voltaic and battery energy storage systems under time-of-use pricing in the industrial park. J. Energy Storage 2024, 100, 113614. [Google Scholar] [CrossRef]
  25. Solanki, B.V.; Raghurajan, A.; Bhattacharya, K.; Canizares, C.A. Including Smart Loads for Optimal Demand Response in Integrated Energy Management Systems for Isolated Microgrids. IEEE Trans. Smart Grid 2015, 8, 1739–1748. [Google Scholar] [CrossRef]
  26. Zhou, L.; Zhang, Y.; Lin, X.; Li, C.; Cai, Z.; Yang, P. Optimal sizing of PV and BESS for a smart household considering different price mechanisms. IEEE Access 2018, 6, 41050–41059. [Google Scholar] [CrossRef]
  27. Pyomo. Available online: https://www.pyomo.org/ (accessed on 18 May 2024).
  28. Gurobi. Available online: https://www.gurobi.com/ (accessed on 18 May 2024).
  29. Politecnico di Milano. PoliGrid—A Smart Grid in Piazza Leonardo. Available online: https://www.polimi.it/en/sustainable-development/environment/energy-and-decarbonisation/energy-committee/translate-to-english-poligrid (accessed on 9 May 2025).
  30. ARERA. Delibera 09 Dicembre 2021 566/2021/R/eel. Available online: https://www.arera.it/atti-e-provvedimenti/dettaglio/21/566-21 (accessed on 26 June 2025).
  31. ARERA. Delibera 16 Marzo 2021 109/2021/R/eel. Available online: https://www.arera.it/atti-e-provvedimenti/dettaglio/21/109-21 (accessed on 13 May 2025).
  32. Blocks—Pyomo 6.8.0 Documentation. Available online: https://pyomo.readthedocs.io/en/6.8.0/library_reference/kernel/block.html (accessed on 13 May 2025).
  33. Disposizioni Urgenti in Materia Fiscale E Finanziaria. Available online: https://www.gazzettaufficiale.it/eli/id/2018/12/18/18A08143/sg (accessed on 14 May 2025).
  34. Bovera, F.; Spiller, M.; Zatti, M.; Rancilio, G.; Merlo, M. Development, validation, and testing of advanced mathematical models for the optimization of BESS operation. Sustain. Energy Grids Netw. 2023, 36, 101152. [Google Scholar] [CrossRef]
  35. Scrocca, A.; Bovera, F.; Rancilio, G.; Delfanti, M.; Zatti, M. Techno-Economic Optimization of Services Stacking for a Battery Participating to Electricity Spot Markets. In Proceedings of the International Conference on the European Energy Market, EEM, Istanbul, Turkiye, 10–12 June 2024; IEEE Computer Society: Washington, DC, USA, 2024. [Google Scholar] [CrossRef]
  36. Arera: Bolletta. Available online: https://www.arera.it/bolletta (accessed on 10 June 2025).
  37. European Union. Regulation-EU-2024/1747-EN-EUR-Lex. Available online: https://eur-lex.europa.eu/eli/reg/2024/1747/oj/eng (accessed on 26 June 2025).
  38. ACER. Getting the Price Signals Right: ACER’s Principles for Fair and Cost-Reflective Electricity Network Tariffs, March 2025. Available online: https://www.acer.europa.eu/news/getting-price-signals-right-fair-and-cost-reflective-electricity-network-tariffs (accessed on 16 July 2025).
  39. Harlow, J.E. A Wide Range of Testing Results on an Excellent Lithium-Ion Cell Chemistry to be used as Benchmarks for New Battery Technologies. J. Electrochem. Soc. 2019, 166, A3031. [Google Scholar] [CrossRef]
  40. Sperimentazione MiNDFlex per la Rete Elettrica di Milano|Unareti. Available online: https://www.unareti.it/it/media/progetti/sperimentazione-mindflex-rete-elettrica-milano (accessed on 15 July 2025).
  41. Andreotti, D.; Spiller, M.; Scrocca, A.; Bovera, F.; Rancilio, G. Modeling and Analysis of BESS Operations in Electricity Markets: Prediction and Strategies for Day-Ahead and Continuous Intra-Day Markets. Sustainability 2024, 16, 7940. [Google Scholar] [CrossRef]
  42. Rancilio, G.; Dimovski, A.; Bovera, F.; Moncecchi, M.; Falabretti, D.; Merlo, M. Service stacking on residential BESS: RES integration by flexibility provision on ancillary services markets. Sustain. Energy Grids Netw. 2023, 35, 101097. [Google Scholar] [CrossRef]
  43. Scrocca, A.; Bovera, F.; Delfanti, M.; Blaco, A. Recursive Reconfiguration of Private MV Networks to Maximize Dynamic Islanding Capability. In Proceedings of the 2024 116th AEIT International Annual Conference, AEIT 2024, Trento, Italy, 25–27 September 2024. [Google Scholar] [CrossRef]
  44. GME-Gestore Mercati Energetici. Available online: https://www.mercatoelettrico.org/it/ (accessed on 28 May 2024).
  45. Gazzetta Ufficiale della Repubblica Italiana. DECRETO LEGISLATIVO 26 Ottobre 1995, n. 504. Available online: https://www.gazzettaufficiale.it/eli/id/1995/11/29/095G0523/sg (accessed on 18 June 2025).
Figure 1. Block-based modeling framework for a generic multi-energy system. Lines in the diagram represent energy vectors: yellow denotes electricity, red indicates thermal energy, purple corresponds to cooling energy, and grey represents natural gas flow. Green boxes depict devices or low-level component blocks, blue boxes represent upper-level blocks that model relationships between device blocks for each energy vector, and orange boxes represent external systems (e.g., markets), which can be interconnected with specific blocks.
Figure 1. Block-based modeling framework for a generic multi-energy system. Lines in the diagram represent energy vectors: yellow denotes electricity, red indicates thermal energy, purple corresponds to cooling energy, and grey represents natural gas flow. Green boxes depict devices or low-level component blocks, blue boxes represent upper-level blocks that model relationships between device blocks for each energy vector, and orange boxes represent external systems (e.g., markets), which can be interconnected with specific blocks.
Applsci 15 08529 g001
Figure 2. Experimentally derived look-up tables (LUTs) used in this study.
Figure 2. Experimentally derived look-up tables (LUTs) used in this study.
Applsci 15 08529 g002
Figure 3. Simplified schematic of the MEMG at the Leonardo campus of Politecnico di Milano.
Figure 3. Simplified schematic of the MEMG at the Leonardo campus of Politecnico di Milano.
Applsci 15 08529 g003
Figure 4. Schematic representation of the MEMG components included in the block-based modeling framework analyzed in this study. * The cooling load is represented as its thermal equivalent, i.e., the thermal input required by the absorption chiller to meet the cooling demand.
Figure 4. Schematic representation of the MEMG components included in the block-based modeling framework analyzed in this study. * The cooling load is represented as its thermal equivalent, i.e., the thermal input required by the absorption chiller to meet the cooling demand.
Applsci 15 08529 g004
Figure 5. NPV over a 10-year horizon for each BESS configuration evaluated.
Figure 5. NPV over a 10-year horizon for each BESS configuration evaluated.
Applsci 15 08529 g005
Figure 6. Comparison of annual operational cost components between the reference scenario (without BESS) and the BESS configuration that minimizes annual costs (2 MW/4 MWh).
Figure 6. Comparison of annual operational cost components between the reference scenario (without BESS) and the BESS configuration that minimizes annual costs (2 MW/4 MWh).
Applsci 15 08529 g006
Figure 7. Comparison of annual POD cost components between the reference scenario (without BESS) and the BESS configuration that minimizes annual costs (2 MW/4 MWh).
Figure 7. Comparison of annual POD cost components between the reference scenario (without BESS) and the BESS configuration that minimizes annual costs (2 MW/4 MWh).
Applsci 15 08529 g007
Figure 8. Comparison of 15-min electric power flows in the MEMG between the reference and optimal BESS-integrated configurations on 15 July 2024.
Figure 8. Comparison of 15-min electric power flows in the MEMG between the reference and optimal BESS-integrated configurations on 15 July 2024.
Applsci 15 08529 g008
Figure 9. Comparison of 15-min electric and thermal power flows in the MEMG between the reference and optimal BESS-integrated (2 MW/4 MWh) configurations on 12 December 2024.
Figure 9. Comparison of 15-min electric and thermal power flows in the MEMG between the reference and optimal BESS-integrated (2 MW/4 MWh) configurations on 12 December 2024.
Applsci 15 08529 g009
Figure 10. Impact of increasing the DAM price differential on the optimal electrical scheduling of the MEMG with the optimal BESS configuration (2 MW/4 MWh) on 15 July 2024.
Figure 10. Impact of increasing the DAM price differential on the optimal electrical scheduling of the MEMG with the optimal BESS configuration (2 MW/4 MWh) on 15 July 2024.
Applsci 15 08529 g010
Figure 11. Impact of increasing the DAM price differential on the optimal electrical scheduling of the MEMG with the optimal BESS configuration (2 MW/4 MWh) on 12 December 2024.
Figure 11. Impact of increasing the DAM price differential on the optimal electrical scheduling of the MEMG with the optimal BESS configuration (2 MW/4 MWh) on 12 December 2024.
Applsci 15 08529 g011
Figure 12. Impact of time-of-use power-based charges on the optimal electrical scheduling of the MEMG with the optimal BESS configuration (2 MW/4 MWh) on 15 July 2024.
Figure 12. Impact of time-of-use power-based charges on the optimal electrical scheduling of the MEMG with the optimal BESS configuration (2 MW/4 MWh) on 15 July 2024.
Applsci 15 08529 g012
Table 1. Annual energy values of electrical, thermal, and cooling (* thermal-equivalent) demands, and PV generation for the reference year 2024.
Table 1. Annual energy values of electrical, thermal, and cooling (* thermal-equivalent) demands, and PV generation for the reference year 2024.
Electrical Load [MWh/y]PV Electrical
Generation [MWh/y]
Net Electrical Load [MWh/y]Thermal Load [MWh/y]Cooling Load * [MWh/y]
13,11293012,1828422.91417.2
Table 2. Annual costs for each BESS configuration, including the cost difference compared to the reference case without BESS (EUR 3679 k) and the corresponding number of battery cycles per year.
Table 2. Annual costs for each BESS configuration, including the cost difference compared to the reference case without BESS (EUR 3679 k) and the corresponding number of battery cycles per year.
EPR = 0.5 hEPR = 1 hEPR = 2 hEPR = 3 hEPR = 4 h
P = 1 MWEUR 3638 k/yEUR 3590 k/yEUR 3571 k/yEUR 3564 k/yEUR 3562 k/y
Δ = EUR 41.6 k/yΔ = EUR 88.8 k/yΔ = EUR 108.2 k/yΔ = EUR 114.9 k/yΔ = EUR 117.6 k/y
BESS_cycles = 791BESS_cycles = 880BESS_cycles = 593BESS_cycles = 424BESS_cycles = 339
P = 2 MWEUR 3581 k/yEUR 3553 k/yEUR 3539 k/yEUR 3539 k/yEUR 3545 k/y
Δ = EUR 97.7 k/yΔ = EUR 125.7 k/yΔ = EUR 140.2 k/yΔ = EUR 139.7 k/yΔ = EUR 133.2 k/y
BESS_cycles = 1076BESS_cycles = 798BESS_cycles = 452BESS_cycles = 313BESS_cycles = 239
P = 3 MWEUR 3566 k/yEUR 3544 k/yEUR 3541 k/yEUR 3551 k/yEUR 3565 k/y
Δ = EUR 113.5 k/yΔ = EUR 134.8 k/yΔ = EUR 138.2 k/yΔ = EUR 127.9 k/yΔ = EUR 114.3 k/y
BESS_cycles = 956BESS_cycles = 591BESS_cycles = 324BESS_cycles = 220BESS_cycles = 166
P = 4 MWEUR 3559 k/yEUR 3545 k/yEUR 3558 k/yEUR 3576 k/yEUR 3596 k/y
Δ = EUR 120.0 k/yΔ = EUR 134.2 k/yΔ = EUR 120.7 k/yΔ = EUR 103.0 k/yΔ = EUR 83.1 k/y
BESS_cycles = 801BESS_cycles = 468BESS_cycles = 246BESS_cycles = 167BESS_cycles = 124
Table 3. Capacity factors of the CHP, boilers, BESS, and annual heat dissipation for both the reference and optimal BESS-integrated configurations.
Table 3. Capacity factors of the CHP, boilers, BESS, and annual heat dissipation for both the reference and optimal BESS-integrated configurations.
CHP CFBoilers CFDissipated HeatBESS CF
Reference Case73.75%4.53%6189 MWh/y-
Optimal Case71.63%4.54%5792 MWh/y20.60%
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.

Share and Cite

MDPI and ACS Style

Scrocca, A.; Delfanti, M.; Bovera, F. Optimal Sizing of Battery Energy Storage System for Implicit Flexibility in Multi-Energy Microgrids. Appl. Sci. 2025, 15, 8529. https://doi.org/10.3390/app15158529

AMA Style

Scrocca A, Delfanti M, Bovera F. Optimal Sizing of Battery Energy Storage System for Implicit Flexibility in Multi-Energy Microgrids. Applied Sciences. 2025; 15(15):8529. https://doi.org/10.3390/app15158529

Chicago/Turabian Style

Scrocca, Andrea, Maurizio Delfanti, and Filippo Bovera. 2025. "Optimal Sizing of Battery Energy Storage System for Implicit Flexibility in Multi-Energy Microgrids" Applied Sciences 15, no. 15: 8529. https://doi.org/10.3390/app15158529

APA Style

Scrocca, A., Delfanti, M., & Bovera, F. (2025). Optimal Sizing of Battery Energy Storage System for Implicit Flexibility in Multi-Energy Microgrids. Applied Sciences, 15(15), 8529. https://doi.org/10.3390/app15158529

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop