A sensitivity analysis of a cost optimality study on the energy retrofit of a single-family reference building in Portugal

Improvement of the energy efficiency of residential buildings must ensure compliance with cost optimality criteria, assuming a specific lifespan of the building. At the same time, the energy retrofit of buildings ought to preserve their intrinsic architectural and heritage value. Portuguese residential buildings constructed before 1960 did not follow any energy efficiency rules. They represent 29% of the housing stock in the country and there is a high potential for increasing their energy efficiency. However, it costs more to implement envelope energy efficiency measures through retrofitting works than to provide for them in new buildings. An evaluation based on cost optimality criteria should therefore be performed. This work evaluates the energy performance of a Portuguese reference building typical of the pre-1960 building stock for different thicknesses of thermal insulation retrofit solutions (roof, facade, and ground floor) and systems. The study describes a sensitivity analysis that took a range of climate data, intervention costs, energy prices, discount rates, and energy needs into account. An energy needs factor dealt with the occupants’ habits and the effective reduction of energy consumption compared with the estimated energy needs.


Introduction
The construction industry and the use of buildings are important sources of carbon dioxide emissions, with buildings having an impact on long-term energy consumption. In the European Union (EU), residential buildings represent about 75% of all buildings and single-family buildings represent 64% of housing stock (Buildings Performance Institute Europe 2011). In Portugal, the housing sector accounted for about 18% of final energy consumption in 2010, of which 30% related to electricity consumption. Pre-1960 buildings are a significant proportion of the housing stock (29%) and are responsible for very high levels of energy consumption for heating (National Statistics Institute 2011). About a quarter of the building stock in Europe was built in the last century and is older than the age specified as a theoretical lifespan in European countries, which is usually 50 to 60 years (United Nations Environment Programme 2007). Many of these buildings are often valued for their architectural and even historic characteristics and they reflect the unique identity of some cities. A substantial number of them use inefficient systems, resulting in high energy costs and CO 2 emissions. Retrofitting interventions to make these buildings more energy efficient can provide significant energy savings.
The rehabilitation of Portuguese buildings is only about 6.5% of the total activity of the construction sector, which is much lower than the European average of around 37% (Portuguese Ministry of Environment 2014). According to a recent national survey, about two million houses, about 34% of the national housing stock, need rehabilitation (Portuguese Ministry of Environment 2014). The major renovation of buildings involves complex interventions that have to meet sustainability criteria, particularly in social, environmental, and economic terms. Residential buildings are strongly influenced by economic, environmental, and social aspects whose mutual interaction can in fact have a significant impact on the energy efficiency performance (Boeck et al. 2001). The cost-effectiveness of energy efficiency measures is one criterion for sustainability.
In fact, the Energy Performance in Buildings Directive (EPBD) (European Commision 2010) proposed the development of a comparative methodology framework for calculating the optimum levels of profitability and in 2012 saw the publication of Delegated Regulation No. 244 (European Commision 2012), specifying rules for comparing energy efficiency measures using a costoptimal approach. The cost-optimal methodology includes the reference building selection, the definition of energy efficiency measures, the primary energy calculation of each set of measures, and the overall cost calculation (including initial costs, maintenance costs, replacement costs, energy costs), over the lifespan of the building. Several studies have been performed on costoptimal levels under this European framework Kurnitsk et al. 2011;Vasconcelos et al. 2016).
For this analysis, reference buildings representing the building stock of each country need to be defined (Corgnati et al. 2013). At European level, two projects have provided relevant information on the definition of typical residential buildings, TABULA (Loga et al. 2012) and ASIEPI (INIVE EEIG 2010). It should be noted that neither of these projects involved Portugal. TABULA's main goal was to create building typologies that represent national residential building stock across European countries. For its concerted approach, TABULA started out by examining the different experiences with Bbuilding typologies^in European countries over the past few decades. The focus was on residential buildings and the energy consumed for heating and hot water. The harmonized approach of the TABULA project provides a framework for intercountry comparisons of residential building stocks in the context of energy efficiency.
Regarding the gathering of data, TABULA concluded that energy performance certificates (EPCs) are a promising source for information about the energy performance of national building stocks. The data sourced from the mandatory certificates include a larger fraction of the housing stock, which is a valuable source of information for specifying more representative reference buildings. One of the subtasks of the ASIEPI project was to gather a set of reference buildings to compare energy performance requirements over Europe. ASIEPI's report gives information on the variety of typical houses in Europe; however, since it focused mainly on the choice of building geometry, results are limited.
There are several passive techniques, each of which is suitable for a specific place, building, and climatic condition, according to Bessa and Prado (Bessa and Prado 2015). One way to keep thermal comfort in residential buildings is to employ passive techniques that use no energy, such as enhancing window design to enable natural ventilation, preventing peak indoor temperatures in the summer, and allowing solar radiation to increase low temperatures in the winter. Moreover, with respect to the rest of the envelope, the use of insulation minimizes heat exchanges, especially through the roof and exterior walls, thus avoiding heat gain when outdoor temperatures are high and heat loss from indoors when they are low.
Increasing the thermal resistance of the opaque envelope can significantly reduce energy consumption and provide thermal comfort. Nonetheless, thicker insulation may not be in line with architectural and functional requirements (Jelle 2011). Moreover, the economic benefit of improving insulation depends not only on the initial investment but also on the heating and cooling costs over the lifespan of the building. High levels of thermal insulation may not lead to the cost-optimal solution (Hamdy et al. 2013;Tadeu et al. 2013).
The evaluation of the optimum thickness of envelope insulation and its effect on energy consumption has been studied by many researchers (Kaynakli 2012). For example, Sisman et al. (Sisman et al. 2007) determined the optimum insulation thickness of the external walls and roof for different degree-days regions of Turkey. They demonstrated the relationship between degree-days and the optimum insulation thickness of walls and roof. They also determined the payback period for optimal solutions, which ranged from 1.54 to 4.95 years, depending on the region. In Greece, Axaopoulos et al. (Axaopoulos et al. 2014) discussed the optimal thickness for the wall insulation of a residential building, taking into account orientation, wind direction, and the placement of the insulation on the wall. The heating and cooling needs were obtained by hourly dynamic simulation, which took the influence of the wind by convection into account, resulting in an optimal thickness between 7.1 and 10.1 cm. The placement of thermal insulation on the outside proved to be more cost-effective. For a Portuguese reference building located in Lisbon, Vasconcelos et al. concluded that the thermal rehabilitation measures providing the best cost-efficient results correspond to a roof insulation. Floor insulation, however, offers smallest variation in a building's demand for primary energy. Combinations of thermal envelope rehabilitation measures gave better results than individual measures (Vasconcelos et al. 2016). Where the climate is warmer, as is it is in Portugal, there is no advantage in using thicknesses greater than 80 mm (Tadeu et al. 2015).
Other authors have studied the combination of different energy efficiency measures. Verbeeck and Hens (Verbeeck and Hens 2005) investigated the economic viability of retrofitting measures in five dwellings typical of the Belgian building stock. They found that the sizing of the heating system is directly related to the quality of the envelope. They first improved the envelope insulation, then the glazing and finally they combined those measures with efficient systems. In Greece, Nikolaidis et al. (Nikolaidis et al. 2009) assessed a typical building and concluded that one of the most effective energy-saving measures is to improve the roof insulation. Panão et al. (Panão et al. 2013) discussed housing energy consumption by period of construction, including theoretical and real Portuguese buildings. The paper determines how low the energy load should be in a nearly zero-energy building in Portugal and indicates a value between 60 and 70 kWh/(m 2 year) for heating, cooling, and domestic hot water.
The profitability of energy efficiency measures depends on a large number of interrelated variables. Several authors have proposed using multi-objective optimization analysis for such problems (Hamdy et al. 2013;Malatji et al. 2013;Ferrara et al. 2014;Tadeu et al. 2016;Asadi et al. 2012). The cost-optimal results also depend on the economic evaluation method (net present value (NPV), internal rate of return, ratio between savings and investment, and updated payback period). Using NPV to provide decision criteria and evaluate profitability, as the European Commission does, is one of the most reliable methods to assess investment options (Brealey et al. 2001;Ferreira et al. 2014).
Cost-optimal studies are based on a number of assumptions that can influence the results. For example, the costs of materials and equipment often lack accurate information and are subject to a high variability that prevents a definitive assessment of collected data . The collection of reliable data for cost purposes is one of the most critical steps of costoptimal analysis (Zanghari et al. 2017). Price variations influence the cost optimality of the retrofit measures, and constant reassessment is required to achieve expected return on investment (Buildings Performance Institute Europe 2011). Kumbaroğlu and Madlener (2012) studied administrative buildings in Germany dating from 1900 and showed the importance of energy prices in estimating retrofitting investments. Furthermore, there is an uncertainty in predicting energy prices and discount rates. Sensitivity analysis can help to overcome such uncertainty and make the results of a study more reliable .
In this paper, we use cost-optimal criteria to evaluate improvement measures for Portuguese detached houses built before 1960. We defined a reference building based on information from energy certificates and statistical data. Heating energy needs are estimated using the seasonal method in EN ISO 13790:2008 (European Committee for Standardization 2008). The study involved assessing the variability of results according to the following parameters: climate data, combination of energy efficiency measures, intervention costs, the variation of the useful energy requirements as a function of consumption habits, different energy costs, and discount rates. The study intended to improve understanding of the influence of each parameter in the evaluation of costoptimal solutions by comparing the profitability of the envelope insulation thickness over a lifespan of 30 years.
The reference building is described in the case study section, which also contains all the relevant data such as climate information, economic parameters, and occupants' heating habits. The section BMethodology^presents the methodology to calculate the energy performance cost-optimal levels. The results are then presented and discussed, followed by some final considerations.

