A short-term load forecasting method based on VMD decomposition and improved two-layer BILSTM network
Through VMD decomposition and improved bilayer BiLSTM network, the problems of high model complexity and modal aliasing in short-term power load prediction are solved, achieving higher prediction accuracy and stability.
Patent Information
- Application Number
- CN202111324025.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-11-10
AI Technical Summary
The existing short-term power load prediction methods have high model complexity when dealing with complex historical load sequences, making it difficult to make full use of implicit information. In addition, signal decomposition methods such as WT and EMD have difficulty in selecting basis functions or modal aliasing, which affects the prediction accuracy.
Variable modal decomposition (VMD) is used to decompose the load data, and combined with the improved bilayer bidirectional long and short-term memory network (BiLSTM) model, the training stability and prediction accuracy of the model are improved by optimizing hyperparameters and training methods.
It effectively reduces model training errors, improves prediction accuracy and stability, overcomes the basis function sensitivity and modal aliasing problems of traditional methods, and improves the accuracy and generalization ability of load prediction.
Smart Images

Figure CN114330814B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a short-term load forecasting method based on VMD decomposition and an improved double-layer BILSTM network, belonging to the technical field of short-term power load forecasting. Background Art
[0002] In the context of building smart grids, accurate short-term power load forecasting plays a significant role in the safe and stable operation and efficient dispatch of power grids.
[0003] In recent years, with the continuous increase in computing power and the continuous improvement of artificial intelligence algorithms, a series of cutting-edge forecasting methods, represented by machine learning and deep learning, have been widely applied to short-term power load forecasting. These mainly include traditional machine learning algorithms such as support vector machines (SVM) and random forests, as well as typical deep learning algorithms such as echo state networks, deep belief networks, convolutional neural networks (CNN), and recurrent neural networks (RNN). In addition, some successful algorithms in the fields of machine vision and natural language processing, such as residual networks (ResNet), attention mechanisms, and sequence-to-sequence (seq2seq) structures, have also been applied to load forecasting problems. Among them, by adding a "gating" mechanism, long short-term memory neural networks (LSTM) reduce the long-term dependencies that occur in RNNs, enabling significant progress in modeling complex time series forecasting problems.
[0004] In order to further improve the accuracy of short-term load forecasting, some researchers have studied the application of signal decomposition methods to the decomposition and processing of load data. Common sequence decomposition methods include Wavelet Transform (WT), Empirical Mode Decomposition (EMD), and Variational Mode Decomposition (VMD). When processing non-stationary sequences, WT is greatly affected by the basis function and order. Selecting the appropriate basis function and order increases the complexity of load forecasting. EMD is an adaptive decomposition method, but the number of subsequences decomposed for sequences of different lengths cannot be unified, and modal aliasing is prone to occur.
[0005] Therefore, how to process complex historical load series with lower model complexity, make full use of the implicit information therein, and improve prediction accuracy remains the focus of current research. Summary of the Invention
[0006] Objective: To overcome the shortcomings of the existing technology, the present invention provides a short-term load forecasting method based on VMD decomposition and an improved two-layer BILSTM network.
[0007] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A short-term load forecasting method based on VMD decomposition and an improved two-layer BILSTM network includes the following steps:
[0009] An improved two-layer BiLSTM network load forecasting model is constructed, hyperparameters are set, and the improved two-layer BiLSTM network load forecasting model is trained using the training set and validation set to obtain network parameters and obtain the trained improved two-layer BiLSTM network load forecasting model.
[0010] The load sequence corresponding to the historical moment, the load subsequence after VMD decomposition, and the temperature sequence are input into the trained improved two-layer BiLSTM network load forecasting model to obtain the load forecast result at time t+1.
[0011] As a preferred solution, the improved two-layer BiLSTM network load forecasting model includes: a first-layer BiLSTM network, a second-layer BiLSTM network, and a fully connected linear layer, wherein the first-layer BiLSTM network, the second-layer BiLSTM network, and the fully connected linear layer are connected in sequence; the load sequence corresponding to the historical moment after data normalization is respectively input into the first-layer BiLSTM network, the fully connected linear layer, the load subsequence after VMD decomposition after data normalization, and the temperature sequence after data normalization are all input into the first-layer BiLSTM network; the output of the first-layer BiLSTM network is respectively input into the second-layer BiLSTM network and the fully connected linear layer; the output of the second-layer BiLSTM network is input into the fully connected linear layer, and the fully connected linear layer obtains the load prediction result at time t+1 based on the output of the first-layer BiLSTM network, the output of the second-layer BiLSTM network, and the load sequence corresponding to the historical moment after data normalization.
[0012] As a preferred solution, the method for training the improved two-layer BiLSTM network load forecasting model using a training set and a validation set includes the following steps:
[0013] The improved two-layer BiLSTM network load forecasting model is iteratively trained using the training set data. After each complete training, the prediction effect of the network is verified using the validation set data. The MAPE of the current network on the validation set is compared with the validation set MAPE error of the historical optimal network. If the prediction error of the current network on the validation set is lower, the optimal error is updated, the current network parameters are saved, and training is continued after updating the learning rate until the maximum number of iterations is reached. After the iteration is completed, the optimal network parameters obtained are the network parameters with the smallest validation set error.
[0014] As a preferred solution, the training set accounts for 6 / 10 of the data set, and the validation set accounts for 2 / 10 of the data set. The data set includes: a historical load sequence normalized to the interval [-1, 1], 5 load subsequences decomposed from the historical load sequence by the VMD method, and a temperature sequence.
[0015] As a preferred solution, the temperature sequence is completed into a sequence with a sampling period of 1 hour through linear interpolation.
[0016] As a preferred solution, the hyperparameters include: setting the time window length T, setting the loss function, setting the number of data pairs in each batch used for training, setting the optimizer used for model training, setting the initial learning rate, and the learning rate update strategy.
[0017] As a preferred solution, T=48, that is, using historical data of 48 data points in the past two days to predict the power load in the next hour; taking the mean absolute error as the loss function; setting the number of data pairs in each batch used for training to 128; setting the optimizer used for model training to Adam optimizer, and setting the initial learning rate to 0.01, and the learning rate update strategy to decrease by 30% every 10 times.
[0018] As a preferred solution, the improved two-layer BiLSTM network load forecasting model is evaluated by using the performance of the test set accounting for 2 / 10 of the data set in terms of MAE, root mean square error and MAPE as evaluation indicators of the load forecasting task.
[0019] Beneficial effects: The present invention provides a short-term load forecasting method based on VMD decomposition and an improved two-layer BILSTM network, which has the following technical effects:
[0020] The WT method is highly sensitive to settings such as basis functions and orders, and the EMD method is prone to modal aliasing. The variational mode decomposition (VMD) method can overcome modal aliasing and has greater advantages in processing nonlinear and non-stationary sequences. The present invention proposes a load data preprocessing method based on VMD decomposition, which decomposes complex load time series into several subsequences with more concentrated frequencies and more prominent periodicity. The present invention proposes a short-term load forecasting model based on an improved two-layer BiLSTM network. The "gate" mechanism of LSTM is used to effectively solve the long-term dependency problem in RNN. BiLSTM, which adds a reverse input information module on the basis of LSTM, can mine more contextual information from the input data. The improvement proposed by the present invention is to directly skip some or all network layers for some data, changing the structure of traditional neural networks where the output of the previous layer can only serve as the input of the next layer. This allows these data to skip linear or nonlinear transformations in some network layers, effectively reducing training error and improving training stability. By optimizing and rationally formulating model optimization methods and setting hyperparameters, the training speed of the prediction model is improved, the convergence trend of the model error is guaranteed, and falling into local optimality is avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a diagram of the original load series and the five IMF component series for a certain week.
[0022] Figure 2 It is a graph of hourly load and hourly temperature after interpolation processing for a certain month.
[0023] Figure 3 This is the internal structure diagram of the LSTM unit corresponding to t time step input.
[0024] Figure 4 This is a schematic diagram of the BiLSTM network structure.
[0025] Figure 5 This is a structural diagram of the prediction model based on VMD decomposition and improved two-layer BiLSTM network.
[0026] Figure 6 It is a framework diagram of model parameter optimization.
[0027] Figure 7 This is a comparison chart of the predicted value and the true value of the model of the present invention on the test set.
[0028] Figure 8 This is a locally enlarged diagram comparing the predicted value and the true value of the model of the present invention on the test set.
[0029] Figure 9 This is a comparison chart of the prediction results of a certain day in the test set of various models. DETAILED DESCRIPTION
[0030] The present invention will be further described below with reference to specific embodiments.
[0031] A short-term load forecasting method based on variational mode decomposition (VMD) and an improved bidirectional long short-term memory (BiLSTM) network is characterized by the following specific implementation steps:
[0032] Step 1: Load data preprocessing method based on VMD decomposition, specifically: decompose the historical load series into 5 subsequences using the VMD method; perform linear interpolation on the temperature data and complete the hourly temperature data; normalize all types of data; and divide the dataset into training set, validation set, and test set in a ratio of 6:2:2.
[0033] Step 2: Based on the PyTorch deep learning framework provided by the Python platform, an improved two-layer BiLSTM network load forecasting model is created. Specifically, the output of the entire two-layer BiLSTM network, the output of the first-layer BiLSTM network, and the original load data are concatenated, and then transformed through a fully connected linear layer to obtain the final prediction result.
[0034] Step 3: Model parameter optimization method and hyperparameter setting, specifically: setting the time window length T used by the prediction model; using MAE as the loss function for model training; setting the number of data pairs in each training batch; selecting the Adam optimizer and the corresponding learning rate update strategy.
[0035] Step 4: The proposed model is verified by using the hourly electricity load records of a residential area in Nanjing from January 1, 2016 to December 31, 2017 as a data set. After training, the prediction effect of the present invention is evaluated using the performance of the test set data on various evaluation indicators, and the error is compared with other models.
[0036] The load data preprocessing method based on VMD decomposition in step 1 includes: decomposing the historical load sequence into 5 subsequences through the VMD method, so that the amplitude and frequency are more stable and the periodicity is obvious.
[0037] Since the sampling interval of load data is 1 hour, while the sampling interval of temperature data collected by the corresponding meteorological station is 3 hours, in order to match the load data, linear interpolation processing is performed on the temperature data to complete the hourly temperature data.
[0038] In order to match the input data with the sensitive interval of the activation function [-1, 1] in the network model and avoid the difficulty of network parameter convergence caused by large differences in values, the temperature data, load data, and decomposed subsequence data are normalized, and the data with different value intervals in each group are normalized to the interval [-1, 1].
[0039] In order to meet the actual application scenarios, the dataset is divided into training set, validation set and test set in a ratio of 6:2:2.
[0040] The improved two-layer BiLSTM network load forecasting model based on PyTorch established in step 2 includes: assuming that t+1 is the time when the load is to be predicted, tT to t are the historical times used for prediction, and the load sequence corresponding to the historical times, the load subsequence after VMD decomposition, and the temperature sequence are input into the improved two-layer BiLSTM network. The improved two-layer BiLSTM network splices the output of the entire two-layer BiLSTM network, the output of the first-layer BiLSTM network, and the original load data, and then transforms them through the fully connected linear layer to obtain the final prediction result of the load at time t+1.
[0041] The model parameter optimization method described in step 3 includes: iteratively training the improved two-layer BiLSTM network using the training set data. After each complete training, the network's prediction effect is verified using the validation set data. The mean absolute percentage error (MAPE) of the current network on the validation set is compared with the validation set MAPE error of the historical optimal network. If the current network's prediction error on the validation set is lower, the optimal error is updated, the current network parameters are saved, and training is continued after updating the learning rate until the maximum number of iterations is reached. After the iteration is completed, the optimal network parameters obtained are the network parameters with the smallest validation set error. Finally, the network's prediction effect is tested using the test set data.
[0042] The hyperparameter settings in step 3 include: setting the time window length T used by the prediction model, preferably, taking T = 48, that is, using historical data of 48 data points in the past 2 days to predict the power load in the next 1 hour; setting the loss function for model training, preferably, taking the mean absolute error (MAE) as the loss function; setting the number of data pairs in each batch used for training, preferably, taking 128; setting the optimizer used for model training, preferably, taking the Adam optimizer, and setting the initial learning rate to 0.01, and the learning rate update strategy to decrease by 30% every 10 times.
[0043] Step 4 validates the model using a real-world example. Specifically, the model uses hourly electricity load records from a residential complex in Nanjing from January 1, 2016, to December 31, 2017, as a dataset. The commonly used load forecasting metrics, MAE, root mean square error (MSE), and MAPE, are used as evaluation indicators for load forecasting tasks. After training, the model's prediction performance on the test set is evaluated on each metric, and the error is compared with that of other models.
[0044] This paper proposes a short-term load forecasting method based on VMD decomposition and an improved two-layer BiLSTM network. The short-term power load forecasting model is trained and tested based on the PyTorch framework. The detailed technical solution process is as follows:
[0045] 1. Load data preprocessing method based on VMD decomposition
[0046] 1.1. VMD Decomposition of Load Data
[0047] The WT method is highly sensitive to settings such as basis functions and orders, and the EMD method is prone to modal aliasing. The VMD method can specify the number of decomposed subsequences, overcome the modal aliasing phenomenon, and has more advantages in processing nonlinear and non-stationary sequences. Therefore, the present invention proposes a load data preprocessing method based on VMD decomposition.
[0048] VMD is a multi-scale frequency decomposition method proposed by Dragomiretskiy et al. in 2014. It can decompose a relatively complex multi-frequency input signal f(t) into K frequency centers with ω k The AM / FM component signal u k (t), and is called the Intrinsic Mode Function (IMF). Since the goal in the solution process is to minimize the sum of the bandwidths of all IMFs, the decomposed IMF has a finite bandwidth.
[0049] The estimation of each IMF bandwidth can be done as follows:
[0050] (1) Obtain the one-sided spectrum of each IMF through Hilbert transform.
[0051] (2) The spectrum of each IMF is modulated to the base frequency using the estimated center frequency.
[0052] (3) Calculate the sum of the square norms of the demodulated signal gradients of each IMF to estimate the total bandwidth of each IMF.
[0053] Then the VMD decomposition can be converted into finding the optimal solution to a constrained variational problem:
[0054]
[0055] Where δ(t) is the Dirac function, Denotes the derivative of · with respect to t.
[0056] To solve this variational problem, the constrained problem can be transformed into an unconstrained problem by introducing the Lagrange multiplier λ. At the same time, a penalty factor α is introduced to avoid information loss and over-decomposition, ensuring reconstruction accuracy. The extended Lagrangian expression for this problem is:
[0057]
[0058] Alternate Direction Method of Multipliers (ADMM) is used to update u alternately. k and ω k , to solve the above unconstrained problem, the calculation steps are as follows:
[0059] (1) Initialization Obtain the frequency domain value of each parameter through Fourier transform;
[0060] (2) n = n + 1, for k = 1:K, update u k and ω k :
[0061]
[0062]
[0063] (3) Update λ:
[0064]
[0065] (4) If
[0066]
[0067] Then stop the iteration, and the K IMFs at this time are the output results; otherwise, return to step (2).
[0068] Among them, the judgment accuracy ε>0, and They are Fourier transform of f(ω) and λ(ω), where n is the number of iterations.
[0069] This paper uses the measured electricity load data of a residential area in Nanjing from January 1, 2016 to December 31, 2017 as the research object, with a sampling interval of 1 hour, that is, 24 sampling points per day. The load sequence is decomposed into 5 IMFs using the VMD method, where the original load sequence of 168 data in a week is compared with the 5 IMF component sequences as shown in the figure. Figure 1 As shown in the figure, it can be seen that the amplitude and frequency of each IMF after decomposition are more stable than those of the original sequence, and the periodicity is obvious.
[0070] 1.2. Interpolation of temperature data
[0071] Since the sampling time interval of the temperature data collected by the corresponding meteorological station is 3 hours, with 8 sampling points per day, in order to match the load data, the present invention performs linear interpolation processing on the temperature data and completes the hourly temperature data. Figure 2 The hourly load and interpolated temperature curves for a certain month are given.
[0072] Data Normalization
[0073] In order to match the input data with the sensitive interval of the activation function [-1, 1] in the network model and avoid the difficulty of network parameter convergence caused by large differences in values, the temperature data, load data, and decomposed IMF data are normalized, and the data with different value intervals in each group are normalized to the interval [-1, 1], that is:
[0074]
[0075] Among them, x i represents the i-th element in the original sequence, ||x| max | represents the absolute value of the element with the largest absolute value in the original sequence (taking into account the negative values in the decomposed IMF sequence), y i Indicates the corresponding x i The normalized elements of .
[0076] 1.4. Dividing the Dataset
[0077] The training set, validation set, and test set are divided into two groups in a ratio of 6:2:2. That is, the period from January 1, 2016 to April 13, 2017 is set as the training set, the period from April 14, 2017 to August 6, 2017 is set as the validation set, and the period from August 7, 2017 to December 31, 2017 is set as the test set.
[0078] 2. Establishment of short-term load forecasting model based on improved two-layer BiLSTM network
[0079] By adding a "gate" mechanism, the Long Short-Term Memory (LSTM) neural network effectively solves the long-term dependency problem in RNN and improves the network's performance in processing longer time series. The Bidirectional Long Short-Term Memory (BiLSTM) network, which adds a reverse input information module on the basis of LSTM, utilizes more contextual information in the input data than LSTM. The well-known ResNet network in deep learning is inspired by LSTM and directly skips some data over part or all of the network layers, changing the structure in which the output of the previous layer in the traditional neural network can only be used as the input of the next layer, so that these data skip the linear transformation or nonlinear transformation in some network layers, effectively reducing the training error, improving the training stability, and achieving excellent results in image processing. Therefore, the present invention improves the two-layer BiLSTM network used, and proposes a short-term load forecasting model based on the improved two-layer BiLSTM network.
[0080] The improved two-layer BiLSTM network is mainly composed of LSTM units. The internal structure of the LSTM module corresponding to time step t is as follows Figure 3 As shown, where h t-1 Represents the output information of the previous time step (also called moment or node), x t Represents the input information of the current time step, C t-1 Represents the state of the long-short-term memory cell at the previous time step. The LSTM unit uses a gate structure to forget the cell state at the previous time step, absorb and update the input information of the current time step, and filter and control the output information. The gating function is a sigmoid function, which converts the gate input into a value between 0 and 1, controlling the forgetting, updating, and output of cell state information, thus realizing the "gate" function.
[0081] Forget gate σ f Determines how much information to forget from the previous cell state. The gate t With h t-1 After merging, multiply by the forget gate weight W f And add the forget gate bias b f As the gate input, after passing through the sigmoid function, it outputs a value f between 0 and 1. t , 0 means completely forgotten, 1 means completely retained, the formula is as follows:
[0082] f t =σ(W f ·[h t-1 ,x t ]+b f ) (7)
[0083] Update gate σ i Also known as the input gate, it determines how much new input information is absorbed to update the cell state. Similar to the forget gate, the update gate function is composed of a sigmoid function, whose value i t 0 means no update, 1 means update; then the updated value of the cell state is generated by the tanh function The formula is as follows:
[0084] i t =σ(W i ·[h t-1 ,x t ]+b i ) (8)
[0085]
[0086] Among them, W i with b i are the update gate weights and biases, W C with b C are the cell state weight and bias, respectively.
[0087] The forget gate discards the old cell state information, and the update gate adds new input information. The cell state of the current time step becomes C t , the formula is as follows:
[0088]
[0089] Output gate σ o Determines which parts of the current cell state to output and filters the current cell state. Similar to the update gate, the output gate consists of two parts: the sigmoid function constitutes the output gate, and the tanh function generates the output value h. t , the formula is as follows:
[0090] o t =σ(W o ·[h t-1 ,x t ]+b o ) (11)
[0091] h t =o t *tanh(C t ) (12)
[0092] Among them, W o with b o are the output gate weight and bias respectively.
[0093] The LSTM unit can read the input data in chronological order, update the cell state and output information at the same time, and process the input sequence with a time window length of T by looping T times. The BiLSTM network is composed of two types of LSTM units, forward and reverse, which receive forward and reverse information input respectively, thereby obtaining the context information of the input data and mining more information hidden in the sequence. The BiLSTM network structure is as follows Figure 4 As shown, that is, the two LSTM modules are expanded in chronological order, where A receives input information in the same direction as time, and A′ receives input information in the opposite direction of time. A at all moments shares network parameters, and A′ at all moments also shares network parameters.
[0094] The present invention improves the two-layer BiLSTM network by concatenating the output of the entire two-layer BiLSTM network, the output of the first-layer BiLSTM network, and the original load data, and then transforming them through a fully connected linear layer to obtain the final prediction result. The formula used in the fully connected linear layer is as follows:
[0095] y=Wx T +b (13)
[0096] in, is the N-dimensional input of the linear layer, is the one-dimensional output, b is the linear layer bias, is the linear layer weight.
[0097] Figure 5 Shown is a schematic diagram of the improved two-layer BiLSTM network structure.
[0098] 3. Model parameter optimization method and hyperparameter setting
[0099] Model parameter optimization methods
[0100] Figure 6The figure shows the parameter optimization framework of the proposed model. First, the load data is decomposed using VMD. The decomposed load data and temperature data are normalized and preprocessed. The training, validation, and test sets are divided into training, validation, and test sets in a 6:2:2 ratio. After initializing the relevant hyperparameters, the improved two-layer BiLSTM network is iteratively trained using the training set data. After each complete training cycle, the network's prediction performance is verified using the validation set data. The mean absolute percentage error (MAPE) of the current network on the validation set is compared with the validation set MAPE error of the historical best network. If the current network's prediction error on the validation set is lower, the optimal error is updated, the current network parameters are saved, and training continues after updating the learning rate until the maximum number of iterations is reached. After the iterations are complete, the optimal network parameters obtained are those that minimize the validation set error. Finally, the network's prediction performance is tested using the test set data.
[0101] 3.2. Hyperparameter Settings
[0102] The present invention establishes a prediction model based on the PyTorch framework. The network parameter optimization method and various hyperparameter settings adopted are shown in Table 1.
[0103] Table 1 Relevant hyperparameter settings of the prediction model proposed in this invention
[0104] Hyperparameter Type set up Time window length T 48 Loss Function L1 loss (i.e. MAE) Batch size 128 Optimizer Adam Learning rate update strategy After every 10 iterations, update lr = lr * 0.7 Initial value of learning rate 0.01
[0105] Since the activation functions used in the BiLSTM module are the sigmoid function and the tanh function, which are symmetric about the points (0, 0.5) and (0, 0), respectively, to improve the convergence and stability of the model, the weight parameters of the BiLSTM are initialized with the Xavier normal distribution, the weight parameters of the linear module are initialized with a random normal distribution with a mean of 0 and a variance of 0.1, and all bias parameters are initialized to all 0.
[0106] 4. Example Analysis and Comparison
[0107] Evaluation metrics
[0108] The mean absolute error (MAE), root mean square error (MSE), and MAPE, which are commonly used in forecasting problems, are selected as evaluation indicators for load forecasting tasks. The relevant formulas are as follows:
[0109]
[0110]
[0111]
[0112] Where N is the total number of elements, is the predicted value, y i is the true value.
[0113] Prediction Results
[0114] Table 2 shows the various errors of the model proposed in this invention on the training set, validation set, and test set. Each time the model is fully trained using the training set data, i.e., the parameter optimization process, the prediction effect of the currently trained model is verified using the validation set data. Since the model's MAPE is verified, the MAPE of the validation set in Table 2 is the best among the three data sets. The test set data did not participate in the model training, and its error data best reflects the model's prediction effect and generalization performance. As can be seen from Table 2, the various errors of the test set are relatively close to those of the training set, which also verifies that the model has a good prediction effect on untrained data and excellent generalization performance.
[0115] Table 2 Comparison of various errors of the proposed model on different data sets
[0116]
[0117] Figure 7 The comparison between the predicted values and measured values of the model proposed in this invention on the test set. The test set data is from August 7, 2017 to December 31, 2017, including the end of summer, the whole autumn and the beginning of winter. Figure 7 It can be seen that the average load in the region is low during the autumn period from September to November, with obvious regularity of change and few sudden load changes. This model can accurately predict the load value for the next hour under such conditions of overall stability and obvious periodicity of load. The load levels in August at the end of summer and December at the beginning of winter are generally higher than those in autumn. The load variation range in August is larger and the fluctuation is more intense. At the end of August, when summer and autumn are transitioning, the electricity load in the region drops significantly and fluctuates greatly. Figure 8 A partial enlarged diagram of the prediction effect from August 24 to September 1 is further given. It can be seen that this model can accurately predict even when the actual load value changes dramatically, and can accurately track the changing trend of the actual value.
[0118] Comparative analysis
[0119] In order to further demonstrate the advantages of the model, the present invention constructed support vector regression (SVR), convolutional neural network (CNN), artificial neural network (ANN), double-layer BiLSTM, and VMD-double-layer BiLSTM models for comparison. The same data set was used to train each comparison model. The support vector regression model used the radial basis kernel function, and the convolutional neural network used the LeNet network structure. The network parameters of each comparison model and the model proposed in the present invention were initialized according to the same random seed. Figure 9 The load forecast curves for a certain day in the test set of various models are given. Figure 9 It can be seen from the figure, especially the second half, that the prediction effect of the VMD-improved two-layer BiLSTM model proposed in this invention is significantly better than that of most comparison models.
[0120] To compare the prediction performance of various models on the test set, Table 3 further presents a comparison of various errors on the test set for different model structures. The data in Table 3 also shows that the proposed model outperforms the comparison models in terms of MAE, MSE, and MAPE on the test set, achieving the most accurate prediction on the entire test set, with three-category errors of 8.6157 kW, 138.1289 kW2, and 1.9733%, respectively. Table 3 also shows that using VMD decomposition to process load data significantly improves prediction accuracy. Compared with the improved two-layer BiLSTM model without VMD decomposition, the VMD-improved two-layer BiLSTM model's test set MAE, MSE, and MAPE are reduced by 67.85%, 90.03%, and 65.63%, respectively. Furthermore, compared with the unmodified VMD-two-layer BiLSTM model, the proposed improved model achieves MAE, MSE, and MAPE reductions of 5.82%, 9.71%, and 5.35%, respectively.
[0121] Table 3 Comparison of various test set errors for different model structures
[0122]
[0123] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A short-term load forecasting method based on VMD decomposition and an improved two-layer BILSTM network, characterized by: The steps include: Build an improved two-layer BiLSTM network load forecasting model, set hyperparameters, train the improved two-layer BiLSTM network load forecasting model using the training set and validation set, obtain network parameters, and obtain the trained improved two-layer BiLSTM network load forecasting model; The load sequence corresponding to the historical moment, the load subsequence after VMD decomposition, and the temperature sequence are input into the trained improved two-layer BiLSTM network load forecasting model to obtain the load forecast result at time t+1; The improved double-layer BiLSTM network load forecasting model includes: a first-layer BiLSTM network, a second-layer BiLSTM network, and a fully connected linear layer, wherein the first-layer BiLSTM network, the second-layer BiLSTM network, and the fully connected linear layer are connected in sequence; the load sequence corresponding to the historical moment after data normalization is respectively input into the first-layer BiLSTM network, the fully connected linear layer, the load subsequence after VMD decomposition after data normalization, and the temperature sequence after data normalization are all input into the first-layer BiLSTM network; the output of the first-layer BiLSTM network is respectively input into the second-layer BiLSTM network and the fully connected linear layer; the output of the second-layer BiLSTM network is input into the fully connected linear layer, and the fully connected linear layer obtains a load forecast result at time t+1 based on the output of the first-layer BiLSTM network, the output of the second-layer BiLSTM network, and the load sequence corresponding to the historical moment after data normalization; The method for training the improved two-layer BiLSTM network load forecasting model using a training set and a validation set includes the following steps: The improved two-layer BiLSTM network load forecasting model is iteratively trained using the training set data. After each complete training, the prediction effect of the network is verified using the validation set data. The MAPE of the current network on the validation set is compared with the validation set MAPE error of the historical optimal network. If the prediction error of the current network on the validation set is lower, the optimal error is updated, the current network parameters are saved, and training is continued after updating the learning rate until the maximum number of iterations is reached. After the iteration is completed, the optimal network parameters obtained are the network parameters with the smallest validation set error.
2. The short-term load forecasting method based on VMD decomposition and improved two-layer BILSTM network according to claim 1 is characterized by: The training set accounts for 6 / 10 of the data set, and the validation set accounts for 2 / 10 of the data set. The data set includes: a historical load sequence normalized to the interval [-1, 1], 5 load subsequences decomposed from the historical load sequence by the VMD method, and a temperature sequence.
3. The short-term load forecasting method based on VMD decomposition and improved two-layer BILSTM network according to claim 2 is characterized by: The temperature series is completed into a series with a sampling period of 1 hour through linear interpolation.
4. The short-term load forecasting method based on VMD decomposition and improved two-layer BILSTM network according to claim 1 is characterized by: The hyperparameters include: setting the time window length T, setting the loss function, setting the number of data pairs in each batch used for training, setting the optimizer used for model training, setting the initial learning rate, and setting the learning rate update strategy.
5. The short-term load forecasting method based on VMD decomposition and improved two-layer BILSTM network according to claim 4 is characterized by: Take T=48, that is, use the historical data of 48 data points in the past two days to predict the power load in the next hour; take the mean absolute error as the loss function; set the number of data pairs in each batch used for training to 128; set the optimizer used for model training to Adam optimizer, set the initial learning rate to 0.01, and set the learning rate update strategy to decrease by 30% every 10 times.
6. The short-term load forecasting method based on VMD decomposition and improved two-layer BILSTM network according to claim 1 is characterized by: It also includes the evaluation of the improved two-layer BiLSTM network load forecasting model using the test set that accounts for 2 / 10 of the data set in terms of MAE, root mean square error and MAPE as evaluation indicators of the load forecasting task.