As one of the key technologies for accelerating the construction of the ubiquitous Internet of Things, demand response (DR) not only guides users to participate in power market operations but also increases the randomness of grid operations and the difficulty of load forecasting. In order to solve the problem of rough feature engineering processing and low prediction accuracy, a short-term load forecasting model of LSTM neural network considering demand response is proposed. First of all, in view of the strong randomness and complexity of input features, the weighted method is used to process multiple input features to strengthen the contribution of effective features and tap the potential value of features. Secondly, an improved genetic algorithm (IGA) is used to obtain the best LSTM parameters; finally, the special gate structure of the LSTM model is used to selectively control the influence of input variables on the model parameters and perform load forecasting. The experimental results show that the research has high prediction accuracy and application value and provides a new way for the development of power load forecasting.

1. Introduction

In recent years, due to the shortage of fossil energy such as oil and the serious environmental problems caused by global carbon emissions, more and more experts and scholars focus on the direction of “Energy Internet [13].” People aim to establish a more flexible and stable form of hybrid power generation. As an important constraint for the safe and stable operation of power system, accurate power load forecasting plays an important role in the economic, safe, and reliable operation of the power system.

Demand response (DR) serves as important means to shift energy supply and uses across time to counter the indeterminate variations. It is of great significance to improve the overall energy efficiency of the energy system [4]. However, especially in the Regional Energy Internet System [5], the strong uncertainty of the user-side DR will increase the difficulty of load forecasting. Accurate load forecasting is the basis for realizing the economic operation and scientific management of the power system, as well as the inevitable choice for long-term strategic planning and operational decision-making. In fact, the fundamental requirement for the implementation of DR programs is the load forecasting of its participants whether they are the group of residential consumers managed by aggregators, industrial consumers, or commercial consumers. DR capacity and DR events to be involved in these programs can be determined through load forecasting [6]. Instantly, the relevant technologies of artificial intelligence (AI) and machine learning (ML) have been widely used in renewable energy forecasting, load forecasting, power system fault diagnosis and optimal dispatching, power grid data visualization, and so forth [7]. At the same time, with the installation and application of a large number of measurement equipment such as smart meters [8] and weather monitoring [9], power grid companies have obtained unprecedented large amounts of data. It provides a lot of data support for power load forecasting based on AI [10]. On this basis, to improve the accuracy of load forecasting and the generalization ability of the load forecasting model has become an urgent problem to be solved.

Load forecasting is one of the most widely used areas of artificial intelligence technology in power systems. Scholars have carried out extensive research on the theory and methods of load forecasting. The methods for power load forecasting mainly include traditional methods and artificial intelligence methods. With the development of the times, traditional methods [1113] have gradually exposed problems such as poor model generalization ability, difficulty in determining model structure, and difficulty in selecting parameters. Artificial intelligence methods [1418] have gradually occupied the stage of load forecasting. Ahmad et al. [19] used two ML algorithms to forecast regional short-term energy demand. In [20], deep recurrent neural network (DRNN) and deep convolutional neural network (DCNN) were presented for day-ahead multistep load forecasting in commercial buildings. Khan et al. used grey correlation based on random forest (RF) and mutual information (MI) for feature selection. Kernel principle component analysis (KPCA) was used for feature extraction and enhanced convolutional neural network (CNN) was used for classification [21]. The choice of model hyperparameters affects the entire prediction process. The essence of optimal model configuration is actually a combination problem. Bouktif et al. used metaheuristic-search-based algorithms to reduce the complexity of the search. This method can find the optimal LSTM hyperparameter set more accurately and quickly [22]. For the problem of hyperparameters, Santra and Lin have similar views. Santra and Lin proposed using GA to optimize the initialization parameters of LSTM. This method improved the robustness of short-term load forecasting [23]. Rong and de León [24] proposed a load estimation method suitable for complex power networks. In order to solve the problem of network unobservability, Rong and de León proposed a nonlinear power-temperature curve to predict the load that varies with temperature. The “effective temperature” was introduced in the paper to properly consider the impact on the power consumption of heating and cooling equipment. This method has been well verified in practice. Li et al. [25] proposed a short-term load forecasting method that considers demand response under an energy Internet environment. The grey correlation analysis method was used to process meteorological data to obtain similar daily characteristic variables input to the forecast model. The LSTM neural network model was used for load forecasting. This method separates the DR electricity price that causes users to participate in DR to indirectly consider the DR load. This method provides a new idea for load forecasting considering DR. The rapid development of AI provides more possibilities for load forecasting technology. At the same time, it also puts forward stricter requirements on the quality of load forecasting, which brings new challenges and opportunities to load forecasting technology.

