Research On Public Building Energy Consumption Prediction Method Based On NAR Neural Network Prediction Technology

In order to solve the problem of high energy consumption of public buildings and optimize and improve energy conservation of public buildings, we built a building energy consumption prediction model based on NAR neural network prediction technology improved by BP neural network algorithm, and the energy consumption value is predicted. The large public buildings as the research object, the key factors to determine the effect of building energy consumption and collect the corresponding data processing, as the input parameters of neural network prediction public buildings energy consumption value, according to the actual situation will eventually NAR prediction of neural network and BP network prediction method and the comparative analysis the measured data. The results show that NAR neural network can predict the energy consumption of public buildings more accurately than BP neural network under different building parameters.


Introduction
Energy is an important basis for the progress and development of human society. China is now in the rapid development of urban construction period, the number of large public buildings is increasing. With the increase of people's demand for living environment and the diversified development of public buildings, the energy consumption of public buildings increases rapidly, which is close to the total energy consumption of residential buildings. Therefore, the energy problem of large public buildings has been concerned by the state.
At present, the problem of energy waste has become a global problem, and countries pay close attention to it. Many scholars at home and abroad have applied the relevant knowledge of data mining to the prediction and analysis of building energy consumption and obtained good research results. Public buildings, functional diversity, using varying conditions, brought many difficulties to energy consumption prediction, and neural network technology to build forecasting model provides a possible, in this paper, the main research method is through the field acquisition object building electricity consumption over a period of time, temperature and other data into neural network input layer, the network model for training simulation, prediction and the result was compared with actual value, verify the NAR neural network forecasting method in order to achieve the purpose of accuracy [1] .

BP neural network
Artificial Neural Network is an emerging research hot spot in the field of Artificial intelligence.
BP neural network is composed of input layer, output layer and several middle layer (layer implied), is a kind of more than three layer or three layer a variety of different structure of neural network, which consists of number of neurons, Neurons in each layer of its neural network are fully connected. in the neuron model, a is the output, f is the excitation function, w is weight, on behalf of the power degree, which is connected with the BP neural model, P is the input, b is the threshold of the neuron model [2] . The output of the basic BP neuron is: The learning process of BP neural network is mainly divided into two parts. The first part is forward propagation. Input data is processed from the input layer through each hidden layer and the actual output value of each unit is obtained. The second part is back propagation. If the desired output is not obtained at last, the connection weights among different levels will be corrected backward. In the process of constant correction and learning, the network learning process will end when the learning error of neural network reaches the required requirements

NAR neural network
The essence of NAR neural network is the dynamic BP neural network with additional delay step function, and the number of input is determined by the delay order. By adjusting the number of neurons, hidden layer and delay order, a better network model can be selected. Because the dynamic neural network can store the data at a certain moment and participate in the next computation of the network, it has the ability of dynamic learning and improving the precision of network training.
Eq. 2 is the mathematical model of NAR neural network algorithm. In the equation, f(·) is the neural network model, d is the additional delay order, and y(t) is the output.
The NAR model is different from the general BP neural network model in that its output and input are y(t). In the first hidden layer, a delay function is added to record the previous data. When the input is x(t), after recording the delay function, the input of the neural network is: The above method gives the NAR neural network model the ability to record previous data.
In order to use the NAR dynamic network model to predict the value of y(t) at future time, the value of the delay variable p in the delay function should be determined first, that is, the order of the NAR dynamic network model should be determined. The crossvalidation method is the most commonly used method to determine the order p of the model. Its principle is as follows: For a set of NAR samplesY (i = 1，2，⋯，n)，make Among them, ( · ) is the non-parametric estimation of the autoregressive function f(·) after removing the ith data, and w(·) represents the selected non-negative weight function, the estimated expression of (X ( )) is: Where K(·) is the kernel function, namely the radial basis function.
In practical application, H is the upper bound of the number of lag variables p, and cv(k) is minimized at {1,2,.., H}, then NAR delay variable p satisfies: To sum up, the NAR neural network energy consumption prediction model has better universality, applicability and prediction accuracy than the common BP neural network for energy consumption prediction and regulation of public buildings with periodic fluctuation of data.

