Electric vehicle short-term load prediction method and device based on similar week and deep learning model, and storage medium

CN118245739BActive Publication Date: 2026-10-09CHINA THREE GORGES UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410354300.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-26
Publication Date
2026-10-09
Estimated Expiration
2044-03-26

AI Technical Summary

Technical Problem

[0007]本发明的目的是为了解决现有技术存在的传统模型驱动预测精度低且不够稳定,单一深度学习模型难以达到理想预测精度,历史负荷数据集质量低,且相似日提取效果差,以及深度学习模型超参数选取困难等问题,而提供的基于相似周和深度学习模型的电动汽车短期负荷预测方法、装置及存储介质

Benefits of technology

[0079]1. This invention uses a CNN-GRU combined deep learning model to perform electric vehicle load prediction. The CNN model extracts features from the input load sequence, and the GRU learns from the extracted features. It can learn fully from a large amount of historical load data of electric vehicles, achieving sufficient prediction accuracy and strong practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118245739B_ABST
    Figure CN118245739B_ABST
Patent Text Reader

Abstract

The application provides a short-term load prediction method and device for electric vehicles based on similar weeks and a deep learning model and a storage medium, S1: historical charging data and feature information of an electric vehicle charging station are acquired; S2: A optimal similar week sequences most similar to a prediction week are screened out based on a weighted formula of a Pearson correlation coefficient and dynamic time warping, feature information is added as features to construct a similar week data set; S3: all load sequences of the similar week data set are subjected to CEEMDAN modal decomposition processing to obtain N modal components, and weather information and the modal components are subjected to normalization processing; S4: the normalized weather information and the modal components are input into a CNN-GRU deep learning model, the model is trained, and a final electric vehicle short-term load prediction model is obtained; S5: a prediction week is formed by a prediction day and the six days before the prediction day, and the prediction week is input into the electric vehicle short-term load prediction model to obtain N normalized modal component prediction data; and S6: the modal component prediction data is subjected to inverse normalization and superposition to obtain electric vehicle load data of the prediction day.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power load forecasting technology, and in particular to a method, apparatus and storage medium for short-term load forecasting of electric vehicles based on similar cycles and deep learning models. Background Technology

[0002] As the penetration rate of electric vehicles increases year by year, their massive stochastic loads have a growing impact on the safe and stable operation of the power distribution network. Simultaneously, with the increasing maturity of research on bidirectional interaction technologies between electric vehicles and the power grid, the demand for technologies capable of accurately predicting electric vehicle loads is gradually increasing. Existing electric vehicle load forecasting methods mostly rely on model-driven approaches; however, model-driven methods lack real load data, resulting in significant discrepancies between predicted and actual load values, and are not sufficiently stable.

[0003] In recent years, with the rapid development of artificial intelligence and the establishment of electric vehicle charging station monitoring platforms in most city power systems, a new research direction has been opened up for electric vehicle load forecasting: data-driven forecasting. This involves inputting sampled historical load data into deep learning network models to predict electric vehicle loads. Data-driven forecasting offers higher accuracy and practicality in load prediction. However, due to the nonlinearity and indistinct characteristics of electric vehicle load sequences, a single prediction model struggles to achieve ideal prediction accuracy. Furthermore, the selection of hyperparameters in deep learning models often relies on empirical trial-and-error methods, which can also prevent the model from achieving optimal prediction accuracy.

[0004] Meanwhile, due to reasons such as improper terminal data acquisition or manual operation, historical load data often has many blank values, and there may even be long-term data anomalies. This will result in the low quality of the dataset input into the deep learning model, thus affecting the prediction accuracy. Extracting similar days to reconstruct the dataset is a common method to improve the quality of the dataset. However, the historical load data of electric vehicle charging stations has characteristics such as unclear features and nonlinearity, while the selection of similar days usually requires obvious features.

[0005] A method for predicting electric vehicle load (patent application number: CN202211559258.6) is currently disclosed, comprising: acquiring a large sample of electric vehicle load data; processing the large sample data to normalize it; constructing an LSTM model; inputting the normalized large sample data into the LSTM model, wherein the normalized large sample data includes a training set and a test set; training the LSTM model using the training set; and processing the test set using the trained LSTM model to obtain the predicted load of the large sample of electric vehicles. This invention can accurately predict the load of large sample electric vehicles, improve the prediction accuracy of small sample electric vehicle loads, provide a basis for power grid dispatch, and improve the safety of electric vehicle charging.

