Paper deep dive
An Optimal Battery-Free Approach for Emission Reduction by Storing Solar Surplus in Building Thermal Mass
Michela Boffi, Jessica Leoni, Fabrizio Leonforte, Mara Tanelli, Paolo Oliaro
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 95%
Last extracted: 3/31/2026, 2:23:10 AM
Summary
The paper proposes a battery-free, carbon-aware control strategy for buildings that utilizes thermal mass as passive energy storage. By adjusting indoor temperature setpoints based on solar surplus and time-varying grid carbon intensity, the strategy reduces CO2 emissions and grid reliance while maintaining occupant comfort. The approach is validated using TRNSYS simulations across different thermal mass configurations.
Entities (5)
Relation Signals (3)
Proposed Strategy → utilizes → Building Thermal Mass
confidence 100% · we propose an optimal battery-free control strategy to reduce carbon emissions by storing the surplus of solar energy in the building’s thermal mass.
Proposed Strategy → reduces → CO2 emissions
confidence 95% · the results show that our strategy yields considerable CO 2 emissions reduction
TRNSYS → simulates → Building Thermal Mass
confidence 90% · We evaluate the approach by simulating three TRNSYS models of the same system with different thermal mass.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Decarbonization in buildings calls for advanced control strategies that coordinate on-site renewables, grid electricity, and thermal demand. Literature approaches typically rely on demand side management strategies or on active energy storage, like batteries. However, the first solution often neglects carbon-aware objectives, and could lead to grid overload issues, while batteries entail environmental, end-of-life, and cost concerns. To overcome these limitations, we propose an optimal, carbon-aware optimization strategy that exploits the building's thermal mass as a passive storage, avoiding dedicated batteries. Specifically, when a surplus of renewable energy is available, our strategy computes the optimal share of surplus to store by temporarily adjusting the indoor temperature setpoint within comfort bounds. Thus, by explicitly accounting for forecasts of building energy consumption, solar production, and time-varying grid carbon intensity, our strategy enables emissions-aware load shifting while maintaining comfort. We evaluate the approach by simulating three TRNSYS models of the same system with different thermal mass. In all cases, the results show consistent reductions in grid electricity consumption with respect to a baseline that does not leverage surplus renewable generation. These findings highlight the potential of thermal-mass-based control for building decarbonization.
Tags
Links
- Source: https://arxiv.org/abs/2603.28217v1
- Canonical: https://arxiv.org/abs/2603.28217v1
Trouble viewing inline? Open PDF directly →
Full Text
93,808 characters extracted from source content.
Expand or collapse full text
An Optimal Battery-Free Approach for Emission Reduction by Storing Solar Surplus in Building Thermal Mass Michela Boffi a,∗ , Jessica Leoni a , Fabrizio Leonforte a , Mara Tanelli a , Paolo Oliaro a a Politecnico di Milano, Piazza Leonardo da Vinci, Milano, 20133, Milano, Italy Abstract Decarbonization in buildings calls for advanced control strategies that coor- dinate on-site renewables, grid electricity, and thermal demand. Literature approaches typically rely on demand side management strategies or on ac- tive energy storage, like batteries. However, the first solution often neglects carbon-aware objectives, and could lead to grid overload issues, while bat- teries entail environmental, end-of-life, and cost concerns. To overcome these limitations, we propose an optimal, carbon-aware op- timization strategy that exploits the building’s thermal mass as a passive storage, avoiding dedicated batteries. Specifically, when a surplus of renew- able energy is available, our strategy computes the optimal share of surplus to store by temporarily adjusting the indoor temperature setpoint within comfort bounds. Thus, by explicitly accounting for forecasts of building en- ergy consumption, solar production, and time-varying grid carbon intensity, our strategy enables emissions-aware load shifting while maintaining comfort. We evaluate the approach by simulating three TRNSYS models of the same system with different thermal mass. In all cases, the results show consistent reductions in grid electricity consumption with respect to a baseline that does not leverage surplus renewable generation. These findings highlight the potential of thermal-mass-based control for building decarbonization. ∗ Corresponding author Email addresses: michela.boffi@polimi.it (Michela Boffi), jessica.leoni@polimi.it (Jessica Leoni), fabrizio.leonforte@polimi.it (Fabrizio Leonforte), mara.tanelli@polimi.it (Mara Tanelli), paolo.oliaro@polimi.it (Paolo Oliaro) arXiv:2603.28217v1 [eess.SY] 30 Mar 2026 Keywords: Optimal control, Decarbonization, Photovoltaics, Smart buildings, Passive thermal storage, Energy flexibility 1. Introduction The construction and building sector contributes significantly to global energy-related CO 2 emissions. According to data reported in the Global Status Report for Buildings and Construction 2024/2025, in 2023 buildings were responsible for approximately 32% of global energy demand and 34% of CO 2 emissions, mainly associated with space heating and cooling, domestic hot water production, lighting, and other end uses, which reached a record of 9.8 GtCO 2 [1]. Despite the progress made in 2024, represented by greater adoption of renewable energy and increased electrification, the sector is still not aligned with the climate neutrality targets set for 2050. In fact, as highlighted by the global buildings climate tracker, between 2015 and 2023, CO 2 emissions associated with buildings increased by 5.4%, compared to the required reduction of 28.1% [1]. As a consequence, the observed progress remains insufficient to meet the targets of the Paris Agreement [1]. Figure 1: CO 2 Emissions from the building sector from 2010 to 2023 (left) and the share of buildings in global energy- and process-related emissions in 2023 (right). Source: re- produced from [1]. Therefore, practical decarbonization solutions are required, and improv- ing envelope and system efficiency alone is often insufficient. In this regard, a promising direction is given by the design of strategies aimed at explic- itly increasing the utilization of on-site renewable generation, predominantly 2 solar. However, photovoltaic (PV) output is intermittent and often poorly aligned with building energy demand, so surplus electricity frequently occurs when it cannot be consumed directly. To manage the intermittency of energy production from PV systems, two strategies are typically adopted: feeding the generated energy into the grid and using electrochemical storage systems. However, both solutions come with some drawbacks. Indeed, in the first case, under a scenario of full electrification of the built environment, a large-scale injection of electrical energy into the grid may lead to over-voltage issues, overloads, and congestion in distribution lines, particularly in the presence of old electrical networks [2, 3]. Consequently, an excessive reliance on the electrical grid may become critical for the stability and reliability of the system. Considering batteries, instead, it must be noted that they are tech- nically effective but not fully sustainable. In fact, some studies show that a non-negligible share of the environmental footprint is related to battery man- ufacturing and end-of-life processing, with outcomes strongly dependent on assumptions regarding chemistry, lifetime, depth of discharge, and recycling pathways [4, 5]. Moreover, although recycling technologies are advancing, they are still complex and energy-intensive, and their viability depends on logistics and recovered material value, hindering both sustainability and cost at scale [4, 6, 7]. These limitations have motivated growing interest in battery-free alter- natives. In this context, the most promising solutions aim at increasing re- newable self-consumption by exploiting intrinsic storage within the building. This perspective naturally connects to the concept of building energy flexibil- ity, defined as the capability of a building to modulate demand and/or gener- ation in response to climate, occupants’ needs, and grid requirements [8, 9]. Energy flexibility can be provided through dedicated storage (electrical or thermal) or, importantly, through passive storage enabled by the thermal capacity of envelope components [8]. In this context, several studies high- light thermal inertia as a promising alternative to active storage. Specifically, these works analyze how to engineer the building envelope so that it can store and release heat, shifting Heating, Ventilation, and Air Conditioning (HVAC) operation and effectively acting as a “virtual battery” [10, 11]. However, much of the existing literature emphasizes envelope design and retrofit measures as a passive mean to enhance thermal storage capacity, rather than a tool that can be real-time managed by a proper control framework. Beyond storage technologies, the strategy used to regulate the way in which they absorb and release energy must also be considered. In this re- 3 gard, is indeed key to note that many building control strategies aim at minimizing energy use or electricity cost. However, these objectives are not generally equivalent to minimizing CO 2 emissions. In fact, as electricity- related emissions depend on the time-varying grid carbon intensity, the same energy saved at different times can lead to markedly different emission out- comes. Therefore, not only an alternative to battery storage is required but also a dedicated control strategy that explicitly account for carbon intensity, rather than treating energy or cost minimization as a proxy for decarboniza- tion. To address these issues, in this work, we propose an optimal battery-free control strategy to reduce carbon emissions by storing the surplus of solar energy in the building’s thermal mass. This avoids battery-related environ- mental and end-of-life impacts and makes the solution easier to implement, also reducing costs. Specifically, we design a control strategy that, consid- ering the forecasts of real-time carbon emission intensity, PV generation, external temperature, and building energy consumption, computes the op- timal fraction (α(k)) of available surplus solar energy to be stored into the building’s thermal mass. Thus, it shifts the indoor temperature setpoint upward in winter and downward in summer, while maintaining occupants’ comfort. In doing so, our strategy stores solar energy when it is available and reduces subsequent reliance on grid electricity, thereby lowering near- term CO 2 emissions. To evaluate the effectiveness of the proposed strategy, we consider three case studies in which we analyze the behavior of the room, but with different thermal mass, i.e., with low, medium, and high thermal ca- pacity. For each case, we simulate its thermal dynamics with and without the proposed control strategy, enabling a direct comparison of its impact across different envelope characteristics. In all the scenarios, the results show that our strategy yields considerable CO 2 emissions reduction, while maintaining occupants’ comfort. Furthermore, as a side effect, it also allows for reducing the consumption of grid electricity, thus favoring cost savings. The remainder of this paper is organized as follows: Section 2 better details the state of the art on building energy management techniques and on the use of the building envelope for passive thermal storage. Then, Section 3 details the proposed method and its implementation, also providing insights into the theoretical rationale that supports it. Next, Section 4 describes the case study and the models used to evaluate our strategy, while Section 5 presents and discusses the obtained results. Finally, Section 6 comments on the main contributions of the work and outlines its possible future directions. 4 2. Related Work This Section summarizes the state of the art in building energy manage- ment. To this end, we first review the most effective strategies proposed in the literature, then focus on approaches that use the building’s thermal mass as passive storage. The goal is to outline their benefits and current limita- tions, to effectively position our work and highlight its novel contributions. 2.1. Building energy management Building energy management strategies can be broadly grouped into three categories, each with distinct strengths and limitations. A first research line focuses on demand side management. These approaches aims at reshap- ing intelligent device scheduling and user behavior through load shifting, peak reduction, and price-based operation. Representative examples include reinforcement learning-based schedulers for residential devices and aggrega- tions [12, 13], game-theoretic or negotiation-based coordination schemes [14], and heuristic optimization, mainly employed in industrial applications [15]. Despite promising results, demand side management strategies depend heav- ily on the availability of sufficiently flexible loads and on user acceptance, and their performance degrades when short-term demand forecasts are inac- curate. A second family of approaches includes model-based control strategies, where a predictive model is used to optimize HVAC setpoints and operating variables over a receding horizon [16, 17]. Compared to occupancy- or air quality-driven modulation, these methods explicitly exploit forecasts of ex- ogenous disturbances and operating conditions to anticipate system behavior and adjust the plant accordingly. Their effectiveness, however, strongly de- pends on the availability of accurate predictive models. To this end, in many contributions, models are learned via machine- or deep-learning methods, which prove to be less computationally intensive, despite providing simi- lar accuracy performance. However, they also come with drawbacks, e.g., changes in operating conditions or occupancy patterns may lead to incor- rect predictions, thereby requiring frequent re-calibration [18]. Conversely, physics-based models yield more generalizable predictions but lead to com- putationally demanding optimization problems that may be difficult to solve in real time on embedded controllers. Similar limitations characterize the last category of literature approaches, which includes works based on deep reinforcement learning [19, 20], as well 5 as metaheuristics and swarm intelligence [21, 22], or even broader deep- learning-enabled frameworks [23, 24] for HVAC control and comfort enforce- ment. While these methods can handle complex, nonlinear dynamics and high-dimensional state spaces, they are typically sample-inefficient, sensitive to reward design, and difficult to deploy safely without extensive training. Moreover, the lack of interpretability limits user trust and regulatory accep- tance, which are critical factors for real-world adoption. All three categories share a common limitation: they are primarily de- signed to minimize energy consumption or cost, without explicitly accounting for the carbon intensity of the grid. New strategies are therefore required that go beyond conventional energy reduction by explicitly targeting decarboniza- tion. This means that they should not be designed to use less energy, but to use energy at the right time, i.e., when the grid is cleaner and renew- able availability is higher. Achieving this goal requires integrating real-time carbon intensity signals into the energy management decision-making pro- cess, which remains largely absent from the existing literature. Beyond that, two additional limitations also emerge. First, practical deployability: many state-of-the-art approaches rely on deep learning or reinforcement learning, which are sensitive to changes in plant configuration and operating condi- tions, poorly interpretable, and computationally complex. Therefore, more interpretable, lightweight solutions are needed to promote adoption and trust. Last, given the well-known limitations of electrochemical batteries in terms of cost, degradation, and environmental impact, there is a clear need for strategies that enable renewable surplus management through battery-free alternatives. 2.2. Building thermal mass as a passive storage system Considering the latter limitation, i.e., the need for battery-free strate- gies, several solutions have been proposed in the literature. One of the most promising research line uses the thermal mass of the building as a passive means to store thermal energy. Such a solution is effective, as it enables the absorption of heat when available in excess and its gradual release when needed, thereby stabilizing indoor temperatures, reducing peak energy de- mand, and enhancing building energy flexibility [25, 26, 8]. Such approaches can be categorized into three groups: sensible heat stor- age through a high-inertia envelope materials, which attenuate indoor tem- perature peaks [26, 27]; latent heat storage via Phase Change Materials, which exploit phase transitions at nearly constant temperature, achieving 6 storage capacities from 5 to 14 times higher than sensible materials [28, 29, 30]; and active exploitation of the building envelope as a thermal battery, integrated with photovoltaics and heating systems to support energy man- agement and emission reduction [10]. In this work, we focus on the third approach. Specifically, we build upon existing literature in the field, which can be organized along three main objec- tives: cost reduction, peak demand reduction, and PV self-consumption max- imization. Considering cost reduction, a reference work in the field proposes a variable setpoint strategy — 21.5 ◦ C during low-price periods and 19 ◦ C during high-price periods — applied to a Nordic multi-apartment building. This strategy yielded annual cost savings of 5.2% in 2015 and 7% in 2022 [31]. A similar approach proposes a floating setpoint pre-cooling strategy to re- duce electricity import costs, achieving a reduction of approximately 6.1% through temporal load shifting [32]. Considering approaches aimed at reduc- ing HVAC energy use, [33] shows that raising the cooling setpoint from 24 ◦ C to 26− 28 ◦ C can reduce air-conditioning load by up to 40% in the two hours following a demand response event. Furthermore, [34] shows that hysteresis- based setpoint control within a 0.5–4 K band reduces heat pump energy use by 28–41% over a four-month heating period. Comparisons between lightweight and heavyweight buildings show that higher thermal mass re- duces cooling demand by 67–75% during heat waves [35]. Finally, [36] shows that, in district heating contexts, pre-heating strategies can render 5.5–7.7% of total heating demand temporally flexible. Finally, considering temperature modulation approaches aimed at increasing the self-consumption of locally produced energy, several benefits have been reported. In the presence of PV surplus, pre-heating or pre-cooling strategies with variable setpoints exploit the building thermal mass by shifting the indoor temperature toward the limits of the comfort range (20− 23 ◦ C instead of a constant 21 ◦ C). Sim- ulations show a reduction in electricity imported from the grid of 45–80%, an increase in renewable self-consumption of 29–43%, and a reduction in evening peak demand of 55–85%, while maintaining acceptable comfort con- ditions [37]. Similarly, in high-performance residential buildings equipped with PV systems and modulating heat pumps, a rule-based strategy mod- ulating the indoor temperature setpoint by approximately ±2 ◦ C relative to the nominal value reduces electricity purchased from the grid by up to 17% and increases PV self-consumption by 22% [38]. Despite the breadth of these contributions, two critical gaps persist in the literature. As previously mentioned, none of these works explicitly targets 7 CO 2 emission reduction as the primary objective of the designed strategies. In fact, even when using thermal storage, the presented strategies optimize cost or energy consumption, implicitly assuming that reducing energy use is equivalent to reducing emissions. Second, model complexity, interpretability, and computational cost are rarely reported, making it unclear whether pro- posed strategies can be realistically adopted in day-to-day building operation. Therefore, in this work, we propose an optimization strategy that exploits building thermal mass as a battery-free thermal storage support, and ex- plicitly targets CO 2 emission reduction, while also accounting for occupants’ comfort. To this end, unlike existing approaches, we explicitly consider the real-time grid carbon intensity signal, ensuring that energy is consumed when the grid is cleaner and not just in smaller amounts. Furthermore, we rely on interpretable and lightweight models to simulate the system thermal behav- ior and to perform the optimization, obtaining an approach that it suitable for practical, large-scale deployment. 3. Methodology As introduced in Section 1, our approach is based on a simple yet novel idea: minimizing the emissions associated with building energy use by lever- aging the building’s thermal mass as a passive storage resource. To this end, we design a control strategy that, at each time step k, based on the time- varying carbon intensity value of the National Grid, computes the optimal fraction α(k)∈ [0, 1] of the available renewable surplus which should be con- verted into thermal energy to be stored in the building mass. It is important to note that this approach requires no modifications to the existing temper- ature control system. Instead, the proposed strategy virtually increases or decreases the temperature setpoint for a specific interval to store the surplus energy. In this way, the strategy pre-charges the building’s thermal mass, and thus reduces future grid demand, as the indoor temperature remains near the user-defined setpoint using the stored energy. In this framework, α serves as the decision variable to optimize the amount of energy stored while ensuring the room temperature does not deviate excessively from the user’s actual comfort settings. More in detail, to achieve this goal, at each time step k, we optimize a sin- gle scalar decision α(k) and update it in a receding-horizon fashion; forecasts over the next m steps of building energy consumptions, solar energy produc- tion, indoor and external temperature, and grid carbon intensity are used 8 only to compute α(k), which is then applied to the current control action. As previously mentioned, α(k) is chosen to reduce near-term grid electricity consumption and the associated CO 2 emissions, while also accounting for occupants’ comfort. Please note that, a key contribution of this work is go- ing beyond aggregate CO 2 metrics; in fact, we explicitly consider temporal dynamics by using time-varying carbon intensity, avoiding average conver- sion factors that, although widely used in the literature [39], can mask when emissions occur. Delving into the details of the approach, the steps followed for the de- velopment and implementation are outlined below. To facilitate a clearer understanding, a flowchart illustrating these steps is provided in Figure 2. Offline Online TRNSYS energy model STEP 1 Thermal dynamic identification MATLAB MATLAB MATLAB MATLAB state- space model STEP 2 Hyperparameters fine-tuning α(k) STEP 3 Real-time strategy application Figure 2: Flowchart illustrating the stepwise development, implementation, and applica- tion of the proposed optimization strategy. It consists of 3 main steps, hereafter described: • STEP 1: thermal dynamic identification.The first step, described in detail in Section 4, consists of identifying an interpretable and simple model to describe the thermal behavior of the system of interest. This can be achieved by using data produced through detailed thermal sim- ulations or collected from a physical building. In this case study, we use 9 TRNSYS high-fidelity model to simulate the data required to identify a simplified state-space model of the system dynamics. Therefore, the TRNSYS model is used for initial identification and validation, while the reduced-order state-space model is the one actually used in the optimization strategy for real-time consumption forecasting. • STEP 2: The energy consumption predicted by the reduced-order state- space model, combined with a forecast of solar energy production and time-varying grid carbon intensity data obtained from the Electricity Maps platform [40], is used to formulate the optimization problem and compute the optimal fraction α(k) of surplus solar energy to store in the building’s thermal mass at each time step. The objective is to minimize emissions while enforcing comfort constraints. As discussed later, the strategy depends on a set of hyperparameters that must be tuned for the specific system, namely the weight ω, the sampling time t s , and the prediction horizon m. This step is therefore devoted to the tuning of these hyperparameters via a Pareto-based procedure, which also clarifies how the chosen weights shape the comfort–emissions trade- off. • STEP 3: real-time strategy application to the actual system. Once the optimal hyperparameters are identified, the strategy can be used. Thus, given the identified state-space model, the number of occupants, solar energy generation forecast, and CO 2 intensity trends, the strategy determines how to adjust the temperature setpoint to reduce emissions by storing energy in the building’s thermal mass when renewable gen- eration is available, thereby reducing reliance on the grid at times of higher carbon intensity. As reported in Section 5, in this work, we apply these steps to three different high-fidelity TRNSYS models. Such models are referred to the same room with varying thermal masses. Thus, for each case, we first build the TRN- SYS model, and we then use it to generate the data required to identify the corresponding lightweight reduced-order model, used during optimization. Then, the optimal set of hyperparameters is computed for each room con- figuration, and the strategy is applied to a new scenario. For each case, the strategy results are compared against a baseline in which no thermal stor- age is performed, in terms of both CO 2 emissions reduction and occupants’ comfort. 10 3.1. Optimization strategy Delving into the details of the strategy implementation, α(k) is com- puted according to a receding-horizon procedure that accounts for the fore- casts of building energy consumption (E pred (k)), the solar energy production (E solar (k)), and time-varying grid carbon intensity (CI(k)). Therefore, the objective function consists of two terms: • CO 2 emissions cost. To minimize this term, the control strategy should favor larger values of α(k) when the carbon intensity is expected to increase in the next hours, so that more solar energy surplus is stored and less grid energy is needed later. • Thermal comfort. This term is introduced to penalize temperature deviations from the reference setpoint; therefore, α(k) is reduced when the induced temperature shift becomes too large. Accordingly, the optimization problem is formulated as J = J CO 2 | z CO 2 emissions + J comfort |z thermal comfort .(1) In the following, we detail how J CO 2 and J comfort have been formulated. 3.1.1. CO 2 Emission Cost This cost is introduced to reduce the energy drawn from the grid when the related carbon intensity is high. To this end, let m be the length of the prediction horizon considered to perform the optimization. In the baseline case, where there is no surplus storage and the solar energy is only used instantaneously, the grid energy required over the horizon is: E grid,0 = m X i=1 max E pred (i)− E solar (i), 0 ,(2) where E pred (i) is the predicted building energy consumption at step i and E solar (i) is the available PV energy at the same step. The corresponding baseline CO 2 emissions are then J CO 2 ,0 = m X i=1 max E pred (i)− E solar (i), 0 · CI(i),(3) 11 with CI(i) denoting the time-varying grid carbon intensity signal. Please note that, as previously mentioned, the choice of accounting for the temporal dynamics of the carbon intensity factor is a key contribution of this work, and is rarely addressed in the literature, which usually considers an average European factor. The reported relations depend on E pred (i), E solar (i), and CI(i). While the last two measures can be obtained from historical datasets (e.g., assuming cyclic behavior over a year) or forecasted using methods available in the liter- ature [41, 42, 43, 44, 45], estimating E pred (i) requires a model of the building thermal behavior in both heating and cooling operation, which can be identi- fied from measured data or from physics-based simulations of the system. In this work we consider as a case study a room, whose complete behavior, as discussed in Section 4, has been modeled using TRNSYS software. However, as it was unnecessarily complex, we then model only the thermal behavior of interest using a state-space model, identified using ad-hoc simulated dataset from TRNSYS. This simplified model has then been used to predict the en- ergy consumption of the room over time, which, along with solar energy and carbon intensity trends, have been used to implement our strategy. Therfore, we are able to compute in real-time the actual emission cost, with our strategy implemented, which requires an additional term to be in- cluded with respect to the baseline formulation J CO 2 ,0 . Specifically, this term is related to the amount of energy saved thanks to the thermal storage. To derive it, we first compute the solar energy surplus as: ∆E solar (i) = max E solar (i)− E pred (i), 0 .(4) Then, we account that thanks to the control strategy, a fraction α(k) of this surplus is stored in the building thermal mass, providing an additional thermal energy input that can be computed as: ∆Q(i) = γ α(k) ∆E solar (i),(5) where γ is the efficiency factor for the conversion from solar energy to thermal storage, which we set equal to γ = 1 in the simulations. To obtain a closed-form control law, we adopt the simplifying approxi- mation that the stored thermal energy offsets future grid imports uniformly over the prediction horizon. Accordingly, the actual CO 2 -related cost can be 12 computed as: J CO 2 = m X i=1 max max E pred (i)− E solar (i), 0 − α(k) m m X j=1 ∆E solar (j), 0 ! CI(i), (6) where ∆E solar (i) and ∆Q(i) are defined as in the CO 2 cost formulation. 3.1.2. Thermal Comfort Cost The thermal comfort cost, instead, is introduced to penalize any devi- ations of the indoor temperature from the reference setpoint. As a conse- quence, it limits the temperature change induced by storing solar energy surplus in the thermal mass. Starting from (5), the temperature variation due to the thermal storage at step i can be approximated as: ∆T (i) = η ∆Q(i) C th = η γ α(k) ∆E solar (i) C th ,(7) where C th is the equivalent thermal capacitance and η = ( +1, heating mode (temperature increase), −1, cooling mode (temperature decrease). (8) Consistently with the approximation used in (6), the overall induced shift over m steps is ∆T tot = η γ α(k) P m i=1 ∆E solar (i) C th .(9) Accordingly, we can define the comfort cost as: J comfort = ∆T tot 2 = α(k) 2 γ P m i=1 ∆E solar (i) C th 2 .(10) 3.1.3. Closed-Form Solution By combining (6) and (10), we can rewrite (1) as: J = E grid,0 − α(k) m m X i=1 ∆E solar (i) ! m X i=1 CI(i)+ +ω α(k) 2 γ P m i=1 ∆E solar (i) C th 2 , (11) 13 where ω > 0 is a weight introduced to balance emissions reduction and ther- mal comfort. It can be tuned via a Pareto analysis to explore the comfort– emissions trade-off, and then selected according to application requirements. Since J is a convex quadratic function of α(k), the minimizer is obtained by setting dJ dα(k) = 0: dJ dα(k) =− 1 m m X i=1 ∆E solar (i) ! m X i=1 CI(i) ! + +2ω α(k) γ P m i=1 ∆E solar (i) C th 2 . (12) Solving for α(k) leads to a closed-form solution: α ⋆ (k) = C 2 th 2ω mγ 2 P m i=1 CI(i) P m i=1 ∆E solar (i) .(13) If P m i=1 ∆E solar (i) = 0, we set α ⋆ (k) = 0. Finally, the actuation is saturated to satisfy α(k)∈ [0, 1]: α(k) = min 1, max(0,α ⋆ (k)) .(14) Please note that achieving this closed-form solution is a key advantage of this formulation as this considerably reduces the computational complexity requried to get optimal α(k) value at each step. 4. Application to the Case Study This section describes the simple yet high-fidelity reference system, con- sisting of a small office room modeled in TRNSYS, which has been considered to evaluate the effectiveness of our approach. Specifically, three versions of the room are designed, each with a different thermal capacity. This allows us to demonstrate that the proposed strat- egy is effective regardless of the specific thermal properties of the building, and can therefore be applied without requiring any structural modification. Each room model serves as the ground-truth representation of the thermal behavior of the corresponding configuration. Based on data collected in ad- hoc performed simulations, we then identify a predictive discrete-time state- space representation of the system, which captures only the specific thermal 14 dynamics of interest for our control strategy. Accordingly, we obtain a sim- ple and interpretable model that is accurate enough to predict the heating and cooling power, while avoiding the computational complexity of the orig- inal TRNSYS counterpart, which is impractical for the optimization routine (STEP 1 in Figure 2). Please note that, although the chosen system is in- tentionally simple, the proposed workflow is general and can be applied to more complex buildings, including using real operational data. Indeed, the identification step can be performed on any system to obtain a reduced-order state-space model linking the relevant exogenous variables to the heating and cooling power required. This separation between data source and control model makes the strategy flexible and system-independent. Back to our considered case study, each room consists of an office located within a larger single-story building, situated in Milan. It has a net floor area of 30 m 2 (6× 5 m) and a net internal height of 3 m. Three walls are adjacent to other spaces, whereas the remaining side is exposed outdoors. In Figure A.10 of Appendix A, the space representation in plan and section (along the A’ axis) is reported. To investigate the effect of thermal mass on the strategy performance, three configurations are considered: light-, medium-, and heavy-weight mass. Their main characteristics are summarized in Table 1, which shows that all three configurations share the same thermal transmittance, but differ in their dynamic thermal properties, e.g., the decrement factor, the phase shift, the surface mass, and the internal areal heat capacity. In this study, particular attention is given to this last parameter, denoted as C m , which represents the effective thermal capacity of each case study [46]. In fact, this is the main parameter determining the amplitude of the setpoint variation resulting from storing a fraction of the solar energy surplus in the thermal mass, as a func- tion of the parameter α. Specifically, it has been computed as the sum of the internal areal heat capacities of the individual envelope components, which has been determined according to the dynamic thermal formulation provided by [46]. According to [47], it is calculated through the global heat transfer matrix of each building component, obtained by combining the transfer ma- trices of the individual layers across the construction. To this end, we start from the thermal transfer equation: ˆ θ 2 ˆq 2 = Z 11 Z 12 Z 21 Z 22 · ˆ θ 1 ˆq 1 (15) Here, ˆ θ 1 and ˆ θ 2 represent the complex amplitudes of temperature on the 15 internal and external sides of the component, respectively, while ˆq 1 and ˆq2 denote the corresponding heat fluxes. The coefficients Zij are the elements of the thermal transfer matrix and describe the dynamic relationship between temperature and heat flux across the construction under periodic conditions. From that equation, we then derive κ i , which represents the internal areal heat capacity of the component over a considered period T, that is, by stan- dard set to 24 hours: κ i = T 2π Z 11 − 1 Z 12 (16) Then, the internal heat capacity of the three case studies is determined by summing the internal heat capacities of all construction components, as de- fined before, each multiplied by its corresponding surface area: C m = X j κ ij · A j .(17) Back to the specific configuration, each room includes a glazed vertical element consisting of a window frame with double low-emissivity glazing, separated by a gas-filled argon cavity. Its solar heat gain coefficient (g-value) is 0.62, the visible light transmittance is 0.78, and the thermal transmittance is 1.1 W/m 2 K. In each model, we consider a single thermal zone represented by an air node, corresponding to the volume of air assumed to have a uniform tempera- ture. The adjacent rooms are assumed to share the same thermal conditions, while the outdoor-facing façade is oriented north and features three windows, each measuring 120× 140 cm. The boundary conditions used in the modeling are summarized in Table 2. Instead, Figure 3 shows the TRNSYS implementation of the energy plant implemented in each room, which will now be detailed. As reported, it con- sists of several blocks, defined Types, which correspond to a specific element of the plant and embed the respective governing equations. To provide a better overview of this plant, the composing types can be se- mantically grouped into six main circuits, represented using different colors. From a system perspective, the model represents a hybrid system for indoor climate control. Heating (red circuit) is provided by a high-temperature air- to-water heat pump (Type 941) for thermal generation and by a radiator (Type 1231) for heat distribution within the space. Cooling (blue circuit) is supplied by an air-to-air multi-split heat pump system (Type 954a), con- 16 Table 1: Building envelope characteristics. This table reports the main properties of the building envelope based on the stratigraphy adopted for the design of the building hosting the considered office room, for each configuration analyzed in the case study. The stratigraphy labels are referred to Figures A.11,A.12,A.13 of Appendix A. Building Classification Configuration StratigraphyThicknessThermalSurfaceAttenuation Phase Internal Areal HeatThermal EnvelopeSubfigure[cm]Trans. [W/m 2 K] Mass [kg/m 2 ]Shift [h] Capacity [kJ/m 2 K]Capacity [kJ/K] LIGHT-WEIGHT External 3130.83 opaque WallExternal(a)20.90.206490.6085.3924.3 enclosure Internal verticalWallBoundary(b)12.51.563450.9601.5821.7 enclosure Horizontal flatRoofExternal(c)44.050.203550.9043.3027.3 enclosure Horizontal enclosureFloorBoundary(d)58.20.2353270.23611.4631.8 against ground MEDIUM-WEIGHT External 6531.77 opaqueWallExternal(a)390.2072280.2679.8450.7 enclosure Internal verticalWallBoundary(b)151.5721440.7684.1951.4 enclosure Horizontal flatRoofExternal(c)46.50.1983350.21511.0768.9 enclosure Horizontal enclosureFloorBoundary(d)37.90.2605590.12012.1544.7 against ground HEAVY-WEIGHT External opaqueWallExternal(a)440.2104280.08713.4959.4 8182.05 enclosure Internal verticalWallBoundary(b)211.5473060.3807.9766.5 enclosure Horizontal flatRoofExternal(c)44.50.2045970.14611.3692.4 enclosure Horizontal enclosureFloorBoundary(d)48.30.2537850.04815.5248.4 against ground Table 2: Boundary conditions. This table reports the values used for the modeling of heating and cooling control, natural ventilation, infiltration, and internal gains, which are shared across the three implemented rooms. ParameterTypeValue Internal gain Artificial lighting6W/m 2 , active during working hours (09:00–19:00) Occupancy 130W per person (ASHRAE standard for moderately active office work [29]). During working days (09:00–19:00), the number of occupants varies between 0, 2, or 4; weekends: 0. Control and operation Hourly air change rate 0.6ACH (infiltration and natural ventilation) Heating setpoint (temperature)Stepwise profile ranging between 20 ◦ and 22 ◦ Cooling setpoint (temperature)Stepwise profile ranging between 25 ◦ and 27 ◦ sisting of an outdoor unit connected to indoor unit. Indoor comfort is main- tained by a control system (gray circuit) based on two separate modulating PID controllers (Type 23). The controllers regulate the heating power of the air-to-water heat pump, the circulation pump power, and the cooling power of the multi-split system, based on the indoor air temperature and the refer- ence setpoint. Effects of the thermal temperature and occupancy are instead 17 Legend Heatingsystem Coolingsystem Control system Photovoltaicsystem Externaltemperature effect Occupancyschedules Environment effect Figure 3: Plant of each TRNSYS model. This Figure provides an overview of the energy plant implemented in each TRNSYS room. described using the orange and light blue circuit, respectively. Regarding on- site generation (green circuit), considering the single-store configuration of the building, a monocrystalline PV module with a nominal power of 445 W is assumed. Accordingly, we design a system composed of 4 modules to provide a total peak power of 1.78 kWp. The PV system sizing was performed in ac- cordance with Directive (EU) 2018/2001 (RED I) [48] on renewable energy, meeting the requirements applicable to existing and new buildings. Overall, in the sizing of the components considered, some parameters were customized to ensure consistency with the design conditions. The main configurations adopted for each Type are reported in Table A.5 in the Appendix A. 18 4.1. Thermal dynamic identification Once the TRNSYS models are implemented, the next step is to identify a simplified yet reliable surrogate that still characterizes the room’s ther- mal response while being less computationally complex. This reduced-order model is used in the optimization process, while the TRNSYS counterpart is only used as a high-fidelity reference for model identification and validation. It is worth noting that, since the approximated model is identified from data, whether simulated or collected from a real system, the same workflow can be applied to other buildings and to real operational measurements. As discussed in Section 1, existing literature generally usually perform the identi- fication step in two different ways. On the one hand, data-driven approaches use regression predictors, e.g., gradient-boosted trees or recurrent neural net- works, trained on environmental data, control variables, and occupancy prox- ies to forecast consumption. On the other hand, grey-box approaches model the room as a low-order RC (resistance-capacitance) network and estimate energy consumption by mapping thermal loads using simplified equipment models. In this work, we leverage a reduced-order state-space representa- tion model, as more interpretable and lightweight than the machine-learning counterpart. Specifically, we identify six models, two for each of the three TRNSYS models, one for heating and one for cooling behavior. Each model has been identified using the MATLAB ssest function [49] and discretized at the controller sampling time ts for being integrated in the optimization framework. Although the designed TRNSYS models provide many signals, we select a reduced input set based on both correlation analysis results and practical measurability in real deployment. Therefore, the selected regressors are: • the setpoint temperature T ref (k); • the occupancy level n occ (k) (used as an internal-gains proxy); • the external temperature T ext (k); while the output variable is the related heating and cooling required power P (k). To ensure that the identified models capture the full range of thermal dynamics, for each TRNSYS room model we generated training datasets for two distinct seasonal periods: heating (October 15 – April 15) and cooling (April 15 – October 15). In each scenario, we specify the time-series trends 19 for the room setpoint T ref (k), occupancy count n occ (k), external tempera- ture T ext (k) (based on Milan Brera meteorological data), and the resulting heating and cooling power required power P (k). Please note that, to iden- tify the system dynamics accurately, it is essential to subject the model to large variations and diverse step conditions. Consequently, we applied vary- ing setpoint profiles: in the winter scenario, a stepwise profile ranging from 20 ◦ C to 22 ◦ C was adopted, whereas in the summer scenario, the pro- file ranged from 24 ◦ C to 26 ◦ C. In both scenarios, the occupancy profile varies over the course of the day: no occupants are present during night-time (00:00–08:00 and 20:00–24:00), two occupants are present during 08:00–12:00 and 16:00–20:00, and four occupants are present from 12:00 to 16:00. It is worth noting that, although high-excitation conditions were necessary for model identification, the resulting model is fully general and can predict the room’s thermal behavior under arbitrary inputs. It is therefore used in the optimization strategy to forecast heating and cooling energy consumption across scenarios that differ from those used during identification. Therefore, at the end of this identification process, we obtain a state-space model capa- ble of accurately predicting the heating and cooling power of our room while avoiding the prohibitive computational overhead of TRNSYS, which would otherwise make real-time optimization infeasible. To select the optimal order for the state-space models and verify their ability to accurately reproduce the TRNSYS reference behavior, models of order 1 through 3 are identified and compared using two metrics, mostly used in the literature: • the coefficient of determination (R 2 ), R 2 = 1− P N t i=1 (y val,true (i)− y val,pred (i)) 2 P N t i=1 (y val,true (i)− ̄y val,true ) 2 , ̄y val,true = 1 N t N t X i=1 y val,true (i); (18) • the normalized mean absolute error (nMAE), normalized with respect to the maximum true output value, nMAE = 100· 1 N t P N t i=1 |y val,true (i)− y val,pred (i)| max i |y val,true (i)| .(19) In more detail, the evaluation is conducted on a dedicated TRNSYS- generated dataset, generated for each room in the conditions reported above 20 and split into an identification and a validation subset. Each model is identi- fied on the former and evaluated on the latter by computing R 2 and nMAE considering the true TRNSYS output y val,true (i) and the model prediction y val,pred (i). Results consistently show that a second- or third-order model provides the best accuracy across both heating and cooling conditions and for all three room configurations. First-order models fail to capture the dominant transient dynamics, while higher-order models yield only marginal accuracy improvements at the cost of increased complexity and reduced in- terpretability. The aggregated results obtained when evaluating the best models identified for each room are reported in Table 3, while a represen- tative comparison between the temporal trends of TRNSYS and surrogate models predictions over 5 days of validation data is shown in Figure 4. Over- all, the identified models reproduces the reference thermal dynamics with good accuracy, thus supporting its use as the predictive model in the opti- mization procedure. The figure also highlights specific aspects of the room’s thermal behavior that will be relevant when analyzing the results of the pro- posed strategy. In particular, the required power is generally higher as the building thermal capacity decreases, since lighter structures are less able to store heat and therefore respond more rapidly to external temperature vari- ations. Consequently, the light configuration exhibits the highest demand, while the heavy configuration, thanks to its greater thermal inertia, shows the lowest. This behavior is more evident in summer simulations, where solar gains and temperature fluctuations are more intense, but it also characterizes the winter results, although to a lesser extent. Table 3: Identification performance. This table reports, for each room configuration, the R 2 and nMAE metrics achieved on the validation set by the surrogate heating and cooling models identified from the TRNSYS simulation. SurrogateLight-weightMedium-weightHeavy-weight ModelR 2 nMAER 2 nMAER 2 nMAE Winter0.77 10.240.6413.730.60 14.00 Summer0.90 6.100.7610.520.70 12.24 21 15-Dec16-Dec17-Dec18-Dec19-Dec20-Dec 0 10 20 30 40 Temperature [°C] T ext (k) T ref (k) (a) Winter: Temperatures (T ref ,T ext ) 15-Aug16-Aug17-Aug18-Aug19-Aug20-Aug 0 10 20 30 40 Temperature [°C] (b) Summer: Temperatures (T ref ,T ext ) 15-Dec16-Dec17-Dec18-Dec19-Dec20-Dec 0 1 2 3 4 People [-] (c) Winter: People (n occ ) 15-Aug16-Aug17-Aug18-Aug19-Aug20-Aug 0 1 2 3 4 People [-] (d) Summer: People (n occ ) 20-Dec21-Dec22-Dec23-Dec24-Dec25-Dec 0 500 1000 1500 Power [W] (e) Winter: Heating Power (P,P pred ) - Light Configuration 20-Aug21-Aug22-Aug23-Aug24-Aug25-Aug 0 500 1000 1500 Power [W] P(k) P pred (k) (f) Summer: Cooling Power (P,P pred ) - Light Configuration 20-Dec21-Dec22-Dec23-Dec24-Dec25-Dec 0 500 1000 1500 Power [W] (g) Winter: Heating Power (P,P pred ) - Medium Configuration 20-Aug21-Aug22-Aug23-Aug24-Aug25-Aug 0 500 1000 1500 Power [W] P(k) P pred (k) (h) Summer: Cooling Power (P,P pred ) - Medium Configuration 20-Dec21-Dec22-Dec23-Dec24-Dec25-Dec 0 500 1000 1500 Power [W] (i) Winter: Heating Power (P,P pred ) - Heavy Configuration 20-Aug21-Aug22-Aug23-Aug24-Aug25-Aug 0 500 1000 1500 Power [W] P(k) P pred (k) (j) Summer: Cooling Power (P,P pred ) - Heavy Configuration Figure 4: Heating and cooling model identification. This figure shows two representative validation periods, with winter data on the left and summer data on the right. The first two rows report the model’s inputs, common to the three room configurations. The remaining rows compare the heating and cooling power predicted by the TRNSYS model (P) with that predicted by the corresponding surrogate model (P pred ). 22 5. Results and Discussion Now that we have identified an efficient surrogate model for each TRNSYS room that accurately predicts the energy consumption (STEP 1 in Figure 2), our strategy can be applied. In fact, other information, such as the time series of grid carbon intensity CI(k) and available solar energy E solar (k) can be retrieved from measured data. Specifically, as we assumed that our office is located in Northern Italy, we considered hourly data on grid carbon intensity CI(k) (kgCO 2 /kWh) from the Electricity Maps platform [40], referring to the year 2024. The outdoor temperature profile, instead, was derived from the climatic data recorded at the Milano Brera meteorological station. Last, the solar energy production of the PV system was estimated through simulations carried out using the room model developed in TRNSYS with the same climatic data. The simulation, conducted over an annual time horizon, allows the calculation of the electrical energy generated by the PV system, assuming a constant panel efficiency. Please note that the choice of using 2024 data has been made as we assume comparable seasonal patterns across years. However, as later discussed in the limitations subsection, if this assumption is considered not reliable, the same framework can be applied using any forecasting method from the literature to predict these variables in real-time. With this setup, the proposed strategy is evaluated on each of the three room configurations over a full-year simulation spanning January 1 to Decem- ber 31, 2024. During the heating season, the indoor temperature setpoint was set to 20 ◦ C during working hours (08:00–19:00) and 18 ◦ C during off- hours and weekends. Similarly, in the cooling season, we assume a setpoint of 26 ◦ C during working hours (08:00–19:00) and 28 ◦ C during off-hours and weekends. Considering the occupation, during working hours, two people were considered to be consistently present in the office. 5.1. Strategy hyperparameters fine-tuning Before applying our strategy, its hyperparameters must be properly tuned for each room. As detailed in Section 3, they include the weight ω, balancing the CO 2 -related and the comfort objectives, and the forecasting parameters, namely the sampling time ts and the prediction horizon m, which together determine the temporal resolution and lookahead window of the optimizer. To properly set their values, two approaches are possible: if prior knowledge or application-driven constraints are available, the parameters must be set 23 accordingly. Alternatively, as in this case, a sensitivity analysis can be per- formed to identify the most suitable ones. To this end, prediction horizons of 12, 18, 24, and 48 hours are considered; for each horizon, sampling times of 30, 60, 120, 180, and 240 minutes are evaluated. For each (m,ts) pair, ω is swept over a logarithmically spaced range from 1 to 1e 15 , and the full one- year scenario is simulated. For each value of ω, the resulting CO 2 emissions and comfort deviation define a point on the Pareto frontier; the optimal ω for that pair is then selected as the one that maximizes emission reduction while keeping comfort within acceptable bounds. Finally, the (m,ts) combination that best achieves this objective across the full simulation is selected. The identified optimal hyperparameters are then used to simulate the strategy on each of the three room configurations. The results are evaluated with respect to a baseline scenario, in which the same behavior of the same room is simulated without any thermal storage, i.e., setting α equals 0. Therefore, in the baseline case, we expect that ∆T is also 0, as the energy supplied to the room is exactly that required to meet the setpoint, while any available solar surplus is not used. On the other hand, for the same reason, the CO 2 emissions are expected to be higher than those measured when applying our strategy. Therefore, to evaluate our strategy, we measure two indicators: • CO 2 emissions reduction, measured as the average grams saved per day and the overall percentage savings over a year, both computed relative to a baseline in which no thermal storage is applied; • Temperature setpoint deviation, measured as the average and maxi- mum deviation from the user-defined setpoint, relative to the baseline scenario in which the setpoint is followed exactly as no thermal storage is applied. The optimal hyperparameter settings for each of the three room configura- tions are reported in Table 4. The results show that the optimal prediction horizon m scales as the configuration goes from light to heavy. This outcome is physically intuitive; in fact, the heavy configuration has greater thermal inertia. Therefore, the heat stored or released propagates more slowly through the structure. As a result, the strategy requires a larger horizon to anticipate charging and discharging decisions. The optimal sampling time ts, instead, ranges between 30 and 60 minutes, while longer values decrease the performance. Also, the optimal weight ω consistently assessed around 10 6 , suggesting that the 24 trade-off between emissions reduction and thermal comfort is governed by the problem scaling rather than the specific thermal properties of the room. Considering savings and temperature deviations measured in these opti- mal configurations, some considerations should be made. In terms of emis- sions reduction, the medium and heavy configurations achieve substantially larger savings than the light-weight one, with annual reductions of approxi- mately 25% compared to 10%. This confirms that greater thermal mass pro- vides more storage capacity, enabling the strategy to shift a larger share of energy demand toward periods of low-carbon solar generation. Accordingly, temperature deviations also increase in medium and heavy configurations. Nevertheless, even when considering the heavy configuration, the average daily deviation remains lower than 0.4 ◦ C, with a maximum of 1.2 ◦ C, con- firming that the strategy achieves significant emissions reductions without compromising occupant comfort. Table 4: Optimal hyperparameters set. The table reports the values of prediction horizon m, sampling time ts, and weight ω identified via grid search, along with the CO 2 emission reductions and setpoint deviation. Configuration HyperparametersEmissions ReductionSetpoint deviation m [h] ts [min] ω [-]avg per day [g/day] tot per year [%]avg per day [ ◦ C] max in a day [ ◦ C] Light-weight123010 6 19.679.880.10.5 Medium-weight246010 6 52.3025.370.30.9 Heavy-weight483010 6 46.0624.770.41.2 Figure 5, further extends the results in Table 4, providing insights into how the yearly CO 2 reduction and the maximum daily ∆T varies as a func- tion of the sampling time ts and prediction horizon m for the best-performing value of ω in the three different configurations analyzed. These trends better highlight the intrinsic trade-off that characterizes our strategy: hyperpram- eteres set that allow for obtaining higher CO 2 emissions reductions also pro- duce larger deviations from the temperature setpoint. Indeed, reducing the CO 2 cost requires increasing α, which in turn increases the room tempera- ture. As previously mentioned, this trend is more evident for the medium and heavy configurations, where the thermal inertia affects the heating and cooling dynamics of the system. We also note that, in general, longer hori- zons (1 or 2 days) lead to greater CO 2 emissions reduction. This means that, as expected, higher look-aheads over surplus availability and carbon- intensity trajectories enable more effective temporal shifting of grid imports. Additionally, across all room configurations, higher actuation frequency, i.e., smaller ts, generally improves performance by allowing the controller to more 25 50100150200250 ts [min] 0 5 10 15 20 25 30 CO 2 red. per year [%] (a) Average Emissions Reduction [g/day] - Light Configuration 3060120180240 ts [min] 0.00 0.25 0.50 0.75 1.00 1.25 1.50 max T per day [°C] H = 12 h H = 18 h H = 24 h H = 48 h (b) Average Setpoint Variation [ ◦ C/day] - Light Configuration 50100150200250 ts [min] 0 5 10 15 20 25 30 CO 2 red. per year [%] (c) Average Emissions Reduction [g/day] - Medium Configuration 3060120180240 ts [min] 0.00 0.25 0.50 0.75 1.00 1.25 1.50 max T per day [°C] H = 12 h H = 18 h H = 24 h H = 48 h (d) Average Setpoint Variation ( ◦ C/day] - Medium Configuration 50100150200250 ts [min] 0 5 10 15 20 25 30 CO 2 red. per year [%] (e) Average Emissions Reduction [g/day] - Heavy Configuration 3060120180240 ts [min] 0.00 0.25 0.50 0.75 1.00 1.25 1.50 max T per day [°C] H = 12 h H = 18 h H = 24 h H = 48 h (f) Average Setpoint Variation [ ◦ C/day] - Heavy Configuration Figure 5: Sensitivity analysis on hyperparameters. This figure shows how total yearly emissions reduction (left) and maximum daily setpoint deviation (right) change as a func- tion of the sampling time and the prediction horizon for each room configuration. Optimal hyperparameters set is marked by a yellow star. effectively exploit the building’s thermal mass. Finally, regardless of the specific hyperparameters, the average daily deviation from the user tem- perature setpoint always remains below ±1.5 ◦ C, which is definitely within acceptable bounds to maintain a comfortable indoor environment. Larger deviations are observed for the heavy model configuration, whereas lighter configurations reduce emissions without introducing significant temperature variations. Overall, this analysis shows that, although the optimal set of hyperparameters depends on the specific application requirements, a good general choice is to employ moderate-to-long prediction horizons, about 1 or 26 2 days, combined with a reduced sampling time, of approximately 30 minutes. In the remainder of this section, more detailed results obtained by apply- ing our strategy to each room configuration under the best hyperparameter settings, i.e., those reported in Table 4 will be presented. BaselineStrategy 0 10 20 30 40 50 60 70 80 CO 2 Emissions [kg] 72.62 65.44 75.22 56.14 67.68 50.92 Configuration light medium heavy (a) CO 2 Emissions [kg] BaselineStrategy 0 50 100 150 200 250 300 350 Energy [kWh] 330.27 296.75 346.21 256.39 312.04 233.12 Configuration light medium heavy (b) Energy Consumptions [kWh] Figure 6: Strategy performance: annual results. This figure compares in all the considered room configurations the yearly aggregated CO 2 emissions (left) and energy consumption (right) for the baseline scenario (α(k) = 0) and the proposed strategy. 5.2. Strategy performance Once the optimal set of hyperparameters has been identified (STEP 2 in Figure 2), our strategy can be online applied (STEP 3) and its benefits can be investigated. To this end, a first comment can be made based on the results in Figure 6, which, for each room configuration, compares the annual CO 2 emissions and energy consumption provided by our strategy, with respect to the baseline scenario in which no thermal storage is applied. The results show that our strategy yields an annual CO 2 emissions saving with respect to the related baseline case of approximately 9.88%, 25.37%, and 24.77%, for the light-, medium- and heavy-weight configurations respectively. This corresponds to 7.18 kg, 19.09 kg and 16.76 kg of CO 2 saved in a year. In addition, although this is not the main objective of our strategy, we also highlight that it results in an annual energy saving with respect to the re- lated baseline case of 10.15%, 25.94%, and 25.29%, corresponding to 33.52 kWh, 89.81 kWh, and 78.92 kWh for the light-, medium-, and heavy-weight configurations respectively. Beside CO 2 reduction, thermal comfort must also be considered. To this end, we used the Predicted Mean Vote (PMV) index, as defined by the UNI EN ISO 7730 standard [50, 51] to evaluate how comfort varies when applying our strategy. Please note that, to compute this indicator, in accordance with 27 ISO 7730:2005, metabolic rate and clothing insulation values were defined for both the summer and winter seasons, while additional parameters used for PMV calculation are reported in Table A.6 of Appendix A. With this setup, the results demonstrate that our strategy achieves thermal comfort levels comparable to the baseline. Specifically, while the baseline PMV is −0.31 in winter and 0.33 in summer, our approach yields similar values. This is further confirmed by the worst-case setpoint deviation, which remains limited to a PMV value of−0.05 in winter and−0.04 in summer. Thus, we can conclude that PMV values fall within the limits defined by ISO 7730:2005, both for existing buildings (-0.7 < PMV < 0.7) and for new or renovated buildings (- 0.5 < PMV < 0.5). Therefore, the proposed control strategy applies to both existing and new constructions, representing a valid tool to reduce emissions while meeting comfort constraints. To better detail the outcomes of our strategy, Figures 7 and 8 show the trends of the relevant input and output variables defining our evaluation scenario over two representative zoomed windows. Those windows have been selected from the full-year simulation and span from the 15 th to the 30 th November for the winter period and from the 15 th to the 30 th July for the summer one. Please note that these specific windows have been reported as representative; the observed trends are, indeed, consistent across the rest of the year. Specifically, Figure 7 shows the input variables defining the scenario, i.e., the external temperature T ext (k), the setpoint temperature of the room T ref (k), the number of people n occ (k), the solar energy available E solar (k), and the grid carbon intensity CI(k). Figure 8, instead, shows the output of our strategy. In particular, in the first row, it reports the trends of the optimal surplus allocation factor α(k), i.e., the fraction of PV surplus that is sug- gested to store in the building thermal mass. In the middle row, instead, the trends of the related CO 2 emissions reductions are reported. These values have been computed, according to the surrogate emission model introduced in Section 3, as: ∆CO 2 (k) = max E pred (k)− E solar (k), 0 − α(k) m m X i=1 ∆E solar (i) ! CI(k), (20) i.e., as the difference of the grid-related emissions obtained in the baseline case, when α = 0, and those associated with the case in which the pro- posed strategy is applied. Similarly, on the last row, the trends of the 28 15-Nov16-Nov17-Nov18-Nov19-Nov20-Nov21-Nov22-Nov23-Nov24-Nov25-Nov26-Nov27-Nov28-Nov29-Nov30-Nov 0 10 20 30 Temperature [°C] T ext (k) T ref (k) (a) Winter: Temperatures (T ref ,T ext ) 15-Jul16-Jul17-Jul18-Jul19-Jul20-Jul21-Jul22-Jul23-Jul24-Jul25-Jul26-Jul27-Jul28-Jul29-Jul30-Jul 0 10 20 30 Temperature [°C] T ext (k) T ref (k) (b) Summer: Temperatures (T ref ,T ext ) 15-Nov16-Nov17-Nov18-Nov19-Nov20-Nov21-Nov22-Nov23-Nov24-Nov25-Nov26-Nov27-Nov28-Nov29-Nov30-Nov 0 1 2 3 4 People [-] (c) Winter: People (n occ ) 15-Jul16-Jul17-Jul18-Jul19-Jul20-Jul21-Jul22-Jul23-Jul24-Jul25-Jul26-Jul27-Jul28-Jul29-Jul30-Jul 0 1 2 3 4 People [-] (d) Summer: People (n occ ) 15-Nov16-Nov17-Nov18-Nov19-Nov20-Nov21-Nov22-Nov23-Nov24-Nov25-Nov26-Nov27-Nov28-Nov29-Nov30-Nov 100 200 300 CO 2 Intensity [g/kWh] (e) Winter: Grid Emissions Intensity (CI) 15-Jul16-Jul17-Jul18-Jul19-Jul20-Jul21-Jul22-Jul23-Jul24-Jul25-Jul26-Jul27-Jul28-Jul29-Jul30-Jul 100 200 300 CO 2 Intensity [g/kWh] (f) Summer: Grid Emissions Intensity (CI) Figure 7: Simulated scenario: input parameters. This figure shows the trend of the input variables in a zoomed window of the defined scenario. temperature variation are reported. These values have been computed as ∆T (k) = η γ α(k) ∆E solar (k) C th (with γ = 1 in our simulations), i.e., as the tem- perature deviation induced by the control action with respect to the baseline case (α = 0). Analyzing these trends, we can derive some considerations. First, the lim- ited thermal mass of the light-weight room hinders the capability of storing significant amounts of thermal energy. As a result, whenever surplus solar energy is available, our strategy sets α close to 1 in both winter and summer, thus storing nearly all excess power. However, due to the low thermal inertia, the room temperature rises rapidly, causing α to drop shortly after, as further storage would lead to high setpoint deviations. This behaviour produces an 29 oscillatory temperature profile, which nonetheless remains within ±0.5 ◦ C of the setpoint, and yields small CO 2 savings. In contrast, the medium- and heavy-weight configurations exhibit a smoother α profile, reflecting the slower thermal response of the room. This also results in a more regular temperature evolution, but also in slightly larger deviations from the set- point, which are, however, bounded within ±1 ◦ C. Also, we can note that in winter, our strategy suggests storing most of the solar energy surplus across all configurations. In summer, instead, lower percentages of this energy are stored, especially considering the medium- and heavy-weight configuration. This is reasonable, as summer is characterized by larger solar surplus, so only a fraction of the available excess energy can be stored thermally to prevent excessive temperature increases. As a last comment, it is worth noting that the results discussed so far refer to the optimal configuration in Table 4. Specifically, their refer to the optimal ω value, which provides the best balance between CO 2 emissions reduction and temperature setpoint deviation. However, depending on the specific ap- plication, a different trade-off may be desirable. To better understand the impact of this parameter on the strategy performance, Figure 9 illustrates, for each room configuration, how both objectives vary as a function of ω, keeping the prediction horizon and sampling time fixed to their optimal val- ues. It is possible to note that, decreasing ω places greater emphasis on emissions reduction, allowing larger temperature deviations; conversely, in- creasing this parameter enforces adherence to the user-defined setpoint at the cost of reduced savings. This flexibility makes the proposed approach adaptable to a wide range of operational requirements, from comfort-critical environments to applications where emissions minimization is the primary objective. It is indeed possible to observe that, by forcing the weight toward a lower value, in order to induce a greater variation of the setpoint and increase the amount of solar surplus stored in the thermal mass, thus reducing emissions, an annual CO 2 saving of 27.29%, 30.04%, and 29.97% can be achieved for the light-, medium-, and heavy-weight cases, respectively, compared to the baseline case. These percentages correspond to reductions of 19.71 kg, 22.41 kg, and 20.43 kg of CO 2 . However, this increased saving also leads to a larger deviation of the setpoint and greater occupant discomfort, with maximum ∆T values of 2.6 ◦ C 2.3 ◦ C, and 1.3 ◦ C, respectively. 30 15-Nov16-Nov17-Nov18-Nov19-Nov20-Nov21-Nov22-Nov23-Nov24-Nov25-Nov26-Nov27-Nov28-Nov29-Nov30-Nov 0.00 0.25 0.50 0.75 1.00 [-] (a) Winter: Surplus Fraction to Storage (α) 15-Jul16-Jul17-Jul18-Jul19-Jul20-Jul21-Jul22-Jul23-Jul24-Jul25-Jul26-Jul27-Jul28-Jul29-Jul30-Jul 0.00 0.25 0.50 0.75 1.00 [-] (b) Summer: Surplus Fraction to Storage (α) 15-Nov16-Nov17-Nov18-Nov19-Nov20-Nov21-Nov22-Nov23-Nov24-Nov25-Nov26-Nov27-Nov28-Nov29-Nov30-Nov 0 5 10 15 20 CO 2 [g] (c) Winter: CO 2 Emission Reduction (∆CO 2 ) 15-Jul16-Jul17-Jul18-Jul19-Jul20-Jul21-Jul22-Jul23-Jul24-Jul25-Jul26-Jul27-Jul28-Jul29-Jul30-Jul 0 5 10 15 20 CO 2 [g] (d) Summer: CO 2 Emission Reduction (∆CO 2 ) 15-Nov16-Nov17-Nov18-Nov19-Nov20-Nov21-Nov22-Nov23-Nov24-Nov25-Nov26-Nov27-Nov28-Nov29-Nov30-Nov 1 0 1 T [°C] Light Medium Heavy (e) Winter: Temperature Variation (∆T) 15-Jul16-Jul17-Jul18-Jul19-Jul20-Jul21-Jul22-Jul23-Jul24-Jul25-Jul26-Jul27-Jul28-Jul29-Jul30-Jul 1 0 1 T [°C] Light Medium Heavy (f) Summer: Temperature Variation (∆T) Figure 8: Simulated scenario: output variables. This figure shows the trend of the output variables in the defined scenario, referred to a zoomed window of two weeks. Please note that ∆CO 2 and ∆T are computed with respect to the baseline scenario in which no strategy is applied, i.e., (α = 0). 10 1 10 3 10 5 10 7 10 9 [-] 58000 60000 62000 64000 66000 68000 70000 72000 J CO 2 J CO 2 J comf 0 500 1000 1500 2000 2500 J comf (a) Light Configuration 10 1 10 3 10 5 10 7 10 9 [-] 55000 60000 65000 70000 75000 J CO 2 [kg] J CO 2 J comf 0 250 500 750 1000 1250 1500 1750 J comf [ C 2 ] (b) Medium Configuration 10 1 10 3 10 5 10 7 10 9 [-] 50000 55000 60000 65000 J CO 2 J CO 2 J comf 0 2000 4000 6000 8000 J comf (c) Heavy Configuration Figure 9: ω fine-tuning. This figure shows the trends of annual CO 2 emissions reduction and average daily temperature deviation with respect to the weight ω. 31 5.3. Limitations Despite the impressive results, it must be acknowledged that it is a proof-of-concept validation, and several simplifying assumptions have been adopted. Still, the scope of this work was to provide a preliminary insight into the potential of our control strategy to minimize CO 2 emissions through the exploitation of the building’s energy flexibility provided by its thermal storage capacity. Therefore, it must be noted that none of the following limi- tations undermines this potential; rather, they point to clear extensions that can further improve robustness and applicability. The first limitation is that the controller is evaluated using historical datasets to estimate solar energy production and external temperature, while a dataset from 2024 is used for the grid carbon intensity. In real deployments these signals must be forecast, and prediction errors may reduce the attain- able savings. Nevertheless, the proposed control law only requires short- horizon trends and is computationally lightweight, making it straightforward to integrate standard forecasting pipelines. Second, we assume that the energy offset induced by thermal storage is uniformly distributed over the prediction horizon. In other words, the amount of renewable surplus effectively shifted to the thermal mass is mod- eled as a constant reduction of grid energy across the next m steps. This simplification is introduced to keep the problem analytically tractable and to preserve the closed-form solution for α(k), while still capturing the main effect of interest. In practice, the true impact of a setpoint shift on the energy trajectory may be non-uniform. Therefore, the uniform-allocation as- sumption can be relaxed in future work by considering other profiles for the surplus distribution. Third, the internal heat capacity is modeled as a 24-hour periodic signal, as required by the standard. This assumption is supported by the limited amplitude of its intra-day variations, which remain relatively small and re- peat consistently over time. Therefore, the periodic approximation does not significantly affect the accuracy of the model and can be considered a rea- sonable simplification rather than a restrictive assumption. Last, the proposed control strategy was validated in a simulated environ- ment. Future work will involve its application to a real-world case. Still, these limitations do not reduce the relevance of the approach; they rather indicate that the reported savings should be interpreted as a conser- vative lower bound obtained under simplified but realistic assumptions. 32 6. Concluding Remarks In this work, we present a novel building decarbonization strategy based on a battery-free setup. Specifically, our idea is to store excess renewable en- ergy, when available, in the building’s thermal mass, using it as a controllable energy buffer. To this end, we design an ad-hoc optimization strategy that, whenever a renewable surplus is available, computes the optimal fraction to store, trading off grid-related CO 2 emissions and occupants’ comfort. Under specific assumptions, we show that a closed-form solution can be derived, yielding a policy that is lightweight and suitable for real-time implementa- tion. To assess the effectiveness of this approach, we consider a proof-of-concept validation by designing a simplified yet high-fidelity TRNSYS room model and identifying an interpretable discrete-time model for describing its ther- mal behavior, which has been then used for short-horizon energy consumption forecasting. The strategy is evaluated across three configurations of the case study, representing buildings with low, medium, and high thermal mass. The results obtained by simulating our strategy performance over a year show a reduction in grid-related emissions of approximately 10% compared to the reference scenario without storage in the low thermal mass case, correspond- ing to annual savings of 7 kg of CO 2 . In the medium and high thermal mass cases, the reduction reaches 25% (approximatelly 18-20 kg of CO 2 ). These savings are achieved with maximum setpoint deviations of±0.5 ◦ C in the low thermal mass case, and±1.2 ◦ C in the medium and high thermal mass cases. A thermal comfort assessment based on the PMV index confirms that, de- spite these deviations from the reference setpoint, thermal comfort remains within the limits prescribed by the standard. Future work will focus on real-building validation, integrating forecasting models for solar energy and carbon intensity. Overall, the presented re- sults support the potential of the proposed intuition, showing that the build- ing envelope as a thermal storage can be a low-cost alternative to batteries for increasing renewable self-consumption and reducing building-related CO 2 emissions. 33 Appendix A. Additional Details on TRNSYS Model In this Appendix, further details on the TRNSYS model implementation and on the calculation of PMV for the different scenarios are reported. First, Figure A.10 shows the representation of the space in plan and section, carried out along the A’ axis of the case study. In addition, Figures A.11, A.12 and A.13 illustrate the stratigraphy of the various envelope components used to model the office room. Second, Table A.5 provides further information into TRNSYS Type set- tings and functionality. Last, Table A.6 presents additionals details on the parameters adopted for the PMV calculation across the different scenarios considered. 34 120 140 5 m 6 m Office Area = 30 m 2 h = 3 m Volume = 90 m 3 b a b b A'A 120 140 120 140 (a) Plan 3 m c d (b) A’ Section Figure A.10: Designed building section. This Figure shows the plant and the A’ section of the building hosting the designed office room. 35 o ROCK WOOL INSULATION thickness 100 m GYPSUM PLASTERBOARD thickness 12.5+12.5 m i OSB PANEL thickness 15 m ROCK WOOL INSULATION thickness 50 m AIR GAP thickness 15 m ALLUMINIUM CLADDING thickness 4 m 20,9 10 2,51,5 5 1,5 0,4 (a) External opaque enclosure GYPSUM PLASTERBOARD thickness 12.5+12.5 m ROCK WOOL INSULATION thickness 75 m GYPSUM PLASTERBOARD thickness 12.5+12.5 m i 12,5 7,5 2,52,5 (b) Internal vertical enclosure i o GYPSUM PLASTERBOARD thickness 12.5+12.5 m STEEL BEAM thickness 100 m PROFILED METAL SHEET thickness 1 m VAPOUR BARRIER EPS INSULATION thickness 160 m WATERPROOF BREATHABLE MEMBRANE PERFORATED STEEL PROFILE FOR VENTILATION thickness 60 m PROTECTIVE STEEL PLATE thickness 2.4 m 44,05 16 6 3,45 5,5 10 2,5 (c) Horizontal flat enclosure o i VENTILATED CRAWL SPACE thickness 250 m CONCRETE BLINDING LAYER thickness 80 m OSB PANEL thickness 18 m AIR GAP thickness 80 m XPS INSULATION thickness 120 m VAPOUR BARRIER GYPSUM FIBREBOARD PANEL thickness 12.5+12.5 m 58,2 2,5 8 0,6 12 25 8 LVT FLOORING thickness 6 m 1,8 (d) Horizontal enclosure against ground Figure A.11: Light-weight configuration stratigraphy. This Figure shows the stratigraphy of the main elements constituting the light-weight version of the building hosting the designed office room. 36 o HOLLOW BRICK thickness 200 m PLASTER thickness 15 m i EPS INSULATION thickness 140 m AIR GAP thickness 15 m CERAMIC CLADDING FACADE thickness 20 m 39 20 1,5 14 1,5 2 (a) External opaque enclosure HOLLOW BRICK thickness 120 m PLASTER thickness 15 m PLASTER thickness 15 m i 15 12 1,51,5 (b) Internal vertical enclosure i o PLASTER thickness 15 m REINFORCED CONCRETE AND HOLLOW BLOCK SLAB thickness 200 m SLOPED LIGHTWEIGHT CONCRETE SCREED thickness 40 m WATERPROOFING MEMBRANE EPS INSULATION thickness 160 m NON-WOVEN FABRIC BALLAST LAYER IN GRAVEL thickness 40 m 46,5 16 4 4 20 1,5 (c) Horizontal flat enclosure o i VAPOUR BARRIER MECHANICAL/ELECTRICAL CONCRETE SCREED thickness 60 m LIGHTWEIGHT FINISHING SCREED thickness 40 m LVT FLOORING thickness 20 m XPS INSULATION thickness 120 m REINFORCED CONCRETE SLAB thickness 150 m 37,9 4 0,6 6 12 15 (d) Horizontal enclosure against ground Figure A.12: Medium-weight configuration stratigraphy. This Figure shows the stratigra- phy of the main elements constituting the medium-weight version of the building hosting the designed office room. 37 CONCRETE BLOCKS thickness 250 m PLASTER thickness 15 m EPS INSULATION thickness 140 m AIR GAP thickness 15 m CERAMIC CLADDING FACADE thickness 20 m i o 44 25 1,5 14 1,5 2 (a) External opaque enclosure CONCRETE BLOCKS thickness 180 m PLASTER thickness 15 m PLASTER thickness 15 m i 21 18 1,51,5 (b) Internal vertical enclosure i o PLASTER thickness 15 m REINFORCED CONCRETE SLAB thickness 180 m SLOPED LIGHTWEIGHT CONCRETE SCREED thickness 40 m WATERPROOFING MEMBRANE EPS INSULATION thickness 160 m WATERPROOFING MEMBRANE BALLAST LAYER IN GRAVEL thickness 40 m 44,5 16 4 4 18 1,5 (c) Horizontal flat enclosure o i VAPOUR BARRIER MECHANICAL/ELECTRICAL CONCRETE SCREED thickness 80 m LIGHTWEIGHT FINISHING SCREED thickness 60 m CERAMIC FLOORING thickness 20 m XPS INSULATION thickness 120 m REINFORCED CONCRETE SLAB thickness 200 m 48,3 6 2 8 12 20 (d) Horizontal enclosure against ground Figure A.13: Heavy-weight configuration stratigraphy. This Figure shows the stratigraphy of the main elements constituting the heavy-weight version of the building hosting the designed office room. 38 Table A.5: Employed TRNSYS Types. This Table lists all the TRNSYS Types used to design the considered office room and reports their parameter settings. TypeDefinitionSettings 941 Blower Power = 0.059 kW Air To WaterTotal Air Flowrate = 1097.04 m 3 /hr Heat PumpRated Heating Capacity = 1.04 kW Rated Heating Power = 0.246 kW 954a Total Air Flowrate = 378 m 3 /hr Air to Rated Indoor Fan Power = 0,035 kW HeatRated Outdoor Fan Power = 0,05 kW PumpRated Total Cooling Capacity = 1,3 Rated Cooling Power = 0,33 kW 114 Circulation PumpRated Power = 32 W 1231 Design Capacity = 1200 W Design Surface Temperature = 70 ◦ C Radiator Design Air Temperature = 20 ◦ C Design Delta-T Exponent = 1,3 Number of Pipes = 20 562f Photovoltaic Area = 7.73 m 2 Panel PV Cell Efficiency = 23% 23 Minimum Control Signal = 0 Maximum Control Signal = 1 Cooling Gain Constant = -2 ControllerIntegral Time = 1 hr Derivative Time = 0 hr Fraction of ySet for Proportional Effect = 1 23 Minimum Control Signal = 0 HeatingMaximum Control Signal = 1 andGain Constant = 0.1 PumpIntegral Time = 1 hr ControllerDerivative Time = 0 hr Fraction of ySet for Proportional Effect = 0.5 39 Table A.6: PMV calculation in different scenarios. The table summarizes the parameters used for the PMV calculation across the considered scenarios. ScenarioSettingsPMV Winter scenario without α Air temperature = 20 ◦ C Air speed = 0.1 m/s Relative humidity = 50%PMV = -0.31 Metabolic rate = 1.2 (70 W/m 2 ) Clothing insulation = 1.1 (0.17 m 2 K/W) Air temperature = 21.2 ◦ C Air speed = 0.1 m/s Winter scenario with αRelative humidity = 50%PMV = -0.05 (maximum ∆T = 1.2 ◦ C)Metabolic rate = 1.2 (70 W/m 2 ) Clothing insulation = 1.1 (0.17 m 2 K/W) Summer scenario without α Air temperature = 26 ◦ C Air speed = 0.15 m/s Relative humidity = 50%PMV = 0.33 Metabolic rate = 1.2 (70 W/m 2 ) Clothing insulation = 0.6 (0.095 m 2 K/W) Air temperature = 24.8 ◦ C Air speed = 0.15 m/s Summer scenario with αRelative humidity = 50%PMV = -0.04 (maximum ∆T = 1.2 ◦ C)Metabolic rate = 1.2 (70 W/m 2 ) Clothing insulation = 0.6 (0.095 m 2 K/W) 40 References [1] United Nations Environment Programme, Global Alliance for Build- ings and Construction, Global status report for buildings and construc- tion - beyond foundations: Mainstreaming sustainable solutions to cut emissions from the buildings sector, United Nations Environment Pro- gramme (2024). doi:10.59117/20.500.11822/45095. [2] N. Damianakis, G. R. C. Mouli, P. Bauer, Grid impact of photo- voltaics, electric vehicles and heat pumps on distribution grids — an overview, Applied Energy 380 (2025) 125000. URL: https://w. sciencedirect.com/science/article/pii/S0306261924023845. doi:https://doi.org/10.1016/j.apenergy.2024.125000. [3] R. Gupta, A. Pena-Bello, K. N. Streicher, C. Roduner, Y. Farhat, D. Thöni, M. K. Patel, D. Parra, Spatial analysis of distribution grid capacity and costs to enable massive deployment of pv, electric mobility and electric heating, Applied Energy 287 (2021) 116504. doi:https://doi.org/10.1016/j.apenergy.2021.116504. [4] A. Dehghani-Sanij, E. Tharumalingam, M. Dusseault, R. Fraser, Study of energy storage systems and environmental challenges of batteries, Renewable and Sustainable Energy Reviews 104 (2019) 192–208. URL: https://w.sciencedirect.com/science/ article/pii/S1364032119300334. doi:https://doi.org/10.1016/j. rser.2019.01.023. [5] L. da Silva Lima, M. Quartier, A. Buchmayr, D. Sanjuan-Delmás, H. Laget, D. Corbisier, J. Mertens, J. Dewulf, Life cycle assessment of lithium-ion batteries and vanadium redox flow batteries-based renewable energy storage systems,Sustainable Energy Tech- nologies and Assessments 46 (2021) 101286. URL: https://w. sciencedirect.com/science/article/pii/S2213138821002964. doi:https://doi.org/10.1016/j.seta.2021.101286. [6] D. Akinyele, J. Belikov, Y. Levron, Battery storage technologies for elec- trical applications: Impact in stand-alone photovoltaic systems, Ener- gies 10 (2017). URL: https://w.mdpi.com/1996-1073/10/11/1760. 41 [7] C. Lamnatou, G. Notton, D. Chemisana, C. Cristofari, Stor- age systems for building-integrated photovoltaic (bipv) and building- integrated photovoltaic/thermal (bipvt) installations: Environmen- tal profile and other aspects, Science of The Total Environment 699 (2020) 134269. URL: https://w.sciencedirect.com/science/ article/pii/S0048969719342524. doi:https://doi.org/10.1016/j. scitotenv.2019.134269. [8] R. Alesci, M. Fiorentini, E. Zanetti, R. Scoccia, Energy flexibility quantification of the building’s thermal mass for radiator and floor heating systems, Energy 325 (2025) 135903. URL: https://w. sciencedirect.com/science/article/pii/S0360544225015452. doi:https://doi.org/10.1016/j.energy.2025.135903. [9] I. Annex, 67, summary report energy in buildings and communities pro- gramme annex 67 energy flexible buildings, 2019, 2019. [10] Y. Zhi, T. Sun, D. Gao, X. Chen, G. Wei, X. Dai, X. Yang, Achieving net zero energy heating by integrating the building envelope as a thermal battery, iScience 27 (2024) 109892. URL: https://w. sciencedirect.com/science/article/pii/S2589004224011143. doi:https://doi.org/10.1016/j.isci.2024.109892. [11] A. Jossen, J. Garche, D. U. Sauer, Operation conditions of batteries in pv applications, Solar energy 76 (2004) 759–769. [12] E. Mocanu, D. C. Mocanu, P. H. Nguyen, A. Liotta, M. E. Webber, M. Gibescu, J. G. Slootweg, On-line building energy optimization using deep reinforcement learning, IEEE transactions on smart grid 10 (2018) 3698–3708. [13] F. Alfaverh, M. Denai, Y. Sun, Demand response strategy based on re- inforcement learning and fuzzy reasoning for home energy management, IEEE access 8 (2020) 39310–39321. [14] S. Chouikhi, L. Merghem-Boulahia, M. Esseghir, H. Snoussi, A game- theoretic multi-level energy demand management for smart buildings, IEEE Transactions on Smart Grid 10 (2019) 6768–6781. URL: https: //api.semanticscholar.org/CorpusID:181848840. 42 [15] I. Ullah, I. Hussain, M. Singh, Exploiting grasshopper and cuckoo search bio-inspired optimization algorithms for industrial energy management system: Smart industries, Electronics 9 (2020). URL: https://w. mdpi.com/2079-9292/9/1/105. [16] M. Elnour, Y. Himeur, F. Fadli, H. Mohammedsherif, N. Meskin, A. M. Ahmad, I. Petri, Y. Rezgui, A. Hodorog, Neural network-based model predictive control system for optimizing building automation and man- agement systems of sports facilities, Applied Energy 318 (2022) 119153. [17] R. Lv, Z. Yuan, B. Lei, J. Zheng, X. Luo, Model predictive control with adaptive building model for heating using the hybrid air-conditioning system in a railway station, Energies 14 (2021). URL: https://w. mdpi.com/1996-1073/14/7/1996. [18] X. Zhou, H. Du, S. Xue, Z. Ma, Recent advances in data mining and machine learning for enhanced building energy management, Energy 307 (2024) 132636. URL: https://w.sciencedirect.com/science/ article/pii/S0360544224024101. doi:https://doi.org/10.1016/j. energy.2024.132636. [19] G. Gao, J. Li, Y. Wen, Energy-efficient thermal comfort control in smart buildings via deep reinforcement learning, arXiv preprint arXiv:1901.04693 (2019). [20] W. Valladares, M. Galindo, J. Gutiérrez, W.-C. Wu, K.-K. Liao, J.- C. Liao, K.-C. Lu, C.-C. Wang, Energy optimization associated with thermal comfort and indoor air control via a deep reinforcement learning algorithm, Building and Environment 155 (2019) 105–117. [21] F. Wahid, R. Ghazali, L. H. Ismail, Improved firefly algorithm based on genetic algorithm operators for energy efficiency in smart buildings, Arabian Journal for Science and Engineering 44 (2019) 4027–4047. [22] V. Kanna, R. Subramani, M. A. Rusho, S. Sharma, A. Mahapatro, D. Gupta, J. Lozanovic, et al., Swarm intelligence for energy-efficient heating, ventilation, and air conditioning (hvac) systems: A case study in smart buildings, Case Studies in Thermal Engineering (2025) 106823. 43 [23] R. Selvaraj, V. M. Kuthadi, S. Baskar, Smart building energy manage- ment and monitoring system based on artificial intelligence in smart city, Sustainable Energy Technologies and Assessments 56 (2023) 103090. [24] M. Arun, D. Barik, N. A. Othman, S. Praveenkumar, K. Tudu, Inves- tigating the performance of ai-driven smart building systems through advanced deep learning model analysis, Energy Reports 13 (2025) 5885– 5899. [25] Y. Han, Z. He, S. Wu, Y. Liu, Y. Lian, C. Wang, J. Feng, Z. Zhou,Enhancing building energy efficiency with thermal mass optimization,Advances in Applied Energy 18 (2025) 100224. URL: https://w.sciencedirect.com/science/article/ pii/S2666792425000186. doi:https://doi.org/10.1016/j.adapen. 2025.100224. [26] Y. Han, Z. Zhou, W. Li, J. Feng, C. Wang, Exploring building component thermal storage performance for optimizing indoor ther- mal environment – a case study in beijing, Energy and Buildings 304 (2024) 113834. URL: https://w.sciencedirect.com/science/ article/pii/S0378778823010642. doi:https://doi.org/10.1016/j. enbuild.2023.113834. [27] L. Navarro, A. de Gracia, D. Niall, A. Castell, M. Browne, S. J. McCormack, P. Griffiths, L. F. Cabeza,Thermal en- ergy storage in building integrated thermal systems: A review. part 2. integration as passive system,Renewable Energy 85 (2016) 1334–1356. URL: https://w.sciencedirect.com/science/ article/pii/S0960148115300860. doi:https://doi.org/10.1016/j. renene.2015.06.064. [28] P. K. S. Rathore, S. K. Shukla, Potential of macroencapsu- lated pcm for thermal energy storage in buildings: A comprehen- sive review, Construction and Building Materials 225 (2019) 723– 744. URL: https://w.sciencedirect.com/science/article/pii/ S0950061819318847. doi:https://doi.org/10.1016/j.conbuildmat. 2019.07.221. [29] N. Soares, J. Costa, A. Gaspar, P. Santos, Review of pas- sive pcm latent heat thermal energy storage systems towards 44 buildings’ energy efficiency,Energy and Buildings 59 (2013) 82–103. URL: https://w.sciencedirect.com/science/article/ pii/S0378778813000157. doi:https://doi.org/10.1016/j.enbuild. 2012.12.042. [30] B. M. Tripathi, S. K. Shukla, A comprehensive review of the thermal performance in energy efficient building envelope incorpo- rated with phase change materials, Journal of Energy Storage 79 (2024) 110128. URL: https://w.sciencedirect.com/science/ article/pii/S2352152X23035272. doi:https://doi.org/10.1016/j. est.2023.110128. [31] R. Ramesh, A. Hasan, H. ur Rehman, Analysis of energy flex- ibility of an efficient positive energy apartment building in a nordic climate by thermal mass activation, volume 18, 2023, p. 813 – 820. URL: https://w.scopus.com/inward/record. uri?eid=2-s2.0-85179517133&doi=10.26868%2f25222708.2023. 1251&partnerID=40&md5=0eda85014a6c10bfde97adad77e2e852. doi:10.26868/25222708.2023.1251. [32] Y. Zhou, Demand response flexibility with synergies on pas- sive pcm walls, bipvs, and active air-conditioning system in a subtropical climate,Renewable Energy 199 (2022) 204– 225. URL: https://w.sciencedirect.com/science/article/pii/ S0960148122013039. doi:https://doi.org/10.1016/j.renene.2022. 08.128. [33] H. Yuan, Y. Chen, A. D. Gangi, Z. Chen, Energy flexibility evaluation for building passive thermal storage mass, Energies 19 (2026). URL: https://w.mdpi.com/1996-1073/19/4/1035. [34] H. Johra, K. Filonenko, P. Heiselberg, C. Veje, S. Dall’Olio, K. En- gelbrecht, C. Bahl, Integration of a magnetocaloric heat pump in an energy flexible residential building, Renewable Energy 136 (2019) 115– 126. URL: https://w.sciencedirect.com/science/article/pii/ S0960148118315568. doi:https://doi.org/10.1016/j.renene.2018. 12.102. [35] T. Kuczyński, A. Staszczuk,Experimental study of the in- fluence of thermal mass on thermal comfort and cooling en- 45 ergy demand in residential buildings,Energy 195 (2020) 116984. URL: https://w.sciencedirect.com/science/article/ pii/S0360544220300918. doi:https://doi.org/10.1016/j.energy. 2020.116984. [36] D. Dominković, P. Gianniou, M. Münster, A. Heller, C. Rode, Utilizing thermal building mass for storage in district heating systems: Combined building level simulations and system level optimization, Energy 153 (2018) 949–966. URL: https://w.sciencedirect.com/science/ article/pii/S0360544218307060. doi:https://doi.org/10.1016/j. energy.2018.04.093. [37] C. Fernández Bandera, J. Pachano, J. Salom, A. Peppas, G. Ramos Ruiz, Photovoltaic plant optimization to leverage electric self consumption by harnessing building thermal mass, Sustainability 12 (2020). URL: https://w.mdpi.com/2071-1050/12/2/553. [38] M. Pinamonti, A. Prada, P. Baggio, Rule-based control strategy to increase photovoltaic self-consumption of a modulating heat pump using water storages and building mass activation, Energies 13 (2020). URL: https://w.mdpi.com/1996-1073/13/23/6282. [39] I. Khan, M. W. Jack, J. Stephenson, Analysis of greenhouse gas emis- sions in electricity systems using time-varying carbon intensity, Journal of Cleaner Production 184 (2018) 1091–1101. URL: https://w. sciencedirect.com/science/article/pii/S0959652618306474. doi:https://doi.org/10.1016/j.jclepro.2018.02.309. [40] O. Corradi, Electricity maps portal, 2016. URL: https://app. electricitymaps.com/map. [41] H. Zhou, Y. Zhang, L. Yang, Q. Liu, K. Yan, Y. Du, Short-term pho- tovoltaic power forecasting based on long short term memory neural network and attention mechanism, IEEE Access 7 (2019) 78063–78074. doi:10.1109/ACCESS.2019.2923006. [42] J. Gaboitaolelwe, A. M. Zungeru, A. Yahya, C. K. Lebekwe, D. N. Vinod, A. O. Salau, Machine learning based solar photovoltaic power forecasting: A review and comparison, IEEE Access 11 (2023) 40820– 40845. doi:10.1109/ACCESS.2023.3270041. 46 [43] C. Scott, M. Ahsan, A. Albarbar, Machine learning for fore- casting a photovoltaic (pv) generation system, Energy 278 (2023) 127807. URL: https://w.sciencedirect.com/science/article/ pii/S036054422301201X. doi:https://doi.org/10.1016/j.energy. 2023.127807. [44] V. Aryai, M. Goldsworthy, Day ahead carbon emission forecast- ing of the regional national electricity market using machine learn- ing methods, Engineering Applications of Artificial Intelligence 123 (2023) 106314. URL: https://w.sciencedirect.com/science/ article/pii/S0952197623004980. doi:https://doi.org/10.1016/j. engappai.2023.106314. [45] R. Kohút, M. Klaučo, M. Kvasnica, Unified carbon emissions and market prices forecasts of the power grid, Applied Energy 377 (2025) 124527. URL: https://w.sciencedirect.com/science/ article/pii/S030626192401910X. doi:https://doi.org/10.1016/j. apenergy.2024.124527. [46] International Organization for Standardization (ISO), Uni en iso 13786:2008: Thermal performance of building components, dynamic thermal characteristics - calculation methods, 2008. [47] N. Aste, F. Leonforte, M. Manfren, M. Mazzon,Ther- mal inertia and energy efficiency – parametric simulation as- sessment on a calibrated case study,Applied Energy 145 (2015) 111–123. URL: https://w.sciencedirect.com/science/ article/pii/S0306261915001208. doi:https://doi.org/10.1016/j. apenergy.2015.01.084. [48] E. Parliament, Council, Directive (eu) 2018/2001 on the promotion of the use of energy from renewable sources (recast), Official Journal of the European Union, 2018. [49] The MathWorks, Inc., System identification toolbox documentation, MathWorks Documentation, 2026. URL: https://w.mathworks. com/help/ident/index.html. [50] P. O. Fanger, Thermal Comfort: Analysis and Applications in Environ- mental Engineering, Danish Technical Press, Copenhagen, 1970. 47 [51] I. O. for Standardization (ISO), Iso 7730:2025: Ergonomics of the ther- mal environment — analytical determination and interpretation of ther- mal comfort using calculation of the pmv and ppd indices and local thermal comfort criteria, 2025. 48