Parameter prediction and model design 2.1 Actual data preprocessing
Through field research and cooperation with project companies, this paper obtained partial energy consumption data of a large public building in anning district, lanzhou city, gansu province in recent ten years, and took them as statistical samples.
Since the parameters in the sample data have different orders of magnitude, before data simulation and prediction, it is necessary to give priority to the adaptive processing of the data in the sample to reach the value range of neural network training. In order to avoid the network identification accuracy error caused by the magnitude difference and improve the convergence speed of the network, we introduce the normalization method in the numerical statistical analysis to preprocess the collected parameters, so as to reduce the impact of singular samples on the performance of the neural network and map each parameter to the range [0,1]. The processing methods are as follows: Set x as the sample parameter, y as the normalized output of a certain sample parameter x, x as the minimum value of x, and x as the maximum value of x, then the normalized formula is shown as follows [3] .
The data processed by equation (7) is within the interval of [0,1].

Model design
NAR neural network has a more efficient function of nonlinear data function mapping approximation, which can predict building energy consumption more accurately by using NAR neural network model. In this paper, NAR neural network model was designed by MATLAB and used to predict the experimental results.
Based on object of public building construction type and the proportion of energy consumption survey, lighting power consumption as well as the most power-hungry occupy its overall energy consumption of central air conditioning, at the same time, it is focus on the part of the energy conservation and emissions reduction, so this article will lighting as well as central air conditioning energy consumption data to predict as the research key [4] .
Select data collected in recent years, the public buildings in daily lighting power consumption as well as central air conditioning power consumption for a total of more than 1000 sets of data, respectively as the prediction model of input variables, between July to December, 2018 daily energy consumption prediction as output variables of the model and finally compared with the measured values, according to the empirical formula 2m+1 calculate the number of hidden layer nodes, m as the input layer node number, it is concluded that the network hidden layer with 5 nodes, the network structure for the 2-5-2, namely, to establish three layers of NAR neural network energy consumption prediction model has two groups of input vector, 2 set of output vector. Partial data samples are shown in table 1, which are respectively the original measured data tables.

Parameters to determine
Functions used in neural network design: trainlm: Training function, Levenberg-marquard (LM) algorithm is adopted to train the BP neural network of medium scale, which has the advantages of fast convergence and high accuracy; Tansig: hyperbolic tangent function, used for transmission of input layer to intermediate layer on BP neural network nodes; Purelin: linear function used for transmission from intermediate layer to output layer on BP neural network nodes.
Sim: used to simulate the network that has completed the training.
Normalization function: normalize the samples at the input end to between [0,1], and use postmnmx function to normalize the output value to the actual value after the training, which can increase the training accuracy and accelerate the convergence speed.
The learning efficiency was set at 0.05, the momentum factor was 0.65, the delay order was 5, the maximum training times was 1000, and the maximum square error of network training was.

Training process
Step 1: network initialization.
Initialize the weights Wij and Wjk between the input layer and the hidden layer, and between the hidden layer and the output layer of the neural network. Initialize input layer and output layer thresholds a and b.
Step 2: calculate the hidden layer.
= (∑ − ) = 1,2, … , ; = 1,2, … , is the value of the hidden layer of the j layer, f is the excitation function of the hidden layer, and is the input node variable of the i.
Step 3: calculate the output layer.
Step 4: calculate the error.
is the expected output and is the actual output.
Step 7: calculate the global error. Judge whether the error meets the requirements or reaches the maximum iteration number. If the requirements are not met or the maximum iteration number is not reached, return to the second step.
While, is the expected output of sample p, is the actual output of sample p, N is the number of sample data, and m is the output vector digit.

Verification of prediction results
In order to verify the effectiveness of NAR algorithm in the prediction of public building energy consumption, BP algorithm and NAR algorithm were respectively used for prediction, and the predicted results were compared and analyzed. Figure 1 and figure 2 respectively show the comparison graph of predicted data and test samples based on BP algorithm and NAR algorithm.

Error evaluation criteria
The mean absolute percentage error (MAPE) is used for error evaluation to compare and evaluate the accuracy of the predicted data. The smaller MAPE is, the smaller the error is [5] .
Among them, n is the total number of results, y is the real value, is predicted. Figure 7 shows the comparison of prediction errors between BP algorithm and NAR algorithm. Table 2 shows the comparison of the mean absolute percentage errors of the two methods.

Conclusion
(1) In this paper, the results of energy consumption prediction based on NAR neural network model show that this method has higher accuracy and reliability than traditional methods. Especially in the data prediction which is less affected by objective factors such as lighting energy consumption, it has high accuracy and the average relative error is about 2%. However, the prediction effect of the improved BP network shows volatility and the maximum average relative error is more than 18%.
(2) Under the influence of cooling in summer and heating in winter, the energy consumption of central air conditioning in public buildings has great seasonal fluctuations and differences in different periods, and the regularity is more difficult to be specific, which has some influences on energy consumption prediction, and the convergence is insufficient and the required data volume is large [6] .