[0006] This publicly available solution uses LSTM to perform prediction tasks on large sample data, which improves the accuracy of electric vehicle load prediction. However, it does not perform further processing on the input dataset. Using the original dataset will increase the burden on the prediction model and the prediction time. Low-quality dataset input will also affect the prediction accuracy. In addition, the solution does not optimize the parameters of the prediction model, which may lead to the model's prediction effect not reaching its best. Furthermore, the solution uses a single LSTM prediction model, which is prone to overfitting and affecting the prediction accuracy. Summary of the Invention

[0007] The purpose of this invention is to address the problems of low and unstable prediction accuracy of traditional model-driven forecasting, difficulty in achieving ideal prediction accuracy with a single deep learning model, low quality of historical load datasets, poor similar day extraction performance, and difficulty in selecting hyperparameters for deep learning models. The invention provides a method, device, and storage medium for short-term load forecasting of electric vehicles based on similar weeks and deep learning models.

[0008] To achieve the above-mentioned technical features, the objective of this invention is as follows: a short-term load forecasting method for electric vehicles based on similarity cycles and deep learning models, comprising the following steps:

[0009] Step S1: Obtain historical charging data and feature information of electric vehicle charging stations;

[0010] Step S2: Select the A best similar week sequences that are most similar to the predicted week from the historical charging data, and add feature information to construct a similar week dataset;

[0011] Step S3: Perform CEEMDAN mode decomposition on all load sequences of similar weekly datasets to obtain N modal components, and normalize the feature information and modal components.

[0012] Step S4: Input the normalized feature information and modal components into the CNN-GRU deep learning model, train the model, and obtain the final short-term load prediction model for electric vehicles.

[0013] Step S5: Combine the forecast date with the six days preceding it to form a forecast week, and input it into the short-term load forecasting model for electric vehicles to obtain N normalized modal component forecast data.

[0014] Step S6: Inverse normalize the modal component prediction data and superimpose them to obtain the predicted daily electric vehicle load data.

[0015] The feature information in step S1 includes temperature, humidity, traffic flow, and whether it is a holiday.

[0016] The similar periodic sequence screening method in step S2 is a weighted formula of Pearson correlation coefficient and dynamic time warping, specifically:

[0017] Pearson correlation coefficient:

[0018]

[0019] d p(x,y) =1-p;

[0020] In the formula, x i and y i The load values ​​for similar weeks and the predicted week at the same date and time. and The load mean for similar and predicted weeks are respectively, where n is the sequence length and p is the load mean for the predicted week. (x,y) Let d be the Pearson correlation coefficient. p(x,y) This is a comprehensive measure of the Pearson correlation coefficient.

[0021] Dynamic time warping:

[0022] e (x,y) =||x i -y j ||2;

[0023]

[0024] In the formula, e (x,y) For Euclidean distance, x i and y j Let E be the load values ​​at sampling points i and j for similar and predicted cycles, and E be the cost matrix. Solve for e according to the following recursive formula. (1,1) to e (n,m) The shortest path;

[0025]

[0026] In the formula, γ (i,j) For the shortest path, γ is the value of the previous recursive point. (i-1,j-1) γ (i-1,j) and γ (i,j-1) For the possible paths from the previous recursive point to this recursive point, we get:

[0027]

[0028] In the formula, d DTW(x,y) γ is a comprehensive measure of dynamic time warping. (n,m) For e (1,1) to e (n,m) The shortest path, where m is the maximum number of sampling points for similar weeks, and n is the maximum number of sampling points for the predicted week;

[0029] Weighted formula:

[0030] d (x,y) =αd p(x,y) +βd DTW(x,y) ;

[0031] Where, d (x,y) To provide a comprehensive similarity measure, α and β are weighted coefficients for the Pearson correlation coefficient and the dynamic time warping formula.

[0032] In step S3, the CEEMDAN mode decomposition step specifically includes:

[0033] Step S3.1: Let the original signal be x(t). Add a normal distribution to x(t) to obtain the preprocessed sequence x. i (t):

[0034] x i (t)=x(t)+εδ i (t);

[0035] In the formula, i = 1, 2, 3, ..., k, ε is the noise figure, and δ i Let k be the noise of the i-th iteration, and k be the number of noises.

[0036] Step S3.2, for x i (t) Perform EMD decomposition to obtain K modal components The mean of the CEEMDAN decomposition is used as the IMF1:

[0037]

[0038] r1(t)=x(t)-I MF,1 (t);

[0039] In the formula, I MF,1 (t) represents the first modal component of the CEEMDAN decomposition, r1(t) represents the residual signal after the first decomposition, and K is the number of modal components.

[0040] Step S3.3: Add the noise back into the residual signal of the j-th stage after decomposition, and continue EMD decomposition:

[0041]

[0042] r j (t)=r j-1 (t)-I MF,j (t);

