Electricity price prediction method based on variational mode decomposition and TimesNet

By combining variational mode decomposition and the TimesNet model, the problems of multi-periodicity and abnormal volatility in the electricity market are solved, enabling more flexible and accurate electricity price forecasting and adapting to complex electricity market dynamics.

CN120912243APending Publication Date: 2025-11-07GREATER BAY AREA UNIV (IN PREPARATION)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511057362.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing technologies suffer from poor forecasting flexibility and insufficient accuracy when dealing with the multi-periodic and abnormal fluctuations in the electricity market, making it difficult to adapt to complex electricity market dynamics.

Method used

The variational mode decomposition (VMD) algorithm is used to decompose the electricity price data into multiple narrowband decomposed mode functions. The center frequency mode functions are extracted by combining Hilbert transform and heterodyne demodulation. The alternating direction multiplier method is used to minimize the demodulation mode bandwidth. The different center frequency mode functions are then input into the TimesNet model for electricity price prediction.

Benefits of technology

It improves the flexibility and accuracy of electricity price forecasting, can adapt to complex electricity market scenarios, effectively removes noise and abnormal fluctuations, and enhances the robustness and adaptability of the forecasting model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912243A_ABST
    Figure CN120912243A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electricity price prediction, in particular to an electricity price prediction method based on variational mode decomposition and TimesNet, and the method comprises the steps: obtaining historical electricity price data obtained through the recognition of a historical electricity price data table of a power system, carrying out the preprocessing of the historical electricity price data, and obtaining a historical electricity price data set; a variational mode decomposition algorithm VMD is adopted to decompose the historical electricity price data set; adopting Hilbert transform and a heterodyne demodulation method in sequence to extract a center frequency mode function of each narrowband decomposition mode function; performing minimum demodulation modal bandwidth processing on the center frequency modal function based on an alternating direction multiplier method; and constructing a VMD-TimesNet model, and inputting the different center frequency modal functions into the VMD-TimesNet model to obtain an electricity price prediction result. According to the method, the problems of non-stationarity and multi-periodicity in the price sequence can be effectively solved, and the electricity price prediction accuracy is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electricity price prediction, and particularly relates to an electricity price prediction method based on variational mode decomposition and TimesNet. BACKGROUND

[0002] The electricity price prediction problem mainly faces major challenges due to the volatility and complexity of the electricity market, especially in the short-term time range. Short-term electricity prices often have non-stationary and nonlinear characteristics, influenced by demand fluctuations, supply instability, market structure changes, external shocks, and seasonality. In addition, electricity prices also exhibit multi-periodicity characteristics, including intra-period and inter-period fluctuations, which make the price show complex periodic fluctuations at different time scales. The overlap and interaction of periodic fluctuations increase the difficulty of prediction, especially when dealing with sudden and irregular price fluctuations, accurate prediction becomes more difficult.

[0003] The existing technology mainly adopts statistical methods and machine learning methods, but the existing methods perform poorly in dealing with high volatility and abnormal price patterns, and it is difficult to effectively capture these key characteristics. Specifically, statistical methods are sensitive to non-stationarity and multi-periodicity, and usually rely on fixed model assumptions, lack of flexibility, and are difficult to adapt to complex and changing electricity market dynamics, while existing machine learning methods, such as hybrid models of variational mode decomposition technology (VMD) (such as VMD-LSTM and VMD-ATT-LSTM), although have nonlinear modeling capabilities, lack a dedicated mechanism to handle multi-periodicity or abnormal fluctuations, and have poor prediction flexibility and insufficient prediction accuracy in complex scenarios. SUMMARY

[0004] The purpose of the present application is to provide an electricity price prediction method based on variational mode decomposition and TimesNet, which solves the problems of lack of mechanism to handle multi-periodicity or abnormal fluctuations, poor prediction flexibility, and insufficient prediction accuracy in the prior art.

[0005] To achieve the above-mentioned purpose, the present application provides an electricity price prediction method based on variational mode decomposition and TimesNet, comprising the following steps:

[0006] S1, obtaining historical electricity price data identified from a historical electricity price data table of an electricity system, preprocessing the historical electricity price data to obtain a historical electricity price data set;

[0007] S2, decomposing the historical electricity price data set using a variational mode decomposition algorithm VMD to obtain a plurality of narrowband decomposition modal functions;

[0008] S3, sequentially using Hilbert transform and heterodyne demodulation method to extract the center frequency modal function of each narrowband decomposition modal function;

[0009] S4, based on the alternating direction multiplier method to minimize the center frequency modal function demodulation modal bandwidth processing;

[0010] S5, based on the variational mode decomposition algorithm VMD and TimesNet to construct the VMD-TimesNet model, and input different center frequency modal functions into the VMD-TimesNet model to obtain the electricity price prediction results output by the VMD-TimesNet model based on matrix operation.

