Power Consumption Prediction Based on Deep Learning

The purpose of this paper is to select a power consumption forecasting method with high accuracy and low error. Previous power consumption forecasting methods are basically based on the optimization and improvement of the original classical forecasting methods, and the error has not been substantially reduced. It was not until 2006 that the unveiling of deep learning technology opened a new chapter in the direction of artificial intelligence, and the research of power consumption forecasting has ushered in a new wave. In this paper, the origin of deep learning technology is introduced, and the LSTMs model of deep learning is built, and the short-term electricity consumption forecasting model is built, which can complete the forecasting of the time series of electricity consumption. At the end of this paper, a case simulation analysis is carried out. After 57 days’training of power consumption data, the power consumption curve in the next week is finally obtained. It is found that the error rate is very small and the accuracy is high.


INTRODUCTION
Deep learning technology is a deeper exploration of traditional neural networks, and there are many applications in the direction of artificial intelligence today. With the rapid development of the economy, the optimization of the construction of smart grids is imminent, and the power system urgently needs more data and information to provide more functions for future construction and operation. Power system electricity consumption forecasting is an important direction for deep learning in power system power consumption analysis and forecasting. In this paper, the long-term and short-term memory neural network model is used to construct the electricity consumption prediction model, and the simulation experiment is carried out on this basis.

data statistics and processing overview
In the operation of the power system, some faults and some unplanned events will inevitably occur. These will make the data monitored by the information acquisition system different from the usual mutations, and the abnormal data will have serious error effects on the experimental simulation results, reduce the reliability of prediction.
Therefore, the raw data recorded by the smart meter cannot be directly applied to the experiment, and the preprocessing of the experimental data is necessary. The processing of the power data can greatly reduce the instability in the simulation process and improve the accuracy of the model prediction .
This chapter will explain the pre-processing and power consumption data statistical research work on the power consumption data selected in this topic, so as to effectively reduce the influence of the uncertainty of the sample data on the error of the experimental results in the preliminary preparation work of the simulation.

data sources
The experimental data used in this project is the electricity consumption data of a certain area of Binhe New City. The data includes the electricity consumption data of the power system from June 1, 2017 to December 31, 2017. A certain area of Binhe New City is located in the northern coastal area, located in the industrial and commercial economic circle. The surrounding industrial parks include steel smelting and forging, garment manufacturing, automobile production, chemical industry and other industries, and the population is huge, which guarantees that the region is very high. The sample represents the value and the experimental results have real reliability.
Table1 Electricity consumption data specification sheet

Data workday change law
In order to visually and visually check the change of electricity consumption on the working day, this paper selects the power consumption curve for two consecutive working days. The picture shows the electricity consumption curve for two consecutive working days in a certain area of Binhe New City from November 10, 2017 to November 11, 2017. This figure can visually find that the power consumption trend of the two days of the working day is almost the same. It's exactly the same. As can be seen from the figure, the power consumption will reach two maximum values on the same day, and the peak time of the two days is basically the same. The electricity consumption continued to increase every morning, and reached the peak of the first electricity consumption around 11 noon, and began to decline within 2 hours after 12 o'clock. After 14 o'clock in the afternoon, people spent During the lunch break, normal production activities began, and the electricity consumption decreased slightly, but the overall situation continued to grow until it reached the second peak of electricity consumption at 21 o'clock, and then began to decline.

Table2 Electricity consumption curve for two consecutive working days
It can be seen from the electricity consumption curve that people have a strong regularity in production and living activities on weekdays, and the curves of adjacent units are basically the same.

Holiday change law
Because people's production and living activities on working days and holidays often have great changes, people's electricity consumption on different dates is very different.
In the week without legal holidays, the electricity consumption data of working days and weekends have changed a lot. It can be imagined that the electricity consumption of people on weekends will be lower than that of working days. Electricity. Based on the above speculation, this paper separately selects the electricity consumption data for one week, and draws the electricity consumption curve as shown in Figure. It can be analyzed from the map. On the working day, people's production activities occupy a dominant position. The production units such as factories operate normally, generating a large amount of electricity used in the power system. On the weekend, the situation is reversed. Compared with the production of electricity, the production units such as factories enter the rest, so the electricity consumption on weekends is lower than the working days.
Table3 Continuous electricity consumption curve for one week The above is an analysis of the usage of electricity for one week.

SHORT-TERM ELECTRICITY CONSUMPTION PREDICTION MODEL BASED ON DEEP LEARNING
In this paper, the long-short-term memory neural network model LSTMs is used to build the electricity consumption prediction model, and the simulation experiment is carried out on the basis of the data. The data is used as the training set and test set of the Binhe New City in a northern city.