[0043] In the formula, I MF,j (t) represents the j-th mode component obtained from the CEEMDAN decomposition, E j-1[δ i [(t)] represents the (j-1)th IMF component after EMD decomposition, r j (t) represents the residual signal in the j-th stage, ε j-1 Noise figure;

[0044] Step S3.4: Repeat step S3.3. When the number of extreme points is less than 2 or the set number of components, the decomposition ends. At this point, the original signal is decomposed into K signal components and one residual component.

[0045]

[0046] Where r(t) is the margin signal, I MF,i (t) represents the i-th signal component.

[0047] In step S3, the normalization formula is specifically as follows:

[0048]

[0049] In the formula, x and x one These are the data values ​​before and after normalization, x. min and x max These are the minimum and minimum values ​​of the data, respectively.

[0050] In step S4, the CNN-GRU deep learning model is specifically as follows:

[0051] CNNs are used to extract features from the input data, which are then fed into a GRU for learning. The formula for the GRU is:

[0052] z t =σ(w z ×[h t-1 ,x t ]);

[0053] r t =σ(w r ×[h t-1 ,x t ]);

[0054]

[0055]

[0056] In the formula, x t This indicates the information input at the current moment, h t-1 z represents the hidden state at the previous time step. t Indicates the update gate, r t Indicates the reset gate. h represents the candidate hidden state. tThe hidden state is passed to the next time step, σ represents the sigmoid function, and w z w r w represents the weight of the corresponding gate.

[0057] The hyperparameters in the CNN-GRU deep learning model are optimized using the sparrow search algorithm.

[0058] The hyperparameters that need to be optimized include the number of convolutional kernels in the two-layer CNN, the number of hidden neurons in the three-layer GRU, as well as the batch size, learning rate, and maximum number of iterations. The optimized hyperparameter values ​​are then assigned to the CNN-GRU deep learning model.

[0059] The sparrow search algorithm includes the following steps:

[0060] Step 1: The formula for updating the discoverer's location is:

[0061]

[0062] In the formula, Let β1 represent the position of the i-th sparrow in the t-th iteration, β2 be a random number (β1∈(0,1]), β2 be a random number following a normal distribution, R2 be the warning threshold (R2∈[0,1]), ST be the safety threshold (ST∈[0.5,1]), and L be the number of sparrows in the t-th iteration. A matrix of all ones with the same dimensions; when R² < ST, it means there is no danger nearby, and the finder can forage in a wider area; when R² ≥ ST, it means there is danger nearby, and the finder needs to move to a different location to forage. max This represents the maximum number of iterations.

[0063] Step 2: The formula for updating the position of newcomers is:

[0064]

[0065] In the formula, Let $t$ be the worst position of the population in the $t$-th iteration. Let i be the optimal position of the discoverer in the t-th iteration, Q be the population size, and A be a one-row multidimensional matrix with all elements being 1 or -1. When i > 0.5Q, it means that the current fitness value is too low, and the newcomer needs to abandon the current area and switch to other areas to continue foraging. When i ≤ 0.5Q, it means that the current newcomer is searching near the optimal position.

[0066] Step 3: The formula for updating the scout's location is:

[0067]

[0068] In the formula, The current global optimal position is given by β3, which is a random number following a standard normal distribution. B is a random number, ∈ [-1, 1], and ε takes the value 10. -50 To prevent the denominator of the given fraction from being zero, f i f is the current fitness value of the sparrow. g f is the current optimal fitness value. w This is the worst fitness value at present.

[0069] A short-term load forecasting device for electric vehicles based on similarity cycles and a deep learning model, the device being used to implement the forecasting method, the device comprising:

[0070] The data acquisition module is used to acquire historical charging data, temperature, humidity, traffic flow, and holiday / holiday information of electric vehicle charging stations.

[0071] The similar week dataset construction module is used to select the A optimal similar week sequences that are most similar to the predicted week from historical charging data based on the Pearson correlation coefficient and the weighted formula of dynamic time warping, and add feature information to construct the similar week dataset.

[0072] The mode decomposition module is used to perform CEEMDAN mode decomposition on all load sequences of similar weekly datasets to obtain N mode components, and to normalize the feature information and mode components.

[0073] The hyperparameter optimization module is used to assign the optimized hyperparameters of the sparrow search algorithm to the CNN-GRU deep learning model;

[0074] The deep learning model training module is used to input normalized feature information and modal components into the CNN-GRU deep learning model to train the model.

[0075] The electric vehicle load forecasting module is used to combine the forecast date with the six days preceding it to form a forecast week, which is then input into the electric vehicle short-term load forecasting model to obtain N normalized modal component forecast data.

[0076] The prediction result overlay module is used to inverse normalize the modal component prediction data and overlay it to obtain the predicted daily electric vehicle load data.

[0077] A computer-readable storage medium storing one or more programs, which, when executed by a processor, implement a method for short-term load forecasting of electric vehicles based on a similarity cycle and a deep learning model as described in any one of claims 1-8.

[0078] The present invention has the following beneficial effects:

[0079] 1. This invention uses a CNN-GRU combined deep learning model to perform electric vehicle load prediction. The CNN model extracts features from the input load sequence, and the GRU learns from the extracted features. It can learn fully from a large amount of historical load data of electric vehicles, achieving sufficient prediction accuracy and strong practicality.

[0080] 2. This invention introduces sparrow search to optimize the hyperparameters of the CNN-GRU deep learning model. It optimizes the number of kernels in the two-layer CNN convolution, the number of hidden neurons in the three-layer GRU, as well as the batch size, learning rate, and maximum number of iterations. This can maximize the model's prediction accuracy and provide corresponding hyperparameter configurations for different datasets.

[0081] 3. This invention uses historical load data to filter similar weekly curves using a weighted formula based on Pearson correlation coefficient and dynamic time regularization to obtain similar weekly datasets. This results in higher dataset quality and shorter load sequence lengths, solving problems such as low quality of historical load datasets and poor extraction of similar days, while improving prediction accuracy and speed. Attached Figure Description

[0082] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0083] Figure 1 This is a flowchart of a short-term load forecasting method for electric vehicles based on a similarity cycle and a deep learning model, according to the present invention.

