A Case Study on a Stochastic-Based Optimisation Approach towards the Integration of Photovoltaic Panels in Multi-Residential Social Housing

The socioeconomic reality and the energy retrofit potential of the social housing neighbourhoods in Portugal are stimulating challenges to be addressed by research to pursue suitable energy efficient strategies to be integrated into these buildings. Therefore, this study explored a stochastic-based optimisation approach towards the integration of photovoltaic (PV) panels, considering different scenarios that combine the occupancy rate, the internal gains, the envelope refurbishment and the heating system efficiency. The optimisation approach has as its objective the minimisation of the life cycle cost of the photovoltaic system while using a limited space area on the rooftop for its installation. This study allowed concluding that the use of passive measures such as improving the thermal performance of the building envelope is essential to attain a lower optimal-sizing of a photovoltaic installation. The results reveal a decreasing trend in the PV optimal sizing, attaining a reduction up to 30% of the total number of PV panels installed on the sloped rooftop in several scenarios with 50% of occupancy rate. However, the impact can be greater when passive measures are coupled to more efficient heating systems, with higher COP, which result in a decrease up to 64% of the number of PV panels. Thus, the approach proposed is of paramount importance to aid in the decision-making process of design and sizing of photovoltaic installation, highlighting the practical application potential for social housing and a contribution for mitigation of the energy poverty of low-income families that live in these buildings.


