Abstract

Increasing the energy efficiency of buildings is a strategic objective in the European Union, and it is the main reason why numerous studies have been carried out to evaluate and reduce energy consumption in the residential sector. The process of evaluation and qualification of the energy efficiency in existing buildings should contain an analysis of the thermal behavior of the building envelope. To determine this thermal behavior and its representative parameters, we usually have to use destructive auscultation techniques in order to determine the composition of the different layers of the envelope. In this work, we present a nondestructive, fast, and cheap technique based on artificial neural network (ANN) models that predict the energy performance of a house, given some of its characteristics. The models were created using a dataset of buildings of different typologies and uses, located in the northern area of Spain. In this dataset, the models are able to predict the U-opaque value of a building with a correlation coefficient of 0.967 with the real U-opaque measured value for the same building.

1. Introduction

In the process of architectural design, the building needs to adapt its interior environment to the adequate comfort conditions. Therefore, the more adverse the weather conditions, the more effort that will have to be made by the passive and active systems of the building to maintain the level of interior comfort [1]. This circumstance generally entails an increase in energy consumption and consequently an increase in CO2 emissions affecting the environment negatively [2].

According to the data provided by the Spanish Institute of Diversification and Energy Saving, the Spanish building sector destined for residential use consumes 17% of the total consumed energy and 25% of the demand for electrical energy [3]. This sector is subject to numerous initiatives of different administrations, all aimed at reducing CO2 emissions and energy consumption, especially in the housing stock of buildings built before 2006, the year when the Technical Building Code regulation in Spain started. The Basic Document of Energy Saving established the requirements that buildings and their thermal systems must comply with [4]. These regulations and requirements were the reason for the creation of a set of rules [5] to evaluate the energy efficiency of buildings.

In order to meet the requirements established by the regulation, we have to first evaluate the building energy efficiency and, if necessary, apply energy saving measures. Energy saving measures can be grouped into two categories:(i)Passive measures, which act on the constructive elements that make up the thermal envelope of the building. The intervention techniques in this category have the objective of decreasing the thermal transmittance value.(ii)Active measures, whose objective is to reduce the nonrenewable sources energy consumption, increasing the performance of thermal equipment related to the conditioning of the indoor environment.

Any technique created to evaluate building energy efficiency has to include some criteria to facilitate the acquisition of knowledge about the enclosure thermal behavior and the thermal equipment [6]. It also needs to create a model, from datasets (databases) of evaluations in similar buildings [7], which provides a method for estimating the results of an evaluation. There are several approaches for creating the estimation method [8], all of which can be classified into three general categories [9]:(i)White box models: it is the conventional approach used in engineering(ii)Black box models: it is the approach used in machine learning(iii)Gray box models: it is a hybrid engineering/machine learning approach.

White box models range from simple statistical techniques, such as least squares or time series, to more complex numerical models that model physical systems simulating the physical laws that govern the system. These models do not achieve good results when working with large datasets [10], and the more complex the model is, the more time it takes to obtain an estimation for the energy efficiency of a building.

Black box models are created automatically from data that relate some system characteristics with the variable we want to estimate. This is called the training phase. Once the model is trained, it can give an output for the variable we want to estimate when given the system characteristics. This prediction is made quickly.

Black box models have been widely used for predicting the energy performance of buildings. Some of these uses are the prediction of heating [11], cooling [12], and electric power consumption [1316] of buildings.

Artificial neural networks (ANNs) are one of the most widely used black box models, and they are achieving good results in a great variety of problems, including the prediction of energy consumption of a building. Some of the problems of energy estimation solved with ANN are energy test bench in buildings [1720], electric power prediction [2124], and heating/cooling consumption prediction [2528].

The advantages ANNs provided with respect to more traditional engineering solutions are as follows:(i)They can easily create models with complex relationships between data, other than linear.(ii)They are fast making predictions: the process of training is slow, but once trained, the predictions are usually done in milliseconds.(iii)They can generalize better than traditional models if they have a class example for a region: they perform well when evaluating buildings that the model has never seen, given that we trained the model with an example fairly similar to the one never seen.(iv)They perform well with large datasets.