[0084] Figure 2 This is a structural diagram of a short-term load forecasting device for electric vehicles based on a similarity cycle and a deep learning model, according to the present invention.

[0085] Figure 3 This is a comparison chart of load curves for similar cycles according to the present invention.

[0086] Figure 4 This is a comparison chart of the prediction curves of different models of this invention. Detailed Implementation

[0087] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0088] Example 1:

[0089] like Figure 1 As shown, this embodiment provides a method for short-term load forecasting of electric vehicles based on similarity cycles and deep learning models, including:

[0090] Step S1: Obtain historical charging data and feature information of electric vehicle charging stations.

[0091] In practice, historical charging data of charging stations in a certain area can be selected. A large amount of historical charging data and characteristic information of charging stations in that area can be collected in advance. The time interval for collecting historical charging data and characteristic information can be set to 15 minutes, 30 minutes, 60 minutes, etc., according to actual needs. The characteristic information includes temperature, humidity, traffic flow and whether it is a holiday. Temperature and humidity can be obtained from weather forecasts or thermometers, thermocouples, etc., and traffic flow can be obtained from traffic map software or other publicly available data.

[0092] Step S2: Select the A best similar week sequences that are most similar to the predicted week from the historical charging data, and add feature information to construct a similar week dataset;

[0093] The similar weekly sequences were selected using a weighted average of the Pearson correlation coefficient and dynamic time regularization, specifically as follows:

[0094] The Pearson correlation coefficient can be used to assess the strength of the linear relationship between two variables. This method can quantify the similarity of local alignment features between any two load curves; the formula is as follows:

[0095]

[0096] d p(x,y) =1-p;

[0097] In the formula, x i and y i The load values ​​for similar weeks and the predicted week at the same date and time. and The load mean for similar and predicted weeks are respectively, where n is the sequence length and p is the load mean for the predicted week. (x,y) Let d be the Pearson correlation coefficient. p(x,y) This is a comprehensive measure of the Pearson correlation coefficient.

[0098] Dynamic time warping can scale time series and calculate the overall trend similarity between two time series, overcoming the problem that using a single Pearson correlation coefficient method easily ignores the overall trend of the load curve. Its formula is:

[0099] e (x,y) =||x i -y j ||2;

[0100]

[0101] In the formula, e (x,y) For Euclidean distance, x i and y j Let E be the load values ​​at sampling points i and j for similar and predicted cycles, and E be the cost matrix. Solve for e according to the following recursive formula. (1,1)to e (n,m) The shortest path;

[0102]

[0103] In the formula, γ (i,j) For the shortest path, γ is the value of the previous recursive point. (i-1,j-1) γ (i-1,j) and γ (i,j-1) For the possible paths from the previous recursive point to this recursive point, we get:

[0104]

[0105] In the formula, d DTW(x,y) γ is a comprehensive measure of dynamic time warping. (n,m) For e (1,1) to e (n,m) The shortest path, where m is the maximum number of sampling points for similar weeks, and n is the maximum number of sampling points for the predicted week;

[0106] Based on the two measures mentioned above, a weighted comprehensive similarity measure is proposed, with the weighting formula as follows:

[0107] d (x,y) =αd p(x,y) +βd DTW(x,y) ;

