**4. Conclusions**

A new application of FDA and a new methodology to assess the impact of retrofitting in buildings are presented in this paper. The study was conducted by analysing monitored data of lighting consumption, heating demands, illuminance levels and indoor temperatures of the Rectorate building of the University of the Basque Country (Spain). These analyses aimed to detect an impact on the measured variables and to quantify the changes achieved with retrofitting. The methodology used in this study is based, on the one hand, in the functional analysis contrasting the distance between mean functions of monitored samples before and after retrofitting. On the other hand, as a comparison, the classical or vectorial approach was carried out measuring the dissimilarities between sample medians.

The presented method contributes with advantages over the already existing research in the topic of building retrofitting evaluation. Some research evaluated the effect of the refurbishment based on environmental indicators. Other studies give a measure of the heat losses before and after retrofitting, and other studies focus on the heating demands. One of the advantages of the proposal of using functional analysis is that it can be applied to evaluate different building variables such as temperatures, lighting levels, electrical consumption or heating demands. Consequently, it can be used to search for relationship or effects between variables. For instance, if the heating demand is not reduced as expected, the evolution of other variables can be observed to look for the cause. Moreover, a daily based analysis can be done, evaluating the peculiarities of some days in the performance of the studied variables.

The research contribution of this paper is the application of a mathematical method such as functional analysis to evaluate the impact that a building retrofitting had in its energy performance. There are few studies that present evaluations of retrofitting actions in buildings with monitored data and the employed methods are based in vector-based data approaches. The benefits of applying FDA to contrast and measure the similarity between samples of monitored data before and after a retrofitting were demonstrated. An advantage of FDA is that it is not restricted to certain characteristics of the data distribution, thus it is not necessary to test its normality. It considers complete time units, working with the time set in a continuous way, without having to summarise them, which is beneficial to evaluate monitored building variables. In addition, the outlier detection takes into account constant deviations as a reason to identify an outlier, even though it does not surpass the cut-off criterion.

Furthermore, the variables used in this study are commonly analysed in different types of buildings. The methodology presented here can be applied to assess the energy and thermal performance of different buildings, such as industrial, residential, educational or office buildings. Functional analysis can be applied, with variables or tools different from those used here, to evaluate different aspects of the studied building. Thus, this method could also be used to evaluate monitored variables in thermal facilities within an energy efficiency framework. The effectiveness and usefulness of the functional approach to evaluate variables that affect the energy efficiency was demonstrated in this study.

The results illustrate the greater accuracy of FDA in detecting if there was a significant change in the studied variables in comparison with vectorial analyses results. In the illuminance analysis of the second floor, the FANOVA detected a change (*p*-value ≈ 0) while the vectorial ANOVA did not (*p*-value = 0.22). Additionally, FDA could detect that most of the lighting consumption reduction on the third floor was concentrated in the last hours of the day. In addition, it has been demonstrated that FDA can provide trustable information about the dispersion of the data. In the lighting consumption analysis of the third floor, the greater dispersion of data after retrofitting was only identified with FDA. Moreover, the representation of the monitored variables in a continuous way throughout the day shows that the FDA allows a greater accuracy and a better adjustment to reality than the vectorial methods. It allows identifying average patterns of the studied variables and it has the potential for detecting anomalous behaviours of monitored variables. In the analysis of the heating demand of the ground floor, the FDA reported a peak in the early hours of the day (around 7 p.m.), both before and after the retrofitting, which the vectorial analysis did not notice.

From an energetic point of view, the conclusion is that the refurbishment carried out in the building under study had a significant impact on its energy performance. The main aim of the retrofitting was to reduce the heat losses. This goal was achieved, as demonstrated by the decrease in the heating demands of the entire building even though the temperatures were increased, a ventilation system being installed and the LED lighting reducing the internal heat gains. The analysis also shows that the illuminance levels were improved on all floors, only decreasing on the ground floor as a shading was installed to prevent from direct sunlight. According to FDA results, the heating demands were reduced 17% on the ground and first floor, 24% on the second floor and 36% on the third floor. Moreover, the reduction in lighting consumptions were 38% for the ground floor, 73% for the first floor and around 20% for the second and third floors.

**Author Contributions:** Mathematical methodology, M.M.C.; engineering knowledge, S.M.M. and E.G.Á.; and data collection, P.E.O. and A.E.G. All authors have read and agreed to the published version of the manuscript.

**Funding:** This paper was funded by the Spanish Government (Science, Innovation and Universities Ministry) under the project RTI2018-096296-B-C21.

**Acknowledgments:** This paper was supported by the Spanish Government (Science, Innovation and Universities Ministry) under the project RTI2018-096296-B-C21.

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