This work focuses on developing a technique for evaluating a building energy efficiency based on ANN. To achieve it, we created a dataset by evaluating the energy efficiency of a great number of buildings located in the north of Spain, focusing on residential buildings. Using this dataset, we trained and tested several different ANN architectures. The procedure is explained in the following sections.

2. Materials and Methods

ANNs need large datasets in order to function properly; thus, the first step for creating an ANN model for predicting the energy performance of a building is the generation of a reliable dataset [4]. The Spanish administration has not yet released the results of energy efficiency evaluations carried out since the end of 2013 in Spanish buildings [29]. There are other European Union countries where the energy certification process of existing buildings has been implemented for a longer period of time, such as Italy or Denmark. In these countries, there are web applications available that allow to query the results of the energy efficiency evaluation for all the evaluated buildings.

Due to this lack of data for Spanish buildings, in this work, we created the dataset that is used to train and evaluate ANN-based models. This dataset was generated from the evaluation of the energy efficiency of a number of buildings destined for different uses located in the north of Spain. The dataset is composed of data from 453 buildings, resulting in a total usable area of 570,438.30 m2. The classification of the buildings by destined use can be seen in Table 1. From those buildings, our work focuses on those with residential use.

A dataset is composed of individual examples. Each example consists of several input variables (features) and one or more outputs. The building energy efficiency evaluation procedure established by the current regulations generates two categories of data [30]:(i)Data regarding the thermal envelope: the thermal envelope affects the demand for heat energy, that is, the amount of energy needed to condition the interior environment in the building during the winter regime.(ii)Data regarding the thermal equipment: the thermal equipment affects the energy consumption, and it is related to the CO2 emission level.

These data give us the input and output variables of our training set. One of the difficulties a certified technician faces when evaluating the energy efficiency of a building [31] is determining the real thermal transmittance of the building enclosure that is in contact with the air (U-opaque), information that allows to accurately estimate the losses of heat energy. The difficulty arises from the lack of information regarding the different inner layers of the opaque zone of the exterior enclosure. This difficulty could be overcome with the development of a model that allows the prediction of the thermal transmittance value U (measured in W/°K·m2) from other known building characteristics [32]. The objective of the ANN created in this work is to calculate this value using some easily obtained building characteristics.

One of the officially recognized tools for energy efficiency certification of existing buildings is named CE3X [33]. This tool consists of a user manual and a software that allows to simulate the behavior of a building regarding energy efficiency and calculate the impact of energy saving measures in the building energy efficiency. Using this tool with our ANN, we can obtain a value that indicates the building energy efficiency in terms of a variable that ranges from A+ to G.

2.1. Training the ANN Model

An ANN network consists of several elementary units, called neurons, organized in layers. There are three types of layers: input, hidden, and output layers. The input layer consists of the same number of neurons as the input variables we want to use. The output layer has as many neurons as output variables our dataset does. Between the input and output layers, we can place as many hidden layers as we desire with as many neurons per layer as we choose. Usually, all the neurons in a layer are connected to all the neurons of the following layer (feed forward and full connected), where each connection has an associated weight. This is the architecture we chose for our models.

The function of each neuron is to sum the results of multiplying each of its inputs with the associated weight for the input connection and apply a function to the result. This function is called the activation function.

The process of creating an ANN-based model is divided in the training and testing phases. The training phase consists in finding the best parameters that allow the model to infer the output(s) given the inputs, with the minimal overall error over the training set. This phase includes the selection of the architecture for the network. As said before, the problem we try to solve determines the input and output architectures of the network (as the input and output variables are determined by the problem). The selection of the number of hidden layers, elements per hidden layer, and the activation function of the elements is done manually. Usually, several architectures are selected and the training phase consists in training these different ANNs until we find the one that provides the best result for the problem at hand.