[0108] Where, d (x,y) To comprehensively measure similarity, α and β are weighted coefficients of the Pearson correlation coefficient and the dynamic time warping formula. In this embodiment, both α and β are set to 0.5.

[0109] Step S3: Perform CEEMDAN mode decomposition on all load sequences of similar weekly datasets to obtain N modal components, and normalize the feature information and modal components.

[0110] The CEEMDAN mode decomposition steps are as follows:

[0111] Step S3.1: Let the original signal be x(t). Add a normal distribution to x(t) to obtain the preprocessed sequence x. i (t):

[0112] x i (t)=x(t)+εδ i (t);

[0113] In the formula, i = 1, 2, 3, ..., k, ε is the noise figure, and δ i Let k be the noise of the i-th iteration, and k be the number of noises.

[0114] Step S3.2, for xi (t) Perform EMD decomposition to obtain K modal components The mean of the CEEMDAN decomposition is used as the IMF1:

[0115]

[0116] r1(t)=x(t)-I MF,1 (t);

[0117] In the formula, I MF,1 (t) represents the first modal component of the CEEMDAN decomposition, r1(t) represents the residual signal after the first decomposition, and K is the number of modal components.

[0118] Step S3.3: Add the noise back into the residual signal of the j-th stage after decomposition, and continue EMD decomposition:

[0119]

[0120] r j (t)=r j-1 (t)-I MF,j (t);

