Electric vehicle charging load prediction method and system combining sequence decomposition and feature extraction, and storage medium
By combining the methods of sequence decomposition and feature extraction, VMD and frequency feature extraction technology, a prediction model of multi-layer perceptron and attention module for complex domain calculation is constructed, which solves the problems of long-term dependence and noise processing in the charging load prediction of electric vehicles, and achieves more accurate and stable prediction results.
Patent Information
- Application Number
- CN202411590017.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The prior art is difficult to effectively capture long-term dependencies and process noise in the charging load prediction of electric vehicles, resulting in large errors in prediction results.
Combining the methods of sequence decomposition and feature extraction, multiple subsequences with clear features are generated using variational modal decomposition (VMD), and predicted spectrum is extracted through frequency feature, and a prediction model of a multi-layer perceptron and attention module based on complex domain calculations is constructed, and a mixed loss function in the time domain and the frequency domain is trained.
Effectively remove noise, improve the prediction accuracy of deep learning models, reduce prediction errors, and the prediction error changes stably under different prediction lengths.
Smart Images

Figure CN119539367A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of charging load prediction, and in particular to a method, system and storage medium for predicting charging load of an electric vehicle combining sequence decomposition and feature extraction. Background Art
[0002] During the operation of the power system, it is necessary to ensure the balance between power supply and demand in order to maintain the stability and reliability of the system. However, the widespread use of electric vehicles has become the current trend of electricity consumption. The randomness of their charging needs has brought uncertainty to the demand side of the power system, greatly increasing the difficulty of power dispatch. Therefore, the power system needs accurate load forecasting to help arrange power generation plans in advance and ensure the balance between power supply and demand.
[0003] Power load forecasting is to predict the power load in the next few hours or days based on historical data. The traditional time series forecasting method is a statistical regression model. However, the regression model ignores the complex interactions between multiple independent variables and is not suitable for modeling long-term dependencies. Deep learning models can better handle long-term and complex time series relationships. Common neural network structures suitable for time series forecasting include multi-layer perceptrons (MLPs), convolutional networks, recurrent neural networks, and transformer-based networks. These models all capture the correlation between different time steps from the perspective of time series, and use the autocorrelation of the sequence to build a connection between historical data and future data for prediction.
[0004] A core issue of long-term time series prediction is that the method should be able to expressively capture long-term dependencies. However, the above methods are limited to predicting the time series itself, and are prone to local prediction overfitting. For a time series, the frequency contains periodic information. When extracting short-term dependencies at high frequencies, long-term dependencies can also be extracted at low frequencies. The frequency-based neural network extracts the spectral features of the load sequence, first predicts the spectrum of the future sequence, and then converts it back to the time domain through the inverse Fourier transform.
[0005] Due to the randomness of charging behavior, load data is complex and noisy in both the time and frequency domains. This data characteristic increases the difficulty of neural network models in extracting effective features and making accurate predictions. In order to improve the generalization performance of deep learning models, it is necessary to select appropriate feature variables to enrich the input of the prediction model. Summary of the invention
[0006] In view of the defects of the prior art that load data is random and noisy, the present invention proposes an electric vehicle charging load prediction method, system and storage medium that combine sequence decomposition and feature extraction, uses variational mode decomposition (VMD) to generate multiple subsequences with clear features, and then predicts the spectrum through frequency feature extraction, which solves the technical problems of large errors in prediction results caused by the neglect of long-term dependence by time series models and the prediction deviation caused by noise.
[0007] In an embodiment of the present invention, a method for predicting electric vehicle charging load by combining sequence decomposition and feature extraction comprises the following steps:
[0008] S1. Obtain the operating data of the charging station, standardize the operating data, and divide it into a training set, a validation set, and a test set according to the proportion. Perform variational mode decomposition on the operating data of each set to generate multiple intrinsic mode functions.
[0009] S2, pad each intrinsic mode function with zeros to expand the data length, and then use fast Fourier transform to obtain spectrum data with higher frequency resolution;
[0010] S3, using data slicing to divide each spectrum data into multiple continuous frequency bands and then splicing them, converting the one-dimensional data into two-dimensional data; inputting the two-dimensional data into a multi-layer perceptron based on complex domain calculation to enhance the spectrum data;
[0011] S4, constructing a prediction model based on the complex domain attention module and the residual module, inputting the enhanced spectrum data into the constructed prediction model, extracting the data characteristic frequency combination through the complex domain attention module and the residual module, and taking the weighted sum of all intrinsic mode functions as the output of the prediction model;
[0012] S5. Predict a period of historical data so that the future series is consistent with the historical data in terms of data trend; calculate the difference between the real data and the predicted data based on the mean square error of the time series and the mean absolute error of the spectrum to obtain the mixed loss in the time domain and frequency domain; use the mixed loss as the loss function to update the prediction model parameters and realize the training of the prediction model.
[0013] In an embodiment of the present invention, a system for predicting electric vehicle charging load by combining sequence decomposition and feature extraction, based on the prediction method, includes the following modules:
[0014] The intrinsic mode function generation module obtains the operating data of the charging station, standardizes the operating data, and divides the operating data into a training set, a validation set, and a test set according to the proportion. The operating data of each set is subjected to variational mode decomposition to generate multiple intrinsic mode functions.
[0015] The spectrum data generation module fills each intrinsic mode function with zeros to expand the data length, and then uses fast Fourier transform to obtain spectrum data with higher frequency resolution;
[0016] The spectrum enhancement module uses data slicing to divide each spectrum data into multiple continuous frequency bands and then splices them to convert one-dimensional data into two-dimensional data; the two-dimensional data is input into a multi-layer perceptron based on complex domain calculation to enhance the spectrum data;
[0017] A prediction model construction module is used to construct a prediction model based on a complex domain attention module and a residual module. The enhanced spectrum data is input into the constructed prediction model. The characteristic frequency combination of the data is extracted through the complex domain attention module and the residual module. The weighted sum of all intrinsic mode functions is used as the output of the prediction model.
[0018] The prediction model training module predicts a period of historical data so that the future series will be consistent with the historical data in terms of data trend; the difference between the real data and the predicted data is calculated based on the mean square error of the time series and the mean absolute error of the spectrum to obtain the mixed loss in the time domain and frequency domain; the mixed loss is used as the loss function to update the prediction model parameters to realize the training of the prediction model.
[0019] In an embodiment of the present invention, there is also a storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of the prediction method in the embodiment of the present invention are implemented.
[0020] It can be seen from the above technical solutions that the present invention has the following advantages:
[0021] 1. The present invention predicts future time series from the frequency domain, constructs an MLP and attention structure based on complex operations, uses the attention structure to extract characteristic frequency combinations for frequency domain data, and uses MLP to enhance medium and high frequency data for the divided frequency domain data because the attention mechanism pays more attention to low frequencies.
[0022] 2. The present invention performs preprocessing of decomposition and conversion based on the time-frequency characteristics of the data. Use variational mode decomposition (VMD) to generate IMFs with clearer frequency domain characteristics and eliminate noise; based on the characteristics of discrete Fourier transform, the sequence length is extended to generate frequency domain data with higher resolution. VMD can decompose complex time series into multiple modal components with clear frequency components, thereby effectively removing noise and simplifying the data structure, and improving the prediction accuracy of deep learning models.
[0023] 3. The loss function of the present invention combines the MSE in the time domain and the MAE in the frequency domain to more accurately capture the loss of trends and cycles. During training, a period of historical data is predicted, and the loss of historical data is used to enhance the prediction of data distribution. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a flow chart of an electric vehicle charging load prediction method combining sequence decomposition and feature extraction in an embodiment of the present invention;
[0025] Figure 2 The framework diagram of the prediction model in the embodiment of the present invention is mainly composed of three sub-parts: 1) VMD, which decomposes the sequence and reduces noise; 2) frequency attention module, which extracts sequence frequency features; 3) time-frequency mixed loss, which updates the prediction model from both the time domain and the frequency domain;
[0026] Figure 3 Schematic diagram of frequency enhancement structure using complex domain MLP;
[0027] Figure 4 The complex field computation graph for linear mapping;
[0028] Figure 5 The figure is a visualization diagram of the comparison results of input 96 and prediction 96, where (a) is the experimental result of the prediction method of this embodiment, (b) is the experimental result of the ATFNet algorithm, (c) is the experimental result of the FEDformer algorithm, (d) is the experimental result of the PatchTST algorithm, (e) is the experimental result of the Autoformer algorithm, and (f) is the experimental result of the Nonstationary transformer algorithm;
[0029] Figure 6 The following is a visualization diagram of the input 96-prediction 96 ablation results, where (a) is the load prediction result of the frequency attention module only, (b) is the load prediction result of FAM plus TF loss, and (c) is the load prediction result of this embodiment that combines VMD, FAM and TF loss. DETAILED DESCRIPTION
[0030] The technical solution of the present invention is further described in detail below in conjunction with the embodiments and drawings. Obviously, the embodiments described below 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.
[0031] Example
[0032] See also Figure 1 , Figure 2 , this embodiment provides a charging load prediction method combining signal decomposition and frequency feature extraction, comprising the following steps:
[0033] S1. Obtain the operating data of the charging station, standardize the operating data, and divide it into a training set, a validation set, and a test set according to the proportion. Perform variational mode decomposition on the operating data of each set to generate multiple intrinsic mode functions.
[0034] In this embodiment, the operating data is charging power data; performing variational modal decomposition on the operating data specifically includes the following steps:
[0035] S11. Divide the charging power data into samples according to a preset division standard to generate a training set, a validation set, and a test set. Standardize the charging power data in each set to obtain standardized sample data.
[0036] Among them, the data set is the charging load data of an electric vehicle charging station at an airport in a certain city. The charging station has 55 piles with a rated power of 120kW. The charging load data used in the experiment was collected from April 1 to May 31, 2023. In order to show the detailed changes in the charging load, the sampling interval is set to 15 minutes.
[0037] The data set is divided into training set, validation set and test set according to the ratio of 0.5, 0.25 and 0.25. The data of each set is standardized respectively, and the standardization formula is:
[0038]
[0039] In the formula, h(t) is the original data set data, t represents the data time, and the maximum length is N. μ is the data mean. σ is the data standard deviation. ′ (t) is the standardized sample data.
[0040] S12. Perform variational modal decomposition on the standardized sample data to generate multiple modal functions corresponding to the sample data.
[0041] That is, the variational mode decomposition algorithm is used to extract the signal features in the standardized sample data. Set the sample data h ′ (t) is decomposed into K modal functions (i.e. modal components), each modal function u k (t) are all kept at the center frequency ω k around.
[0042] S13. Construct an initial constraint model with the optimization goal of minimizing the estimated bandwidth of all modal functions and the sum of all modal functions being equal to the corresponding sample data.
[0043] This step minimizes the sum of the estimated bandwidths of all modal functions while satisfying the constraint that the sum of all modal functions is equal to the original input signal (i.e., sample data). The initial constraint model is constructed as follows:
[0044]
[0045] Where * represents the convolution operation, u k (t) represents the mode function; δ(t) in the brackets is the Dirac function, which does not change the mode function when convolved with the mode function, and 1 / πt is convolved with the mode function to perform Hilbert transform; i represents the imaginary unit, and the Dirac function and 1 / πt are respectively taken as the real part and the imaginary part and summed to form the analytical signal; represents the partial derivative of t, K is the number of preset modal functions, {u1,u2,…,u k} is the standardized sample data h ′ (t) each mode function, {ω1,ω2,…,ω k} is the center frequency of each mode function.
[0046] S14. Use a preset Lagrangian expansion expression to update the initial constraint model to generate a target constraint model; through the target constraint model, use an alternating direction multiplier algorithm and a preset convergence formula to iteratively update the modal function to generate multiple intrinsic mode functions.
[0047] S2. Fill each intrinsic mode function with zeros to expand the data length, and then use fast Fourier transform to obtain spectrum data with higher frequency resolution.
[0048] In this embodiment, the following steps are specifically included:
[0049] S21, according to the historical data length L and the predicted data length H, fill zeros at the end of each intrinsic mode function until the data length is Get the corresponding extended mode function.
[0050] For an intrinsic mode function u(t) of length L, H zeros are added after the sequence data to expand the intrinsic mode function u(t) to a length of The extended modal function u ext (t).
[0051] S22. Using fast Fourier transform, each extended mode function is converted from the time domain to the frequency domain.
[0052] Among them, the formula of fast Fourier transform is:
[0053]
[0054] Where F[k] is the frequency spectrum, index k is the frequency point, and there are a total of Discrete frequencies. ext (t) is the extended mode function, index n is the time, there are a total of The last H term is all zero, so it can be ignored when calculating the spectrum, which speeds up the calculation. i θ =cosθ+isinθ is a complex exponential function. As k changes, A series of functions with a period of L + H are generated. Each discrete value of the input sequence is multiplied by the corresponding complex exponential function, and all these products are summed to obtain a frequency weight in the output spectrum.
[0055] In addition, since the front and back segments of the spectrum have a conjugate property, this embodiment only retains half of the spectrum to reduce the time complexity in subsequent calculations:
[0056]
[0057] In the formula, the kth frequency and the kth frequency from the end in the spectrum are in a conjugate relationship, and only half of the data is retained, thereby reducing both time and space complexity.
[0058] S3. Use data slicing to divide each spectrum data into multiple continuous frequency bands and then splice them to convert the one-dimensional data into two-dimensional data; input the two-dimensional data into a multi-layer perceptron based on complex domain calculation to enhance the spectrum data.
[0059] Specifically, if Figure 3 As shown, the following steps are included:
[0060] S31. Split the spectrum of the intrinsic mode function into n continuous sub-spectrum graphs by using a non-overlapping data block method, and stack the n segments of data to form two-dimensional data.
[0061] S32, performing standardization processing on each continuous sub-spectrum graph according to its own mean and variance.
[0062] The formula for standardization is:
[0063]
[0064] Where f[n,i] is two-dimensional data, subscript n represents the number of sub-spectrum segments, and there are N segments in total; subscript i represents the sequence number of the frequency in each spectrum segment, and the length is p; μ n is the average value of each spectrum; σ n is the standard deviation of each spectrum segment.
[0065] S33, splicing the two-dimensional data back into one-dimensional data according to the original spectrum order; and then inputting the standardized data into a multi-layer perceptron based on complex domain calculation for frequency enhancement.
[0066] Figure 4 It is the complex domain computation graph of linear mapping, and the specific formula is:
[0067] X out =X·W=(X re W re -X im W im )+i(X im W re +X re W im )
[0068] Where X is the input spectrum data, X re and X im are the real and imaginary parts of the spectrum data respectively; W is the neural network weight parameter, W re and W im are the real and imaginary parts of the weight respectively; X out Calculates the result of complex field multiplication.
[0069] Among them, the multi-layer perceptron structure based on complex domain calculation specifically includes a normalization layer, a fully connected layer I, a gelu activation layer, a dropout layer I, a fully connected layer II and a dropout layer II which are connected in sequence.
[0070] S4. A prediction model is constructed based on the complex domain attention module and the residual module. The enhanced spectrum data is input into the constructed prediction model. The data characteristic frequency combination is extracted through the complex domain attention module and the residual module. The weighted sum of all intrinsic mode functions is taken as the output of the prediction model.
[0071] Specifically, the following steps are included:
[0072] S41. Use linear transformation to embed the enhanced spectrum data into the high-dimensional spectrum In the example above, we use three learnable parameters and Linearly map the high-dimensional spectrum into query matrices Q h , key matrix K h Sum value matrix V h .
[0073] S42. Use multi-head attention to extract different frequency combinations, perform complex dot product attention on each head, and finally concatenate the attention outputs of all heads. Use the residual network to fuse the multi-head data to obtain the fused attention output.
[0074] The attention calculation formula is:
[0075]
[0076] In the formula, head hrepresents the attention output, the subscript h represents the number of heads, there are N attention heads in total, that is, there are N parallel attention modules in total. Each attention head uses the query matrix Q h Multiply by the key matrix K h The conjugate transpose of , and then normalize the value through the softmax function to get the attention score, and finally multiply it by the value matrix V h Get the output of each attention head.
[0077] The residual network calculation formula is:
[0078]
[0079] Where F is the concatenation of attention heads (head1,…,head H ), MLP is a multi-layer perceptron based on complex domain calculation, It is the attention output after residual network fusion.
[0080] S5. Predict a period of historical data so that the future series is consistent with the historical data in terms of data trend; calculate the difference between the real data and the predicted data based on the mean square error of the time series and the mean absolute error of the spectrum to obtain the mixed loss in the time domain and frequency domain; use the mixed loss as the loss function to update the prediction model parameters and realize the training of the prediction model.
[0081] In this embodiment, the values at time t and time t+1 are predicted at the same time at time t; the predicted value at time t is historical data, which is a case of using known data to predict known data, and its prediction error will be much smaller, so this part of the predicted data is added when training the model to reduce the training error.
[0082] The mixed losses in time domain and frequency domain are used as the loss function to update the prediction model parameters, which can accurately capture the cycle and trend characteristics of the charging load.
[0083] Specifically, the following steps are included:
[0084] S51. Output the fused attention through inverse Fourier transform Convert to time domain signal
[0085] S52, the length of the tag data Y is H, but the time domain signal The length is When training the prediction model, a historical sequence of length L is added to the label data to make the label data consistent with the length of the time domain signal to help predict data trends.
[0086] S53. Calculate the difference between the real data and the predicted data according to the mean square error of the time series and the mean absolute error of the spectrum to obtain a mixed loss in the time domain and frequency domain; use the mixed loss as a loss function to update the prediction model parameters to achieve training of the prediction model.
[0087] In this embodiment, the calculation formula of the mixing loss is:
[0088]
[0089] In the formula, α is the loss weight; f i is the frequency spectrum of the label data, is the spectrum of the predicted data, the subscript i represents the i-th frequency, and there are n frequencies in total; y i is the time series of label data, To predict the time series of data, the subscript i represents the i-th moment, and there are n moments in total.
[0090] S6. Use the trained prediction model to predict the charging load of electric vehicles.
[0091] In order to verify the superiority of the method proposed in this embodiment, five methods including Nonstationary transformer, PatchTST, Autoformer for prediction in the time domain and ATFNet and FEDformer for prediction in the frequency domain are used to train and test the same training samples and test samples. The evaluation indicators of the prediction effect are the mean absolute error and the mean square error:
[0092]
[0093] Among them, MAE is the mean absolute error, MSE is the mean square error, n is the number of time points to be predicted, and y i and are the actual value and predicted value of the charging load of the charging station at time i. The experimental results are shown in Table 1.
[0094] Table 1 Comparative experimental results
[0095]
[0096] Whether it is short-term prediction or long-term prediction, this embodiment has the smallest error in both indicators, which is significantly improved compared with other models. When the prediction length is 24, the MSE and MAE are reduced by 25.6% and 14.2% respectively compared with the control model with the lowest error. And among the predictions of various lengths, the model prediction of this embodiment is the most stable, and the error increases slowly as the prediction length increases.
[0097] Figure 5A sample of the test set is shown, (a) is the experimental result of the prediction method of this embodiment, (b) is the experimental result of the ATFNet algorithm, (c) is the experimental result of the FEDformer algorithm, (d) is the experimental result of the PatchTST algorithm, (e) is the experimental result of the Autoformer algorithm, and (f) is the experimental result of the Nonstationary transformer algorithm.
[0098] from Figure 5 It can be seen that the data set has a certain periodicity, in which the amplitude fluctuates between cycles, whether it is the high-frequency or low-frequency part, which shows that the noise is distributed in the entire spectrum. The performance of the model predicted in the time domain is generally not as good as that in the frequency domain. The time domain model recognizes a single period, hardly captures the global dependency of the data, and the local features are not well identified, and the entire predicted data fluctuates smoothly. In contrast, the frequency domain model can capture the periodicity very well, and the three frequency domain models can fit the curve of the real data, but there are certain differences in the processing of local dependencies. The model proposed in this embodiment uses VMD to process data, and while decomposing the modal components (i.e., modal functions) with clearer frequency characteristics, it also eliminates the noise in the entire frequency band, so the model of this embodiment is also closer to the true value in amplitude.
[0099] Table 2 Ablation experiment results
[0100]
[0101] The present invention mainly has three modules: 1. Frequency Attention Module (FAM), 2. Time-Frequency Mixed Loss (TF loss), 3. VMD parallel structure. In order to verify the effectiveness of the proposed method, this embodiment designs three models for ablation comparison, model 1 has only FAM, model 2 is FAM plus TF loss, model 3 is a combination of FAM, TF loss and VMD, that is, the complete model proposed by the present invention. The three models are trained and tested on the same training samples and test samples. The evaluation indicators of the prediction effect use the mean absolute error and the mean square error. As can be seen from Table 2, all three increase the accuracy of model prediction.
[0102] Figure 6 The distribution of data in the model can illustrate the role of different modules. Figure 6 Figure (a) shows the load forecasting result with only the frequency attention module. The frequency attention module can capture the periodicity of the data, and the overall curve fluctuation is consistent with the true value. However, the overall value of the prediction in Figure (a) is higher than the true data. Figure 6 Figure (b) shows FAM plus TF loss, which is used to supplement the prediction of data trends. The result is that the trend of the predicted values is more consistent with the real data. Figure 6 As shown in Figure (c), VMD, IMF and TF loss are combined. VMD is used to obtain k IMFs, k FAMs are used in parallel, and the results are added together to update the model using TF loss. The decomposed IMFs have data with clearer frequency domain information. At the same time, the noise in the entire frequency band is eliminated during the decomposition process. After using the VMD parallel structure, the characteristic frequency is predicted in a targeted manner, so the prediction effect is the best for both high and low frequencies.
[0103] Based on the same inventive concept, on the basis of the above-mentioned prediction method, this embodiment also provides an electric vehicle charging load prediction system combining sequence decomposition and feature extraction, including the following modules:
[0104] The intrinsic mode function generation module obtains the operating data of the charging station, standardizes the operating data, and divides the operating data into a training set, a validation set, and a test set according to the proportion. The operating data of each set is subjected to variational mode decomposition to generate multiple intrinsic mode functions.
[0105] The spectrum data generation module fills each intrinsic mode function with zeros to expand the data length, and then uses fast Fourier transform to obtain spectrum data with higher frequency resolution;
[0106] The spectrum enhancement module uses data slicing to divide each spectrum data into multiple continuous frequency bands and then splices them to convert one-dimensional data into two-dimensional data; the two-dimensional data is input into a multi-layer perceptron based on complex domain calculation to enhance the spectrum data;
[0107] A prediction model construction module is used to construct a prediction model based on a complex domain attention module and a residual module. The enhanced spectrum data is input into the constructed prediction model. The characteristic frequency combination of the data is extracted through the complex domain attention module and the residual module. The weighted sum of all intrinsic mode functions is used as the output of the prediction model.
[0108] The prediction model training module predicts a period of historical data so that the future series will be consistent with the historical data in terms of data trend; the difference between the real data and the predicted data is calculated based on the mean square error of the time series and the mean absolute error of the spectrum to obtain the mixed loss in the time domain and frequency domain; the mixed loss is used as the loss function to update the prediction model parameters to realize the training of the prediction model.
[0109] The above modules are respectively used to implement steps S1-S5 of the above prediction method. When the training of the prediction model is completed, the charging load of the electric vehicle can be predicted by the prediction model.
[0110] In addition, this embodiment further provides a storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, each step of the prediction method described in this embodiment is implemented.
[0111] The present invention solves the problem of large prediction error under the influence of random load fluctuations, and can achieve lower errors even when data fluctuates violently. The prediction error changes stably under different prediction lengths, and the prediction results have higher prediction accuracy and stability.
[0112] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principles of the present invention shall be equivalent replacement methods and shall be included in the protection scope of the present invention.
Claims
1. A method for predicting electric vehicle charging load by combining sequence decomposition and feature extraction, characterized in that: The following steps are involved: S1. Obtain the operating data of the charging station, standardize the operating data, and divide it into a training set, a validation set, and a test set according to the proportion. Perform variational mode decomposition on the operating data of each set to generate multiple intrinsic mode functions. S2, pad each intrinsic mode function with zeros to expand the data length, and then use fast Fourier transform to obtain spectrum data with higher frequency resolution; S3, using data slicing to divide each spectrum data into multiple continuous frequency bands and then splicing them, converting the one-dimensional data into two-dimensional data; inputting the two-dimensional data into a multi-layer perceptron based on complex domain calculation to enhance the spectrum data; S4, constructing a prediction model based on the complex domain attention module and the residual module, inputting the enhanced spectrum data into the constructed prediction model, extracting the data characteristic frequency combination through the complex domain attention module and the residual module, and taking the weighted sum of all intrinsic mode functions as the output of the prediction model; S5. Predict a period of historical data so that the future series is consistent with the historical data in terms of data trend; calculate the difference between the real data and the predicted data based on the mean square error of the time series and the mean absolute error of the spectrum to obtain the mixed loss in the time domain and frequency domain; use the mixed loss as the loss function to update the prediction model parameters and realize the training of the prediction model.
2. The prediction method according to claim 1, characterized in that: The operating data in step S1 is charging power data; performing variational modal decomposition on the operating data includes the following steps: S11. Divide the charging power data into samples according to a preset division standard to generate a training set, a validation set, and a test set, and standardize the charging power data in each set to obtain standardized sample data; S12, performing variational modal decomposition on the standardized sample data to generate multiple modal functions corresponding to the sample data; S13, constructing an initial constraint model with the estimated bandwidth of all modal functions being minimized and the sum of all modal functions being equal to the corresponding sample data as the optimization goal; S14. Use a preset Lagrangian expansion expression to update the initial constraint model to generate a target constraint model; through the target constraint model, use an alternating direction multiplier algorithm and a preset convergence formula to iteratively update the modal function to generate multiple intrinsic mode functions.
3. The prediction method according to claim 2, characterized in that: The initial constraint model is constructed as: Where t represents the data time, * represents the convolution operation, and u k (t) represents the mode function; the δ(t) in the brackets is the Dirac function, which does not change the mode function when convolved with the mode function, and 1 / πt is convolved with the mode function to perform the Hilbert transform; i represents the imaginary unit, and the Dirac function and 1 / πt are summed as the real and imaginary parts respectively to form the analytical signal; represents the partial derivative of t, K is the number of preset modal functions, {u1,u2,…,u k } is the standardized sample data h ′ (t) each mode function, {ω1,ω2,…,ω k } is the center frequency of each mode function.
4. The prediction method according to claim 1, characterized in that: Step S2 includes: S21, according to the historical data length L and the predicted data length H, fill zeros at the end of each intrinsic mode function until the data length is Get the corresponding extended mode function; S22. Using fast Fourier transform, each extended mode function is converted from the time domain to the frequency domain.
5. The prediction method according to claim 1, characterized in that: Step S3 includes: S31, splitting the spectrum of the intrinsic mode function into n continuous sub-spectrum graphs by a non-overlapping data block method, and stacking the n segments of data to form two-dimensional data; S32, performing standardization processing on each continuous sub-spectrum according to its own mean and variance; S33, splicing the two-dimensional data back into one-dimensional data according to the original spectrum order; and then inputting the standardized data into a multi-layer perceptron based on complex domain calculation for frequency enhancement.
6. The prediction method according to claim 5, characterized in that: The standardization processing formula in S32 is: Where f[n,i] is two-dimensional data, subscript n represents the number of sub-spectrum segments, and there are N segments in total; subscript i represents the sequence number of the frequency in each spectrum segment, and the length is p; μ n is the average value of each spectrum; σ n is the standard deviation of each spectrum segment.
7. The prediction method according to claim 1, characterized in that: Step S4 includes: S41, use linear transformation to embed the enhanced spectrum data into the high-dimensional spectrum, and then use three learnable parameters and Linearly map the high-dimensional spectrum into query matrices Q h , key matrix K h Sum value matrix V h ; S42. Use multi-head attention to extract different frequency combinations, perform complex dot product attention on each head, and finally concatenate the attention outputs of all heads. Use the residual network to fuse the multi-head data to obtain the fused attention output.
8. The prediction method according to claim 7, characterized in that: Step S5 includes: S51, converting the fused attention output into a time domain signal through inverse Fourier transform; S52, when training the prediction model, supplement the label data with a length of H with a historical sequence with a length of L, so that the length of the label data is consistent with that of the time domain signal; S53. Calculate the difference between the real data and the predicted data according to the mean square error of the time series and the mean absolute error of the spectrum to obtain the time-domain and frequency-domain mixed loss; use the time-domain and frequency-domain mixed loss as the loss function to update the prediction model parameters to realize the training of the prediction model.
9. An electric vehicle charging load prediction system combining sequence decomposition and feature extraction, characterized in that: The prediction system is based on the prediction method according to any one of claims 1 to 8, comprising: The intrinsic mode function generation module obtains the operating data of the charging station, standardizes the operating data, and divides the operating data into a training set, a validation set, and a test set according to the proportion. The operating data of each set is subjected to variational mode decomposition to generate multiple intrinsic mode functions. The spectrum data generation module fills each intrinsic mode function with zeros to expand the data length, and then uses fast Fourier transform to obtain spectrum data with higher frequency resolution; The spectrum enhancement module uses data slicing to divide each spectrum data into multiple continuous frequency bands and then splices them to convert one-dimensional data into two-dimensional data; the two-dimensional data is input into a multi-layer perceptron based on complex domain calculation to enhance the spectrum data; A prediction model construction module is used to construct a prediction model based on a complex domain attention module and a residual module. The enhanced spectrum data is input into the constructed prediction model. The characteristic frequency combination of the data is extracted through the complex domain attention module and the residual module. The weighted sum of all intrinsic mode functions is used as the output of the prediction model. The prediction model training module predicts a period of historical data so that the future series will be consistent with the historical data in terms of data trend; the difference between the real data and the predicted data is calculated based on the mean square error of the time series and the mean absolute error of the spectrum to obtain the mixed loss in the time domain and frequency domain; the mixed loss is used as the loss function to update the prediction model parameters to realize the training of the prediction model.
10. A storage medium having computer instructions stored thereon, which, when executed by a processor, implements the steps of the prediction method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Power load prediction method based on variational mode decomposition and gating cycle unit
CN111193256A
Power load prediction method and system based on variational mode decomposition multi-granularity
CN118100142A
Gearbox gear remaining service life prediction method
CN118464432A
Cited By
New media wind control method and system based on artificial intelligence
CN120030393A
Data processing method and device, computer equipment and storage medium
CN120897218A
Charging load prediction method and device based on time sequence decomposition and electronic equipment
CN121983967A
Double-branch time sequence prediction method based on frequency amplitude shaping and period alignment
CN122241121A
A Two-Branch Time Series Prediction Method Based on Frequency Amplitude Shaping and Period Alignment
CN122241121B