Reference building
The characteristics of residential buildings change over time since they depend on social aspects and technological and legal requirements. The first Portuguese energy performance regulations date from 1990 (Portuguese Ministry of Construction 1990) and so houses built before 1960 did not follow any particular requirements. Most were built of stone masonry with wooden, singleglazed windows, while the roofs were generally sloping with ceramic tiles laid on a wooden structure, without insulation (Bragança et al. 2007).
The reference building was defined to be representative of detached houses built before 1960. It is a virtual building based on statistical data, according to the methodology proposed by Vasconcelos et al. (Vasconcelos et al. 2015). Its geometric and thermal characteristics were established using statistical data provided by the National Agency for Energy (ADENE), which are available in the database Energy Certification System (ECS) (ADENE 2014) that contains more than 800,000 certificates. Statistical data provided by the National Statistics Institute (INE) and the General Directorate for Energy and Geology (DGEG) were also used (National Statistics Institute 2011). Based on these data, it is concluded that the most representative typology is a one-floor house with two bedrooms. Rooms were mostly heated by electric heaters, whose nominal efficiency is 1.00, while gas heater systems were most often used for hot water, with the average efficiency of the systems being 0.60 (Serra et al. 2013).
The internal dimensions of the reference building illustrated in Fig. 1 are given in Table 1. Walls are made of stone masonry. The glazed area was assumed to be 15% of useful floor area and to comprise single-glazed wooden framed windows with a solar heat gain coefficient g w of 0.85 and a thermal transmittance value U of 5.10 [W/(m 2°C )]. Shading devices were assumed to be light colored curtains made of a thin fabric with a solar factor of 0.38. The glazed area was assumed to be distributed equally around the four facades (facing north, south, east, and west). The average thermal transmittance of the solutions, U, is shown in Table 2, where the subscripts e, f, r, and w identify the walls, floor, roof, and windows, respectively (Serra et al. 2013). Additionally, the table indicates the solar factor average of the glazing, g w , as well as the air change rate, Rph. The Fig. 1 Reference building adopted Rph corresponds to the lower limit imposed by the Portuguese law (Portuguese Ministry of Economy and Employment 2013), so as to guarantee air quality and minimize the risk of condensation. It was also found that the thermal inertia corresponds to an intermediate class of the energy storage capacity.

