Optimal Integration of Renewable Sources and Latent Heat Storages for Nearly Zero-Energy Buildings

: A crucial way to reach a future sustainable society concerns the path towards nearly zero-energy buildings because of large amounts of energy at stake. The present work proposes an approach for the optimal integration of small-scale technologies (renewable and traditional) to enhance the pathway of existing and inefficient buildings towards low-carbon systems in a cost– benefit effective manner. Operation optimization, as well as an innovative combined design, is investigated with the goal of selecting the capacity of the technologies to be installed depending on the expected operations. The renewable technologies are integrated with proper storage units, such as batteries and latent thermal storage, which allows for reducing the space required for the installation. Two different non-linear programming approaches are used with the aim of finding an optimal solution. The optimization allows for reducing operation costs of 22% for renewable energy sources (RES)-fed dwellings. The combined operation and design optimization lead to a reduction in installation and operating costs by 7%. In the analyzed case, the adoption of the advanced optimization approach shows that latent heat storage is more suitable to be installed than electric storage ( − 2.5% cost).


Introduction
The EU has set ambitious energy targets aiming at reducing greenhouse gas emissions by 40% by 2030 and reaching a 27% share of renewables by 2020. Currently, the building sector is accountable for about 40% of the energy consumed and carbon emissions in the EU.
To abate emissions and meet long-term decarbonization targets in this sector, it will require radical, fast and lasting pathways to convert existing buildings into near zero carbon systems [1][2][3]. For this reason, the use of renewable energy sources for supplying domestic needs is becoming increasingly important worldwide.
Two main approaches exist for the exploitation of renewable energy sources (RES) for the building sector supply. The first, which is currently developed to the greatest extent, is generation-centered and consists of installing the technologies into specific generation sites [4,5] (i.e., large photovoltaic systems with medium voltage level). The second option is the demand-centered approach, which consists in producing energy from RES where needed. Currently, the first option allows one to reach high production performances. However, the generation-centered approach requires grid characteristics far out from those usually available. Proper integration of the two approaches represents a viable solution for the emission reduction in the building sector, integrating the zero-energy buildings, especially in remote areas that are not densely populated.
Concerning the construction of new buildings, various approaches exist in the literature for the design of zero-energy buildings, including the envelope (material and layer) together with the technology selection [6,7]. Energy-oriented models that provide support to decision making in the context of new zero-energy buildings are discussed in [8]. In [9], a study revealing the potential challenges and opportunities while using optimizations in the design of net zero-energy buildings is presented. A comparison of the performance of various approaches adopted for the solution of the design problem of nearly zero-energy building is assessed in [10].
It is important to remind that existing buildings will constitute the main stock of dwellings for the next 10-20 years. Furthermore, about 30% of the buildings are more than 50 years old, with little or no renewable energy sources (RES) installed. For this reason, the path to meet the de-carbonization goal necessarily passes towards the transition of existing buildings towards near-zero-energy buildings.
Transition of existing dwellings towards near-zero-energy buildings cannot rely on a single RES technology. The use of a unique technology for supplying the entire heat/electricity requirement is generally not sufficient to allow reaching efficient zero energy buildings. The integration of low cost-capacity technologies represents a crucial goal for the achievement of energy-autonomous buildings. This goal can be achieved in existing buildings through installation of a proper set of renewable technologies, high-efficiency conversion devices and suitable energy storages. The design of a proper set of technologies tailored on the specific application, i.e., building thermal demand, position, geographical area (that affects solar radiation evolution, wind speed etc.) and the correct system operations are mandatory for a cost-effective solution. An optimization stage is therefore mandatory in the design process. Furthermore, integration of various renewable technologies requires a proper tool to define an overall optimal operation (i.e., which is the production/conversion/storage technology that makes sense to operate at a certain time and what is the best load). Various attempts have been conducted at a district level. A problem of district planning is solved in [11] using Mixed Integer Non-Linear Programming. The design of a management tool for a district energy system for polygeneration relying on an agent-based approach is discussed in [12]. Concerning the uncertainty analysis, various works can be found in the literature [13][14][15].
In this context, the European project RE-COGNITION [16] aims at focusing the attention of the polygeneration on a single building with specific small-scale technologies. The two specific aims of the project are: (a) developing small-scale renewable technologies for electricity/heat and cold production and (b) integrating the technologies in the best way in order to reach optimal costbenefits scenarios at building level.
The present work has the aims of proposing: a) a tool for the assessment of a seamless technology integration, depending on the characteristics of the demand and the site/type of installation; b) an innovative technique for the optimal management of the system. Renewable energy sources will be integrated with proper storage units, such as batteries and latent thermal storage units, which allows for reducing the dimension required for the installation. A proper algorithm is used with the aim of finding an optimal solution. The proposed tool is shown to significantly improve the integration of the renewable sources in a building context. The reduction in costs that is achieved by the proposed optimizer is discussed together with the environmental benefits.