During the training phase, the connection weights are adjusted in an iterative manner in order to minimize the error between the real output of the dataset and the output the network provides. This adjustment is repeated many times (iterations or epochs) for all the training dataset until a sufficient accuracy is achieved. In this work, we used the gradient descent-based backpropagation method for training the networks [34]. These types of algorithms try to minimize a value, usually the network error, propagating back the error to the hidden layer and updating the connections weights appropriately. The value the backpropagation method is trying to minimize is the error the network has over all the training set examples. As the network output variable is a real number, the error is set to be the mean square error (MSE). The backpropagation algorithm we chose is the Levenberg–Marquardt variation.

One of the problems ANNs has is variance (overtraining): if we train the network for a long time, with a converging algorithm, the network is going to have a low, even near zero, error over the training set but a much higher error over examples the network has never seen. There are several methods to minimize variance. We chose early stopping for training our ANN. This technique consists in further dividing the train set in a training and validation set. During the training process, the network error is calculated in the training set and the network weights are updated according to this error. Once updated, we calculate the error in the validation set. In the early iterations, both the training and validation errors decrease, up to a point where the training error continues to decrease but the validation error increases. This indicates that the network is overtraining. Early stopping consists in stopping when this point is reached.

3. Results and Discussion

As said before, the building dataset was created from a sample of buildings in the north of Spain. The thermal transmittance and the average values of several energy efficiency parameters for buildings in the dataset can be seen in Table 2.

As previously said, the objective of the ANN we created is to be able to calculate the U-opaque value for a building from a set of easily obtained variables. The variables we chose to create the dataset are the year of manufacture of the building, the area of the building, its two GPS coordinates, and the thermal transmittance of the opaque area of the envelope (U-opaque). Therefore, the ANN will have 4 inputs and one output (U-opaque prediction).

The northwest of Spain is made up of small and medium-sized towns, where there are few construction companies available. Using the GPS coordinates was thought to potentially capture this peculiarity: a company works in a close region using the same techniques and materials for a given period. The period is captured in the year of construction. The area of the building was thought to be related to the heat loss, so we also included this variable.

Although there may be other variables that could improve the prediction of the U-value, the values for the chosen variables are easily obtained and, almost always, publicly available (for instance, we could use the model for predicting the U-value for a house that is being advertised for sale).

For the design and training of ANN, we used the software MATLAB with artificial neural networks toolbox. Using this computer tool, we can train, validate, and test an ANN.

We used an iterative approach for creating the final ANN. In each iteration, we improve upon the results obtained in the previous iteration. We tested different ANN architectures with different hidden layers, different number of neurons in the hidden layer, and different activation functions in the neurons. The ANN was trained using 90% of the examples for training and 10% for validation.

3.1. First Training Iterations: Hyperparameters Selection

In order to check if ANNs could provide a good solution for the problem at hand, the first tests were done using a small train set consisting of 138 buildings (named as “in blocks”). These tests were aimed at selecting the best hyperparameters for the ANN: number of layers and elements per layer, activation functions, and number of inputs.

The first iteration intended to choose the best activation function. We used two hidden layers, with 10 neurons and 5 neurons, respectively. With this configuration, after 10 training executions for the TANSIG function, the network achieved an average correlation of 0.746. Training the same initial ANN during 10 executions, changing the function to LOGSIG, made the ANN achieve an average correlation coefficient of 0.821. These results indicate that the LOGSIG is the best activation function for this problem, and it is the one that we used in the following iterations (Figure 1).

In the next iteration, we tested a configuration with a single hidden layer. We tested several architectures, ranging from 10 to 100 neurons in the hidden layer. Using 10 neurons, the ANN achieved a correlation of 0.56. A correlation of 0.82 resulted from using 50 neurons and a correlation of 0.96 using 100 neurons in the hidden layer. Although the best results were obtained using 100 neurons in the hidden layer, this configuration is not recommended, since we have almost the same neurons as training examples and this can easily produce an overtraining and limit the network generalization capacity.

In the next iteration, we carried out more tests using an architecture with 2 hidden layers. The number of elements in the first layer ranged from 5 to 30 and between 5 and 20 for the second layer (for a maximum of 50 neurons between both). We performed 10 equal executions for each resulting combination of elements in order to avoid the randomness of the training process. With an architecture of 5-5, the ANN obtained an R = 0.656 and R = 0.749 for 10-5, R = 0.901 for 10-10, R = 0.949 for 15-1, R = 0.969 for 15-15, and R = 0.987 for 20-15.

Although the architectures with the highest number of elements in the hidden layers achieved similar values, the one with 20 elements in the first hidden layer and 15 in the second achieved the best results. This indicates that this architecture is the most suitable to solve the problem at hand. As previously explained, we chose the LOGSIG activation function for all neurons because it gave the best results in a previous iteration.

In Figure 2, we can see a comparison between the ANN predictions and the U-opaque real measured values as well as the correlation value obtained for the chosen 20-15 architecture.

In the next iteration, in order to analyze the ANN inputs sensitivity and to select the most representative ones, we trained several ANNs with the same architecture and different input combinations. In Figures 36 we can see the results obtained when using only a subset of all the inputs.

As we can see in the graphs 4 to 6, the year of construction and the usable area of a building are the variables that have more prediction power, the usable area of the building having a greater incidence in the prediction. In the next iteration, we use these two variables as inputs for the network.

3.2. Training Process: Parameters Search

Once these tests have been carried out and the viability of ANNs to solve the prediction of U-opaque has been confirmed, we created a dataset with a greater number of training and validation examples. We used this dataset to search for the best model parameters (the network weights). The dataset is divided into 2 categories: block buildings (238 training examples) and single-family buildings (94 training examples). For this dataset, we used the same ANN architecture used in the initial test. We carried out two training tests, training two identical ANN, one in each category of the dataset, in order to check the training degree and generalization capacity of the ANN obtained in the initial test. For these tests, several errors (10 in total over the U-opaque value of the training file) were randomly introduced to verify the capacity of the ANN to isolate these anomalous behaviors.

In Figure 7, we show the comparison of the 2 ANNs, one of them using the data with errors (represented by the points in blue).

As we can see, the results are very similar and the behaviors with the most amplitude values are also very similar.

A comparison between the ANN trained in the new dataset and the real measured U-opaque values for the 238 block buildings of the dataset can be seen in Figure 8.

In Figure 9, we can see a case by case comparison between the same values in Figure 8 and the error the ANN has for these examples.

A comparison between the ANN trained in the new dataset and the real measured U-opaque values for the 94 single-family buildings of the dataset can be seen in Figure 10.

In Figure 11, we can see a case by case comparison between the same values in Figure 10 and the error the ANN has for these examples.

These results indicate that the ANNs created are capable of predicting the U-opaque with a high degree of correlation for both types of buildings.

3.3. Training Process: Building a Single Model

In the next iteration, we tried to obtain a single ANN that allowed the prediction of U-opaque for both types of buildings. In order to achieve this, we created a single training set combining both types of buildings (with a total of 334 training examples). A comparison between the ANN trained in this new dataset and the real measured U-opaque values for the 334 buildings of the dataset can be seen in Figure 12.

These results are not satisfactory. The ANN is not capable of differentiating the U-opaque behaviors from similar values due to the difference in the typology of the building, as it can be observed, for example, around values of the 1.75 prediction of the U-Opaque.

To solve this lack of necessary information for the ANN, we created an additional input variable indicating the type of building, with value 0 for the single-family buildings and 1 for the block building. Therefore, the ANN will have 3 inputs and 1 output.

A comparison between the ANN trained in this new dataset and the real measured U-opaque values for the 334 buildings of the dataset can be seen in Figure 13, where we can see that the ANN has a good modeling capacity for the prediction of the U-opaque of both types of buildings.

In Figure 14, we can see a case by case comparison between the same values in Figure 13 and the error the ANN has for these examples.

