Modelling of electricity demand in residential buildings using artificial neural networks

Electricity is the basis for the functioning of modern society. It is used for many purposes, including HVAC systems. Information on future electricity demand is an important element from the point of view of both the real estate user and other entities on the energy market. The study forecasts the demand for electricity on the basis of data from over 12,000 buildings. The model was created using one of the tools from the area of artificial intelligence - neural networks. Over 15,000 networks differing in architecture, number of nerve cells, activation functions, sets of explanatory variables and learning algorithms have been tested. The paper presents those from the tested models, which were characterized by the highest precision of operation.


Introduction
The amount of consumed electricity is one of the basic factors determining the quality of modern society.In the European Union, for example, households are the second largest source of energy demand after transport, of which about 25% is met by electricity.[1] Large domestic appliances and HVAC systems are some of the main areas of its consumption.Electricity is widely used in air-conditioning systems, which are now increasingly common in residential buildings.Inasmuch as it does not have a strong impact on total annual energy consumption, the associated increase in demand for electricity in summer peaks can be observed every year.Also, the demand for building heating cannot be ignored.
In this paper, an attempt was made to forecast the annual demand for electricity by households.Both the total energy consumption and demand divided into heating and cooling purposes for the property interior were modelled.Numerous data related to technical aspects of residential buildings, as well as interior design, economic data and habits of real estate residents were used as independent variables.The model was built on the basis of artificial neural networks (ANNs), i.e. tools from the area of artificial intelligence.Their use enables the creation of highly optimized non-linear models without a preliminary knowledge of the relation nature between independent and dependent variables.

Modelling of electricity demand in buildings
Demand for electricity from individual households is the main component of total energy demand in a building.If there is archival data on its amount, it is possible to carry out forecasts for subsequent years using relatively simple mathematical models.In particular, factors such as weather data affecting energy demand for heating and cooling of real estate surfaces and hot water production should be considered.It is also worth taking into account (in order to obtain a high degree of versatility of the model) the element connected with a possible thermomodernization of buildings and introduction to use more energy-efficient components of interior equipment.In these analyses, except for the above-mentioned cases, it is not necessary to consider changes in technical parameters of buildings and sudden changes in the behavior of real estate users.This means the relative stability of demand (the average annual growth in the European Union is about 2% [2]) corrected by stochastic and weather components, as well as by relatively slow changes in the life patterns of household members.
The situation is different in the case of an attempt to estimate the electricity demand without the possibility to refer to archival data.This is the case, for example, during the design of new buildings, in particular of entire housing estates, as well as during extensive revitalization processes aimed not only to change the technical aspects of a property, but also to change the target group of its users.Knowledge of future electricity demand in newly constructed buildings is valuable information not only from the investor's point of view, but most of all it is desired by planners [3].It should be noted that preparation of adequate technical infrastructure for power grid connections requires time and high capital expenditure.Already today, there are many cases of problems related to e.g.transmission infrastructure, which is not adapted to work under the loads arising during demand peaks.This can be attributed to issues related with changes in the structure and level of energy demand, as well as inefficient models of the electricity market function.In the present study, the reasons for the current situation were not analyzed.Emphasis was put only on the possibility of modelling the demand in individual residential buildings.