The Project
The overarching aim of the RE-COGNITION project [16] is twofold. One is developing cross-cutting technologies suitable for different building environment. The technologies developed are various, as schematized in Figure 1a. A new aerodynamic concept of vertical axis wind turbine is proposed to ensure the efficiency of variable geometry turbines at higher wind speed also for urban applications, by means of sustainable passive principles; also, a specific passive vibration suppression system is developed for safety with the aim of rooftop integration. Building Integrated Photovoltaics is studied with the aim of improving the aesthetic appeal of the modules along with a cost reduction in the kWh of the energy produced. A micro combined heat and power system fed by biogas is developed by proper modifications of the systems fed by natural gas (e.g., system for flexible combustion). A latent heat storage with a special fin design is developed for heat exchange improvement between water and phase change material. In the end, an optimized solar-thermal driven dehumidification device is investigated through the application of innovative material such as sorption bed.
The second goal of the project consists of developing an ICT framework to enable the building integration of RES technologies for electricity/heat and cold production ( Figure 1b). This allows one to ensure the satisfaction of the highest possible share of the building's demand by means of renewable energy technology. Technologies include variable RES (e.g., solar, wind) and dispatchable energy sources (e.g., biogas, geothermal) along with energy storage and advanced energy efficient technologies.

Case Study
In this work, the installation of some of the technologies proposed in the RE-COGNITION project is considered to feed an existing building fed by a gas heat-only boiler ( Figure 2). The case study considered for the analysis is a large existing dwelling including 20 flats. The dwelling is located in the area with about 2500 degree-days, typical of mild European climate. The dwelling is 30 years old and this is in the energy class E. The yearly energy consumption is about 100 kWh/m 2 . The heat demand for the dwelling is estimated considering the hourly method (UNI EN ISO 52016), while the electricity demand is evaluated by summing up typical daily profiles of the various flats. In Figure 3, the electricity and the thermal demand evolution for a typical winter cold day are reported. Different sets of technologies have been considered during the design stage. In all cases (Table  1), a small-scale wind turbine, a microturbine in a cogeneration configuration (mCHP), an air heat pump and a gas-fueled heat-only boiler are included. In Case 1, photovoltaics (PV) and an electric storage are available. In Case 2, photovoltaics and a latent heat storage are also available. Small-scale wind turbine: The small-scale wind turbine considered has a nominal power (reached with wind speed larger than 10 m/s) of 6 kW.
mCHP: a biogas microturbine for heat and power generation characterized by an electric nominal power of 20 kW.
Gas heat-only boiler: This is a typical condensing gas boiler for space heating production. The nominal thermal power is 170 kW.
Air heat pump: The air heat pump has a nominal thermal power of about 180 kW. Latent heat storage: This is a latent heat storage filled with paraffin wax as Phase Change Material (PCM). The total storable thermal energy is 70 kWh.
Electric storage: Lithium-ion battery is considered with 26 kWe of total storable energy. The nominal power is evaluated considering the following criteria: (1) available data of the various technologies; (2) common practice in the design of renewable energy technologies; (3) proper device size is estimated after preliminary multiple simulations.
The efficiencies of the production and conversion technologies depend on the operating condition. This means that the correlation between the source and the energy vector produce is not linear. This makes the problem much more difficult to solve. Investment costs for the technologies are reported in Table 2, along with the references where they have been found.