Once the ANN for the different types of buildings was made, a sensitivity analysis of the ANN was carried out. To do so, we put some fictitious values in the dataset trying to simulate all the possible inputs that the ANN may have in the variable range and we evaluate the network in this variable grid. For this reason, all the buildings were analyzed. The years of construction of the building vary between 1900 and 2014, and the area of the building varies between 32.5 m2 and 654 m2. With these characteristics, regular intervals were used for both inputs, for example, the values 1900, 1930, 1960, 1990, and 2015 have been used for the year, and the area varying linearly in 20 square meters increments (30, 50, 70, …, 650).

It should be noted that the ranges of the inputs for single-family buildings and block buildings are different (for example, in relation to the area, for single-family buildings the maximum is 654 m2, and for block buildings, the maximum area is 300 m2); however, the same configuration has been used to jointly analyze the results for both types of buildings.

The result of the ANN for both types of building can be seen in Figures 1517.

We can see in Figure 15 a trend: newer buildings have lower U-opaque values. We corroborate this trend in Figure 16, where the ANN behavior for both types of buildings is similar: the older the building is, the higher the U-opaque average values are.

It should be noted that in block buildings, in the 2015 tests, zero values are produced when the usable areas are greater than 300 m2, which can be understood as situations in which ANN has not been trained, as the maximum values are below 300 m2.

We can see in Figure 17 that a downward trend in the value of the U-Opaque is verified as the area of the building increases for single-family buildings, while the opposite occurs in block buildings. This can be considered a coherent behavior, since the buildings with greater usable area usually correspond to a higher thermal quality standard in single-family buildings; therefore, the materials and constructive solutions used for the composition of the envelopment have a lower transmittance value. As we said, the opposite trend occurs in block buildings. A possible explanation of this behavior could be the fact that modern block buildings tend to be smaller, and thus more thermally efficient, but we need a detailed analysis to find the cause of this behavior.

We also observe in Figure 17 an oscillatory behavior, indicating that the network is not generalizing well for some ranges. This behavior could be mitigated by using a bigger dataset or trying a more suitable weight initialization.

4. Conclusions and Future Developments

As the results indicate, ANNs are a good model for predicting the U-Opaque of a building using several of its characteristics. The outputs of the ANNs trained in our dataset have a high correlation coefficient with the real U-Opaque measured values for the same buildings.

We carried out several tests using different characteristics of a building as the ANN input variables. The building year of construction and the area of the building are the variables that have more prediction power for the U-opaque value, being the constructed area the one with the highest prediction power.

Using a single ANN for predicting the U-opaque value for both block buildings and single-family buildings and comparing its outputs with the real U-Opaque measured values for the same buildings, we obtained a correlation coefficient of 0.967 and a satisfactory generalization capacity as shown in the results.

The results of this work indicate that it is possible to estimate the energy efficiency of a building in a given geographic zone with a high degree of accuracy using some building characteristics, without doing an intervention in the building or using measurement devices. This supposes a great advance in the field of architecture, because the U-Opaque measurement is a costly and time-consuming task.

However, as explained before, ANNs are considered a black box system in the sense that we input some values to the network and the ANN produces an output without being able to know how these results are produced. But in the Civil Engineering and Architecture fields, it is important to be able to explain the processes that occur in a system or model, so in order to be able to have an explanation of how a model works for predicting the U-Opaque value of a building and be able to extract some formula that explains the model behavior, we plan to use another machine learning technique called evolutionary computation. Using the genetic expressions algorithm, we would be able to extract the model knowledge in the form of mathematical equations. This algorithm allows to obtain simple mathematical expressions, but with a low correlation value or predictive capacity. Using genetic programming algorithms and introducing trigonometric operators, we can obtain mathematical equations with a higher correlation coefficient, although the obtained equations can be more complex.

Data Availability

The energy efficiency dataset used to support the findings of this study has been deposited in the GitHub repository https://github.com/mereshow/ann-energy-efficiency.git.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.