In order to improve prediction accuracy and model generalization ability, a short-term load forecasting model of LSTM neural network considering DR is proposed in this paper. Based on characteristics of engineering processing, the weighted method [26] is used to deal with multiple input features. In order to strengthen the contribution of effective features and explore the potential value of effective features in depth, this paper defines the weights of input features. Then, IGA is used to select the optimal model parameters of LSTM [27]. Finally, the parameter-tuned LSTM model is used for load forecasting.

2. Feature Extraction

This paper uses the data of New South Wales, Australia, from 2006 to 2010 for experimental verification. The data from 2006 to 2008 is used as the training set and the data from 2009 to 2010 is used as the verification set. In this paper, the maximum temperature, the minimum temperature, the average temperature, the date, and the real-time electricity price of the area are extracted as the input features.

2.1. Extraction of Temperature Characteristics

The average temperature is the true average temperature of each day. The average temperature in winter is the lowest and the average temperature in summer is the highest. The load in these two quarters is higher than in other quarters due to the increase in air conditioner usage. Therefore, the feature of average temperature can reduce the abnormal high temperature and low temperature to a reasonable range to reduce temperature fluctuation and then combine it with the real temperature. In this paper, the average temperature weight is set to 0.6, and the true temperature weight is set to 0.4. The specific formula is as follows:

T is the input feature of temperature, is the average temperature, and is the real temperature. Figure 1 shows the temperature characteristic curve after weighting treatment.

2.2. Extraction of Date Characteristics

Date type is another important influencing factor of short-term forecasting. The load on the user side on weekends will be greater than the load on workdays, and the load on the user side on holidays will also be greater than the load on workdays. This paper lists the date type as one of the factors that affect load forecasting. Considering that the parameters of the deep neural network need to be fed back, this paper expresses workdays as 1 and weekends and holidays as 2. Store the date feature in the fourth column of the feature vector.

2.3. Extraction of Real-Time Electricity Price Characteristics

The reform of the electricity market is an inevitable trend and requirement of national development. The marketization of the electricity prices is the top priority, and real-time electricity price is an important factor affecting load fluctuation. First, the maximum information coefficient (MIC) [28] is used to analyze the correlation between load and real-time point price. MIC is used to measure the degree of linear or nonlinear dependence between two variables. The greater the mutual information between the two variables is, the stronger the correlation is. MIC can overcome the shortcoming that mutual information is inconvenient to calculate continuous variables and can better reflect the degree of correlation between attributes. For a binary data set divide into a grid of columns and rows. For the divided grid , calculate the probability of each unit in to obtain the probability distribution of the binary data set on the grid . Save it as :

Standardize the obtained mutual information and find the maximum mutual information coefficient as follows: where n is the sample size; is a function of the sample size, which represents the constraint of the total number of grids in grid , which must be less than ; and generally . In essence, MIC is a normalized maximum mutual information, with a value interval of . The statistical results show that MIC > 0.4 days, account for 908 days in total, accounting for 46.69%, of which MIC > 0.6 days account for 502 days, accounting for 26.43%.

Figure 2 is the curve of electricity price and load. It can be seen that the trend of electricity price and load is basically the same. Residents can check the real-time electricity price to appropriately reduce electricity consumption and reduce the load, which will play a role in peak clipping. When the load reaches a trough, the electricity price will also be reduced, so as to encourage users to increase the amount of electricity to fill the valley. It has been proved by experiments that the electricity price has a great correlation with the load. In this paper, the real-time price is put into the fifth column of the feature vector as the input feature.