Optimal Operations
An optimization approach is used in order to find the best operations that minimize the cost for the energy supplied. The optimal operation is the one which minimizes the total cost of the energy supplied. This quantity is calculated by summing the cost of the natural gas and electricity entering the system and considering that electricity can also be sold to the grid, as shown in Equation (1).
where the electricity purchased (ce_in), the electricity sold (ce_out), the gas purchased (cg_in) and the investment cost (cinv) are all expressed in EUR/day. These terms are obtained by multiplying the electricity (or the gas) cost times the energy absorbed by the system in the entire time evolution considered. The power fluxes (both electrical and thermal) produced by each technology installed or stored/released by the thermal/electricity storages are the independent variables of the optimization. In the cases considered in this work, the production/conversion technologies are 9: photovoltaic, wind turbine, gas heat-only boiler, heat pump, mCHP, electric storage, thermal storage, electricity sold by the system, electricity purchased by the system. Nevertheless, the independent variables of the problem are not 8. In fact, the optimization cannot be performed separately time by time since the thermal and electrical storage operations make the various timeframes dependent. For this reason, the independent variables of the problem are 9 times the number of the considered timeframes.
where x is the power absorbed/released by each technology and c is the cost of the energy vector in input. Considering various technologies (and the proper energy vector) and the various timeframes of the optimization, a matrix of thermal/electrical power absorbed and released can be adopted. The relation between the chemical/thermal/electrical power entering and exiting each technology is due by the efficiency of each technology. Since the efficiencies of the production and conversion technologies depend on the operating condition, the correlation between the source and the energy vector produce is not linear. This makes the optimization problem to solve non-linear. Among the approaches that can be used to solve these kinds of problems are Mixed Integer Linear Programming (MILP), Non-Linear Programming (NLP) and Mixed Integer Non-Linear Programming (MINLP). The first approach requires a linearization (efficiency must be constant) that can reduce the accuracy of the problem solved. The second requires the use of an alternative approach for considering the integer variables. The third approach can theoretically be used for every kind of problem but the convergence can be more difficult.
The minimum power and inclusion of maintenance costs are the items which mainly need integer variables. In the case of small-scale systems, the devices can often operate in a larger domain with respect to large-scale systems. Furthermore, the maintenance cost for various technologies can be neglected. For this reason, the constraints related to these characteristics are less impactful and often can be neglected. Therefore, when considering the installation of renewable technologies in buildings, a different approach can be used. The approach consists of using the Non-Linear Programming approach, including the limitation of minimum power and maintenance costs (if any) using sigmoidal functions (i.e., smooth gap functions). A sufficiently smooth function is used to avoid convergence problems. At the end of each optimization, the sigmoidal function is checked for not being used in the gap.
The heat release of the latent heat changes with the temperature of the system, and therefore with the time (Figure 4). The temperature of the system can be easily related to the heat stored in the system, by means of numerical simulations. This can be done by means of a 2D thermo-fluidynamic model of the system in order to take into account the effects of the variation of the phase occurring in the thermal storage and the effect of the buoyancy. Once the evolution is obtained, it is easily possible to consider the optimization that the maximum heat absorbed/released by the system changes depending on the state of charge of the thermal storage.

Combined Design and Operation Optimization
If the goal is not the operation of a predefined system but also its design, a different problem must be addressed. In this case, the best overall solution depends on the operational cost as well as on the investment costs. The optimization is thus performed to design optimally the set of technologies depending on the expected operations. In this section, the optimization approach suitable to achieve the best size of the technologies, considering the investment cost and the future operations, is fully described.
The optimization includes not only the cost for the energy supplied (both thermal and electrical), but also the investment costs. These are considered as a function of the installed power and, in case the technology is not installed, the corresponding investment cost is zero. The independent variables of the optimization are: (a) The fluxes of heat/electricity produced/consumed by each production/conversion energy systems, which are 9 (photovoltaic, wind turbine, gas heat-only boiler, mCHP, heat pump, electric storage, thermal storage, electricity sold by the system, electricity purchased by the system); (b) The installed capacity for each technology, which is 7 (photovoltaic, wind turbine, gas heat-only boiler, mCHP, heat pump, electric storage, thermal storage).
As discussed for the operation optimization, the overall number of independent variables of the problem is 9 times the number of time step, plus the 7 values of the capacities installed since the optimization must be performed considering all times because the presence of the thermal and electrical storages creates an interdependent relation between the times.
The objective function to be minimized is the total cost, which is achieved by summing the cost of the resources entering the dwelling plus the investment cost of the technologies. Therefore, the total cost is expressed as shown in Equation (3).
where the electricity purchased (ce_in), the electricity sold (ce_out), the gas purchased (cg_in) and the investment cost (cinv) are all expressed in EUR/day, as for the optimization described in Section 2.3.1. Considering various technologies (and the proper energy vector) and the various timeframes of the optimization, a matrix of thermal/electrical power absorbed and released can be set. the combined design and operation optimization because of the presence of the investment, which is considered with integer variables.