[0011] In some embodiments of the present application, in S1, the historical electricity price data identified by the historical electricity price data table of the power system are obtained, and the preprocessing of the historical electricity price data includes:

[0012] Obtaining the historical electricity price data in the preset time period extracted by the identification software based on the data identification algorithm on the historical electricity price data table, determining the abnormal data in the historical electricity price data in the preset time period, and correcting the abnormal data by using the time series interpolation method;

[0013] Comparing and analyzing the corrected historical electricity price data in the preset time period with the electricity price fluctuation, cleaning the historical electricity price data exceeding the electricity price fluctuation threshold, and obtaining the historical electricity price data set.

[0014] In some embodiments of the present application, in S2, the historical electricity price data set is decomposed by using the variational mode decomposition algorithm VMD to obtain a plurality of narrowband decomposition modal functions, which includes:

[0015] The plurality of narrowband decomposition modal functions are obtained by using the variational mode decomposition algorithm VMD, and the expression is:

[0016] {U k (t)}={u 1 (t),u 2 (t),…,u K (t)};

[0017] Wherein, U k (t) is the historical electricity price data set, K is the total number of narrowband decomposition modal functions, u K (t) is the Kth narrowband decomposition modal function, and t is the time series;

[0018] The center frequency corresponding to the plurality of narrowband decomposition modal functions is obtained, and the expression is:

[0019] {ω1,ω2,…,ω K};

[0020] Wherein, ω k is the center frequency corresponding to the kth narrowband decomposition modal function.

[0021] In some embodiments of the present application, in S3, the center frequency modal function of each narrow-band decomposed modal function is extracted by using a Hilbert transform and a heterodyne demodulation method in turn, comprising:

[0022] S31, the real value signal of u K (t) is converted into a complex value analytic signal by using a Hilbert transform, and the expression is:

[0023]

[0024] Wherein, p.v. represents the Cauchy principal value, is a complex value analytic signal, and τ is a Lagrange multiplier step length;

[0025] The analytic signal of each modal function is constructed to obtain the instantaneous amplitude and phase, and the expression is:

[0026]

[0027] Wherein, A k (t) is the instantaneous amplitude of the Kth narrow-band decomposed modal function, φ k (t) is the instantaneous phase of the Kth narrow-band decomposed modal function, z k (t) is the spectrum of the analytic signal, and j is an imaginary unit;

[0028] S32, the spectrum z k (t) of each analytic signal is moved to the center frequency by using a heterodyne demodulation method, and the expression is:

[0029]

[0030] Wherein, is the center frequency concentrated spectrum;

[0031] S33, the demodulation signal is low-pass filtered, so that u k (t) is concentrated on ω k , and the center frequency modal function is obtained.

[0032] In some embodiments of the present application, in S4, the center frequency modal function is processed by a minimum demodulation modal bandwidth based on an alternating direction multiplier method, comprising:

[0033] S41, a variational optimization model is constructed based on an alternating direction multiplier method, and the expression is:

[0034]

[0035] Wherein, is a bandwidth metric value, is an analytic signal kernel;

[0036] The constraint condition limit needs to be satisfied, and the expression is:

[0037]

[0038] Wherein, X(t) is the constraint condition;

[0039] S42, based on the alternating direction multiplier method iterative algorithm, the expression of the updated mode is obtained:

[0040] Wherein, is the Fourier transform of the kth mode, is the Fourier transform of the Lagrange multiplier, α is the bandwidth penalty parameter, n is the iteration index, is the Fourier transform of the center frequency, ω represents the frequency variable, Indicates the center frequency corresponding to the kth narrow-band decomposition mode function in the nth iteration;

[0041] The expression of the updated center frequency is:

[0042]

[0043] The expression of the updated Lagrange multiplier is:

[0044]

[0045] Wherein, τ is the Lagrange multiplier step, is the Fourier transform of the input signal.

[0046] In some embodiments of the present application, in S5, the different center frequency mode functions are input into the VMD-TimesNet model, and the electricity price prediction result output by the VMD-TimesNet model based on matrix operation includes:

[0047] S51, based on the intrinsic mode function vectors at different time points, a multi-dimensional time sequence is obtained, and the amplitude sequence generated by performing fast Fourier transform on each column of the multi-dimensional time sequence is obtained. The amplitude sequences of different time sequences are weighted and averaged to obtain an overall amplitude sequence Amp;

[0048] S52, the first m frequencies f1, f2, …, f m , in the overall amplitude sequence Amp are obtained, which have the maximum amplitude. m The number of data points in each cycle is calculated, and the calculation formula is:

[0049]

[0050] Wherein, q m is the data point, and T is the cycle.

[0051] S53, arrange each q m data points into a row, divide the multi-dimensional time series into a two-dimensional feature matrix;

[0052] S54, input the two-dimensional feature matrix into the VMD-TimesNet model to obtain the electricity price prediction result, the expression is:

[0053]