3. Prediction Model

3.1. Improved Genetic Algorithm

Genetic algorithm (GA) is a global search optimization algorithm formed according to the selection and genetic law of “survival of the fittest” in nature. The initial population composed of feasible solutions is operated by three operators of selection, crossover, and mutation. Eliminate one by one according to the fitness value of the individual. Finally, the individuals with the best fitness are left to form a new population, parallel calculation of multiple solution groups by genetic algorithm. Replace generations to achieve global convergence to obtain the optimal solution.

Hill climbing is a good local search algorithm. Firstly, a point is randomly selected as the initial point of iteration in the search space, and then a point is randomly generated in its neighborhood to calculate its function value. If the function value of the point is better than the current point, the current point is used to replace the initial point as a new initial point to continue searching in the neighborhood. Otherwise, the search process will be terminated if another point and initial point are randomly generated in the neighborhood until the better point is found or the better point is not found several times in a row. Because hill climbing is a method to optimize by randomly generating individuals in the neighborhood, it does not need to use a gradient. Hill climbing method can play the role of local optimization when genetic algorithm deals with complex problems. In the iterative process of this paper, the hill climbing method is introduced to optimize the individuals obtained by genetic algorithm, which greatly improves the efficiency of optimization.

3.2. LSTM Algorithm Mechanism

LSTM is an excellent variant of Recurrent Neural Network (RNN), which solves the problem of short memory and difficult training of RNN. It is very suitable for the classification and prediction of time series and is widely used in natural language processing. As shown in Figure 3, is the time point; is the input gate, which is mainly used to control how much information about the current state of the network needs to be saved in the internal state; is the forget gate, which is mainly used to control how much information is in the past state and needs to be discarded; is the output gate, mainly used to control how much information of the internal state at the current moment needs to be output to the external state; is the internal state of the neuron at the current moment; is the external state at the current moment; is the external input at the current moment; and is the activation layer function. The calculation formula between each variable is as follows:

Through the comprehensive application of these three control gates, the LSTM neural network can control the retention and discarding of the information transmitted in the neural network. It determines how much of the new state information at the current moment needs to be stored in the memory unit. Compared with general neural networks, LSTM neural networks can learn dependencies with a relatively long span without the problems of gradient disappearance and gradient explosion [29].

3.3. Selection of LSTM Optimal Parameters

The initial values of the weighting matrices can affect the performance of the LSTM. Inspired by [23], an improved genetic algorithm (IGA) is used to assist in searching the proper initial values for the weighting matrices of the LSTM. Figure 4 shows the flow diagram of the proposed method.

Step 1. Initialize chromosome population.
A set of n chromosomes are randomly generated. Each chromosome contains the values for all the weighting matrices in LSTM.

Step 2. Set fitness function.
For each chromosome in the current population, its value is used to initialize the weighting matrices in the LSTM. The LSTM predicts the output error of the training sample as the fitness function and calculates the fitness value of the individual in the initial population.

Step 3. Generate the new population through genetic operations.
This step generates a new population that contains the same number of chromosomes as the current population. The roulette wheel selection is used so that a chromosome with a higher fitness value had a higher probability of being selected for genetic operations. The chromosomes of the new population are produced by reproduction, crossover, and mutation operations on the chromosomes selected from the current population.
Chromosomes with higher fitness in the current population will be selected for reproduction, and it will be added to the new population, until the reproduction ratio is reached. The elitism policy is used in this article to ensure that the best chromosome among the current chromosomes can be added to the new population group.
Repeatedly select two chromosomes of the current population as the parent chromosomes for the crossover operation to generate two offspring chromosomes and add them to the new population until the crossover ratio is reached. Uniform crossover is adopted in this study. With uniform crossover, each value in the offspring chromosomes is independently chosen from the two values at the same corresponding position in the two parent chromosomes, as shown in Figure 5.
The mutation operation repeatedly selected a chromosome from the current population, modified the selected chromosome to generate a new chromosome, and added the mutant to the new population, until the mutation ratio has reached. With one-point mutation, a small random change is injected into the value of a randomly selected position in the selected chromosome to generate the mutant, as shown in Figure 6. Mutation operation makes the chromosome population more diverse.

