Estimated electric power consumption by means of artificial neural networks and autoregressive models with exogenous input methods

The growth electric energy demand in the industrial and commercial sectors and in public and private buildings represents a problem to estimate electrical consumption in these sectors in order to avoid fines imposed by the respective companies supplying electricity. This study presents artificial neural networks (ANN) and autoregressive models with exogenous input (ARX) models to calculate and to predict the electrical consumption for public sector using heuristic procedures. This system allows estimating the electric power consumption of the next few months ahead, and therefore, a better management of electric energy. The model validation is performed by comparing the results with a nonlinear regression model, ANN and autoregressive models with exogenous input models and the real data with analysis of variance (ANOVA). The ANN models results are estimate confidence intervals of 95%. The variables used as inputs to the neural model estimated are temperature, relative humidity, power consumption and time (day and hour). The algorithm used to estimate is Levenberg-Marquardt.


INTRODUCTION
Estimated electric power consumption in public sector requires advanced intelligent tools such as artificial neural networks (ANN) and autoregressive models with exogenous input (ARX).Electric energy is used in the buildings' comfort as cooling, heating and lighting, electrical and electronic equipment.In this sense, buildings are responsible for approximately 40% of the annual energy consumption worldwide with respect to these sectors (Omer, 2008).The main problem to estimate the electric power consumption is the complex dynamic behavior exhibited by the load series.
As the electric power consumption in these sectors grows, the complexity of the generation systems and energy consumption in the electricity companies increases according to their ability to supply power.These companies performs a measurement of all the variables (voltage, current, frequency and magnetic flux variations in the electrical network) from a central control room, plotting in real-time the average values of the programmed energy production and performing *Corresponding author.E-mail: luis_rojasr@hotmail.com.
adjustments according to the demand of the day (Yik and Lee, 2005).Currently, it is necessary to make an energy analysis for the buildings construction of different economic sectors through the professional application of technology by engineers and architects that design energy-efficient buildings.After finishing the design and construction of the building, electrical consumption is decided mainly by its control, maintenance and number of occupants; in order to achieve functional and satisfactory environments in intelligent buildings, the overall reduction in electrical consumption through control systems is required (Mrabti et al., 2011;Young-Sub and Kang-Soo, 2007).This improves the energy efficiency of electrical and control devices as well as the estimated algorithms of electric power consumption.
The electric power consumption on a given day depends not only on the previous day's demand, but also of day electrical consumption of the previous week.Furthermore, they are several aspects that significantly influence the patterns of electrical consumption, particularly related to climate variables.By example on a hot day, the power consumption in buildings increases significantly due to the energy used for cooling (Basaran et al., 2010).To estimate the electric consumption in the short-term it is necessary to consider operations in electrical systems.Storage, generation and distribution of power are the most significant variables in buildings optimization (Nguyen-Vu et al., 2008).
This problem can be solved through models estimation of electric power consumption.These models have caused a great interest on study from the time when power grids were installed as a system of power transmission and distribution.Estimated models are useful for different applications and for mass proliferation of the use of electricity in the industrial, commercial and domestic sector.Within these environments, there are many applications for estimated models, such as cost reduction, planning, maintenance, human resource generation, design and research.
In recent years, literature describes numerous works of techniques applied to the estimate of electric power.Recently, the estimate of electric power has used ANN.To predict buildings energy needs benefiting from orientation, insulation thickness and transparency ratio by using ANN.Engineers have developed models of neural networks for lighting in office buildings, using the temperature and days of the week to estimate the demand for heat and electricity consumption (Wong and Wang, 2009).These networks are connected by a great number of links carrying out a nonlinear operation through different software.The use of neural networks applied to the internal temperature of buildings, reports an air conditioning control used to predict the electric energy demand (Ruano et al., 2005).Engineers have proposed self-organized maps as neural network models to predict short-term electric energy consumption, resulting in a demand curve for the following hours as well as the use of predictive models of power load with neural networks combined with error correction (RBFNN), based on the energy demand consumption for air conditioning in buildings (Doukas et al., 2007).The ARX is dynamic mathematical models derived from the system identification theory that predict the behavior of air temperature inside buildings (Shina et al., 2001).
The objective of this study was to develop a model to estimate the electric power consumption for public sector based on a multilayer perceptron neural network that allows estimating the electricity consumption the next few months to get a better management of electric power with the classification by supervised learning models.The variables used as inputs to the model estimate are temperature and relative humidity, as well as power consumption and time.A validation model performance was made by comparing results with ARX and measured data, by analysis of variance (ANOVA).