[0054] wherein H is a future time step, is the electricity price prediction result of H future time steps, is the padding matrix of the i th two-dimensional feature matrix, θ i is the feature parameter of the i th padding matrix.

[0055] In some embodiments of the present application, S5 further comprises:

[0056] S55, train the VMD-TimesNet model parameters based on minimizing the loss function, the expression is:

[0057]

[0058] The advantages and beneficial effects of the present application relative to the prior art are:

[0059] 1. The VMD-TimesNet model combines the signal decomposition advantages of VMD and the powerful time series prediction ability of TimesNet. TimesNet is a model based on the Transformer architecture, which can handle complex time series data. In complex scenarios such as changes in electricity market rules (implementation of new electricity price policies), increase in new energy generation proportion (impact of intermittent power generation on electricity price), etc., TimesNet can flexibly learn the characteristics of the electricity price time series after these changes. Different modal functions decomposed by VMD provide more targeted input for TimesNet, so that the model can better adapt to changes in these complex scenarios and enhance the flexibility of prediction.

[0060] 2. Different center frequency modal functions are input into the VMD-TimesNet model, and the model can learn and predict according to the characteristics of each modal function. This multi-modal input method allows the model to consider the influence of multiple factors on electricity prices simultaneously, for example, inputting low-frequency modal functions representing long-term trends and high-frequency modal functions representing short-term fluctuations into the model. The model can integrate information from these different frequency components and flexibly output electricity price prediction results to adapt to electricity price changes in various complex scenarios.

[0061] 3. The historical electricity price data is decomposed into multiple narrowband decomposition modal functions by the variational modal decomposition (VMD) algorithm, each modal function can represent a periodic component of different frequency, VMD can well separate these different periodic signals, so that the subsequent prediction model can make more accurate modeling for each periodic component, thereby improving the overall prediction accuracy. After extracting the central frequency modal function, the central frequency modal function is minimized and demodulated modal bandwidth based on the alternating direction multiplier method (ADMM), which can effectively remove the influence of noise and abnormal fluctuations, further improving the prediction accuracy.

[0062] The technical solutions of the present application will be described in further detail below with the help of the accompanying drawings and examples. BRIEF DESCRIPTION OF DRAWINGS

[0063] Figure 1 The steps of an electricity price prediction method based on variational modal decomposition and TimesNet in an embodiment of the present application are shown in the schematic diagram.

[0064] Figure 2 The structure of the VMD-TimesNet model in an embodiment of the present application is shown in the schematic diagram.

[0065] Figure 3 The full data set of the historical electricity price data set in an embodiment of the present application is shown in the schematic diagram.

[0066] Figure 4 The training set of the historical electricity price data set in an embodiment of the present application is shown in the schematic diagram.

[0067] Figure 5 The test set of the historical electricity price data set in an embodiment of the present application is shown in the schematic diagram.

[0068] Figure 6 The electricity price prediction fitting diagram of the VMD-TimesNet model in an embodiment of the present application is shown in the schematic diagram.

[0069] Figure 7 The box plot of the prediction error of multiple prediction models in an embodiment of the present application is shown in the schematic diagram.

[0070] Figure 8 The comparative schematic diagram of the empirical cumulative distribution function of multiple prediction models in an embodiment of the present application is shown in the schematic diagram. DETAILED DESCRIPTION

[0071] In the description of the present application, it should be noted that the terms "upper", "lower", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the present application is usually placed, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In the description of the present application, it should be noted that, unless otherwise specified and limited, the terms "arrangement", "installation", "connection" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected, it can be mechanically connected, or it can be electrically connected, it can be directly connected, or it can be indirectly connected through an intermediate medium, and it can be the communication between two elements inside. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0072] The embodiments of the present application will be described in detail below with reference to the drawings.

[0073] As Figure 1 shown, the present application provides a price prediction method based on variational mode decomposition and TimesNet, comprising the following steps:

[0074] S1, obtaining the historical price data identified from the historical price data table of the power system, preprocessing the historical price data to obtain a historical price data set;

[0075] S2, decomposing the historical price data set by using a variational mode decomposition algorithm VMD to obtain a plurality of narrow-band decomposition modal functions;

[0076] S3, sequentially using Hilbert transform and heterodyne demodulation method to extract the center frequency modal function of each narrow-band decomposition modal function;

[0077] S4, based on the alternating direction multiplier method, the center frequency modal function is minimized and demodulated modal bandwidth processing;

[0078] S5, based on the variational mode decomposition algorithm VMD and TimesNet, a VMD-TimesNet model is constructed, and different center frequency modal functions are input into the VMD-TimesNet model to obtain the price prediction result output by the VMD-TimesNet model based on matrix operation.

[0079] The advantages and beneficial effects of the present application relative to the prior art are:

[0080] 1. The VMD-TimesNet model combines the signal decomposition advantages of VMD and the powerful time series prediction capabilities of TimesNet. TimesNet is a model based on the Transformer architecture, which can handle complex time series data. In complex scenarios such as changes in power market rules (implementation of new electricity price policies), increase in new energy generation proportion (impact of intermittent power generation on electricity prices), etc., TimesNet can flexibly learn the characteristics of the electricity price time series after these changes. The different modal functions decomposed by VMD provide more targeted input for TimesNet, enabling the model to better adapt to changes in these complex scenarios and enhance the flexibility of the prediction.

[0081] 2. Different center frequency modal functions are input into the VMD-TimesNet model, which can learn and predict according to the characteristics of each modal function. This multi-modal input method allows the model to consider multiple factors affecting electricity prices simultaneously, such as inputting low-frequency modal functions representing long-term trends and high-frequency modal functions representing short-term fluctuations into the model. The model can integrate information from these different frequency components and flexibly output electricity price prediction results to adapt to electricity price changes in various complex scenarios.

[0082] 3. Historical electricity price data is decomposed into multiple narrowband decomposition modal functions by the Variational Modal Decomposition (VMD) algorithm, each modal function can represent periodic components of different frequencies, VMD can well separate these different periodic signals, so that the subsequent prediction model can model each periodic component more accurately, thereby improving the overall prediction accuracy. After extracting the center frequency modal function, the Alternating Direction Method of Multipliers (ADMM) is used to minimize the modal bandwidth of the center frequency modal function, which can effectively remove the influence of noise and abnormal fluctuations, further improving the prediction accuracy.

[0083] In some embodiments of the present application, in S1, the historical electricity price data identified from the historical electricity price data table of the power system is obtained, and the historical electricity price data is preprocessed, including:

[0084] Obtaining the historical electricity price data in the preset time period extracted by the identification software based on the data identification algorithm on the historical electricity price data table, determining the abnormal data in the historical electricity price data in the preset time period, and correcting the abnormal data by using the time series interpolation method;

[0085] Comparing and analyzing the corrected historical electricity price data in the preset time period with the electricity price fluctuation situation, cleaning the historical electricity price data exceeding the electricity price fluctuation threshold, and obtaining the historical electricity price data set.

[0086] Specifically, since the electricity price sequence usually has non-stationary, nonlinear and multi-periodic characteristics, the price sequence is first preprocessed.

[0087] In some embodiments of the present application, in S2, the historical electricity price data set is decomposed by using a variational mode decomposition algorithm VMD to obtain a plurality of narrowband decomposition modal functions, including:

[0088] The plurality of narrowband decomposition modal functions are obtained by using the variational mode decomposition algorithm VMD, and the expression is:

[0089] {U k (t)}={u 1 (t),u 2 (t),…,u K (t)};

[0090] Wherein, U k (t) is a historical electricity price data set, K is the total number of narrowband decomposition modal functions, u K (t) is the Kth narrowband decomposition modal function, and t is a time series;

[0091] The center frequency corresponding to the plurality of narrowband decomposition modal functions is obtained, and the expression is:

[0092] {ω1,ω2,…,ω K};

[0093] Wherein, ω k is the center frequency corresponding to the kth narrowband decomposition modal function.

[0094] In some embodiments of the present application, in S3, the center frequency modal function of each narrowband decomposition modal function is extracted by using Hilbert transform and heterodyne demodulation method in turn, including:

[0095] S31, the real value signal of u k (t) is converted into a complex value analytic signal by using Hilbert transform, and the expression is:

[0096]

[0097] Wherein, p.v. represents the Cauchy principal value, is a complex value analytic signal, τ is a Lagrange multiplier step size, u k (t) is the kth narrowband decomposition modal function, and k∈(1, 2, …, K);

[0098] The analytic signal of each modal function is constructed to obtain the instantaneous amplitude and phase, and the expression is:

[0099]

[0100] where A k (t) is the instantaneous amplitude of the k-th narrowband decomposition modal function, φ k (t) is the instantaneous phase of the k-th narrowband decomposition modal function, z k (t) is the spectrum of the analytic signal, and j is the imaginary unit;

[0101] S32, the spectrum z k (t) of each analytic signal is moved to the center frequency using a heterodyne demodulation method, and the expression is:

[0102]

[0103] where, is the center frequency concentrated spectrum;

[0104] S33, the demodulated signal is low-pass filtered, so that u k (t) is concentrated around ω k , and the center frequency modal function is obtained.

[0105] Specifically, this step shifts the spectrum of z k (t) to concentrate the frequency content of the modal around zero frequency, effectively isolating the narrowband components of the modal, and then low-pass filters the demodulated signal to ensure that each modal u k (t) is located near ω k .

[0106] In some embodiments of the present application, in S4, the center frequency modal function is minimized based on the alternating direction multiplier method to process the demodulation modal bandwidth, which includes:

[0107] S41, the decomposition of the original signal X(t) into K eigenmodal functions can be expressed as a variational optimization problem. The goal is to minimize the sum of the demodulation modal bandwidth while ensuring that the sum of the eigenmodal functions can reconstruct the original signal. Based on the alternating direction multiplier method, a variational optimization model is constructed, and the expression is:

[0108]

[0109] where, is the bandwidth metric value, is the analytic signal kernel;

[0110] The constraint condition limit must be satisfied, and the expression is:

[0111]

[0112] where X(t) is the constraint condition;

[0113] S42, the alternating direction multiplier method is iterated to obtain the expression of the updated modal:

[0114]

[0115] wherein, is the Fourier transform of the k-th modality, is the Fourier transform of the Lagrange multiplier, a is a bandwidth penalty parameter, and n is an iteration index, is the Fourier transform of the center frequency, and ω denotes the frequency variable, denotes the center frequency corresponding to the k-th narrowband decomposition modality function in the n-th iteration;

[0116] The expression for updating the center frequency is obtained as:

[0117]

[0118] The expression for updating the Lagrange multiplier is obtained as:

[0119]

[0120] wherein, τ is a Lagrange multiplier step size, is the Fourier transform of the input signal.

[0121] In some embodiments of the present application, in S5, the different center frequency modality functions are input into the VMD-TimesNet model, and the electricity price prediction result output by the VMD-TimesNet model based on matrix operation includes:

[0122] S51, based on the intrinsic modality function vectors at different time points, a multi-dimensional time sequence is obtained, and an amplitude sequence generated by performing a fast Fourier transform on each column of the multi-dimensional time sequence is obtained, and the amplitude sequences of different time sequences are weighted and averaged to obtain an overall amplitude sequence Amp;

[0123] S52, the first m frequencies f1, f2, …, f m with the maximum amplitude in the overall amplitude sequence Amp are obtained. m The number of data points in each period is calculated, and the calculation formula is:

[0124]

[0125] wherein, q m is the data point, and T is the period.

[0126] S53, q m data points are arranged in a row, and the multi-dimensional time sequence is divided into a two-dimensional feature matrix.

[0127] It should be understood that if the last paragraph of data points is insufficient, it will be filled with zeros to complete the matrix, and the final matrix is denoted as These matrices Together constitute U 1D The feature matrix. In each Each row captures the variation within a period, while each column reflects the variation between periods.

[0128] S54, input the two-dimensional feature matrix into the VMD-TimesNet model to obtain the electricity price prediction result, and the expression is:

[0129]

[0130] Wherein, H is the future time step, is the electricity price prediction result of H future time steps, is the filling matrix of the i-th two-dimensional feature matrix, θ i is the feature parameter of the i-th filling matrix.

[0131] In some embodiments of the application, S5 further comprises:

[0132] S55, training the VMD-TimesNet model parameters based on minimizing the loss function, and the expression is:

[0133]

[0134] The beneficial effects of the above technical solutions of the application are:

[0135] 1. The application proposes a brand new integrated model for power price modeling and prediction, which combines variational mode decomposition (VMD) and TimesNet organically. Through VMD, the power price time series is decomposed to extract modes with different frequency characteristics, effectively dealing with the non-stationarity and multi-periodicity problems in the price sequence, and fundamentally improving the modeling accuracy.

[0136] 2. The model of the application integrates the deep learning model TimesNet for processing the decomposed sub-sequences, fully utilizes its technical advantages in time series feature extraction and prediction, and significantly improves the overall prediction accuracy. In addition, a multi-model integration strategy is developed, which fully considers the characteristics of the decomposed sub-sequences, further enhances the robustness and generalization ability of the prediction results.

[0137] 3. The application is tailored for the unique characteristics of power market price data (such as nonlinearity, volatility and multi-periodicity), ensuring that the model has excellent universality and adaptability in various power market scenarios, and providing strong support for dealing with complex power market demand.

[0138] A specific scenario is combined to simulate and test the method of the application, as shown in Figures 2-8 :

[0139] To rigorously evaluate the effectiveness and efficiency of the proposed VMD-TimesNet model in predicting hourly electricity prices, we conducted extensive analysis using data from the California Independent System Operator (CAISO). CAISO is responsible for managing the entire power grid in California, and the real-time prices of the state's electricity spot market are updated every five minutes. Power producers submit price bids, and the generation plan for each five-minute period is arranged based on the corresponding dispatch price. The allowed range of electricity bids is capped at $1000 per megawatt-hour and bottomed at -$150 per megawatt-hour.

[0140] Step 1: The historical electricity price dataset used in this study covers a 1216-day time period, starting from 1:00 AM on January 1, 2016, and ending at 11:00 PM on April 30, 2019. The dataset contains a total of 29,068 hourly price records. In the analysis, 80% of the data was designated as the training set (from 01:00:00 on January 1, 2016, to 19:00:00 on August 30, 2018), and the remaining 20% as the test set (from 20:00:00 on August 30, 2018, to 23:00:00 on April 30, 2019), Figures 3-5 A visual representation of the dataset is shown, and Table 1 displays the descriptive statistics of each dataset.