Step 4. Select the best chromosome.
After one evolution, the fitness value is calculated for the retained chromosomes, and the best chromosome is retained. Compare the fitness value of the chromosome with the maximum fitness value and the best chromosome of the previous generation. The best chromosome is recorded. Finally, the chromosome with the best fitness value is used to initialize the weighting matrix in the LSTM, and the training data is fed to the LSTM to generate the fitness value of the chromosome.

Step 5. Stop criterion
If the fitness value of the best chromosome is already optimal, then the LSTM of the best chromosome is adopted, and the proposed method is terminated. The parameters of LSTM are initialized with the optimal weights to obtain the optimal network structure.
In this paper, the original real data set is divided into three training sets and a test set. Feature engineering processing is carried out by means of the weighted discretization method. The input features processed by the weighting method are more valuable, and then the IGA is used to select the optimal parameters of the LSTM network. The LSTM network after parameter tuning is used to train and predict real data. The specific process is shown in Figure 7.

4. Case Study

In order to evaluate the prediction performance, the mean absolute percentage error and forecasting accuracy are set according to the load forecasting indexes evaluated by State Grid Corporation of China. The specific formulas are as follows:where is the total number of predictions and and are the real value and the predicted value of the load at time respectively.

4.1. Analysis of Experimental Results

After training and verification of the proposed model, this paper conducted day-ahead short-term load forecasting from 2009 to 2010 and calculated the and the of the parameter-tuned SVM model and RF model. The results are shown in Table 1. It can be seen from the table that whether it is a one-day or half a year, of the proposed model is the smallest and is the greatest and the goodness of fit is the best of all models, which shows that the method proposed in this paper is more accurate and the robustness is better.

Experimental verification shows that the comparison between the four methods and the real load curve is shown in Figure 8. It can be seen from the figure that the load curve predicted by the model proposed in this paper has the highest degree of fit with the real curve. The prediction results are more accurate than the other three methods. In order to further evaluate the performance of the model, this article compares the calculation speed of each model. The average calculation time of this model is 7.96 s, while the average calculation speeds of SVM, RF, and GRU are 11.14 S, 9.86 S, and 8.03 s, respectively. Through the comparison of average calculation time, it can also be seen that the model proposed in this article has certain advantages compared with other models.

5. Conclusions

In view of the phenomenon that user-side DR is highly uncertain and load prediction becomes more difficult, this paper selects regions with relatively perfect demand-side management as target regions and puts forward a short-term load prediction method that takes DR into consideration. In this paper, the weighted discretization method is used to process the input features and enhance the contribution degree of input features. Then, IGA is used to select the optimal model parameters of LSTM. After that, the LSTM prediction model is established for load prediction. Finally, the effectiveness and superiority of the proposed method are verified based on the actual data, and the following conclusions are drawn.(1)Considering a variety of load influencing factors, this paper uses the weighted discretization method to process input characteristics. And the maximum information coefficient method is used to verify the real-time electricity price characteristics selected in this paper have a strong correlation with load.(2)In this paper, the IGA algorithm is used to select the optimal LSTM parameters.(3)The LSTM model has a special forgetting gate mechanism, which can automatically screen the input variables that are beneficial to the model during the training process. It cuts down the prediction time on the basis of improving the model performance and prediction accuracy.

Data Availability

The data used in the study are available at http://www.aemo.com.au.

Conflicts of Interest

The authors declare no conflicts of interest.


This work was supported by National Key Research and Development Plan (2019YFF0301505); Liaoning Natural Science Foundation (2019-ZD-0682); and Education Department of Liaoning Province Science and Technology Research Projects (LNJC201912).