Operations Optimization
The present section reports the results of the operation optimization for the cases described in Table 1. Results for Case 2 are reported in Figure 5. The base electric load is supplied using the mCHP. Wind turbine and photovoltaics are operated always when available since these are free sources. The electricity produced is used not only to supply the electric demand but also for the operation of the electric heat pump and for selling to the grid. The electricity is sold in the times the electricity cost is higher. This can be easily noticed by observing Figure 6 which reports the evolution of the electricity purchased (a) and sold (b) to the grid (the maximum cost for the electricity sold is 10 a.m.). Concerning the heat demand, the presence of the thermal energy storage makes the selection of the technologies for heat production more flexible. The technology mostly used for the heat production is the mCHP. The electric heat pump is used when the electricity cost is low; otherwise it is cheaper to sell the extra electricity to the grid and to use the heat-only boiler for supplying the thermal load. The heat-only boiler, when operating, works at its maximum thermal power; the excess heat produced is stored in the thermal energy storage. The heat-only-boiler operation results in a sort of on-off regulation that allows for maximizing the performances when it operates. Results for Case 2 are reported in Figure 5. As for Case 1, the base electric load is supplied using the mCHP while the wind turbine and photovoltaics are always operated when the resource is available. The electricity produced is used to supply the electric demand, the operation of the electric heat pump and for selling to the grid (for a small extent). The presence of the electric storage allows one to store electricity during night and to use it when the electricity cost is higher and/or when the most convenient technologies are not sufficient to cover the peak. Furthermore, at 10 a.m., part of the electricity produced is sold to the network since the electricity price at that time is high.
Concerning the heat demand, the base load is mainly covered by means of the mCHP. The electric heat pump is used when the electricity cost is low while in the timeframes when the cost is high it is more convenient to sell the extra electricity to the grid and to use the heat-only boiler for supplying the thermal load (Figure 7), as also was the case in Case 1. The results obtained in this section have been compared with the results obtained (without the optimization tool) by selecting the various sources consecutively, depending on the average production cost (Benchmark Case). The Benchmark Case does not include the thermal and electrical storages. Concerning the objective functions, the values are 62.03 EUR/day for Case 1, 61.37 EUR/day for Case 2 and 74.8 EUR/day for the Benchmark Case. The results clearly show that the availability of the optimization tool here presented (Case 1 and 2) allows one to save about 22% of the cost with respect to a non-optimized solution (Benchmark Case). Furthermore, the installation of the electric storage (Case 2), with respect to the thermal storage (Case 1), allows one to save about 1% of the operation cost.
In case the investment costs of the devices are included, it is possible to estimate which is the overall cost (operation plus installation) of the overall group of technologies. In this case, the overall cost for Case 1 is 110.7 EUR/day and 104.5 EUR/day for Case 2; this is due to the large size of the thermal storage selected. However, from both the investment and operation perspective, the solution proposed in Case 2 is more advantageous with respect to the solution proposed in Case 1. Concerning the Benchmark Case, the investment costs of Case 1 and 2 are higher since they also include the presence of the storages. The overall cost for the Benchmark Case is 127.9 EUR/day, therefore the savings on the sum of operation and investment are about 17%.