[0141] Table 1. Descriptive statistics of the full dataset, training set, and test set

[0142]

[0143] Step 2: To evaluate the effectiveness of the VMD-TimesNet model, we selected Linear Regression (LR), Support Vector Regression (SVR), Long Short-Term Memory (LSTM), and the TimesNet model as benchmarks.

[0144] To evaluate the performance of the VMD-TimesNet model relative to existing methods, we employed several commonly used evaluation metrics. These metrics comprehensively evaluate the prediction accuracy and robustness of the models from multiple perspectives, providing a comprehensive understanding of their capabilities in handling complex electricity price time series data. Let pred,i and y real,i denote the predicted and actual electricity prices at time point i, respectively, and let and denote the average actual and predicted electricity prices over a specified time period, respectively. The selected evaluation metrics are as follows:

[0145] Mean Absolute Error (MAE):

[0146]

[0147] Absolute Percentage Bias (APB):

[0148]

[0149] Legates and McCabe Index (LMI):

[0150]

[0151] Wilmott’s Index (WI):

[0152]

[0153] Abnormal Capture Ratio (ACR):

[0154]

[0155] MAE is a commonly used evaluation metric in predictive modeling, which quantifies the average magnitude of errors between predicted and actual values, without considering the direction of errors. Lower MAE values indicate better predictive performance, reflecting smaller deviations between predicted and actual values.

[0156] APB is an index that evaluates systematic bias in model predictions, expressed as a percentage of true values. Lower APB values (close to zero) indicate better model accuracy, with the best value being zero.

[0157] LMI is an error metric that assesses the deviation from the mean of true values, emphasizing the accuracy of predictions. Unlike many traditional error metrics, LMI effectively reduces the impact of outliers, thus providing a more robust evaluation of model performance. The LMI index ranges from negative infinity to 1, with values closer to 1 indicating higher prediction accuracy.

[0158] WI is an error metric that includes the sum and proportional differences of true and predicted means and variances. The WI index ranges from 0 to 1, with values closer to 1 indicating higher prediction accuracy.

[0159] ACR is an index that describes the ability of a predictive model to capture anomalies in a dataset. The ACR index ranges from 0 to 1, with values closer to 1 indicating better anomaly capture performance.

[0160] After evaluating the prediction performance of each model using the above metrics, we further selected several statistics to compare the prediction results of the two prediction models. The first comparative evaluation metric is the Diebold-Mariano (DM) statistic, which compares the prediction accuracy of the two models by examining the difference in their prediction errors. The formula of the DM statistic is:

[0161]

[0162] where T represents the total number of predictions, e 1,t and e 2,t represent the prediction errors of Model 1 and Model 2 at time point t, respectively, the loss difference is defined as is the mean of the loss difference. Under the null hypothesis that the prediction performance of the two models is equal, the DM statistic asymptotically follows a normal distribution. If the DM statistic is greater than zero and the p-value is less than the specified significance level, it indicates that Model 1 is significantly better than Model 2; otherwise, if the DM statistic is less than zero and the p-value is less than the significance level, it indicates that Model 2 is significantly better than Model 1.

[0163] As the second comparative evaluation metric, we use the Skill Score (SS) to compare the prediction accuracy of the model relative to the reference model. The Skill Score based on the Mean Absolute Error (MAE) is defined as:

[0164]

[0165] where MAE model represents the Mean Absolute Error of the model to be evaluated, and MAE reference represents the Mean Absolute Error of the reference model. A Skill Score SS>0 indicates that the model has better prediction performance than the reference model; SS=0 indicates equivalent performance; and SS<0 indicates poorer prediction performance.

[0166] As the third comparative evaluation metric, we use the Empirical Cumulative Distribution Function (ECDF) to compare the prediction accuracy of the model relative to the reference model. The ECDF provides a non-parametric estimate of the cumulative distribution of prediction errors, which can comprehensively evaluate the performance of the model at all error magnitudes. The ECDF is defined as:

[0167]

[0168] where I(·) is the indicator function, n is the total number of observations in the data set, and e i,tThe prediction error for method i at time point t. The faster the ECDF curve rises towards 1, the higher the proportion of small errors for that prediction method. Therefore, in comparing ECDF plots, models with ECDF curves that rise faster, reaching higher cumulative probabilities at lower error values, are generally more accurate.

[0169] As a fourth evaluation metric, we employ the boxplot of prediction errors to compare the prediction accuracy of our model with the reference models. The boxplot provides a visual representation of the distribution of prediction errors, highlighting the median and quartiles. A boxplot with a median close to zero indicates that the prediction errors of the model are small. Furthermore, a boxplot that is flatter or compressed suggests that the prediction method is more robust.