Introduction
The European building stock from the 1970s to the 1990s represent the largest share of the existing buildings and are considered the least energy-efficient, thus presenting enormous potential for intervention. The energy consumption of the built environment over the next 50 years will be mainly dominated by the existing older building stock and their rate of refurbishment and renewal over time. Some projections indicate that without a significant change of practice, the non-retrofitted building stock is estimated by 2050 to represent around 80% of the total energy consumption in the building sector [1]. The massive construction of new buildings and infrastructures has been progressively slowed down, giving priority to the rehabilitation of existing buildings and built heritage. According to this tendency, new challenges and funding programs have emerged across Europe [2][3][4][5][6], focusing on the integration of renewable energy sources into the existing energy systems and new building technologies and more recently the New European Bauhaus Initiative [6].
Building refurbishment has been pointed as a big economic and social challenge that Europe will face over the following decade. In fact, the enormous potential to decrease energy consumption and the advances in renewable energy technologies were two of the main drivers for the implementation of nearly zero energy buildings (nZEB) over the last decade and have led member states to outline new measures and guidelines at the national scale to encourage the refurbishment of existing building stock [7]. The European Commission (EC) published the Directive 2018/844/EU [7] amendment, which includes guidelines and defines strategies that will help accelerate the rate of building renovation towards more energy-efficient systems. This Directive defines that an annual average of 3% renovation is needed to achieve the Union's energy efficiency ambitions cost-effectively, considering that every 1% increase in energy savings reduces gas import by 2.6%. These numbers confirm that the objectives of renovating the existing building are extremely important in the decarbonisation and resource efficiency of cities. Recently, the EC published the Regulation (EU) 2021/1119 [8] of the European Parliament and of the Council of 30 June 2021 establishing the framework for achieving climate neutrality and amending Regulations (EC) n • 401/2009 [9] and (EU) 2018/1999 [10]. In this scope, the EC adopted a comprehensive and interconnected package of proposals for the acceleration of greenhouse gas emission (GGE) reductions in the next decade. Two of those proposals are building-related: increased the use of renewable energy and greater energy efficiency [11].
In Portugal, as in other European countries, social housing plays an important role in ensuring adequate living conditions for the population. About 2.5% of the urban population live in social housing complexes, which represent approximately 118,000 dwellings. A large part of these buildings is in need of refurbishment measures [12]. The lack of adequate interior thermal comfort conditions of flats is often reported and the main cause is linked to energy poverty of the families [13]. In a recent publication, Gouveia and Palma [14] gathered information regarding possible approaches to address this issue, namely: development of building management system for social housing [15]; application of energy social tariff for electricity and natural gas [16]; both imply the improvement of measuring and monitoring as well sharing knowledge and best practice on energy poverty mitigation [17].
Some examples of refurbishment interventions in social housing are described in the literature, mostly integrating measures pointing towards a better indoor environmental quality and reduction of the energy consumption, such as increased thermal insulation, new windows and doors with enhanced thermal characteristics, and new energy-efficient HVAC systems [18][19][20][21][22]. The cost-effectiveness of these interventions is important to ensure housing affordability, minimising the risk of tenants being unable to cover energy costs [23]. The lack of financial resources makes the refurbishment interventions in social housing a challenge, either if focused on the improvement of the external envelope thermal properties [24], or in the implementation and operation of more efficient renewable energy-based systems [25,26].
Recent research studies have focused on the relationship between the buildings' occupancy patterns, the energy consumption and indoor thermal comfort, thus concluding that social housing buildings energy consumption is impacted by a significant variation of building occupancy profiles [18,27]. Another key factor with high influence on the buildings' energy consumption and thermal discomfort is the negative impact of the presence of several unoccupied flats in the multi-residential social buildings [28]. Furthermore, the study by Haldi and Robinson [29] point out a non-negligible impact on internal gains as a consequence of the occupant behaviour in the use of lighting and appliances.
Another group of recent research studies have been carried out regarding the incorporation of renewable energy production systems in the context of social housing [30][31][32], despite all the barriers such as financial, structural, social, and organisational constraints [25]. Lee and Shepley [30] investigated the impact of the installation of photovoltaic panels within the framework of a governmental initiative scheme to support low-income families in Korea. A significant reduction in electricity costs was reported, positively impacting the mitigation of energy poverty. Another study analysed the potential of a photovoltaic installation in a small social housing neighbourhood in Portugal. The results of this latter study pointed to a reduction of energy costs of around 15% and a great potential for energy storage as more than 79% of surplus generated energy [33]. Almeida et al. [34] have been studying several renovation scenarios to be implemented in social housing buildings, based on the effect of embodied energy on cost-effectiveness. The results revealed that a significant reduction of non-renewable primary energy consumption can be achieved using photovoltaic systems, despite the still unattractive installation cost. In fact, several authors [35,36] have reported the impact of the inclusion of PV panels in both new and renovated social housing. Nevertheless, a lack in the literature was identified as no consideration of the variability of the occupation rate was taken into account.
Based on the literature and focusing on the retrofit potential of social housing, a lack of studies regarding the impact of different occupancy rate and consequent uncertainty in quantification of internal gains has been scarce. Combining these issues with the potential for the use of renewable energy sources in social housing context and its practical application potential, constitutes a challenge and is the major aim of this study. Therefore, a novel approach is proposed based on current simulation tools to aid in the decision-making process of design and sizing of photovoltaic installation in the social housing.
The uncertainty in the occupancy of social housing buildings is a well-known issue, which can lead to an oversizing design of the systems with important impact in the operation and maintenance costs, sometimes even jeopardising their use throughout the life cycle. In addition, the proposed methodology can be useful in an early stage of the decisionmaking process, providing the designer with relevant information. Methodologies that use stochastic design are common in the literature, however, the inclusion of uncertainty in the occupancy-related input parameters are new.

Building Characterisation
The case study is a multi-residential building located in Aveiro, in the North-Centre region of Portugal. Based on previously conducted studies [28,37], the main characteristics of the building are herein highlighted. The building belongs to a large social housing neighbourhood (see Figure 1) built in the final of 80's, comprising 38 buildings, representing the main public housing complex of the city and more than five thousand habitants. Figure 1 shows the case study building. The building is composed by four floors above the ground level. It includes six flat units per floor with an average treated area of 72.4 m 2 by flat. The total treated floor area of the building is 1737.2 m 2 . Two types of flats configurations exist: T2, composed of two bedrooms, living room, kitchen, and bathroom; and T3, composed of three bedrooms, living room, kitchen, and two bathrooms. The building geometry is depicted in Figure 2. The constructive solutions of the building were designed considering low requirements in respect to energy efficiency, a consequence of the regulations at the time of construction. Two different configurations of the external walls were identified, neither including insulation. The external walls of the ground floor are constituted by double leaf brick masonry while the walls in the elevated floors are concrete prefabricated panels. The roof is pitched and composed of a highly ventilated crawl space above the prefabricated lightweight concrete slab. Windows are single glazed with an aluminium frame with exterior roller-shutters. The ground slab consists of a concrete floor. A detailed description of the building solutions can be found in the previous works [28,37].
Flats are naturally ventilated with the outdoor air admission due to window openings and infiltration through the roller shutter boxes and open balconies. Air extraction grids are installed in the bathrooms. However, the users tend to close the ventilation grids and insufficient ventilation is commonly frequent as reported and discussed by Oliveira et al. [37]. No heating or cooling systems were installed, with rare exceptions in which electric portable devices were seen in some flats and the domestic hot water was supplied by a condensing boiler.