Neural networks models
Nowadays, neural networks are excellent tools to perform various tasks: pattern recognition (objects in images and drawings), speech recognition, explosive detection, and identification of human faces (in airports to identify the people that move in and out of it), perform data compression, videogames, artificial learning and estimated electric power consumption.Often they are also used to solve a problem when there are no existing algorithms to solve certain processes (such as image recognition); this is because the algorithms are accurate, while neural networks have more flexibility (Ayata et al., 2007).Besides, neural network models can be applied to engineering problems with nonlinear nature, where a key feature is the response rate for solutions.
An ANN model was developed for office buildings with daylighting for subtropical climates.There were four nodes at the output layer with the estimated daily electricity use for cooling, heating, electric lighting and total building as the output building energy (Wong et al., 2010).A short-term load estimation using ANN was applied to the Nigeria Electric Power System to the load estimate 1 h in advance.The inputs used for this ANN are the previous hour load, previous day load, previous week load, day of the week, and hour of the day (Adepoju et al., 2007).
A neural network consists of input neurons, hidden neurons and output neurons.Each of these is grouped into layers.The data are spread throughout the network starting from the input neurons to the output neurons (Mohammad et al., 2011).The neurons are connected by a large number of weighted links; neuron nodes that are adjusted so as to obtain certain specific results over which signals or information can pass.Basically, a neuron receives inputs over its incoming connections, combines the inputs, performs generally a nonlinear operation, and then outputs the final results.
Generally, what matters is only the final weight of the output neurons.When the output signals are transmitted to the input neurons, all signals are processed again by changing the neural weights.The discussion about whether this process converges to specific states for each neuron through the iterations is complex.That is, those neural networks are minimized or maximized to find optimal values.Hidden nodes with nonlinear transfer functions are used to process the information received by the input nodes.The network can be written as:  Where the number of input nodes is m, the number of hidden nodes is n, a sigmoidal transfer function is f , as the logistic function: (2) Equation 2 represents a vector of weights from hidden nodes to output nodes that introduce nonlinearity into the model.In Equation 1, α0 and β0 are the weights of the main arches of partial terms, which always have values equal to 1 (Gareta et al., 2006).Among the units or neurons that form a neural network there is a set of connections that bind them.Each unit transmits signals to those connected to its output.Associated with each unit, there is an activation function that transforms the net input to the unit which comes as a result of being connected to other units that supply information in the output value.Maybe a linear or nonlinear function, chosen depending on the specifications of the problem has to be solved neuron.Normalization of data necessary to avoid conditions of the neurons is saturated.If the neurons are saturated, there is a small change in the value of the item that can cause an error in the output value (Wong et al., 2010).To this end, data must be normalized before being presented to the neural network.The range considered as input any value between minus infinity and plus infinity and generates an output between 0 and 1.The starting value of the number of nodes in the hidden layer is equal to the average of the number of inputs and outputs.
Normalization is carried out through the following expression: Several iterations are required to train a small network, even for a simple problem.To reduce the number of iterations and speed up the learning time of ANN, several topics of recent research have been developed; some improvements of the algorithm of retropropagation are the gradient descent and the algorithm of Levenberg-Marquardt (Ngoo et al., 2011).
The ranges of applications of ANNs are steadily increasing.Its use in applications related to the administration and management of energy begins in the early 90's, and provides a thorough description of the applications of ANNs in renewable energy systems (Wong et al., 2010).
The ANN applied in this study, is a layered network with 5 input nodes and one hidden layer with a variable number of hidden nodes, such as temperature (Temp), relative humidity (RH), time (Hr and Day) and energy consumption (kW) as variables that influence energy consumption, directly on multiple factors such as power consumption heating systems, air conditioners, and refrigerators (Kim et al., 2011) with an output layer with one node.A schematic diagram of the basic architecture is shown in Figure 1.Each layer was interconnected together by the connection strengths called weights.In such networks, all neural signals propagate forward through the network layers.There are no connections back and neither side usually either recurrent self, useful in recognition or pattern classification.