[0170] Step 3: A comprehensive comparative analysis of the performance of various methods in terms of MAE, APB, ACR, WI, and LMI is conducted, as shown in Table 2. The results clearly demonstrate that the VMD-TimesNet model outperforms other models in all indicators. The fitting plot of the VMD-TimesNet model is shown in Figure 6 Specifically, compared to the best-performing alternative method, the VMD-TimesNet model reduces the MAE by 2.40% and the APB by 1.45%. Additionally, the WI and LMI indicators are improved by 7.84% and 5.26%, respectively. These results highlight the significant advantages of the VMD-TimesNet model, particularly in terms of prediction accuracy and robustness. Regarding the ACR indicator, the VMD-TimesNet demonstrates its ability to effectively predict 35% of the outliers, far exceeding other methods. This is particularly important in power price prediction, as prices are often highly volatile due to factors such as the integration of renewable energy, market trading behavior, and extreme weather conditions. This volatility often results in negative or abnormally high prices, which are considered outliers. If a prediction model fails to accurately capture these outliers, the reliability of the prediction results will be compromised. However, the VMD-TimesNet model excels in identifying these outliers, thereby enhancing its effectiveness in real-world applications.

[0171] Table 2 Comparison of MAE, APB, ACR, WI, and LMI for various models

[0172]

[0173] In the following analysis, we adopted the Diebold-Mariano test to compare the prediction accuracy of the VMD-TimesNet model with other competing methods. The results are shown in Table 3, where the DM statistics are greater than zero and the p-values are close to zero in all comparisons of VMD-TimesNet with other models. These results indicate that we can reject the null hypothesis that the VMD-TimesNet and other methods have equal prediction performance, further demonstrating that the VMD-TimesNet model has significantly better prediction accuracy than other models.

[0174] Table 3 Comparison of Diebold-Mariano test results for VMD-TimesNet and other models

[0175] Indicator TimesNet LSTM SVR LR DM statistics 9.0670 10.7516 10.5594 10.0743 p-value 0.0000 0.0000 0.0000 0.0000

[0176] Next, we compared the skill scores of VMD-TimesNet using TimesNet, LSTM, SVR, and LR as benchmark models. The results are summarized in Table 4.

[0177] The VMD-TimesNet model always obtained positive skill scores relative to all other models, with specific values of 0.0608, 0.1312, 0.0753, and 0.0347 compared to TimesNet, LSTM, SVR, and LR, respectively. Skill scores reflect the performance of models in terms of relative error, with higher scores indicating greater error for the reference model. Therefore, the VMD+TimesNet model, by combining the features extracted from VMD decomposition, demonstrated superior ability to capture the dynamic characteristics of power price time series, thereby providing more accurate prediction results.

[0178] Table 4 Comparison of skill scores for VMD+TimesNet and other models

[0179] Indicator TimesNet LSTM SVR LR Skill score 0.0608 0.1312 0.0753 0.0347

[0180] To further evaluate the prediction performance of various models, we visualized the prediction errors of VMD-TimesNet, TimesNet, LSTM, SVR, and linear regression through box plots, as shown in Figure 7 The box plot of VMD+TimesNet is closest to zero, indicating superior prediction accuracy relative to other models. In addition, the interquartile range (IQR) of the prediction errors of VMD+TimesNet is narrower than that of other models, indicating that VMD+TimesNet exhibits the highest robustness in prediction results.

[0181] As Figure 8As shown, the empirical cumulative distribution function (ECDF) comparison analysis of the five models (VMD+TimesNet, TimesNet, LSTM, SVR, and linear regression) on the prediction error is demonstrated. The results show that the ECDF curve of the VMD+TimesNet model rises rapidly to 1, indicating that the model has a higher proportion of smaller prediction errors in most error ranges. This rapid rise indicates that VMD+TimesNet can consistently provide lower error magnitudes in most error ranges, thereby exhibiting superior performance in terms of error distribution.

[0182] In the present application, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. In case of conflict, the present specification, including explanations of the terms, as understood by the context of the specification will control. In addition, the terms used herein are for the purpose of describing the embodiments of the present application only and are not intended to limit the present application.

[0183] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can still be modified or replaced by equivalents, and these modifications or replacements should not make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present application.

Claims