Climate Regions
To increase the relevance of the findings, the numerical simulations considered two different locations representative of the less and the most severe climates of Portugal. Therefore, besides Aveiro (mild climate conditions), Bragança (severe winter) climate was also simulated [38]. The hourly weather files used in the simulations were extracted from the Portuguese climate database provided by DGEG [39]. The average air temperature, relative humidity, and solar irradiation of the two regions is depicted in Figure 3. Aveiro is characterised by having a heating degree-day (HDD) of 1297 • C while in Bragança is 2015 • C (HDD values are defined with the base temperature of 20 • C). The relative humidity of both regions is balanced in the winter but lower in Bragança during the summer. The solar irradiation values are similar in both regions. Figure 3 shows the main climate details for both regions under the study.

Numerical Design and Sizing Approach
This research work proposes a methodology for the optimisation of the number of photovoltaic panels to be integrated into a multi-residential social housing building taking into account different scenarios. A stochastic approach is implemented to consider the uncertainty of occupancy rate and internal gains in the optimisation procedure and the impact of previous refurbishment actions on the building envelope (opaque and glazed) are also taken into account. The methodology is tested in two different climate regions of Portugal as previously described. The minimisation of the life cycle cost is the main objective. Figure 4 depicts a graphical description of the methodology involving the use of three different software tools (EnergyPlus ® (EP) (version 8.9, United States Department of Energy (DOE), Washington, DC, USA), JEPlus ® (version 2.0, Energy and Sustainable Development (IESD), United Kingdom, Leicester) and HOMER ® (version 3.14.4, National Renewable Energy Laboratory, Boulder, CO, USA)), which can be summarised in the following steps: • Detailed model definition using the Sketchup software for geometry definition and the Euclides plugin to export for EnergyPlus; • Definition of the simulation premises to implement in EnergyPlus, such as: (i) climatic regions (Aveiro and Bragança); (ii) energy refurbishment of the building envelope based on the introduction of thermal insulation and new windows (original envelope and improved envelope); (iii) heating system coefficient of performance (COP = 1.0 and COP = 3.4); (iv) occupancy rate of the building (100%, 75% and 50% of occupied flats).
• Definition of three levels of internal gains (2.0, 3.0 and 4.0 W/m 2 ) and random sampling using the Latin Hypercube Sampling (LHS) algorithm of JEPlus. Energy simula-tion of the different scenarios, using JEPlus as a parametric tool within the EnergyPlus environment. The main output of the simulations to feed into the next step is total energy consumption of the building for the different scenarios.

•
Optimisation of the number of PV panels using the HOMER Pro ® software by minimising their life cycle cost with a maximum limit 86 photovoltaic panels (rooftop area and shading restrictions).
Energies 2021, 14, x FOR PEER REVIEW 6 of 16 • Definition of three levels of internal gains (2.0, 3.0 and 4.0 W/m 2 ) and random sampling using the Latin Hypercube Sampling (LHS) algorithm of JEPlus. Energy simulation of the different scenarios, using JEPlus as a parametric tool within the Ener-gyPlus environment. The main output of the simulations to feed into the next step is total energy consumption of the building for the different scenarios.

•
Optimisation of the number of PV panels using the HOMER Pro ® software by minimising their life cycle cost with a maximum limit 86 photovoltaic panels (rooftop area and shading restrictions).

Building Energy Model Simulations and Scenarios
The geometry of the building was defined as the 3D view depicted in Figure 5. For modelling purposes, the building is divided into several thermal zones, which correspond to the main compartments of the 24 flats. The building geometry was created in Sketchup ® (version 2019, @Last Software and Google Trimble Inc., Boulder, CO, USA) software and automatically converted into EnergyPlus input files for defining further modelling settings. Figure 5 presents the geometry of the building model of the study.

Building Energy Model Simulations and Scenarios
The geometry of the building was defined as the 3D view depicted in Figure 5. For modelling purposes, the building is divided into several thermal zones, which correspond to the main compartments of the 24 flats. The building geometry was created in Sketchup ® (version 2019, @Last Software and Google Trimble Inc., Boulder, CO, USA) software and automatically converted into EnergyPlus input files for defining further modelling settings. Figure 5 presents the geometry of the building model of the study. The model was previous calibrated by Oliveira et al. [28], resorting to monitoring data collected in-situ, including interior environment data, airtightness evaluation and external envelope characterisation. The model calibration was performed using data from seven flats (14 thermal zones), and the accuracy was evaluated by comparing the goodness of fit (GOF) index (see Figure 6) with the ASHRAE Guideline limits [41]. To accurately simulate the energy refurbishment of the building envelope, the simulation plan includes two base models, differing in terms of the constructive solutions: (1) original envelope, and (2) improved envelope. In addition, the base models were combined with a heating system varying in terms of COP index and with three occupancy rates, leading to a total of 24 combinations. Figure 7 presents the layout of the building energy models. The original building characteristics referred to Section 2.1 were considered as the reference scenario (models with original envelope-Id. 1 to 12). The improved envelope (models Id. 13 to 24) includes a set of passive measures, namely: the addition of a thermal insulation layer for vertical and horizontal opaque envelope and the substitution to doubleglazing window systems. For the horizontal elements, thermal insulation was applied over the ground floor slab and the roof was thermally isolated on the horizontal slab of the ventilated crawl space. The thermal insulation thickness defined has a thickness range of 5-12 cm, in order to comply with the requirements defined by the Portuguese thermal code for the climate regions [38]. The same criterion was used in the selection of the new double glazing systems. Table 1 lists the main thermal characteristics of the building elements. Regarding the active measures, the simulation will consider an improved heating system with a COP of 3.4, which corresponds to an air-conditioning class B (minimum requirement established by the Portuguese regulation [38]). The COP of 1.0 was also considered in the improved envelope scenarios, in order to evaluate the influence of keeping a less efficient heating system. Only the installation of heating systems was considered as typically no cooling systems are used in the Portuguese social housing building stock [37]. Table 2 presents the COP index used in EnergyPlus simulations. The impact of unoccupied flats can be relevant for the thermal and energy performance of multi-familiar buildings, as shown in a previous study [28]. In the context of social housing, due to their temporary and intermittent occupation rates, this phenomenon can be particularly important. Herein, besides the two fully occupied situations (100% flats occupied), two additional occupancy scenarios of the building were considered (75% flats occupied and 50% flats occupied). No internal gains were considered in the unoccupied flats.
The internal gains are another important source of uncertainty in building simulation. In residential buildings, using a lumped value to simulate all the internal gains is the most common approach. In the framework of this research, three plausible values were defined for the internal gains: 2, 3 and 4 W/m 2 . These values were randomly distributed within the building flats and the LHS algorithm was applied to generate a 50 cases samples for each of 24 models, leading to a total of 1200 simulations in both locations. The sampling algorithm assumes an equal probability for all parameters, i.e., a uniform distribution. Regarding the used software's EnergyPlus and HOMER Pro ® , each annual simulation was performed with a computational time associated of approximately 139 s and 70 s respectively, both resourcing to an Intel Core i7 5820 K with eight cores working on a 3.30 GHz processor equipped with 16 GB of RAM.
The model's thermal properties (weather file data, heating system, occupancy rate, etc.) were defined in EnergyPlus and to simplify the automatization of the procedure, the building energy simulation is initiated using the JEPlus add-on for LHS. The samples were thus generated and simulated by JEPlus, using EnergyPlus as the engine. Once determined the energy consumption outputs, these are prepared through a python script to be fed into and processed with HOMER Pro ® software (see Section 3.2).

HOMER Pro-Building Energy Production Optimisation
The final goal of the methodology is the optimisation of the number of photovoltaic panels to be integrated into a multi-residential social housing building, using the minimization of the life cycle cost as the ultimate objective. For the optimisation process, the photovoltaic system was configured and modelled in HOMER Pro ® software and hourly simulations of its operation were performed to assess the life cycle cost of each solution.
The photovoltaic panels were simulated on the rooftop of the building and the following constraints were defined: not exceeding the sloped rooftop available area (86 panels) with South orientation and avoiding the self-shading of the panels due to their proximity (see Figure 8). The photovoltaic panels were modelled, considering a peak power of 260 Wp, 16.2% efficiency, a tilt angle of 35 degrees and no tracking system. The input values for the inverters were as follows: 1 kW size, 20 years lifetime and 95% inverter efficiency. Figure 8 shows the rooftop view of full photovoltaic installation and Table 3 the specifications and properties of the PV panels considered in HOMER Pro ® software. The weather data used in the simulations was collected from the DGEG [39] database, as described in Section 2.2. The input data required by the software are the daily solar irradiation on a horizontal plane, the hourly mean values of outdoor temperature, wind speed, and the hourly energy consumption for the whole year taken from the energy simulations previously carried out in EnergyPlus (see Section 3.1).
In the optimisation procedure, the calculations of the optimal sizing were made using the Net Present Value (NPV) as the base criterion. HOMER Pro ® computes the life cycle cost of the photovoltaic system based on the NPV, taking into consideration all costs that occur within the project lifetime, including the effect of a pre-defined discount rate. Therefore, the NPV includes the installation cost of the system and its operating costs and maintenance, which occur during the project lifetime. The project lifetime considered in the analyses of HOMER Pro ® was 20 years and it was assumed a unitary cost of 200€ for the photovoltaic panels. A discount rate of 3% was considered and the energy costs were calculated using a unitary electricity price of 0.215 €/kWh.

Optimisation Results
The proposed methodology was applied to the entire dataset and thus a large number of results were produced. Therefore, the detailed results of only one model are presented in this section as an example case. Figure 9 shows the results of the 50 energy simulations carried out for the improved envelope scenario, located in Bragança considering a heating system with a COP of 3.4 and with 100% of occupancy rate (Model Id. 22). The effect of the internal gains is evident as the total energy demand varies between 48,000 and 59,000 kWh/year. The total energy demand is then used as input for the calculation of the NPV value associated with the integration of photovoltaic panels. This calculation is carried out in HOMER Pro assuming that the number of photovoltaic panels ranges between 0 and 86. Figure 10 shows the results of this procedure, highlighting the optimum solution of each sample, which corresponds to the minimum NPV value. For this particular set-up (Model Id. 22), the optimum number of photovoltaic panels ranges between 68 and 86.

Impact of the Energy Refurbishment of the Building
To evaluate the impact of the energy refurbishment of the building envelope based on the introduction of thermal insulation and double glazing windows, Figure 11 shows the results of the optimisation procedure for the models with a COP of 1.0, separately for the original envelope and improved envelope scenarios. Moreover, the effect of considering a different number of unoccupied flats is also depicted in the graph. The optimum number of photovoltaic panels are grouped into classes for readability purposes and both figures (Figures 11 and 12) show the share of optimum occurrences (red dots of Figure 10) within each class, considering the entire dataset (24 Models Ids).  The impact of the energy refurbishment obvious leads to a decreasing trend in the optimum number of photovoltaic panels. In fact, in the scenarios with the original envelope and a COP of 1.0 (see Figure 11), the optimum number of photovoltaic panels results in the maximum (86 panels) in both locations, except for the situation with 50% occupancy rate in Aveiro, where the optimum solution decreases to the range between 60 and 75 panels. On the other hand, in the scenarios with the improved envelope, the optimum number of photovoltaic panels is lower, reaching the minimum range between 30 to 45 panels, once again in the situation with 50% occupancy rate of flats in Aveiro. Regarding the impact of the unoccupied flats, the results show that this situation is even more relevant in the scenarios with the improved envelope. In Aveiro with the improved envelope, the optimum number of photovoltaic panels can vary between 30 and 85, depending on the percent of unoccupied flats and, obviously, on the uncertainty related to the internal gains.
The results for a heating system with a COP of 3.4 are shown in Figure 12. It is noteworthy that the efficiency of the heating system has a high influence on the optimum solutions, generally leading a lower number of photovoltaic panels when compared with the solutions with a COP of 1.0. This situation is more evident in the scenarios with the original envelope.