[0121] In the formula, I MF,j (t) represents the j-th mode component obtained from the CEEMDAN decomposition, E j-1 [δ i [(t)] represents the (j-1)th IMF component after EMD decomposition, r j (t) represents the residual signal in the j-th stage, ε j-1 Noise figure;

[0122] Step S3.4: Repeat step S3.3. When the number of extreme points is less than 2 or the set number of components, the decomposition ends. At this point, the original signal is decomposed into K signal components and one residual component.

[0123]

[0124] Where r(t) is the margin signal, I MF,i (t) represents the i-th signal component.

[0125] In step S3, the normalization formula is specifically as follows:

[0126]

[0127] In the formula, x and x one These are the data values ​​before and after normalization, x. min and x max These are the minimum and minimum values ​​of the data, respectively.

[0128] Step S4: Input the normalized feature information and modal components into the CNN-GRU deep learning model, train the model, and obtain the final short-term load prediction model for electric vehicles.

[0129] The CNN-GRU deep learning model is specifically as follows:

[0130] CNNs are feedforward neural networks that can extract multi-faceted and deep features from time series. Compared to manually designed multi-dimensional input features, CNNs have better discriminative and generalization capabilities. A CNN consists of an input layer, convolutional layers, pooling layers, fully connected layers, and an output layer. Its main components are convolutional and pooling layers. Convolutional layers extract local features from the input time series and mine deep features from the data. Pooling layers compress the extracted features to reduce network complexity. In this embodiment, CNNs are used to extract features from the input data and then fed into a GRU for learning.

[0131] GRU is a gating mechanism in recurrent neural networks (RNNs) that can learn relatively long-term dependencies without encountering the vanishing and exploding gradient problems. GRU and LSTM are two types of RNNs. GRU combines the input and forget gates of LSTM into an update gate while retaining the reset gate, simplifying the network structure without reducing prediction accuracy. The formula for GRU is:

[0132] z t =σ(w z ×[h t-1 ,x t ]);

[0133] r t =σ(w r ×[h t-1 ,x t ]);

[0134]

[0135]

[0136] In the formula, x t This indicates the information input at the current moment, h t-1 z represents the hidden state at the previous time step. t Indicates the update gate, r t Indicates the reset gate. h represents the candidate hidden state. t The hidden state is passed to the next time step, σ represents the sigmoid function, and w z w r w represents the weight of the corresponding gate.

[0137] Furthermore, the hyperparameters in the CNN-GRU deep learning model are optimized using a sparrow search algorithm. The hyperparameters to be optimized include the number of kernels in the two CNN layers, the number of hidden neurons in the three GRU layers, as well as the batch size, learning rate, and maximum number of iterations. The optimized hyperparameter values ​​are then assigned to the CNN-GRU deep learning model. The sparrow search algorithm includes the following steps:

[0138] Step 1: The formula for updating the discoverer's location is:

[0139]

[0140] In the formula, Let β1 represent the position of the i-th sparrow in the t-th iteration, β2 be a random number (β1∈(0,1]), β2 be a random number following a normal distribution, R2 be the warning threshold (R2∈[0,1]), ST be the safety threshold (ST∈[0.5,1]), and L be the number of sparrows in the t-th iteration. A matrix of all ones with the same dimensions; when R² < ST, it means there is no danger nearby, and the finder can forage in a wider area; when R² ≥ ST, it means there is danger nearby, and the finder needs to move to a different location to forage. max This represents the maximum number of iterations.

[0141] Step 2: The formula for updating the position of newcomers is:

[0142]

[0143] In the formula, Let $t$ be the worst position of the population in the $t$-th iteration. Let i be the optimal position of the discoverer in the t-th iteration, Q be the population size, and A be a one-row multidimensional matrix with all elements being 1 or -1. When i > 0.5Q, it means that the current fitness value is too low, and the newcomer needs to abandon the current area and switch to other areas to continue foraging. When i ≤ 0.5Q, it means that the current newcomer is searching near the optimal position.

[0144] Step 3: The formula for updating the scout's location is:

[0145]

[0146] In the formula, The current global optimal position is given by β3, which is a random number following a standard normal distribution. B is a random number, ∈ [-1, 1], and ε takes the value 10. -50 To prevent the denominator of the given fraction from being zero, f i f is the current fitness value of the sparrow. g f is the current optimal fitness value. w This is the worst fitness value at present.

[0147] Step S5: Combine the forecast date with the six days preceding it to form a forecast week, and input it into the short-term load forecasting model for electric vehicles to obtain N normalized modal component forecast data.

[0148] Step S6: Inverse normalize the modal component prediction data and superimpose them to obtain the predicted daily electric vehicle load data.

[0149] Example 2:

[0150] like Figure 2 A short-term load forecasting device for electric vehicles based on similarity cycles and a deep learning model, the device being used to implement the forecasting method, the device comprising:

[0151] The data acquisition module is used to acquire historical charging data, temperature, humidity, traffic flow, and holiday / holiday information of electric vehicle charging stations.

[0152] The similar week dataset construction module is used to select the A optimal similar week sequences that are most similar to the predicted week from historical charging data based on the Pearson correlation coefficient and the weighted formula of dynamic time warping, and add feature information to construct the similar week dataset.

[0153] The mode decomposition module is used to perform CEEMDAN mode decomposition on all load sequences of similar weekly datasets to obtain N mode components, and to normalize the feature information and mode components.

[0154] The hyperparameter optimization module is used to assign the optimized hyperparameters of the sparrow search algorithm to the CNN-GRU deep learning model;

[0155] The deep learning model training module is used to input normalized feature information and modal components into the CNN-GRU deep learning model to train the model.

[0156] The electric vehicle load forecasting module is used to combine the forecast date with the six days preceding it to form a forecast week, which is then input into the electric vehicle short-term load forecasting model to obtain N normalized modal component forecast data.

[0157] The prediction result overlay module is used to inverse normalize the modal component prediction data and overlay it to obtain the predicted daily electric vehicle load data.

[0158] Example 3:

[0159] A computer-readable storage medium storing one or more programs, which, when executed by a processor, implement a method for short-term load forecasting of electric vehicles based on a similarity cycle and a deep learning model as described in any one of claims 1-8.

[0160] Example 4:

[0161] A simulation scenario for electric vehicle load prediction was set up. Simulation experiments were conducted to verify the prediction accuracy and rationality of the method proposed in this invention.

[0162] The experiment used historical charging data from all electric vehicle charging stations located in the same area of ​​a city. The original dataset included load data and weather temperature information from January 1, 2018 to December 31, 2019, with a sampling period of 1 hour, totaling 17,520 data points.

[0163] The hyperparameters of the CNN-GRU deep learning model were optimized using the sparrow search algorithm, and the optimization results are shown in Table 1.

[0164] Table 1 Optimization Results

[0165]

[0166] To objectively evaluate the rationality of the method of this invention, the mean absolute error (MAE) and root mean squared error (RMSE) are used as model evaluation metrics. The formulas for calculating MAE and RMSE are as follows.

[0167]

[0168]

[0169] In the formula, y i and These are the actual and predicted load values. It is the predicted sample mean, where n is the number of samples.

[0170] To eliminate the influence of different units on prediction accuracy, this invention normalizes the input data, and the normalization formula is as follows.

[0171]

[0172] In the formula, x and x one These are the data values ​​before and after normalization, x. min and x max These are the minimum and maximum values ​​of the data, respectively. The input dataset is divided into training, validation, and test sets in an 8:1:1 ratio.

[0173] September 13, 2019, was randomly selected as the date to be predicted. The six days preceding the date and the date to be predicted were combined to form a prediction week. The sliding window step size was set to 6. The original load sequence was traversed. The similarity between each consecutive six days and the six days preceding the prediction week was calculated using a comprehensive similarity metric. The data of the nine consecutive six days with the highest similarity and their respective following days were merged to form a similar sequence set. The results of the similar week selection are shown in Table 2.

[0174] Table 2. Results of similar week selection

[0175]

[0176] (1) To verify the effectiveness of this invention in extracting similar cycles using a comprehensive similarity metric, load curves for different similar cycles were plotted by sampling each point of all similar cycle sequences, as shown below. Figure 3 As shown, comparing the curve similarity of similar weekly load sequences, the overall shape and local features of the load curves of different similar weeks and the predicted week are quite similar.

[0177] (2) To verify the improvement in prediction accuracy achieved by using a similar weekly dataset, the original dataset and the traditional similar daily dataset were compared with the similar weekly dataset of this invention. The traditional similar daily dataset was constructed by calculating the similarity of climate features between the day to be predicted and the historical load input using grey relational analysis. The climate features included temperature, humidity, air pressure, and date factors. The prediction model used was a CNN-GRU model optimized by the sparrow search algorithm. The evaluation metrics are shown in Table 3.

[0178] Table 3 Evaluation Indicators

[0179]

[0180] Compared to traditional similar day datasets, the similar week dataset reduced MAE and RMSE by 27.60% and 19.71%, respectively; compared to the original dataset, MAE and RMSE were reduced by 18.71% and 14.17%, respectively. Experiments show that using similar week datasets can improve dataset quality, and inputting similar week datasets into prediction models can significantly improve prediction accuracy.

[0181] (3) To test the superiority of the CNN-GRU deep learning model of this invention over the comparison models, LSTM and KELM were selected as comparison models. To avoid the influence of other factors, similar weekly datasets were used as input for different prediction models, and all models were decomposed using CEEMDAN. The sparrow search algorithm was also used for hyperparameter optimization. The prediction curves of different models were compared as follows: Figure 4 As shown in Table 4.

[0182] Table 4 Comparison of prediction curves from different models

[0183]

[0184] Compared to LSTM and KELM models, the CNN-GRU prediction model reduced MAE by 27.48% and 36.09%, respectively, and RMSE by 20.04% and 27.83%, respectively. This verifies the rationality and superiority of the CNN-GRU prediction model of this invention.

Claims

1. A method for short-term load forecasting of electric vehicles based on similarity cycles and deep learning models, characterized in that, Includes the following steps: Step S1: Obtain historical charging data and feature information of electric vehicle charging stations; Step S2: Select the A best similar week sequences that are most similar to the predicted week from the historical charging data, and add feature information to construct a similar week dataset; Step S3: Perform CEEMDAN mode decomposition on all load sequences of similar weekly datasets to obtain N modal components, and normalize the feature information and modal components. Step S4: Input the normalized feature information and modal components into the CNN-GRU deep learning model, train the model, and obtain the final short-term load prediction model for electric vehicles. Step S5: Combine the forecast date with the six days preceding it to form a forecast week, and input it into the short-term load forecasting model for electric vehicles to obtain N normalized modal component forecast data. Step S6: Inverse normalize the modal component prediction data and superimpose them to obtain the predicted daily electric vehicle load data; The similar periodic sequence selection method in step S2 is a weighted formula of Pearson correlation coefficient and dynamic time warping, specifically: Pearson correlation coefficient: ; ; In the formula, and The load values ​​for similar weeks and the predicted week at the same date and time. and These are the load averages for similar weeks and the predicted week, respectively. For sequence length, The Pearson correlation coefficient is used. This is a comprehensive measure of the Pearson correlation coefficient. Dynamic time warping: ; ; In the formula, Euclidean distance. and For similar weeks and predicted weeks and The load value at each sampling point Given the cost matrix, solve using the following recurrence relation. arrive The shortest path; ; In the formula, For the shortest path, The value of the previous recursive point. , and For the possible paths from the previous recursive point to this recursive point, we get: ; In the formula, It is a comprehensive metric for dynamic time warping. for arrive The shortest path, m The maximum number of sampling points for similar cycles. n To predict the maximum number of sampling points for the week; Weighted formula: ; in, To comprehensively measure similarity, and It is a weighted coefficient of the Pearson correlation coefficient and the dynamic time warping formula; In step S4, the CNN-GRU deep learning model is specifically as follows: CNNs are used to extract features from the input data, which are then fed into a GRU for learning. The formula for the GRU is: ; ; ; ; In the formula, This indicates the information to be entered at the current moment. This indicates the hidden state at the previous moment. Indicates an update to the door. Indicates the reset gate. Indicates the candidate hidden state. This represents the hidden state that is passed on to the next time step. This represents the sigmoid function. , , It represents the weight of the corresponding gate; The hyperparameters in the CNN-GRU deep learning model are optimized using the sparrow search algorithm. The hyperparameters that need to be optimized include the number of convolutional kernels in the two-layer CNN, the number of hidden neurons in the three-layer GRU, as well as the batch size, learning rate, and maximum number of iterations. The optimized hyperparameter values ​​are then assigned to the CNN-GRU deep learning model.

2. The method for short-term load forecasting of electric vehicles based on similarity cycles and deep learning models according to claim 1, characterized in that: The feature information in step S1 includes temperature, humidity, traffic flow, and whether it is a holiday.

3. The method for short-term load forecasting of electric vehicles based on similarity cycles and deep learning models according to claim 1, characterized in that: In step S3, the CEEMDAN mode decomposition step specifically includes: Step S3.1, let the original signal be... Adding the normal distribution In the process, a preprocessed sequence is obtained. : ; In the formula, , Noise figure For the first Secondary noise k The number of noises; Step S3.2, for Perform EMD decomposition and obtain Modal components The mean of the CEEMDAN decomposition is used as the IMF1: ; ; In the formula, This is the first modal component of the Ceemdan decomposition. This represents the remaining signal after the first decomposition. K The number of modal components; Step S3.3, add the noise again to the decomposed first... j Within the remaining signal of the stage, EMD decomposition continues: ; ; In the formula, The first denoted CEEMDAN decomposition is the th denoted CEEMDAN. Modal components, Represents the first decomposition after EMD. One IMF component, Indicates the first The remaining signal of the stage. Noise figure; Step S3.4: Repeat step S3.

3. When the number of extreme points is less than 2 or the set number of components, the decomposition ends; at this point, the original signal is decomposed into... One signal component and one residual component: ; in, This is a margin signal. For the first Each signal component.

4. The method for short-term load forecasting of electric vehicles based on similarity cycles and deep learning models according to claim 1, characterized in that: In step S3, the normalization formula is specifically as follows: ; In the formula, and These are the data values ​​before and after normalization, respectively. and These are the minimum and minimum values ​​of the data, respectively.

5. The method for short-term load forecasting of electric vehicles based on similarity cycles and deep learning models according to claim 1, characterized in that, The sparrow search algorithm includes the following steps: Step 1: The formula for updating the discoverer's location is: ; In the formula, Indicates the first In the nth iteration The position of the sparrow It is a random number. , It is a random number that follows a normal distribution. It is the warning threshold. , It is a safety threshold. , Is with A matrix of all ones with the same dimension; when When this indicates there is no danger nearby, the finder can forage in a wider area. When this happens, it indicates danger in the surroundings, and the finder should move to another location to forage. This represents the maximum number of iterations. Step 2: The formula for updating the position of newcomers is: ; In the formula, For the first The worst position of the population in the next iteration For the first The optimal position of the discoverer in the next iteration. For population size, For a single-row multidimensional matrix whose elements are all 1s or -1s, when When the current fitness value is too low, the newcomer must abandon the current area and move to another area to continue foraging. When the current participant is searching near the optimal position, it indicates that the participant is currently searching. Step 3: The formula for updating the scout's location is: ; In the formula, It is the current globally optimal position. It is a random number that follows a standard normal distribution. It is a random number. , Values To prevent the denominator of the given fraction from being zero, This represents the current fitness value of the sparrow. This is the current optimal fitness value. This is the worst fitness value at present.

6. A short-term load forecasting device for electric vehicles based on similarity cycles and a deep learning model, characterized in that, The apparatus is used to implement the prediction method according to any one of claims 1-5, the apparatus comprising: The data acquisition module is used to acquire historical charging data, temperature, humidity, traffic flow, and holiday / holiday information of electric vehicle charging stations. The similar week dataset construction module is used to select the A optimal similar week sequences that are most similar to the predicted week from historical charging data based on the Pearson correlation coefficient and the weighted formula of dynamic time warping, and add feature information to construct the similar week dataset. The mode decomposition module is used to perform CEEMDAN mode decomposition on all load sequences of similar weekly datasets to obtain N mode components, and to normalize the feature information and mode components. The hyperparameter optimization module is used to assign the optimized hyperparameters of the sparrow search algorithm to the CNN-GRU deep learning model; The deep learning model training module is used to input normalized feature information and modal components into the CNN-GRU deep learning model to train the model. The electric vehicle load forecasting module is used to combine the forecast date with the six days preceding it to form a forecast week, which is then input into the electric vehicle short-term load forecasting model to obtain N normalized modal component forecast data. The prediction result overlay module is used to inverse normalize the modal component prediction data and overlay it to obtain the predicted daily electric vehicle load data.

7. A computer-readable storage medium storing one or more programs, which, when executed by a processor, implement a method for short-term load forecasting of electric vehicles based on a similarity cycle and a deep learning model as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Electric vehicle load prediction method

    CN115730635A

  • Short-term load prediction method considering error compensation and mode decomposition

    CN119109021A