1. A price forecasting method based on variational mode decomposition and TimesNet, characterized in that, The method comprises the following steps: S1, obtaining historical electricity price data identified from a historical electricity price data table of a power system, preprocessing the historical electricity price data, and obtaining a historical electricity price data set; S2, decomposing the historical electricity price data set by using a variational mode decomposition algorithm VMD to obtain a plurality of narrow-band decomposition modal functions; S3, sequentially using Hilbert transform and heterodyne demodulation to extract the center frequency modal function of each narrow-band decomposition modal function; S4, performing minimum demodulation modal bandwidth processing on the center frequency modal function based on an alternating direction multiplier method; S5, constructing a VMD-TimesNet model based on the variational mode decomposition algorithm VMD and TimesNet, and inputting different center frequency modal functions into the VMD-TimesNet model to obtain an electricity price prediction result output by the VMD-TimesNet model based on matrix operation. 2.The price forecasting method based on variational mode decomposition and TimesNet according to claim 1, wherein, In the S1, the preprocessing of the historical electricity price data obtained by identifying the historical electricity price data table of the power system comprises: obtaining historical electricity price data in a preset time period extracted from the historical electricity price data table by the identification software based on a data identification algorithm, determining abnormal data in the historical electricity price data in the preset time period, and correcting the abnormal data by using a time series interpolation method; comparing and analyzing the corrected historical electricity price data in the preset time period with electricity price fluctuation conditions, cleaning the historical electricity price data exceeding the electricity price fluctuation threshold, and obtaining a historical electricity price data set. 3.The price forecasting method based on VMD and TimesNet according to claim 2, wherein, In the S2, the decomposition of the historical electricity price data set by using the variational mode decomposition algorithm VMD to obtain a plurality of narrow-band decomposition modal functions comprises: obtaining a plurality of narrow-band decomposition modal functions by using the variational mode decomposition algorithm VMD, and the expression is: {Uk(t)} = {u 1 (t),u 2 (t),…,uK(t)}; wherein U k (t) is a set of historical price data, K is the total number of narrow-band decomposition mode functions, uK(t) is the Kth narrow-band decomposition mode function, and t is a time series. obtaining the center frequency corresponding to the plurality of narrow-band decomposition modal functions, and the expression is: {ω1,ω2,…,ωK}; wherein ωk is the center frequency corresponding to the kth narrow-band decomposition modal function.

4. The method of claim 3, wherein, In the S3, the extraction of the center frequency modal function of each narrow-band decomposition modal function by sequentially using Hilbert transform and heterodyne demodulation comprises: S31, converting the real value signal of uk(t) into a complex value analytic signal by using Hilbert transform, and the expression is: where p.v. denotes the Cauchy principal value, is a complex analytic signal, τ is a Lagrange multiplier step size, uk(t) is the kth narrowband decomposition mode function, k e (1, 2,..., K). constructing an analytic signal of each modal function to obtain an instantaneous amplitude and a phase, and the expression is: wherein Ak(t) is the instantaneous amplitude of the kth narrow-band decomposition modal function, φk(t) is the instantaneous phase of the kth narrow-band decomposition modal function, zk(t) is the frequency spectrum of the analytic signal, and j is an imaginary unit; S32, moving the frequency spectrum zk(t) of each analytic signal to the center frequency by using heterodyne demodulation, and the expression is: wherein is the center frequency of the spectrum; S33, performing low-pass filtering on the demodulation signal to make uk(t) concentrate on ωk, and obtaining the center frequency modal function.

5. The method of claim 4, wherein, In the S4, the minimum demodulation modal bandwidth processing on the center frequency modal function based on the alternating direction multiplier method comprises: S41, constructing a variational optimization model based on the alternating direction multiplier method, and the expression is: wherein is a bandwidth metric value, is a resolved signal kernel; the constraint condition needs to satisfy the constraint condition limit, and the expression is: wherein X(t) is the constraint condition. S42, the expression of the updated mode is obtained by iterative calculation based on the alternating direction multiplier method iterative algorithm: wherein, is the Fourier transform of the kth modality, is the Fourier transform of the Lagrangian multiplier, a is a bandwidth penalty parameter, and n is an iteration index, is the Fourier transform of the center frequency, and ω denotes the frequency variable, denotes the center frequency corresponding to the kth narrowband decomposition modality function in the n th iteration. The expression of the updated center frequency is obtained as: The expression of the updated Lagrange multiplier is obtained as: where τ is the Lagrange multiplier step size, is the Fourier transform of the input signal.

6. The method of claim 5, wherein, In the S5, the different center frequency mode function is input into the VMD-TimesNet model, and the price prediction result output by the VMD-TimesNet model based on matrix operation includes: S51, based on the intrinsic mode function vector at different time points, a multi-dimensional time sequence is obtained, and an amplitude sequence generated by performing fast Fourier transform on each column of the multi-dimensional time sequence is obtained, and the amplitude sequences of different time sequences are weighted and averaged to obtain an overall amplitude sequence Amp; S52, the first m frequencies f1, f2, …, fm with the maximum amplitude in the overall amplitude sequence Amp are obtained, and the number of data points in each period of the frequency fm is calculated, and the calculation formula is: Wherein, qm is a data point, and T is a period; S53, arrange each qm data points into a row, and divide the multi-dimensional time sequence into a two-dimensional feature matrix; S54, input the two-dimensional feature matrix into the input VMD-TimesNet model to obtain the price prediction result, and the expression is: where H is the future time step, is the electricity price prediction result of H future time steps, is the filling matrix of the i-th two-dimensional feature matrix, and θi is the feature parameter of the i-th filling matrix.

7. The method of claim 6, wherein, The S5 also includes: S55, train the VMD-TimesNet model parameters based on the minimum loss function, and the expression is: