Modelling the energy demand of a residential building using an artificial neural network (ANN) approach

The consumption of fossil fuels accelerates and accentuates the formation and development of the climate change phenomenon. Understanding the energy demand in the early-stage design could lead to more energy savings. There are several methods for predicting buildings energy demand and they differ overall in terms of prediction quality. the multicollinearity of variables, linearity, and other conditions limit the predictive quality of standard models such as linear regression modeling. This paper is interested in developing an energy demand prediction tool based on artificial neural network modeling ANN to test its limitations and its predictive quality. For this purpose, and based on the scientific literature, a panel of parameters often used by architects at the time of architectural design was selected, which are, the thermal resistance of the external walls, the type, and rate of glazing, the orientation, the shading devices the set point cooling PMV and natural ventilation rate schedule. A campaign of 600 dynamic thermal simulations is then run under energy plus using the Latin Hypercube Sampling (LHS) approach. The best ANN model obtained after testing several activating functions gave a prediction potential of over 99.7%. The model also ranks each parameter according to its importance in the equation identifying the energy demand. It can therefore be assumed that the artificial neural network technique is effective and the ANN outperforms the other prediction methods.


Introduction
Climate change is one of the most important phenomena in human history.The risks that scientists have been predicting since the middle of the last century are known, and some are being experienced at relatively accelerated rates: rising temperatures, rising sea levels, melting Arctic and Antarctic ice and atmospheric pollution (Hassan et al: 2019).The consumption of fossil fuels and ever-increasing standards of living are singled out as the main factors accelerating climate change (Zhao et al: 2012).To combat climate change, several COPs have been organized in the hope of finding ways to make a collective commitment.Primarily, energy efficiency and the gradual introduction of renewable energies are the two main courses of action for reducing fossil fuel consumption and the resulting pollution (Boukarta: 2018;Ye et al: 2021).In this vein, being able to predict energy demand and classify buildings in terms of their potential for reducing energy demand is a key action insofar as it enables decision-makers to take concrete measures to reduce energy demand and operational CO2 emissions (Bourdeau et al: 2019).The residential sector consumes more than 40% of final energy worldwide (Rogers: 2008) and more than 46% in Algeria (Aprue: 2021).In this context, predicting energy demand is an important step, as it enables us to determine the factors that generate energy consumption and to propose concrete solutions aimed at optimizing energy demand.The energy required for heating and cooling is the two main needs that generate energy consumption (Mcquiston et al: 2004).Some countries, such as the Nordic countries, are mainly geared towards heating, while others, such as Algeria, with over 80% of its surface area express the need for air conditioning rather than heating (Ghedamsi, 2016).According to Baker and Steemers (2003), the parameters controlling heating and cooling requirements are linked to four main factors: the role of the occupant, building characteristics, HVAC systems and the environment.Predicting energy demand can be summed up as the equation that consists of finding the impact of each register and parameter on the energy demand of buildings to be able to act to reduce the resulting energy demand.The control parameters mentioned above interact in a complex way and with linear or non-linear trends, which makes the study of energy demand prediction complex (Yuanjin et al: 2022).In this line, the development of energy demand prediction models has become the main issue addressed by several authors (Boukarta: 2021, Dogan et al: 2017, Saffari et al: 2017).The present paper would like to test the reliability as well as the predictive power of modelling by an artificial neural network in an arid climate zone.To do this, we are faced with several questions: what is artificial neural network modelling?how could we apply this approach?what are its validation hypotheses? and what would be its potential for predicting energy demand in comparison with other modelling approaches?

Literature review and research gap
A review of the scientific literature dealing with the issue of predicting energy demand has enabled us to identify two main approaches (Boukarta and Berezowska: 2017): (a) the first is known as historicist and is based mainly on a broad database including both energy demand by consumption sector and potential parameters that may explain energy demand.The authors' interest in this approach lies in the fact that it makes it possible to reduce the gap in the prediction of energy demand because it is based on real energy consumption data.On the other hand, the limitations of this approach can be summed up in two points: the large time budget required to characterize the buildings and the impossibility of introducing the impact of new technologies on energy demand.(b) The engineering approach is based on calculation algorithms that can predict energy demand with relatively good prediction degrees, depending on the parameters applied.According to Dall'O et al (2012), Bartiaux et al (2003), Lucas et al (2009), energy simulation tools can cause a gap between predicted and simulated energy demand ranging from 50 to 200%.To reduce the efficiency gap between the simulated and the actual, some authors use calibration to reduce the margin of error to below 5 to 15%, according to ASHRAE guidelines, depending on the quality of the energy data obtained (hourly or monthly) (Ashrae: 2014).The second point to understand relates to the control parameters explaining the energy demand.According to Baker and Steemers et al (2003), it seems that energy demand is subject to variation according to 4 possible registers: (i) parameters linked to the occupant.The occupant's socio-economic and physiological characteristics can cause energy demand to vary by 50 to 200% (Dall'O et al: 2012).This first parameter is the primary uncertainty factor explaining the difference in prediction between the simulated and the predicted values.The use of these parameters requires extensive fieldwork to collect energy consumption data (Elena et al: 2010).(ii) Parameters relating to the design of the building.This second set of parameters is the most widely studied in the scientific literature.The most common parameters are related to the shape of the building, expressed in terms of compactness (Boyuer: 2009), and to the building envelope, such as the thermal resistance of external walls and floors, and the rate and type of glazing (Kaoula et al: 2021, Semahi et al: 2019, Boukarta: 2021).(iii) Parameters related to the urban context.This range of parameters includes firstly the climatic floor in which the building is located, followed by the spatial configuration which could generate a microclimate and thus influence the energy demand of the building in question (Bozzonet: 2005, Kitous: 2013).(iv) and finally, the control parameters linked to (operational systems) such as the heating, air conditioning or even lighting system (Manoj et al: 2013).Some authors have even introduced this control parameter with a historicist approach (Elena et al: 2010).One of the limitations of prediction models is that they introduce parameters that are difficult to adjust in practice, such as incident solar radiation, which architects will not be able to introduce into their studies.The third point to understand revolves around the choice of sampling method.Sampling methods include (Kaoula and Abouchair: 2019): (i) Monte-Carlo sampling, which is based on pseudo-random sequences and is recommended for problems where the space does not exceed 100,000 combinations; (ii) Sobol and Halton sampling, which are so-called quasi-Monte-Carlo methods based on the use of sequences with low discrepancy.The use of these methods provides a better representation of the space of possible combinations.See Figure 1.(iii) Latin Hypercube Sampling (LHS) is a very efficient multi-dimensional sampling method.As a general rule, a sample size of 10 times the number of design variables will be sufficient for the mean of the combinations to be modelled accurately, whereas other sampling methods require a minimum of 15 times the number of variables.The difference between the LHS and Monte Carlo methods lies in the fact that the Monte Carlo method involves generating samples for one variable using a simple random sampling method, while the second method, Latin Hypercube, generates random samples that occur in equal probability intervals with a normal distribution for each range.In this paper we will use the engineering method based on dynamic thermal simulations and the choice of control parameters relating to the building and climatic conditions.We have chosen the parameters that architects tend to use during the sketch phase, and the sampling method is the LHS because it provides the best representation of the parameters.

Methodology
Artificial neural network modelling is starting to take up a significant part of research recently, as it avoids the linearity problems that regression modelling is limited to.The multilayer perceptron is the best known and most frequently used type of neural network (Popescu et al: 2009).The architecture of an ANN model is made up of several layers, the layers that are not directly connected to the environment are called "hidden".An input layer, known as the autonomous layer, which is used only to transmit input signals to higher layers.Finally, an output layer, which is used to obtain the output data after processing.Depending on the direction of processing, there are two possible models, a feed-forward model which considers a single direction from input to output, directly and without loops, as seen in Figure 2.There is also a second model, called Feed-back, which allows signals to be sent in both directions (idem).To pass data from input to output, the data is processed using activation functions which can take different forms, such as tangent, sigmoid, identity function, etc.The data must undergo an initial learning stage, which generally represents the processing of 70% of the total sample, and the remaining 30% will be used to test and validate the results obtained from the model.In this paper we will use the Feed-forward method to predict the energy demand of a residential building.To do this, we have organised the method around 5 steps.See Figure 3: The first step was to obtain climate data for the city of Biskra covering the period 2007-2021.We then analysed the weather data to identify the strategies needed to limit energy demand, based on the Szokolay diagram using Climate Consultant software version 6.0.The climatic analysis enabled us to realise the importance of cooling in the energy equation for the city of Biskra.This led us to consider only the strategies linked to air conditioning, as heating only represents 8.1% of the energy demand, unlike air conditioning, which represents 13.7%, plus the 18.9% potentially achievable with shading techniques, and the 22% that can come from evaporative cooling, and finally 28.2% from thermal mass.See Figure 4. Based on the psychometric diagram presented above, the chosen control parameters are organised according to a variation that always considers a maximum, minimum and average value.The parameters considered in this study are often used by architects in the sketch phase of their architectural projects, without knowing the importance of their impact on energy demand, and even less the energy demand obtained from the different combinations.Also, the choice of values for each variable is thought out in such a way that the variables chosen cover the values that actually exist.In other words, each variable is parameterised by three values, minimum, average and maximum.The table below shows the values set for each parameter.At the end of this first stage, we chose a generic dwelling consisting of two bedrooms, a living room, a kitchen, a bathroom and a WC, and a balcony.This architecture is widespread in Algeria and represents the typical spatial organisation of a dwelling.See Figure 5.The second step consists of applying the simulation protocol described in Table 1 above to the generic housing model obtained.The total number of simulations required to launch the simulation campaign is equal to 10 times the number of variables, i.e., 320 simulations (32*10) using the Latin hypercube sampling method.To make the results more accurate, we ran 600 simulations combining the different parametric variations.Using (DesignBuilder) software running with Energy Plus as the calculation engine, we ran the 600 simulations to obtain the energy demand required for air conditioning, operational CO2, hours of discomfort according to the standard 55 adaptive comfort model (0.5 Clo and 1.1 Met) and life-cycle analysis.In this paper we have only considered the energy demand for air conditioning.The third step is to organize the results obtained as a database in the SPSS software in order to be able to launch our neural network modelling.The Table 2, below shows some of the results obtained and the coding of the variables.
Once the activation functions had been chosen, we proceeded to identify the number of hidden units with which the model has the best prediction potential.The modelling results are obtained with a variation from 1 to 20 hidden units and 13 is considered the best number of hidden units.See Figure 8.

Importance of parameters
With a high prediction rate, the importance of the parameters controlling energy demand for air conditioning can be established.At the top of the list is the thermal resistance of the building materials, with over 27%.Insulation and thermal mass allow better control of air temperature, both during the day and at night.In second place is the glazing ratio at 25.60%, and the best glazing ratio for reducing energy demand for air conditioning is 10%.The thermal quality of the glazing also helps to reduce energy consumption by 18.80%, and the best glazing is double glazing with a low-emissivity coating.In fourth place is orientation, which can vary energy demand by 15.20%.Preferred orientations are those that reduce solar radiation.In fifth place, we find shading devices with 11.9%, whereas Climate Consultant predicted 18.8%.And the best device is the Louvre type with a depth of 0.5m.In last position, sixth and seventh, we find cooling setpoint Predicted Mean Vote PMV and natural ventilation organized according to the outside temperature of 25-30 and 35°C with an impact of 5 and 4% respectively.These low impact values are linked to the high temperature during the summer season, which reduced the periods of natural ventilation.

Conclusion
This study explores the predictive potential of artificial neural network modeling based on the generic design of a dwelling in the arid climate of the city of Biskra.For this purpose, the cooling energy demand is predicted, taking into account its dependence on various design parameters, using an MLP neural network.600 simulation datasets are created by varying the design parameters, external wall, glazing type, window/wall ratio, natural ventilation rate, cooling PMV set point and orientation.The optimal number of neurons in the hidden layer is first determined using this dataset for training and testing.The MLP network with a hidden layer of 13 neurons performs well with a sum of squares error and relative error of 0.26 kWh and 0.0015 respectively.Based on these results, it can therefore be said that this model can be used to predict cooling energy demand with a high degree of accuracy.Also, it can therefore be assumed that the artificial neural network technique is effective and the ANN outperforms the other prediction methods like regression models.The most important design variables explaining the cooling energy demand are the external wall (27.60%), the WWR (25.60%), the type of glazing (18.80%), the building orientation (15.20%), the shading devices (11.90%) and finally, with a small effect, the cooling set point PMV (0.5%) and the natural ventilation rate (0.4%).
The results obtained can be generalized to the whole arid zone and can serve as a basis for architects, in the design stage, to design housing with a lesser impact of each parameter on energy demand.As a possible extension of the present study, we are thinking of applying this method to the post-occupancy stage.To do this, it will be necessary to calibrate the climatic data and the actual energy consumption to limit the differences in terms of prediction between the real and the simulated energy demand.

Figure 3 .
Figure3.The method adopted for the application of ANN modelling.

Figure 4 .
Figure 4. Bioclimatic analysis of the city of Biskra.

Table 1 :
Parameters chosen for the study and their range of variation.

Figure 5 :
Figure 5: the generic model of the chosen home.

Figure 8 .
Figure 8. SSE and RE values as a function of the number of hidden units.Once the activation functions and the number of hidden units have been determined, we have a remarkably accurate prediction model, with an R² of 0.997.The QQ diagram and the correlation between the values predicted by the model and those obtained by simulations confirm the predictive power of the model obtained.See Figure 9.

Figure 9 .
Figure 9. QQ plot and predicted Vs Simulated correlation.