Effect of the Uncertainty in the Internal Gains
To highlight the variability associated with the uncertainty in the quantification of the internal gains, Figure 13 shows the box-plot representation of the optimum number of photovoltaic panels, separately for each Model Id. The analysis of the results evidences that the initial premise regarding the available roof area for which the number of PV panels is limited to 86, is predominant in the results. Obviously, in these scenarios, the uncertainty associated with the quantification of internal gains is not felt, since all scenarios lead to an optimal solution of 86 panels. However, when the efficiency of the heating systems is changed, or when the energy performance of the building envelope is improved, or when the two are combined, the relevance of the internal gains is reflected in the results, corresponding to a dispersion of the optimal solutions. As expected, 100% and 75% occupation rate scenarios are the most influenced by the uncertainty in the internal gains. On the other hand, the impact of the uncertainty is less obvious in the 50% occupation rate scenarios.
In short, the results confirm the importance of internal gains in the optimal design of the number of photovoltaic panels. Considering that in social housing, the variability of internal gains tends to be greater, due to the socio-economic context of the owners/tenants of the buildings, the importance of a probabilistic approach is needed to reduce the performance gap prevision in retrofitting design scenarios. These stochastic approaches can in fact be a powerful tool, supporting the designer in the decision-making process, avoiding oversizing solutions as frequently reported in the literature and that consequently cost and maintenance wise are a long-term issue [42].

Conclusions
This study has highlighted the need to define a robust approach to assess the impact of improvement measures, both active and passive, on the energy efficiency in social housing buildings, specifically tackling the optimisation approach for photovoltaic energy system design, as a contribution for mitigation of the energy poverty of low-income families that live in these neighbourhoods.
Social housing buildings differ from the typical multi-residential building, due to the more pronounced impact of the uncertainty of the occupation and the internal gains that can cause a significant impact on the photovoltaic design for these buildings. Facing the growing trend of photovoltaic systems across the world, this paper develops a novel methodology with a strong practical application potential to minimise the uncertainty in sizing these systems as a paramount issue that has not been thoroughly studied and builds on previous works of the authors [28,37].
The combination of a group of parameters, such as the available rooftop area for PV installation, thermal quality of the external envelope (opaque and glazed), energy efficiency of heating or cooling devices, occupancy rate of the whole buildings, internal gains that implicitly are linked to flat occupation profiles, should be considered in the definition of renewable energy strategies and optimal design of PV installations. A methodology for optimal sizing of photovoltaic energy systems was proposed to support the selection of the optimal area of the number of PV panels, taking into account a number of constraints and variables/parameters based on the minimisation of the life cycle cost. The following main conclusions can be drawn:

•
Severe winter regions, as the case of Bragança, can cause space restrictions for an on-site production, since they have major energy consumption for heating and consequently, optimal solutions can led to a maximum area (86 panels) allowed in the building; • Renovation and improvement measures over the building external envelope reduce the total energy consumption, herein this study referred as improved envelope, leading to lower optimal-sizing PV solutions. In some cases a reduction up to 30% of the total number of photovoltaic panels allowed on the rooftop is attained. However, the impact can be greater when coupled to more efficient heating systems, with higher COP; • The occupancy rate has a significant impact on the energy consumption for heating, having a more significant consequence in the scenarios with the improved envelope leading a lower PV design (number of panels). As an example, a reduction up to 64% of the number of PV panels was attained in the scenario with 50% occupancy rate; • To the previous findings the variability associated with the uncertainty in the quantification of the internal gain is more notable in the cases of higher occupation rates (75 and 100%) revealing the importance of the definition of internal gains in the optimal design of the number of photovoltaic panels. • Renewable energy production is growing continuously, and consequently supported by the investments and funding sources to intensify the implementation of renewable energy for 2030 horizon and also by the decreasing costs of renewable energy technology, namely in the case of photovoltaics and their components. • At this stage of its development, the proposed methodology includes some limitations, namely: the inclusion of uncertainty in the definition of the economic scenarios, the definition of the range of variation for internal gains, and the compatibility with HVAC systems, including the possibility of cooling in summer, responding to future scenarios arising from climate change.

•
In future developments, the optimisation of PV should be complemented with battery storage systems scenarios, in order to optimise the surplus energy production and off-peak demand, as well as the potential increasing energy costs.