Determinants of electricity demand
Energy demand factors are closely linked to energy consumption categories.One of the divisions used in the literature contains eleven categories [4]: • cold appliances (fridges, freezers and fridge freezers), • cooking (electric hobs and ovens, kettles, microwaves, toasters and other small cooking appliances), • lighting (internal and external lights, on lighting circuits or lamps plugged into sockets), • audiovisual (TVs, games consoles, set top boxes, hi-fi systems, radios and other AV appliances), • ICT (computers, monitors, printers, scanners and networking equipment), • washing appliances (washing machines, washer-dryers, tumble dryers and dishwashers), • showers (electric showers), • water heating (immersion heaters), • space heating (electric fires and other space heating appliances), • other (other appliances not in the above categories, including hair dryers, massage beds, aquariums and pond pumps), • unknown (electricity use recorded on electrical socket circuits but not recorded at the appliance level).
The above division was conducted for the United Kingdom and it is clear that it should be individually adapted to the market on which the research is carried out.An example is the general inclusion of showers category in water heating.
Current studies confirm the particularly high consumption of electricity by large domestic appliances -almost a quarter of total electricity consumption [5].Among them, refrigerators and freezers generate the highest consumption, followed by oven/cooker, washing machine and dishwasher.[2] Other categories of consumers generating high demand for energy are lighting, as well as desktops and monitors.[2].
The degree of using individual elements of the interior infrastructure clearly depends on factors such as weather conditions (including temperature and humidity, wind speed), number of household members, energy efficiency of appliances, and -as already mentioned -habits of the property users.In particular, the two last mentioned can to a certain extent be taken into account in the model by using an input variable for household income (which is the electricity consumer in analyzed case).The demand for energy as a derivative of demand for electrically powered devices and the derived degree of consumerism manifested among others in the expectation of higher living comfort, according to the theory of consumer, is correlated with the obtained income.[6] However, this dependence should not be simplified by reducing it to a model composed only of normal goods, because along with the increase in income, they change into inferior goods (in consumers' perception).This implies a decline in demand for the given good combined with a substitution effect resulting in a transfer of demand towards 'more modern' goods.This means that the increase in income is commonly associated with the purchase of more expensive goods (without going into the reasons for this dependence, often beyond the functional demand), which often (especially in specific commodity groups) means the purchase of goods with a lower demand for electricity.Historical examples include higher prices for energy-efficient LED TVs than for traditional LCDs, the purchase of new, more economical dishwashers, washing machines and refrigerators, replacement of lighting with energy-efficient ones (more expensive to buy).In addition, investments in renewable energy sources, such as photovoltaic panels, become more common.As a result, although the demand for grid energy periodically declines, initial investment requires adequate purchasing power by property users, and thus in this area an inverse relation is created between revenue and demand for energy.
The degree of complexity of the relations described above justifies the use of artificial intelligence at the stage of empirical research in the form of neural networks, of which the undoubted advantage is the ability to independently select model parameters, and consequently to determine the nature of relations between independent and dependent variables.

Artificial neural networks
The origins of ANN date back to the forties of the twentieth century.They have evolved over a long period of time since the emergence of theoretical basis, becoming now a valued tool in the areas of modelling and forecasting electricity demand.The principle of a single artificial neuron is shown in Figure 1.Signals at the inputs (x i ) of neuron (as biological dendrites) are multiplied by weights coupled with them (real numbers -w i ), creating so-called total neuron stimulation (s).This value is then transformed by a so-called activation function.Its role is to use many types of transformations; the most popular are functions: logistic, hyperbolic tangent, Gauss, sine and identity.The signal leaves the cell with the output (y) that is equivalent to the biological axon.Interconnected nerve cells form a structure called ANN.Commonly used networks have nerve cells grouped into so-called layers.Their schematic location in one of the most popular ANNs -multilayer perception (MLP) -is shown in Figure 2. The first, called the input layer, contains neurons whose task is only to retrieve data from outside the network and distribute it among the nerve cells of next layer.Their characteristic feature is lack of direct participation in the learning process.These cells do not gain knowledge, unlike neurons of subsequent layers, i.e. hidden and single output."The intelligence" of learning neurons is hidden in aforementioned weights (w i ), i.e. the real numbers connected with each input of nerve cell.In the learning process, they are modified enabling ANN, with appropriately selected network architecture (two hidden layers), to model -according to Kolmogorov's theory -any continuous function.[7].

Results of empirical studies
Data from the 13th iteration of the Residential Energy Consumption Survey program (RECS) have been used for modelling of electricity demand in buildings.The study covered 12,083 households and concerned the situation in 2009.On the basis of obtained data set, the independent and dependent variables were specified in Table 1.Resulting data sets were divided randomly into three sub-sets with the following number of samples: teaching (60%), validation (15%) and testing (25%).The first one was used to teach networks.The second was a set necessary to determine the moment of interrupting the training process in order to prevent ANN overlearning.The last one -test set -was used after completion of the learning process to assess the quality of the model's operation on unknown data.In the modeling of electricity usage for space heating and air-conditioning the cases with zero energy consumption for these purposes were removed from sub-sets.

No. Name of variable Description Dependent variables I Total site electricity usage [kWh] II Electricity usage for space heating
[kWh] III Electricity usage for air-conditioning, central and window/wall (room) [kWh] Independent variables 1 Heating degree-days to base 65 F (HDD65) 1-year period 2 Cooling degree-days to base 65 F (CDD65) 1-year period 3 Heating degree days, 30-year average, base 65F (HDD30YR) 4 Cooling degree days, 30-year average, base 65F (HDD30YR) 5 Housing unit classified as urban or rural by Census 0 -urban, 1 -rural 6 Year housing unit was built 7 Brick is the major outside wall material 0 -no, 1 -yes 8 Wood is the major outside wall material 0 -no, 1 -yes 9 Siding (aluminum, vinyl, steel) is the major outside wall material 0 -no, 1 -yes 10 Stucco is the major outside wall material 0 -no, 1 -yes 11 Composition (shingle) is the major outside wall material 0 -no, 1 -yes 12 Stone is the major outside wall material 0 -no, 1 -yes 13 Concrete/concrete block is the major outside wall material 0 -no, 1 -yes 14 Glass is the major outside wall material 0 -no, 1 -yes 15 Other material is the major outside wall material 0 -no, 1 -yes 16 Number of full bathrooms 0 -9 17 Number of half bathrooms 0 -9 18 Number of rooms other than bedroom(s) and bathroom(s) 1 -20 19 Total number of rooms in the housing unit 1 -25 20 Microwave oven used 0 -no, 1 -yes 21 Toaster used 0 -no, 1 -yes 22 Coffee maker used 0 -no, 1 -yes 23 Number of refrigerators used 0 -10 24 Separate freezer used 0 -no, 1 -yes 25 Dishwasher used 0 -no, 1 -yes 26 Clothes dryer used in home 0 -no, 1 -yes 27 Natural gas is the main space heating fuel 0 -no, 1 -yes 28 Propane/LPG is the main space heating fuel 0 -no, 1 -yes 29 Fuel oil is the main space heating fuel 0 -no, 1 -yes 30 Kerosene is the main space heating fuel 0 -no, 1 -yes 31 Electricity is the main space heating fuel 0 -no, 1 -yes 32 Wood is the main space heating fuel 0 -no, 1 -yes 33 Solar is the main space heating fuel 0 -no, 1 -yes 34 District steam is the main space heating fuel 0 -no, 1 -yes 35 Other fuel is the main space heating fuel 0 - Models constructed on the basis of all dependent variables described in Table 1 turned out to be, as expected, not precise enough.This is associated with the principle of ANN's construction, in which the signals coming from neurons of the earlier layers are added up when multiplied by their corresponding weights.As a result, forecasting errors caused by natural model imperfections and incorrect neuron response are added up in the nerve cells of subsequent layers and contribute more to ANN's incorrect response.This means that the model must be simplified as much as possible.The number of used independent variables must constitute a balance between simplifying its structure as far as possible and using meaningful input variables.For this reason, it became necessary to select their subset from the variables presented in Table 1, which was optimized as much as possible in terms of modelled issue.
A total of more than 15,000 different ANN models have been tested.The study presents only the best networks and their forecast results.Figure 3a presents forecasting model of total site electricity usage [kWh] (variables numbered in accordance with Table 1).The obtained scatter diagram is shown in Figure 3b.The MAPE error for data from the test set was 41.54%.A MLP with the structure 19-20-1 was used (activation functions: hidden layer -hyperbolic tangent, output layer -logistic).The analogous forecast results were presented for: electricity usage for space heating (Figure 4a and Figure 4b, MAPE was 42.08%, MLP 15-14-1, activation functions: hidden layer -logistic, output layerhyperbolic tangent) and electricity usage for air-conditioning (Figure 5a and Figure 5b, MAPE was 148.40%,MLP 9-5-1, activation functions: hidden layer -hyperbolic tangent, output layer -logistic).

Conclusions
Research results confirmed the possibility and validity of using ANN to forecast electricity demand in buildings in total presentation and partially by sources of demand.As expected, models built on the basis of a reduced number of independent variables were characterized by smaller errors.In order to achieve a high degree of precision, it was necessary to optimize the selection of input variables as much as possible for each model separately, depending on the type of dependent variable.The highest value of MAPE error was recorded in the case of properties with the highest electricity demand.In their case, the possibility of its precise modelling is highly limited.Demand for electricity in other properties was modelled with a relatively high degree of precision except energy usage for air-conditioning.One of the reasons is the relatively low energy consumption for airconditioning purposes in the majority of analyzed households, which in the case of a forecast error of several hundred kWh annually means high MAPE values (this situation is observed in Figure 5b).The research showed that this type of demand cannot be forecast properly by presented models.Total site electricity usage and electricity usage for space heating were predicted with a high level of accuracy.This confirms the validity of ANNs use in case of analyses, where no archive data on electricity consumption in specific properties is available.These models are predisposed in particular to carry out forecasts for newly created real estates, for which it is possible to determine the target group of its future users.

Table 1 .
List of dependent and independent variables.