Autoregressive models with exogenous input model
The parameters for a linear ARX model were determined from values sampled at an interval of time T of the input and output.This determination is performed by a multivariable linear regression that determined the parameters    (Harunori et al., 2001;Preminger et al., 2007).The ARX structure has a system which can be defined by means of the number of the poles, the number of zeros, and the time delay.
The values are obtained by the estimation procedure by entering the coefficients as parameters for determining the vector  to be estimated: To avoid the white noise as a direct error in the equations, the parameters of ARX structural adjustment will be: Often the ARX model Equation 4is represented as: Where the matrices ) (z V and are given by: The number of entries is represented by the number of and

Measures of accuracy
The accuracy of prediction is the most important and decisive performance measurement applied to ANN and ARX models.A measure of accuracy is often defined in terms of prediction error, which is the difference between the measured and the estimated value.There are a number of measures of accuracy in the literature of prediction, with different advantages and limitations.Among the most frequently used are: the mean square error (MSE), the root mean square error (RMSE), and the mean absolute percentage error (MAPE).N is the number of terms of the error.Electric power consumption in public sector depends largely on the variables of temperature and relative humidity to maintain an atmosphere of comfort and functionality (lighting, ventilation, heating and cooling) (Zhiwei et al., 2007).
The time and energy consumption in kWh are considered as inputs to the ANN.Time is necessary because some tasks must be carried out at different schedules, and hence the energy consumption (kWh) will change.

Description of public sector building
The procedure to design the estimate model of electric power consumption based on an ANN algorithm was carried out in the graduate engineering building at the Universidad Autonoma of Queretaro.The structure has five classrooms each with an area of 42 m 2 and a conference room with an area of 58 m 2 .One classroom is equipped with York 18000 BTU Split air conditioning unit.The structure of the building is a single level with 3 m high.
The energy consumption data used to train the model come from measuring in the main substation in the Engineering school at the Universidad Autonoma of Queretaro, with a quality power monitoring system.The temperature data and relative humidity were measured in classrooms with HOBO Pro V2 sensors that allow a rapid response to information and data storage.The HOBOware software was used to transport field data for temperature and relative humidity analysis.This data were obtained, as well as the time and day of measurements.These data were divided into two groups: the first one used a series of 780 h to train the neural network and the second group worked with 195 h to test the neural network model.

ANN algorithm description
The objective of an ANN is to find an optimal configuration of weights, so that it can learn a set of patterns.The proposal for the prediction of electric power consumption in the buildings was an ANN model with the Levenberg-Marquardt algorithm.With this network architecture the highest average of the absolute differences between measured and estimated values was selected, expressed as a percentage of the measured values since its result as a percentage does not depend on variables such as the magnitude of the input data (Rempel et al., 2008).The ANN construction may include hidden layers (not directly connected to inputs or outputs), where neurons in each layer have the same structure of a single neuron, but the inputs are the outputs of the neurons of the preceding layer.The learning rule or data training algorithm is a procedure for modifying the weights of a network and These steps are repeated to find the appropriate number of hidden nodes, using different training parameters for the network.80% of the data were used to train the network, another 10% for the validation set and the remaining 10% to estimate the generalization.

ARX algorithm description
The measured data were used to obtain the coefficients in the ARX model based on analysis of input variables: temperature (TEMP), relative humidity (RH), time (Hr) and day, and as an output variable: the energy consumption (kW).Once data are registered, they are divided into 2 subgroups: the first data set was used to determine the model coefficients; the remaining group was used in the ARX model validation (Abhijit et al., 2011).Once the coefficients were calculated, it performs a comparison of the best prediction with the measured data of electricity consumption in real time in the Engineering building.a) The input and output data are recorded during an experiment of identification, which identifies the signals to measure, as well as its time and its restrictions, b) A set of candidate models is obtained considering its specifications in order to select the most suitable.The formal properties of models are combined with an intuition of engineering and priori knowledge (Figure 2).Then a model with some unknown physical parameters is constructed from basic physical laws and other well-established relationships.A set model built for data fitting, is called "black box", c) It was determined the best model in the set, guided by the data.This is the method of identification.The quality assessment is often based on a self-improvement of the models by the reproducibility of the input variables maintaining its structure.The quality assessment is often based on how the models seek to improve when they try to reproduce the basic approach of the structure of the model.