Combined Design and Operation Optimization
In this section, the results achieved with the optimization performed to estimate the system design considering the operations (detailed in Section 2.3.2) are reported. Figure 8 shows the results for Case 1. The installed technologies in this case are selected by the optimizer. These are: the mCHP, wind turbine, PV, electric heat pump, heat only boiler and thermal storage (i.e., all the technologies available). As for the operation optimization, the base electric load is supplied using the mCHP and wind turbine and photovoltaics when the corresponding resource is available. The electricity produced is used not only to supply the electric demand but also for the operation of the electric heat pump and sold to the grid when the electricity cost is high (in the late morning). As for the other cases, the evolutions of the electricity purchased (a) and sold (b) to the grid can be observed in Figure 6.
The heat demand is mainly supplied by the mCHP and the electric heat pump (exploiting the excess electricity produced by RES). The thermal energy storage makes the selection of the technologies for heat production much more flexible as can be noticed by the number of times it is switched on and off.
During the evening, the thermal and electricity loads are still high, but the availabilities of PV and wind energy are, respectively, null and low. At this time, both the electricity and the thermal energy produced by the most convenient technologies are not sufficient to cover the loads. Therefore, the heat-only boiler is activated to cover the thermal load and the electricity is purchased by the grid.
Results obtained for Case 2 are reported in Figure 9. The technologies selected by the optimizer are mCHP, wind turbine, PV, electric heat pump, heat-only boiler and electric storage. Therefore, in this case all the technologies available are installed. The heat load in this case is covered by the mCHP and electric heat pump. The heat-only boiler is used to cover the thermal demand in the evening, while the electricity demand is covered by discharging the electricity storage.

Comparison and Discussion
In this section, the two optimization approaches presented (operation optimization and combined design and operation optimization) are compared and discussed. Figure 10 shows the comparison among the total cost obtained for the five cases considered: The use of the optimization allows for reducing costs with respect to the Benchmark Case of a fraction between 13% and 24%, depending on the case. The Combined Design and Operation Optimization provides a solution with operational cost which is slightly higher than in the case of Operation Optimization but the investment cost (that is included in the optimization) is significantly lower. The total cost reduction obtained adopting the Combined Design and Operation Optimization is 12% for Case 1 (with thermal storage installed) and 5% for Case 2 (with electric storage installed). Results achieved with Operation Optimization show that the installation of the electric storage is more convenient. Nevertheless, the Combined Design and Operation Optimization provide a better solution in Case 1 (with the thermal storage installed). This is because including the investment costs directly in the optimization process may significantly change the set of technologies that is more convenient to install. The total cost saving achieved by installing a thermal storage instead of an electrical storage is 2.5%. The results reported in Figure 10 clarify the importance of the design stage in the overall cost of RES systems. In particular, the adoption of a Combined Optimization, including design and operation, allows substantial cost reduction that significantly enhances the pathway of existing buildings towards near-zero-energy buildings. Further analyses should include the uncertainty of input data (such as electrical/thermal demand), wind speed and solar radiation. In addition, a multi-scenario analysis should be used with the aim of identifying the best set of technologies to be installed considering different operations (e.g., summer, winter, middle-season operation).

Conclusions
The present work proposes an approach for the optimal integration of small-scale technologies, especially renewable, in existing dwellings. The approach includes two optimization approaches. The first approach aims at optimizing the operating conditions of the system. The second approach optimizes the design (i.e., the capacity of the technologies installed) along with the operation. This allows achieving an optimized solution from both the design and operation perspective. The final goal is to enhance the transition of existing and outdated buildings towards low-carbon emission taking into account the importance of the investment cost. The considered technologies are devices for the energy production (i.e., photovoltaic, eolic), transformation component (e.g., heat pump) and storages (e.g., latent heat storage, thermal storage) Two non-linear programming algorithm approaches (a specific Non-Linear Programming approach for the Operation Optimization and a Mixed Integer Non-Linear Programming for the Combined Design and Operation Optimization) are adopted. The number of optimization variables is high since the optimization must be done considering all the timeframes combined because of the presence of the storages. Results show that the adoption of the optimization approach provides a reduction in the operation costs of combined RES for buildings of a significant extent (about 22%). The adoption of the Combined Design and Operation Optimization leads to a reduction in the overall cost between 5 and 12%. Furthermore, when the Combined Optimization is used, the technologies that are most suitable to be adopted may change; for the analyzed system, the use of latent heat storage instead of an electric storage lead to a cost reduction of about 2.5%.

Author Contributions:
The conceptualization of the work, the approach followed and the coordination were carried out by E.G. The code development and the data gathering was carried out by G.M. The paper was written by E.G. and the final revision was conducted by V.V.
Funding: This research was funded by European Commission in the context of the RE-COGNITION European project, grant number 815301.

Conflicts of Interest:
The authors declare no conflict of interest.