Circulating Neural Network RNN
Before introducing the long-and short-term memory neural network model, it is necessary to introduce the necessary information about the circulating neural network. The traditional feedforward neural network is composed of the input layer, the output layer and the hidden layer. Such a structure causes the problem that the interlayer propagation is limited and there is no connection between the nodes inside the layer. The final model cannot be solved. There are associated events before and after the input layer. Due to such problems, the cyclic neural network RNN has been improved to include connections in the hidden layer. Based on this improvement, the cyclic neural network RNN can memorize the information input from the front input layer and can be directly applied in future output calculations.
Table4 Circulating neural network RNN unit The input information of the hidden layer consists of two parts, including the input of the current moment and the input of the previous moment. Through such a structure, the process required for training learning is greatly reduced. The structure above can be expressed mathematically as Based on the improvement of the above multi-sense layer, the input information of the past moments is added, and the memory problem of the neural network is solved. However, in practical applications, it is often encountered that after a long time scale, a node that is relatively lagging in the network cannot reliably perceive the information of the former node in the network, that is, as the data set is elongated, the cyclic neural network RNN will Losing the ability to sense distant information, there has been a serious gradient disappearance problem. The long-and short-term memory neural network LSTM began to enter the historical arena.

LSTMs short-term electricity consumption prediction model based on deep learning framework
The long-and short-term memory neural network LSTMs has been proposed to solve the above problems. The long-short-term memory neural network LSTMs basically maintains the network structure of the cyclic neural network RNN, but the computational nodes are improved and optimized on the basis of the original.
Table5 Neural network LSTMs unit In LSTMs, a large number of "gate" structures are used to increase or decrease the control of functions through the "gate" structure such as input gates and output gates. The "gate" is a control The computing nodes of LSTM consist of input gates, output gates, forgetting gates, and Cell cells. The hidden layer is more complex than the standard cyclic neural network RNN architecture.
Cell cell elements act similarly to neurons in the hidden layer of the standard circulating neural network RNN and can excite the output. The input gate realizes the control of the input information, and the output gate realizes the control of the output information. The forgetting gate is one of the important structures for making a decision on the state information of the cell Cell. The forgetting gate is directly controlled by the activation function. The output value of the forgetting gate is controlled between high and low levels 1 and 0. When the output of the forgetting gate is low, the Cell cell element deletes the information of the previous state; when the gate is forgotten When the output is high, the Cell cell saves all the information of the previous state. The calculation process of the LSTMs unit is as follows: Forgotten Gate: Memory unit status:

LSTMs summary
Summarizing the characteristics described above, LSTMs is a controllable learning process. According to the deep learning type decomposition explained above, the deep LSTMs is supervised learning. The deep LSTMs is closely connected by various "gate" structures, with separate memory units, and the forgetting gate is responsible for controlling whether state associations of historical time need to be preserved.
Therefore, in the process of learning and training, the structure of the state information should be written into the deep LSTMs network parameters. Relying on such a supervised learning process, we finally get a more relevant prediction than the cyclic neural network RNN, thus establishing a shortterm electricity consumption prediction model based on LSTMs in the deep learning framework.

DEEP LEARNING LSTM MODEL SIMULATION
First, the data read and load process is performed, and the sample data is automatically normalized by the normalization process.
Secondly, the program assigns values, runs the main program, and selects the number of predicted current points, the number of hidden layers, and the number of error thresholds according to the amount of sample data. The number of hidden layers has a great influence on the accuracy of the prediction result. The larger the number of hidden layer nodes, the larger the subsequent calculation amount of the program, and the higher the accuracy of the corresponding prediction results.
Perform network function initialization and select the weight adjustment ratio for each iteration. After the initialization is completed, the LSTMs network starts training learning, and the weight update is performed every iteration. According to the sample data of the test set, the sample data is finally checked and the predicted value is output.
Test It can be seen from the figure that the LSTMs power consumption prediction model based on the deep learning framework has small prediction error and high precision, and can perform highprecision short-term power consumption prediction.

SUMMARY
This paper introduces the research background and research purposes of power system electricity consumption prediction technology. Under the current domestic and international efforts, many methods have achieved a stable application direction. Due to the improvement of comprehensive national strength and the increase of electricity consumption for all, although the traditional electricity consumption forecasting methods have played their role in the past, the emerging methods need to be optimized and developed. This paper introduces the LSTMs model based on deep learning, and on this basis, the simulation test is completed. The traditional power system power consumption prediction method often cannot balance the time series and nonlinear relationship of data. Therefore, this topic adopts a deep learning LSTM model that considers the correlation of data while considering short-term regression prediction. .
Deep learning technology is a deeper exploration of traditional neural networks, and there are many applications in the direction of artificial intelligence today.
In the case simulation stage, the simulation data of this paper uses the data of Binhe New City in a northern city as the training set and test set. In the program, the integration operations such as weight update, process analysis and normalization are carried out, and finally the predicted results are obtained. The initial data is compared and compared, and finally obtained through analysis, the shortterm electricity consumption prediction error rate based on the LSTMs model is low.