RESULTS AND DISCUSSION
Several models of ANN and ARX were generated and tested according to their performance and structured with 975 data which were obtained from electrical energy consumption monitoring, as well as of the temperature and relative humidity variables.The error of the MAPE was used to examine the quality of prediction models in order to determine the best ANN performance and ARX.Error MAPE values were calculated for each of the models and Tables 1 and 2 show the best models, their reliability, and better performance for ANN and ARX models, respectively.The 5-5-1 ANN model is the one that had the best results with a 0.0216 MAPE, 0.9908 R 2 and 0.0927 SEP compared with the results of the remaining models in Table 1.The best ARX model was 3-2-1 with a 0.0439 MAPE, 0.9856 R 2 and 0.1341 SEP, shown in Table 2.
Table 3 shows the prediction results obtained from the ANN, ARX and linear regression models and compares them to the real data.The table shows the MAPE of each model and indicates the most appropriate prediction and most likely to be a successful prediction.
Figure 3 compares the ANN, ARX and regression models in terms of MAPE, SEP and R 2 .The prediction model with ANN has a lower error compared with the results of the remaining models.The real data and ANN, regression, and ARX results were selected and compared using analysis of variance to estimate the variability of the components for the various methods of analysis, in order to compare the systematic errors with the obtained by performing random tests with different mean values to determine if any of them differed significantly from the rest (Table 4).
Propositions were made on the values determined in the models to make a decision in order to accept or reject a test by a data analysis tool called hypothesis testing.

Duncan's multiple range test (DMRT)
Before the DMRT was performed, the standard deviation for each treatment was calculated as:    From the above we can see that the average of the first treatment (real data) and the second treatment (selected ANN) is equal to α = 0.05.These results show that the average of the estimated power consumption of the selected ANN and real data are approximately equal at 95% confidence level, significantly higher than the results of treatment with regression and ARX.When the four estimate models (with α = 0.05) were compared the null hypothesis of the test was accepted with 95% confidence, considering that the interval contains the measured value of the population; this indicates that the

Conclusions
A method for predicting the electric power consumption in a multilayer perceptron neural network was tested.The construction of the model 5-5-1 in the algorithm in ANN was able to produce the best results in predicting electric power consumption in the building, with an estimated error of 0.0216 with the real data.The ANOVA statistical method for estimation of variation was used, comparing the results of the model of ANN with measured data and the results of nonlinear regression and ARX model was obtained at 95% reliability in neural network models.This model is closer to the measured data to predict the electric power consumption in public sector buildings.This ANOVA was used to compare whether the values of a set of numerical data are significantly different than the values of one or more other data sets to achieve a statistical F ratio and error treatment.DMRT was used to identify which model is closer to the real data.Moreover, it was shown that the selected ANN has better estimated values for total electricity power consumption.Additionally, the utility of neural networks was effective in the prediction process of electricity in terms of MAPE.Finally, neural networks, in most cases measures exhibited the lowest prediction error.It concludes the advantages of neural networks to be easier to implement models and allow obtaining low prediction errors.The approach described in this paper could be used to design an intelligent control strategy for electrical consumption in buildings.

Figure 1 .
Figure 1.The schematic of ANN.
connection that link neurons of an ANN have an associated weight, which is what makes the network, acquires knowledge.Considering as the output value of the neuron at a given instant, this signal is transmitted from neuron to but this signal is modified by the value of the connection weight between neurons in question.The nomenclature for the synaptic weight between neuron and neuron is .The first subscript ( ) indicates the neuron or unit where you are going to connect.The second subscript ( ) indicates the neuron or unit where the connection comes from.The entry of the function is the sum of all input signals by the weight associated with the connection of the signal input.

X
is the value of the normalized data, and min x and max x are the minimum and maximum of data set, with an initial value of the weights of the neural network according to the model.
squared values difference between actual and calculated by the following autoregressive model:

)
This is also called equation error structure, where y = output signal, n = input signal, t = discrete time, .The output at the sampling instant t is obtained from past values of the output and input The selection of the values of the best model is obtained through the estimation process

Figure 3 .
Figure 3.Comparison error or neural network, ARX and regression models. 7

Table 1 .
Comparison of estimated error for different neural network models.

Table 2 .
Comparison of estimated error for different ARX models.

Table 3 .
Comparison of measurements and estimated values in neural networks, nonlinear regression and ARX models.

Table 4 .
ANOVA data comparison between the nonlinear regression, ARX and neural network models. of electric power consumption for selected values of the model of ANN and real data were significantly more accurate than the values obtained by nonlinear regression and ARX models. estimate