Electric power spot price prediction method based on wavelet transform and deep belief network
Through the combination of wavelet transformation and deep confidence network, decomposition and pre-training electricity price data is solved, and the problem of insufficient sensitivity to electricity price time characteristics of the neural network combination model is achieved, achieving higher prediction accuracy and efficiency of spot electricity price.
Patent Information
- Application Number
- CN202410821219.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-11-12
AI Technical Summary
The existing neural network combination model is insufficiently sensitive to the time characteristics of electricity price fluctuations in electricity price prediction, resulting in low prediction accuracy.
Wavelet transform is used to decompose historical data into components of different frequency and time scales, and combined with deep confidence networks for layered pre-training and fine-tuning, and optimize parameters through constrained Boltzmann machine and BP algorithm to improve the accuracy of the prediction model.
It significantly improves the accuracy and efficiency of spot price prediction of electricity, can accurately capture the details and trends of electricity price fluctuations, and reduces prediction errors.
Smart Images

Figure CN118941311A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electricity price prediction, and in particular to a method for predicting electricity spot prices based on wavelet transform and deep belief network. Background Art
[0002] As the core element of the power market, electricity prices are directly related to the interests of market participants and become an important basis for them to formulate strategies and make decisions. In the daily operation of the power market, electricity prices are affected by many factors, including supply and demand, policy regulation, weather conditions, etc. These factors make electricity prices complex and changeable. Therefore, improving the accuracy of electricity price forecasts is undoubtedly the key to maximizing benefits for market participants.
[0003] In recent years, with the rapid development of technologies such as big data and artificial intelligence, electricity price forecasting methods are constantly being innovated. Among them, the combination model based on neural network has attracted much attention due to its superior performance in processing nonlinear and complex data. These combination models integrate multiple neural network models and use their respective advantages to jointly improve the prediction accuracy. However, although these combination models have achieved certain results in electricity price forecasting, they still face some challenges and limitations.
[0004] Electricity price fluctuations have obvious time characteristics, that is, electricity prices show different changing trends in different time periods. However, the current neural network combination models still have certain limitations in capturing this time characteristic. They tend to pay too much attention to the overall trend of the data and ignore the changing laws of the data in the time dimension. These combination models are not sensitive enough to the time characteristics of electricity price fluctuations, which may result in the model being unable to accurately capture the details of electricity price fluctuations when predicting electricity prices, thus affecting the prediction accuracy.
[0005] Wavelet transform can decompose time series data into components of different frequencies and time scales, thereby revealing the intrinsic structure and changing patterns of the data. Deep belief networks can better capture the temporal characteristics of electricity price fluctuations. The combination of the two methods can decompose the original electricity price signal, and then provide good initial values for all parameters through layered pre-training, which has higher prediction accuracy than other single-layer neural networks.
[0006] Therefore, the present invention combines the prediction model of wavelet transform and deep belief network to predict the day-ahead electricity price in the electricity spot market, and proposes an electricity spot price prediction method based on wavelet transform and deep belief network. Summary of the invention
[0007] The purpose of the present invention is to provide a method for predicting electricity spot prices based on wavelet transform and deep belief network, so as to solve the problem that the more advanced electricity price prediction methods at home and abroad proposed in the above background technology are combination models based on neural networks, and these combination models are not sensitive enough to the time characteristics of electricity price fluctuations, and the prediction accuracy still needs to be improved.
[0008] To achieve the above object, the present invention provides the following technical solution: a method for predicting electricity spot prices based on wavelet transform and deep belief network, comprising the following steps:
[0009] S1. Data collection and normalization: Based on the identification of the main factors affecting electricity prices, historical data of wind power generation, total power generation and total power consumption in the forecast area are collected as basic data for electricity price forecasting, and the data are normalized;
[0010] S2. Historical data decomposition: Use wavelet transform to decompose historical data into an approximate value An and multiple small values Dn, as shown in formula (1):
[0011]
[0012] Among them, φ is the mother wave; m and n are two integer variables that determine the scaling and translation parameters of φ; is the indicator of discrete time; T is the length of the signal f(t);
[0013] S3, layered pre-training, provides initial values for all parameters based on a deep belief network; each time an independent deep belief network is pre-trained using a restricted Boltzmann machine to calculate and iteratively update the offsets of the relevant descriptions of explicit and implicit elements.
[0014] S4, fine-tuning, solving the optimal value according to the network structure: Repeat the process of step S3, appropriately initialize the number of neurons in each layer of the deep belief network based on the layered pre-training method, and fine-tune the parameters under supervision until the loss function of DBN reaches the minimum value.
[0015] Preferably, in step S3, the specific steps of calculating and iteratively updating the relevant description parameters are as follows:
[0016] A1. Define the energy function E(v,h) and related parameters a i , b i , the deep belief network uses a restricted Boltzmann machine to reflect the probability distribution from the visible layer to the hidden layer through the energy function, as shown in formula (2):
[0017]
[0018] Among them, v i For the display element, h j is the hidden element, ai , b j are their offsets, w i is the connection weight;
[0019] A2. Define the probability distribution of the explicit layer and the hidden layer;
[0020] A3. Define the weight W between each visible element and hidden element;
[0021] A4. Calculate the conditional distribution probability of explicit and implicit elements;
[0022] A5. Calculate the probability P(v) of the visible vector on all hidden units.
[0023] A6. Calculate the objective function L θS ;
[0024] A7. According to the derivative of the objective function L, i , b i , W is updated.
[0025] Preferably, in step A2, the calculation process is as shown in formulas (3) and (4):
[0026]
[0027] Where Z is the normalization constant of the distribution function.
[0028] Preferably, in step A3, the calculation process is as shown in formula (5):
[0029]
[0030] Among them, w i , j is the weight value from the i-th visible element to the j-th hidden element, M and N are the number of visible elements and hidden elements respectively.
[0031] Preferably, in step A4, the calculation process is as shown in formulas (6) and (7) respectively:
[0032]
[0033]
[0034] Preferably, in step A5, specifically, referring to formulas (3) and (4), the objective function of the deep belief network is subjected to stochastic gradient ascent using a restricted Boltzmann machine, as shown in formula (8):
[0035]
[0036] Preferably, in step A6, the calculation process is as shown in formula (9):
[0037]
[0038] Where θ∈{a,b,W} and S is the training dataset.
[0039] Preferably, in step A7, the calculation process is as shown in formulas (10), (11), and (12):
[0040] W t+1 =W t +η(P(h|v (0) )[v (0) ] T -P(h|v (1) )[v (1) ] T ) (10)
[0041]
[0042] Among them, t is the time step and η is the learning rate.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] The present invention collects historical data of wind power generation, total power generation and total power consumption by identifying the main factors of electricity price, and performs normalization processing. Then, the historical data is decomposed into multiple frequencies using wavelet transform, and the electricity price data is decomposed into approximate values and small values using Mallat algorithm. Based on the deep belief network, the initial values are provided for the parameters, and unsupervised learning pre-training is performed through the restricted Boltzmann machine. After exploring the optimal network structure, the parameters are fine-tuned under supervision until the loss function is minimized. The BP algorithm is used for fine-tuning to improve the prediction accuracy and efficiency. Combining the advantages of wavelet transform and deep belief network, the prediction effect of electricity spot price is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A flow chart of a method for predicting electricity spot prices based on wavelet transform and deep belief network according to the present invention;
[0046] Figure 2 The present invention provides a wavelet multi-level decomposition process of an electricity spot price prediction method based on wavelet transform and deep belief network;
[0047] Figure 3 The prediction results of the electricity spot price prediction method based on wavelet transform and deep belief network of the present invention are compared with the actual electricity price. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the implementation regulations described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] Example
[0050] like Figure 1 As shown, a method for predicting electricity spot prices based on wavelet transform and deep belief network specifically includes the following steps:
[0051] (1) Data collection and normalization: Based on the identification of the main factors affecting electricity prices, historical data on wind power generation, total power generation and total electricity consumption in the forecast area are collected as the basic data for electricity price forecasting, and the data are normalized.
[0052] Normalizing data is an important step in electricity price forecasting. By analyzing and processing historical data, we can better understand the relationship between various factors and build a more accurate forecasting model. Normalization can help us eliminate the dimensional differences between data, making the comparison between different indicators more comparable, and providing a more reliable basis for subsequent data analysis and modeling. In the process of electricity price forecasting, accurate basic data and effective data processing methods are the key to ensuring the accuracy and reliability of forecast results.
[0053] (2) Historical data decomposition: Use wavelet transform to decompose historical data into multiple frequencies to avoid the influence of nonlinear and non-stationary factors, so that the data has better performance in terms of variance and outliers. By decomposing the data, we can better understand the structure of the data and find the hidden patterns and laws in the data. This decomposition processing method can play an important role in the fields of data analysis and financial market forecasting, and improve the accuracy and reliability of data processing.
[0054] The Mallat-based fast discrete wavelet transform algorithm is used to assist the calculation, so that the historical electricity price data can be decomposed into an approximate value (An) and multiple small values (Dn), such as Figure 2 shown.
[0055] The discrete form is used to improve efficiency, as shown in formula (1):
[0056]
[0057] Among them, φ is the mother wave; m and n are two integer variables that determine the scaling and translation parameters of φ; is the indicator of discrete time; and T is the length of the signal f(t).
[0058] (3) Layered pre-training, based on deep belief networks to provide initial values for all parameters: Deep Belief Networks (DBN) is a special neural network structure that uses restricted Boltzmann machines (RBM) as the unsupervised learning sub-part of its building block. This structure enables DBN to show excellent performance in data representation and feature learning.
[0059] The restricted Boltzmann machine is a two-layer neural network structure, consisting of a visible layer (VL) composed of visible elements and a hidden layer (HL) composed of hidden elements. The visible layer is mainly used to receive and process input data, while the hidden layer is responsible for detecting and extracting the intrinsic features of the data. This hierarchical structure enables RBM to effectively learn the hierarchical representation of data.
[0060] In RBM, neurons in the same layer are not connected, while neurons in different layers are bidirectionally fully connected. This connection method enables RBM to fully utilize the statistical characteristics of the input data to extract more accurate and effective features. At the same time, the information of RBM can flow in both directions, which means that during the training process, the state of the hidden layer can be adjusted according to the input of the visible layer, and the state of the visible layer can also be fed back according to the output of the hidden layer. This bidirectional flow feature increases the number of training iterations, helps to optimize the parameters of the model, and thus ensures the accuracy of the prediction model.
[0061] In addition, the deep belief network builds a deeper network structure by stacking multiple RBMs. During the training process, each RBM acts as an unsupervised learning module to extract the features of the data layer by layer. In this way, DBN can learn the deep representation of the data, thereby achieving accurate modeling and prediction of complex data. The deep belief network achieves unsupervised learning of data by using restricted Boltzmann machines as building blocks. The hierarchical structure and bidirectional connection characteristics of RBM enable DBN to learn the intrinsic characteristics of the data and build an accurate prediction model.
[0062] Each time an independent RBM is pre-trained, the relevant description parameter a is calculated and iteratively updated according to the following process: i , b i 、W.
[0063] ①Define the energy function E(v,h) and related parameters a i , b i , RBM reflects the probability distribution from the visible layer to the hidden layer through the energy function, as shown in formula (2):
[0064]
[0065] Among them, v i For the display element, h j is the hidden element, a i , b j are their offsets, w i is the connection weight.
[0066] ② Define the probability distribution of the explicit layer and the hidden layer, as shown in formulas (3) and (4):
[0067]
[0068] Where Z is the normalization constant of the distribution function.
[0069] ③ Define the weight W between each visible element and hidden element, as shown in formula (5):
[0070]
[0071] Among them, w i , j is the weight value from the i-th visible element to the j-th hidden element, M and N are the number of visible elements and hidden elements respectively.
[0072] ④ Calculate the conditional distribution probability of the explicit element and the implicit element, as shown in formulas (6) and (7) respectively:
[0073]
[0074] ⑤ Calculate the probability P(v) of the visible vector on all hidden units. Specifically, refer to formulas (3) and (4) and perform stochastic gradient ascent on the RBM objective function, as shown in formula (8):
[0075]
[0076] ⑥Calculate the objective function L θS , as shown in formula (9):
[0077]
[0078] Where θ∈{a,b,W} and S is the training dataset.
[0079] ⑦According to the derivative of the objective function L, i , b i , W is updated as shown in formulas (10), (11), and (12):
[0080] W t+1 =W t +η(P(h|v (0) )[v(0) ] T -P(h|v (1) )[v (1) ] T ) (10)
[0081]
[0082] Among them, t is the time step and η is the learning rate.
[0083] (4) Fine-tuning, exploring the optimal value according to the network structure. Repeat the above process, appropriately initialize the number of neurons in each layer of DBN based on the layered pre-training method, and fine-tune the parameters under supervision until the loss function of DBN reaches the minimum value.
[0084] The BP algorithm (back propagation algorithm) is used for the above processing. In the supervised fine-tuning process, the BP algorithm first adopts a top-down working method according to a certain cycle. All parameters are updated in each working cycle to reduce the prediction error. In the next step, these errors are back-propagated through the training set, and then the DBN parameters are readjusted to the optimal state.
[0085] Specifically, in the fine-tuning process of the deep belief network (DBN), the specific operation of the BP algorithm is as follows: In each working cycle, the algorithm first performs forward propagation based on the input data and the current model parameters to generate a predicted output. Then, the error between the predicted output and the true label is calculated, and this error is back-propagated back to each layer of the network layer by layer. During the back-propagation process, the algorithm calculates the gradient of the parameters of each layer, that is, the partial derivative of the error with respect to the parameter. This gradient information reflects the degree of influence of the parameter on the error, and can therefore be used to guide the direction of parameter update.
[0086] Based on the calculated gradient information, the BP algorithm will use a certain learning rate to update the parameters of each layer. The learning rate is a hyperparameter that controls the step size of parameter updates. By continuously adjusting the learning rate, we can ensure the convergence speed while avoiding the model from falling into a local optimal solution or overfitting. After multiple working cycles of iterative updates, the parameters of DBN will gradually adjust to the optimal state. At this point, the predicted output of the model will be closer to the true label, thereby achieving accurate prediction of new data.
[0087] In the present invention, by identifying the main factors affecting electricity prices, historical data of wind power generation, total power generation and total power consumption in the forecast area are collected and normalized. Then, the historical data is decomposed into multiple frequencies using wavelet transform, and the historical electricity price data is decomposed into an approximate value and multiple small values using a fast discrete wavelet transform algorithm based on Mallat. Then, initial values are provided for all parameters based on a deep belief network. The restricted Boltzmann machine is used as the unsupervised learning sub-part of the building module, and pre-training is performed by calculating and iteratively updating the relevant description parameters. Finally, the optimal value is explored according to the network structure. Repeat the hierarchical pre-training process, and fine-tune the parameters based on supervision until the loss function reaches the minimum value. The BP algorithm is used for fine-tuning to reduce the prediction error and adjust the DBN parameters to the optimal state. The advantages of wavelet transform and deep belief network are combined to improve the accuracy and efficiency of electricity spot price prediction.
[0088] In the operation of the power market, electricity price forecasting is a crucial task. Accurate electricity price forecasting can not only help companies rationally plan electricity procurement and sales strategies, but also provide strong support for the government to formulate energy policies. In recent years, with the continuous development of big data and artificial intelligence technologies, more and more researchers have begun to try to use these advanced technologies to improve the accuracy of electricity price forecasting.
[0089] In order to verify the effectiveness of the electricity spot price forecasting method based on wavelet transform and deep belief network, we selected the hourly electricity price data of the PJM power market in the United States from October 1 to November 30, 2018 as the research sample. During this period, the power market was active and the electricity price fluctuated greatly, providing a rich data foundation for the forecasting model.
[0090] In the data processing stage, we used the first 960 hours of data as the training set to train the prediction model, and the last 504 hours of data as the prediction set to test the prediction performance of the model. Through reasonable data division, we ensure that the model can fully learn the inherent laws of the data during the training process, and can truly reflect the prediction ability of the model in the prediction stage.
[0091] In terms of model construction, we adopted a method for predicting electricity spot prices based on wavelet transform and deep belief network. Wavelet transform is an effective signal processing method that can decompose raw data into components of different frequencies, thereby revealing the intrinsic characteristics of the data. Deep belief network is a powerful deep learning model that can automatically learn the complex nonlinear relationships of data. By combining these two technologies, we can achieve accurate prediction of electricity spot prices.
[0092] During model training, we set the learning rate to 0.9 and the number of RBM layers to 4. The selection of these parameters is crucial to the performance of the model. The learning rate determines the learning speed of the model during training, while the number of RBM layers affects the complexity and expressiveness of the model. Through multiple experiments and adjustments, we found the best parameter combination for this study.
[0093] In order to verify the prediction performance of the model, we used Matlab software to perform simulations. Through the simulation experiment, we obtained the electricity price forecast results on December 1, 2018. Then, we compared the forecast results with the actual electricity price data. Figure 3 As shown in the figure, the prediction results are highly consistent with the actual data, and the prediction error is only 0.85%. This result shows that the electricity spot price prediction method based on wavelet transform and deep belief network has high accuracy and can provide strong support for the operation of the electricity market.
[0094] In addition, we conducted an in-depth analysis of the forecast results. We found that the forecast model performed well in capturing the trend of electricity price fluctuations and was able to accurately predict the peak and valley periods of electricity prices. At the same time, the model was also able to predict the amplitude and frequency of electricity price fluctuations to a certain extent. These characteristics make our forecasting method highly practical and instructive.
[0095] Through this experimental verification, we have proved that the electricity spot price forecasting method based on wavelet transform and deep belief network has high accuracy and practicality, providing more accurate and reliable support for the operation and development of the power market.
[0096] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting electricity spot prices based on wavelet transform and deep belief network, characterized in that: The following steps are involved: S1. Data collection and normalization: Based on the identification of the main factors affecting electricity prices, historical data of wind power generation, total power generation and total power consumption in the forecast area are collected as basic data for electricity price forecasting, and the data are normalized; S2. Historical data decomposition: Use wavelet transform to decompose historical data into an approximate value An and multiple small values Dn, as shown in formula (1): Among them, φ is the mother wave; m and n are two integer variables that determine the scaling and translation parameters of φ; is the indicator of discrete time; T is the length of the signal f(t); S3, layered pre-training, providing initial values for all parameters based on a deep belief network; Each time, an independent deep belief network is pre-trained using a restricted Boltzmann machine to calculate and iteratively update the offsets of the relevant description explicit and implicit elements; S4, fine-tuning, solving the optimal value according to the network structure: Repeat the process of step S3, appropriately initialize the number of neurons in each layer of the deep belief network based on the layered pre-training method, and fine-tune the parameters under supervision until the loss function of DBN reaches the minimum value.
2. The method for predicting electricity spot prices based on wavelet transform and deep belief network according to claim 1 is characterized in that: In step S3, the specific steps of calculating and iteratively updating the relevant description parameters are as follows: A1. Define the energy function E(v,h) and related parameters a i , b i , the deep belief network uses a restricted Boltzmann machine to reflect the probability distribution from the visible layer to the hidden layer through the energy function, as shown in formula (2): Among them, v i For the display element, h j is the hidden element, a i , b j are the offsets of explicit and implicit pixels respectively, w i is the connection weight; A2. Define the probability distribution of the explicit layer and the hidden layer; A3. Define the weight W between each visible element and hidden element; A4. Calculate the conditional distribution probability of explicit and implicit elements; A5. Calculate the probability P(v) of the visible vector on all hidden units. A6. Calculate the objective function L θS ; A7. According to the derivative of the objective function L, i , b i , W is updated.
3. The method for predicting electricity spot prices based on wavelet transform and deep belief network according to claim 2 is characterized in that: In step A2, the calculation process is shown in formulas (3) and (4): Where Z is the normalization constant of the distribution function.
4. The method for predicting electricity spot prices based on wavelet transform and deep belief network according to claim 3 is characterized in that: In step A3, the calculation process is shown in formula (5): Among them, w i , j is the weight value from the i-th visible element to the j-th hidden element, M and N are the number of visible elements and hidden elements respectively.
5. The method for predicting electricity spot prices based on wavelet transform and deep belief network according to claim 4 is characterized in that: In step A4, the calculation process is shown in formulas (6) and (7):
6. The method for predicting electricity spot prices based on wavelet transform and deep belief network according to claim 5 is characterized in that: In step A5, specifically, referring to formulas (3) and (4), the objective function of the deep belief network is subjected to stochastic gradient ascent using the restricted Boltzmann machine, as shown in formula (8):
7. The method for predicting electricity spot prices based on wavelet transform and deep belief network according to claim 6, characterized in that: In step A6, the calculation process is shown in formula (9): Where θ∈{a,b,W} and S is the training dataset.
8. The method for predicting electricity spot prices based on wavelet transform and deep belief network according to claim 7 is characterized in that: In step A7, the calculation process is shown in formulas (10), (11), and (12): W t+1 =W t +η(P(h|v (0) )[v (0) ] T -P(h|v (1) )[v (1) ] T ) (10) Among them, t is the time step and η is the learning rate.