Climate data definition
Portugal is located in south-western Europe and has a predominantly Mediterranean climate, falling under the classification of Köppen Csa/Csb (C, warm temperate; s, dry summer; a,b, hot, mild summer) (Internacional Energy Agency 2013). The country is divided into three heating climate zones (I1, I2, and I3) (Portuguese Ministry of Economy and Employment 2013), which are used to set the envelope thermal requirements (see Fig. 2 (Ferreira et al. 2013). For each place, the available solar radiation is given by the product of M. G S . Figure 3 plots the solar radiation for each heating degree days in the region. It also includes a line obtained by linear regression, with a correlation coefficient of 0.79. This line shows that it is possible to correlate the number of degree days with solar radiation. Based on these results, three values of degree days (987 HDD [°C day], 1570 HDD [°C day], and 1924 HDD [°C day]) were used to simulate the three winter climate zones I1, I2, and I3. The heating time periods for the three zones were respectively 4.8, 6.8, and 7.3 months. The climatic zones, the HDD, and the heating periods were specified based on the data available in Portuguese legislation.
The solar radiation for all the other orientations is obtained from southern solar radiation using orientation factors. Table 3 lists the available radiation for each climate zone and main orientations (X is the orientation factor according to (Portuguese Ministry of Economy and Employment 2013)).

Economic and environmental parameters
A cost optimality study depends on the price trend of energy and to a lesser extent on CO 2 emission costs. The EU has published the energy price trends until 2050 (European Comission 2013) and the price of CO 2 was set by the European Union Emissions Trading Scheme (EU ETS). The primary energy conversion factors (PEFs) for CO 2 emissions applicable to electricity are 0.144 kgCO 2 /kWh EP and for natural gas 0.202 kgCO 2 / kWh EP , according to (Portuguese Ministry of Economy and Employment 2013). The conversion factors  The discount rate, which is adjusted according to the degree of risk related to estimated cash flows, is generally higher for riskier assets. We assumed 6% for the financial perspective. This is the current rate for loans for rehabilitation projects in Portugal (Caixa Geral de Depósitos 2015). From the macroeconomic perspective, we assumed a rate of 3%, as mentioned in (European Commision 2012). Full understanding of the most important variables in cost-optimal studies from the macroeconomic perspective is essential to establish public policies in order to promote energy efficiency and the use of renewable energy sources.

Heating habits
In 2011, Statistics Portugal (INE) and the Directorate General for Energy and Geology (DGEG) published the Inquérito ao Consumo de Energia no Sector Doméstico (Survey on Energy Consumption in Households, ICESD) (National Statistics Institute 2011). It showed that the heating and cooling habits of the Portuguese result in useful energy consumption significantly below the nominal needs estimated by the seasonal method. The methodology used in Portugal to calculate heating and cooling energy needs assumes the permanent use of thermal comfort equipment. As it does not consider the behavior of the occupants, the method does not reflect heating and cooling habits. For example, the German datasets discussed above indicate that the real measured household heating energy consumption could be on average 30% lower than that calculated (Sunikka-Blank and Galvin 2012). A consumption reduction factor to generate more realistic estimates of the energy performance was therefore needed.
In this work, we used ECS data (ADENE 2014) and ICESD results to characterize energy consumption habits. The ICESD enabled the assessment of actual values of the final energy consumed in buildings for various uses, including heating, cooling, and domestic hot water.   Considering the increasing popularity of electric heating systems and their improved efficiency, it was decided to use this energy source as a reference. According to the ICESD, 51.7% of households use electricity for heating. In ICESD, the annual electricity consumption for heating per dwelling was 418.6 kWh (0.036 toe) in dwellings with an average total area of 106.6 m 2 and an average heated area of 50.6 m 2 (47.5% of the total area). The annual final energy consumption was thus 8.3 kWh/m 2 , in the effectively heated area.

Fig. 3 Relation between southern solar radiation and HDD for the different regions in Portugal
According to the ECS, the useful annual energy consumption per household for heating is 117.7 kWh/ m 2 . Since the average efficiency of heating systems is 1.91, the final energy consumption would be 61.6 kWh/ m 2 . Based on the data provided by the national energy surveys, we concluded that the effective final energy consumption is 13.4% of the energy needs given in energy certificates. This percentage expresses the heating habits of occupants and reflects both the real occupancy pattern of the dwellings and the level of household economic resources. Therefore, we decided to apply this percentage as a reduction factor of the heating energy needs.

Methodology
The methodology for determining the primary energy needs is derived from the calculation rules proposed in the European standards. The cost optimality evaluation method is then described and we propose an approach for optimizing the number of combinations of efficiency measures to be considered by identifying those with the best potential for profitability.

Energy performance assessment
This assessment started with the simulated thermal performance of the reference building, considering the dimensional survey, geometry, and thermal characteristics of the envelope, as well as the technical building systems (heating systems and hot water). The same reference building can have different hygrothermal behavior and energy consumption, depending on the local climate conditions. Figure 4 is a schematic representation of the heat transfer coefficients through the building envelope.
According to the ICESD, in Portugal, the energy used for cooling is only 0.5% of household energy consumption. Since the Portuguese legislation allows the cooling needs to be neglected when the overheating period is low (Portuguese Ministry of Economy and Employment 2013), the cooling season was disregarded in this study. The primary energy needs, PE, depend only on the heating energy needs, E h, k , and on domestic hot water (DHW) energy production, E w, k (adapted from (Portuguese Ministry of Economy and Employment 2013)): where k is linked to a single energy source; K h and K w are the number of systems for space heating and DHW, respectively; f h, k and f w, k are the percentage energy needs for space heating and DHW, respectively, for each system k; P h, k and P w, k are the conversion factors between final energy and primary energy associated with a single energy source of each system k; and η h, k and η w, k are the efficiency of each system. The heating energy needs of the building, E h, k , are calculated as follows: where Q tr, i and Q ve, i are the heat transfer coefficient by transmission and ventilation, respectively, given in [kWh/year]; η H, gn is the gain utilization factor; Q int, i and Q sol, i are, respectively, the internal and glazing solar gains, also in [kWh/year]; and A f is the internal useful floor area [m 2 ]. Next, each term of the Eq. (2) is presented.
where H tr, i is the overall transmission coefficient of heat transfer. This includes heat loss to the outside (H ext ), to unheated spaces, and to adjacent buildings (H enu ) elements in contact with the ground (H ecs ) (see Fig. 4). These coefficients depend on the thermal transmittance (U) of the solutions and on the linear thermal transmittance (ψ).
where H ve, i is the overall coefficient of heat transfer from ventilation, given by where R ph is the nominal rate of renewal of indoor air in the heating season, [h −1 ]; and P d is the average ceiling height of the heating area, [m].
where q int is the average internal thermal gain per unit area, equal to 4 W/m 2 ; and M is the duration of the heating season, [month]. The solar gain, Q sol, i , depending on the orientation of each window is given by where j corresponds to each orientation (no); G S is the monthly average solar energy incident on a vertical surface facing south in the heating season, per unit area, [kWh/(m 2 month)]; X j is the orientation factor; F s, j is the glazing obstruction factor associated with the orientation j; and A s, j is the effective glazing surface area collecting solar radiation with orientation j, [m 2 ], given by the product of the window glass area and the respective solar factor. The utilization factor gain, η H, gn , in Eq.
(2) allows simulation of the dynamic effect of the building by the seasonal method (European Committee for Standardization 2008) and is obtained by Eqs. 8, 9, and 10: where γ H ¼ Q int;i þQ sol;i Q tr;i þQ ve;i and a H is a function of the thermal inertia of the building class, 1.8, 2.6, and 4.2, that corresponds to buildings with low, medium, and strong thermal inertia, respectively.
Current Portuguese legislation establishes that the minimum energy requirements for buildings undergoing major intervention should be established according to the age of the building (Order No. 349-B / 2013 (Portuguese Ministry of Economy and Employment 2013)). In the case of buildings constructed before 1960, the value of PE cannot exceed the limit of 1.5 set for the reference building.
The calculations were performed using a code developed by ITeCons, currently used by national experts in the energy certification of buildings.

Cost optimality
From the macroeconomic perspective, the global cost, G(τ), of a set number of measures, NM, over the calculation period τ (adapted from (European Commision 2012)) was calculated by in which i and j are, respectively, the year and the measure being analyzed. Thus, the global cost G(τ) is given by the sum of the initial investment costs, I j , plus the sum of annual costs (including maintenance costs), C i, j , for each year, subject to the discount factor D i . In these calculations, the residual value associated with each measure at the end of the calculation period, V τ, j , subject to the discount factor D i when i = τ, was subtracted. GHG i, j is the carbon emission cost. This cost was not subject to the discount rate and was not considered in the financial perspective. This costoptimal study assumed a period τ = 30 years, as suggested by Delegated Regulation No. 244 (European Commision 2012).
The discount factor for year i, D i , was calculated according to the following expression: where R is the real discount rate and i is the year of calculation (e.g., i = 20 for calculating the replacement cost of a component having a lifespan of 20 years). As required by the Delegated Regulation (European Commision 2012), when determining the overall cost of a measure in the macroeconomic calculation, the prices taken into account were the amounts paid by the customer, excluding value-added tax (VAT) and any other applicable taxes. This calculation did not include subsidies for the various measures or any grants related to energy prices.
The overall cost for buildings and their components was arrived at by adding together all the various costs. This study focused on the financial perspective, which is to say the profitability calculations, where the global cost was calculated by the same expression used in the macroeconomic perspective, except that the cost of carbon was excluded. Another difference is that the financial perspective included VAT and other applicable taxes.

Cost optimality steps
The four steps in evaluating cost optimality are described below.
First, the selection of building solutions, heating, and DHW systems was based on an assessment of market cost and suitability for detached houses. These profitability solutions were compared on a common cost base, i.e., euros per kilowatt hour [€/kWh] for equipment (systems) and euros per thermal resistance [€/r] for insulation and glazing (building envelope), following the recommendations of EN 15459:2007 (European Committee for Standardization 2007).
This preliminary analysis enabled the upper and lower bounds of variation of market prices to be established for each solution. It also made it possible to significantly reduce the number of combinations of measures, which are discussed below, since the intermediate rates of each solution did not have be considered. The lower bounds of market prices were used for cost optimality calculations and the upper bounds for the sensitivity analysis to provide a comprehensive perception of the behavior of the cost-optimal curve. This study only considered price changes for insulation. The range of the systems' cost for the same technology (that is, electricity, heat pump, air conditioner, boiler) is not as significant as the cost of the materials for thermal insulation. A search of the market found that that the variation for the heating systems is less than 20% for similar technical specifications, according previous studies (Tadeu et al. 2016). In the present analyses, the maintenance costs were assumed to be a percentage of the initial investment in systems, in accordance with the values indicated in ISO 15459:2007 (Internacional Energy Agency 2013). So, 4% was used for the air conditioner and heat pump and 1% for the other systems.
Step 2 involved performing simulations of the energy performance of combinations of the most competitive solutions that had been previously selected, varying the insulation thickness and the climate data. These calculations considered the occupants' habits. The third step was to calculate the overall cost with Eq. 11, for all the combinations of improvement measures. At the end (step 4), a sensitivity analysis was performed by comparing the profitability for different scenarios.

Definition of the improvement measures
The energy efficiency measures included the application of thermal insulation to the exterior facade, the slab roof, and the ground floor (as listed in Table 4). These were all combined solutions: roof (6), exterior walls (6), and ground floor (6) thermal insulation options. Two bounds of prices and four heating systems were assumed (electric heater (EH), heat pump (HP), air conditioner for heating (AC), and gas boiler (GB)). The total energy needs for heating and domestic hot water (DHW), EH, and AC were assessed by combining them with a gas water heater (GWH); HP and GB were considered for both functions. Each package was calculated for three different locations, 987 HDD [°C day], 1570 HDD [°C day], and 1924 HDD [°C day]. The parametric assessment resulted in 1728 energy retrofit packages calculated for each location (5184 in total).
In preliminary studies, comparing the profitability of FER-based systems in euros per kilowatt-hour [€/kWh] of useful energy produced with that of the alternative supply of the same amount of energy by the grid was sufficient to evaluate the economic feasibility of this measure. Replacing windows has proved to be of little relevance or even unprofitable, in most cases (Tadeu et al. 2016). Thus, we chose to focus the study on measures with most influence on economic results.
Indeed, other conventional alternatives could be considered in the search for the best measures for the energy rehabilitation of this building. However, it is necessary to obtain a representative sample of the prices practiced in the national market for each selected measure. Thus, in this work, we only considered the measures most often used in Portugal.
The solutions most often used in Portugal for the insulation materials and the heating systems were evaluated. Thus, current market prices were considered (CYPE Ingenieros, S. A 2013) as well as prices provided by manufacturers' associations 1 to arrive at the best estimate for the initial investment and maintenance costs. For replacement costs, a lifespan of 50 years was assumed for insulation, 40 years for windows, and 20 years for systems. The calculations take into consideration that during the course of the 30-year calculation period, some equipment has to be replaced and higher investment/replacement costs have therefore been assumed. The residual values have been also considered. The replacement cost assumed for each solution was the same as its initial investment cost. Figure 5 shows the cost of applying insulation to walls and roofs, depending on the thermal resistance (r = e/λ, where e is the thickness and λ the thermal conductivity), of extruded polystyrene (XPS), mineral wool (MW), glass fiber (GW), expanded polystyrene (EPS), expanded cork (ICB), and rigid polyurethane foam (PUR). It includes the application cost. EPS and ICB-MD (medium density) are insulation solutions that define the lower and upper bounds, respectively.
The economic analysis of the solutions showed that expanded polystyrene was the most cost-effective option. The retrofit solution of walls was assumed to be an external thermal insulation composite system, while in the ceiling, the insulation layer is applied with a cover layer. The insulation on the floor was assumed to be applied inside after removal of the covering layers, which were replaced by new materials. Based on CYPE 2 generator prices, we must add €17/m 2 for the cost of the wall and roof insulation (labor and materials) to the average cost of €2.30 per unit of thermal resistance [€/r]. The application of the ground floor insulation was assumed to be more expensive at €25/ m 2 , given the technical difficulties. The material thickness ranged between 40 and 160 mm, which is suitable for the insulation requirements in Portugal, as stated in previous studies ECOFYS 2007). The analysis assumed a thermal conductivity of λ = 0.036 W/(m°C) for EPS and 0.039 W/(m°C) for ICB-MD.
Various types of electrical and natural gas equipment were considered in the analysis of heating systems. The economic analysis of the solutions indicated that GB and AC systems are the most cost-effective options for the energy needs studied. However, in our analysis, the maintenance costs were assumed to be 1% of the initial investment for all heating systems, in accordance with the predominant values indicated in ISO 15459:2007 (European Committee for Standardization 2007). Regarding the electric heater (EH) already installed in the reference building, the energy retrofit scenario considered replacing it with a high efficiency system with an air conditioner (AC) or heat pump (HP), both used only in their heating mode, or with a low primary energy conversion factor system (PEF)-a gas boiler (GB). The system details considered in the economic analysis are presented in Table 4.
As explained before, to approximate Portuguese occupants' heating habits (National Statistics Institute 2011) (ADENE 2014), we applied a reduction factor of 0.134 to the heating energy needs in each of the 5184 1 APCMC-Associação Portuguesa dos Comerciantes de Materiais de Construção; APIRAC-Associação Portuguesa da Indústria da Refrigeração e Ar Condicionado 2 CYPE-Software for Architecture, Engineering and Construction packages to handle the impact of the occupancy pattern on the energy performance simulations, using a seasonal approach.

Effect of the variation in the thermal insulation cost
In view of the narrow range of heating system operating costs (for the same technology and prices used in the Portuguese market), it is possible to vary only the insulation cost and efficiency of each system and generate changes in the cost-optimal curve. The cost of each heating system was kept constant and was not a function of the energy demand. The power did not change with the insulation level. Figure 6 shows the overall cost for a location with 1570°C heating degree days. Four scenarios are considered: keeping the low efficiency system (EH, η = 1.0), which also has a high primary energy conversion factor (PEF = 2.5); replacing this system with a low PEF system (GB, PEF = 1.0); replacing it with a heat pump (HP η = 3.3); and replacing it with a high efficiency system (AC, η = 4.3). In the specific case of EH, it was considered that this equipment was also replaced in the first year of the baseline scenario. The analysis is based on the financial perspective for a 6% discount rate and considers the lower and upper bounds of the insulation cost. With this cost variation, a significant change in the total cost of each package can be seen, which shows the importance of the initial investment cost to the results, as it substantially affects the shape of the cost-optimal curves and thus the best option. The curves associated with the upper bound of insulation costs are steeper than those related to the lower bound cost, which shows the significant effect of the price difference between insulation materials. The cost-optimal solution found is 60 mm thermal insulation on the roof and GB. Insulating walls and floors costs more. Note that this solution is only accepted for small interventions, which are not covered by U max presented in Table 5. Figure 6 also includes vertical lines indicating the current regulatory limits, which vary according to the heating technology. Analyzing the position of these lines, we can conclude that there are packages, which, despite having a lower total cost, do not meet the current requirements (as specified in section BEnergy performance assessment^). The regulatory limit allows a larger number of packages to be used in systems with a low PEF, even in low insulation level scenarios. For low efficiency and high PEF systems, compliance relies more on the level of the envelope insulation. The interaction between insulation cost and thickness [€/r], the heating system operating cost [€/kWh], and its efficiency [η] is crucial for the profitability calculations. Comparison of the original system of the reference building (low efficiency) and a high efficiency system (AC) indicates that investment in efficient systems can reduce the extent of intervention in the envelope. This is because the AC cost-optimal packages require smaller insulation thicknesses (the leftmost points on each curve) and less intervention in envelope components (roof, walls, and ground floor). The economic performance of the heat pump (HP) is considerably less significant than the AC and GB, which is why it is not part of the results presented in the sensitivity analysis.

Effect of the variation in the climate data
The variation of the winter climate zone (I1, I2, and I3, characterized by 987 HDD [°C day], 1570 HDD [°C day], and 1924 HDD [°C day], respectively) means that the cost-optimal packages of measures could change with the location of the reference building. Figure 7 shows the overall cost of all heating systems and all the insulation packages associated with lower bound costs for two locations: 987 HDD [°C day] (a), 1924 HDD [°C day] (b). For both locations, the costoptimal solution found is GB and thermal 60 mm insulation in the roof. It can be seen that the results for the higher HDD are associated with a wider range of energy needs and overall costs. Meanwhile, the costoptimal range varies from approximately 50 to 52 kWh/(m 2 year) of the primary energy needs for 1570 HDD [°C day] (Fig. 6); for 987 HDD [°C day], the cost-optimal ranges from approximately 40 to 41 kWh/(m 2 year); and for 1924 HDD [°C day], the cost-optimal range varies from 56 to 58 kWh/ (m 2 year). Table 6 compares the packages of measures that represent cost-optimal solutions with the reference thermal transmittance established by national legislation (Portuguese Ministry of Economy and Employment 2013) and it can be seen that the optimum thicknesses do not necessarily change with the location, contrary to what is recommended in (Portuguese Ministry of Economy and Employment 2013). Note that the higher cost of ground floor insulation strongly influences the optimum thickness. However, the optimal thickness for the roof and walls is different for the extreme locations (987 and 1924 HDD [°C day]).
The national reference thermal transmittance values for opaque elements, presented in Table 6 and applicable up to 31/12/2015, were not defined on the basis of a cost-optimal approach, but the reference values that have to be adopted after 31/12/2015 are the outcome of the cost-optimal study for new residential buildings in Portugal, which was performed from a financial standpoint.

Sensitivity analysis
In this section, we look at the impact of changing energy prices, discount rates, and useful energy needs based on energy consumption habits. The objectives are to evaluate the impact of fluctuations of these three parameters on the cost-optimal solution while simultaneously checking compliance with regulatory minimum requirements and to ensure that the packages are more profitable than the reference scenario. A consumption reduction factor was used to handle the non-permanent nature of the occupation of residential buildings in Portugal as well the partial heating of the rooms (users normally heat only the spaces they are using-most of the time only the living room is heated). This should be understood as a modification of the seasonal method of the occupation heating profile.
Adopting higher values of energy needs to accommodate a possible increase in comfort patterns would add uncertainty to the study since we do not have references to estimate it. It is likely that any increase in energy needs would encourage investment in energy efficiency measures.

Primary energy consumption
The differences in the results for two primary energy consumption scenarios are shown in Fig. 8. The first graph shows the total cost of different packages assuming that the energy used covers only 13.4% of energy consumption, while the second covers 100% of the energy consumption. When non-permanent time and space occupation are assumed, the heating energy costs are lower. As a result, the initial investment and maintenance costs of measures account for a higher percentage of the overall cost. Moreover, cutting heating energy needs reduces the differences between packages in terms of primary energy needs and costs. The influence   of the change on heating energy needs is shown in the scheme in Fig. 9. Considering the same packages, the initial and maintenance costs are unchanged. However, they have different profitability results depending on the energy needs level if changes to heating habits are assumed. This analysis shows how the energy needs calculated by the seasonal method are overestimated, since the dwellings are not permanently occupied as that method assumes. For example, in the reference building, the monthly average utility bill for heating and DHW alone would be €80 with the reduction factor and €435, considering 100% of energy needs estimated by the seasonal method for 1570 HDD [°C day].
In a 1570 HDD [°C day] location and without applying the consumption reduction factor, the optimal solution identified in the results corresponds to the placement of 100 mm thick insulation in the roof, 80 mm on the walls, and no intervention on the ground floor. This solution gives a monthly energy expense of €63 for heating and DHW. Considering the 13.4% reduction factor, this same solution would give a monthly energy expense of €31 for heating and hot water. This difference is even more apparent when the figures are compared with those for the reference building, without any intervention, as can be seen in Table 7. In this particular study, as mentioned before, the energy consumption reduction factor of 13.4% reflects the Portuguese citizens' poverty to heat the whole house on a permanent basis.
Thus, it can be concluded that the profitability of the packages depends on the effective energy consumption.
For this reason, cost optimality studies should assess whether the method used to estimate energy should adjust the energy consumption according to people's habits in each country.

Energy prices
The long-term energy prices trend published by Eurostat are considered too optimistic, given what has happened in recent years in Portugal (for example, an increase of 4% in the price of electricity from 2010 to 2011 (Eurostat 2013)). We therefore simulated an increase scenario of 2.5% per year, for all types of energy used in the simulations (electricity and gas). This should reflect the impact of a larger energy price increase in the future.
In Fig. 10, it can be seen that the change in the energy price trend only modifies the overall cost without altering the relative position of the cost-optimal packages. However, the percentage share of energy cost in the global cost, up from 58.9% (Eurostat) to 64.0% (linear increase of 2.5%), in the financial perspective, would encourage investment in energy retrofit, given the greater potential for cost savings.

Discount rates
The cost-optimal dependence on the variation of the discount rates was analyzed. As the discount rate of 6% is representative of the loans offered for rehabilitation projects in Portugal (Caixa Geral de Depósitos Fig. 9 Influence of the change of energy needs relative to the overall cost 2015), it is used as reference in the financial perspective. In addition, we performed a sensitivity analysis with a 12% discount rate in a financial perspective, and with a 6% discount rate from a macroeconomic perspective, in comparison with 3%, as required in (European Commision 2012).  Figure 11 shows the behavior of the cost-optimal packages of measures when higher discount rates are applied. The cost-optimal solutions in the financial and macroeconomic perspectives have changed substantially. The energy costs are significantly higher in the financial perspective due to taxes, which would encourage householders to invest in retrofitting.

Final remarks
This work has evaluated the cost optimality of retrofit solutions for residential buildings constructed before 1960. A reference building was created to represent the relevant Portuguese building stock and the energy performance of the building was simulated with different thicknesses and thermal insulation materials. These solutions interacted with low and high efficiency heating systems and primary energy factors, according to the fuel used. The essential parameters of the model are the increased thermal resistance of the building envelope, the heating system efficiency and the respective PEFs, the heating degree days (HDD) in the region, and the intervention cost.
The energy needs were calculated based on the seasonal method, with the application of a consumption reduction factor to simulate the occupants' habits. The cost-optimal improvement measures were calculated as recommended by the European Commission. In addition, due to the poor financial situation of the Portuguese people, this work assumed a reduction in energy needs and the consequent fall in global costs was discussed. The results for three different locations (987 HDD [°C day], 1570 HDD [°C day], and 1924 HDD [°C day]) found cost-optimal values ranging from 136 to 158 €/m 2 for 30 years and primary energy needs in the range of 41 to 58 kWh/(m 2 year) when meeting the current regulatory requirements.
Finally, a sensitivity analysis was performed to determine the response to changes in energy needs, energy prices, and the discount rate. The following conclusions have been reached: -The correlation between the discount rates adopted and the energy price estimate is crucial for the viability of investment in energy efficiency measures. Too low energy readjustment estimates combined with high discount rates tend to discourage investment in solutions with a lower demand for primary energy.
-If the discount rates are reduced, a more packages would offer a reasonable return on investment. This confirms that lending facilities with lower interest rates can encourage investment in energy retrofit and efficiency measures that have less impact on the environment. -Regarding the composition of packages of measures, the interaction between cost and thickness of insulation [€/r], operating cost of the heating system [€/kWh], and efficiency [η] of said system directly influences the energy retrofit strategy. Depending on the heating habits, investment in systems is more effective than investment in insulation if a certain thermal resistance level has been achieved. The investment profitability of insulation depends largely on the insulation material price. Upper bound prices could discourage the application of insulation. -The cost of energy, significantly higher in the financial perspective due to taxes, favors greater investment in energy retrofit. -Assuming a linear increase of 2.5% in the energy price, which is a more pessimistic scenario than that published by Eurostat, the relative position of the cost-optimal package is not affected. However, it may lead to more investment in energy efficiency.
-Although Portugal is a small country, differences in latitude and altitude affect the energy needs of the reference buildings. Climate zones with higher heating requirements can favor greater insulation thickness in the roof and on walls. However, differences in the global cost associated with the almostoptimum thicknesses are not substantial. In milder climate locations, there is no advantage in using thicker insulation.