Electric vehicle charging load prediction method based on combined neural network

By constructing the LLE-CNN-GRU model and performing hyperparameter tuning based on the combined neural network method, the problem of low accuracy in load prediction of electric vehicle charging facilities is solved and higher prediction accuracy and adaptability are achieved.

CN118657251APending Publication Date: 2024-09-17JILIN ELECTRIC POWER RES INST LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410805860.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

At present, the load forecasting accuracy of electric vehicle charging facilities is low, making it difficult to cope with the randomness and seasonal changes in the charging and swapping behavior of electric vehicle users.

Method used

Using a method based on combined neural networks, by collecting historical charging and swapping load data, constructing a feature matrix and performing data dimensionality reduction, an LLE-CNN-GRU hybrid neural network model was built, and combined with the ISSA algorithm for hyperparameter tuning to improve charging and swapping. Load forecast accuracy.

Benefits of technology

It improves the load prediction accuracy of electric vehicle charging facilities, enables more accurate prediction of charging and replacement needs, and adapts to changes in different seasons and user preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657251A
    Figure CN118657251A
Patent Text Reader

Abstract

The invention discloses an electric vehicle charging load prediction method based on a combined neural network, and relates to the technical field of electric vehicle load prediction. Comprising the following steps: S1, collecting historical charging load data, and carrying out data preprocessing; s2, constructing a feature matrix by using three factors of date type, holiday and air temperature and the charging and battery swapping load data, and taking the feature matrix as the input of a charging facility load prediction model; s3, on the basis of an LLE algorithm, dimension reduction is carried out on the charging and battery swapping load data; s4, building a charging facility load prediction model based on the LLE-CNN-GRU hybrid neural network; s5, performing hyper-parameter tuning on the charging facility load prediction model by using an ISSA algorithm based on a hybrid strategy; and S6, inputting the feature matrix into the optimized charging facility load prediction model, and carrying out load prediction on the charging facility. The method can improve the expected precision of the electric vehicle charging facility load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric vehicle load prediction, and in particular to a method for predicting electric vehicle charging and swapping load based on a combined neural network. Background Art

[0002] The development of electric vehicles is an important means for countries to cope with the energy crisis and alleviate climate warming. With the development of electric vehicles, electric vehicle charging and swapping technology has also been vigorously developed. At this stage, the more mature electric vehicle charging modes include charging pile charging mode and battery swapping mode at battery swapping stations. The potential preference behaviors of electric vehicle users for charging and swapping can be divided into four modes: low-anxiety slow charging, high-anxiety fast charging, charging at any time, and destination charging. The same user has different potential preferences in winter and summer. The potential preferences of different electric vehicle users have different effects on the power of charging and swapping facilities, so it is difficult to do a good job of unified management.

[0003] The randomness of electric vehicle users' charging behavior poses a great challenge to the short-term prediction of charging load at electric vehicle charging stations. However, under the influence of multiple factors, there is still a problem of low accuracy in the predicted load of electric vehicle charging facilities.

[0004] Therefore, how to develop a method to achieve the expected accuracy of the load of electric vehicle charging facilities is one of the problems that needs to be solved urgently. Summary of the invention

[0005] In order to solve at least one of the technical problems mentioned in the background technology, the purpose of the present invention is to provide an electric vehicle charging and swapping load prediction method based on a combined neural network to improve the expected accuracy of the electric vehicle charging facility load.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for predicting electric vehicle charging and swapping load based on a combined neural network comprises the following steps:

[0008] S1, collect historical charging and swapping load data and perform data preprocessing;

[0009] S2, based on the three factors of date type, holiday, temperature and charging and swapping load data, constructs a feature matrix as the input of the charging facility load prediction model;

[0010] S3, based on the LLE algorithm, the charging and swapping load data is reduced in dimension;

[0011] S4, build a charging facility load prediction model based on LLE-CNN-GRU hybrid neural network;

[0012] S5, using an ISSA algorithm based on a hybrid strategy to perform hyperparameter tuning on the charging facility load forecasting model;

[0013] S6, inputting the characteristic matrix into the optimized charging facility load prediction model to perform charging and swapping facility load prediction.

[0014] In certain embodiments of the present invention, in S1, the preprocessing includes filling in null values ​​and / or normalizing the charging and swapping load data.

[0015] In some embodiments of the present invention, the method of filling in null values ​​is as follows:

[0016]

[0017] In the formula, y k Fill in data for missing moments; y k-1 The charging and swapping load value at the same time of the same weekday in the previous week; k+1 It is the charging and swapping load value at the same time of the same day of the following week.

[0018] In some embodiments of the present invention, the input and output relationship of the charging facility load prediction model is as follows:

[0019]

[0020] Where D (k-m)×7 , H (k-m)×2 、T (k-m)×1 and w (k-m)×1 are the input feature quantities X, which represent date type (day of the week), holidays, temperature, and historical charging load of the charging station; is the model output Y, i.e., the predicted value of charging and swapping load; k is the current sample time; k+1 is the time to be predicted; km is the m+1 time before the time to be predicted, including the k time; and the input feature matrix X of the model is:

[0021] X=[D (m+1)×7 , H (m+1)×2 , T (m+1)×1 , w (m+1)×1 ]

[0022] In the formula, each training sample is a matrix of (m+1)×11 order; D (m+1)×7 and H (m+1)×2 They are the one-hot encoding matrices for weekdays and holiday types, as shown in the following formula:

[0023]

[0024]

[0025] Where D j1 D j2 D j3 D j4 D j5 D j6 D j7 (j=1, 2, ..., m+1) is a 7-bit binary code, which represents Monday to Sunday in order. If a bit in the code is 1, it means that the date type of the day is the corresponding date of the week. i1 H i2 It is a 2-bit binary code 01 or 10. Binary 01 means that the day is a holiday, and binary 10 means that the day is not a holiday.

[0026] T (m+1)×1 and w (m+1)×1 are the column vectors of the air temperature and the historical charging and swapping load sequence, as shown in the following formula:

[0027]

[0028] In the formula, Tj and w j (j=1, 2, ..., m+1) are the decimal values ​​of air temperature and historical load respectively.

[0029] In some embodiments of the present invention, in S3, the method for reducing the dimension of the charging and swapping load data is as follows:

[0030] Assume that the high-dimensional data is X = [x1, x2, ..., x N ]∈R D×N , the low-dimensional embedding result is Y = [y1,y2,…,y N ]∈R d×N ; where D is the dimension of the original data set, d is the dimension of the low-dimensional data, N represents the number of samples, x i is the i-th sample in the high-dimensional space; y i is the i-th sample in the low-dimensional space;

[0031] S3.1 selects neighboring points, uses similarity metrics to calculate the similarity between xi and other sample points, and then selects k nearest sample points as neighboring points of x;

[0032] S3.2 calculate the reconstruction matrix W;

[0033] Use the neighboring points of the sample to linearly reconstruct it, and obtain the reconstruction matrix W by minimizing the reconstruction error:

[0034]

[0035] Among them, w ij It means x iWith x j The weight coefficient between j Not x i When the neighbor of ij is 0;

[0036] S3.3 obtains the low-dimensional embedding result Y; uses the weight coefficient to reconstruct the sample data in the low-dimensional space, and obtains the embedding result by minimizing the loss function J(y):

[0037]

[0038] In the formula, w ij It means x i With x j The weight coefficient between i is the i-th sample in the low-dimensional space.

[0039] In some embodiments of the present invention, the charging facility load prediction model adopts a 9-layer model:

[0040] The first layer is the input layer, the ninth layer is the output layer, and the middle two to eight layers are the core layers of the LLE-CNN-GRU load forecasting model. First, two layers of CNN reduce the dimension and extract the feature quantity of the input data, then the feature map based on the reduced dimension feature quantity is stretched into a one-dimensional vector and input into the GRU neural network to start simulation training; finally, a fully connected layer integrates the GRU neural network results and outputs the predicted value in the specified format;

[0041] In the 9-layer model, except for the input layer and the output layer, the specific information of the remaining layers is as follows:

[0042] The second and third layers are convolutional layers, in which the input data is subjected to translation convolution to extract feature information, and then activated and pooled to output feature maps; the convolution kernel size of the second layer is set to 3×5, the convolution kernel size of the third layer is set to 3×3, and the step size is set to 1; the pooling is average pooling, and the activation function is the elu function; the outputs of the second and third layers are expressed as follows:

[0043] C1=C NN (X)

[0044] C2=C NN (C1)

[0045] The output graph of CNN is as follows:

[0046] M=C2

[0047] The fourth layer is a flat layer, which stretches the three-dimensional vector array of the feature map M into a one-dimensional vector array N;

[0048] The fifth, sixth and seventh GNR layers are stacked to form a GRU network; the feature map M is converted into a one-dimensional vector N by the flattening layer and then input into the fifth layer;

[0049] The outputs of the fifth, sixth, and seventh layers of GRU in step l represent g 1,l , g 2,l , g 3,l , as shown in the following formula:

[0050] g 1,l =G RU (g 1,l-1 , N l )

[0051] g 2,l =G RU (g 2,l-1 , G 1,l )

[0052] g 3,l =G RU (g 3,l-1 , G 2,l )

[0053] In the formula, g 1,l-1 is the output of the fifth layer at step l-1; N l Input the one-dimensional vector array of the fifth layer for step l; g 2,l-1 is the output of the sixth layer at step 1-1, G 1,l is the output of the fifth layer at step l; g 3,l-1 is the output of the seventh layer at step l-1; G 2,l is the output of the sixth layer at step l; the output of each layer in the model at step l depends on the input of this step and the output of the previous step;

[0054] The eighth layer is a fully connected layer, which is responsible for integrating the results in G3 and then outputting a vector in a specified format, in which the number of neurons matches the number of model outputs; the number of fully connected layers is one, ensuring that the output of the LLE-CNN-GRU load forecasting model is the charging load forecast value at a single moment.

[0055] In some embodiments of the present invention, in S5, the method of hyperparameter tuning is as follows:

[0056] Use Circle chaos map to initialize the sparrow population to make it evenly distributed. The expression of Circle chaos map is as follows:

[0057]

[0058] In the formula, n represents the dimension of the solution; x n is the solution before Circle chaos mapping; xn+1 is the solution after the Circle chaos mapping; when R2<ST, each dimension of the discoverer's position converges to 0, the possibility of the algorithm searching for the optimal value in the area near 0 increases, and the algorithm is prone to fall into the local optimum. In order to improve the global search ability of the algorithm and coordinate the global and local search capabilities of the sparrow individuals, the present invention proposes a leader update strategy, which is expressed as follows:

[0059]

[0060] In the formula, is the position of the ith individual in dimension d; F d is the location of the food source at d; u b and l b are the upper and lower limits of the solution respectively; c2 and c3 are both random numbers between [0, 1]; c1 is the decay variable, and the expression is as follows:

[0061]

[0062] Where t is the current iteration number; T max is the maximum number of iterations; the finder position is updated as follows:

[0063]

[0064] For the joiner in the SSA algorithm, when i>Q / 2, the position of the sparrow is equal to the product of a standard normal distribution random number and an exponential function with a natural logarithm as the base, and its value converges to 0 when the population converges; therefore, in the ISSA algorithm of the present invention, in order to ensure that each joiner approaches the discoverer it follows and does not fall into 0, the formula is:

[0065]

[0066] Then, based on the above optimization algorithm, the hyperparameters of the LLE-CNN-GRU load forecasting model are optimized; first, the number of convolution kernels of the two CNN layers, the number of hidden neurons of the three GRU layers, the maximum number of iterations, the batch sample size and the learning rate in the LLE-CNN-GRU model are set as the hyperparameters to be optimized; the optimization range of the number of convolution kernels of the two CNN layers and the number of hidden neurons of the three GRU layers in the convolution layer of the two CNN layers is [8, 128], the optimization range of the maximum number of iterations is [10, 100], the optimization range of the batch sample size is [128, 512], and the optimization range of the learning rate is [0.001, 0.1].

[0067] Compared with the prior art, the present invention has the following beneficial effects:

[0068] The present invention first selects and collects three factors, namely date type (weekly date), holidays and temperature, and historical charging load data of charging and swapping facilities, and jointly builds a feature matrix as model input. Then, the LLE algorithm is used to reduce the dimension of the data, remove the redundant content in the data, retain its core, and combine the characteristics of CNN and the processing advantages of GRU neural network for time series data to build an LLE-CNN-GRU model. The ISSA is used to tune the hyperparameters of the model, and finally the optimized model is used to predict the load of charging facilities, thereby improving the expected accuracy of the load of electric vehicle charging facilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 The figure is a flow chart of the overall method of the present invention. DETAILED DESCRIPTION

[0070] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments 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.

[0071] Please refer to Figure 1 This embodiment provides a method for predicting the charging and swapping load of electric vehicles based on a combined neural network. First, three factors, namely, date type (weekly date), holidays and temperature, and historical charging load data of charging and swapping facilities are selected and collected to jointly build a feature matrix as the model input. Then, the LLE algorithm is used to reduce the dimension of the data, remove the redundant content in the data, and retain its core. The LLE-CNN-GRU model is built by combining the features of CNN and the processing advantages of GRU neural network for time series data. The ISSA is used to tune the hyperparameters of the model, and finally the optimized model is used to predict the load of charging facilities.

[0072] The specific steps include:

[0073] S1: Collect historical charging and swapping load data and perform data preprocessing.

[0074] The historical data exported by the charging and swapping facility data collection system includes information such as order number and charging pile ID, and then the data is pre-processed.

[0075] The historical charging and swapping load data also contains a lot of invalid information such as order number and charging pile ID. Therefore, the Pandas package in Python is used to filter and clean the data. Only the charging and swapping load and charging and swapping start and end time information are retained in each row, and then each load is split into 24 hours a day, that is, 24 times of charging and swapping load.

[0076] Because the original charging and swapping load data collected by charging and swapping facilities often includes some null values, and the electric vehicle charging and swapping load data has a certain periodicity, the load data has a high consistency when the date type is similar. Therefore, the following formula is used to fill in the null values:

[0077]

[0078] In the formula, y k Fill in data for missing moments; y k-1 The charging and swapping load value at the same time of the same weekday in the previous week; k+1 It is the charging and swapping load value at the same time of the same day of the following week.

[0079] If there are null values ​​for a period of time, the average of the charging and swapping load data for the same time period on the same date of the previous week and the next week can be used to fill the gap.

[0080] Then, one-hot encoding is performed on the date type and holiday type data, and the historical load and temperature data are normalized to accelerate the convergence of the network loss function and improve the model training speed. The normalization formula is:

[0081]

[0082] In the formula, x is the sample data before normalization; x one is the normalized data; x max and x min are the maximum and minimum values ​​in the sample data before normalization.

[0083] S2: Collect three factors, namely date type (day of the week), holidays and temperature, and historical charging load data of charging and swapping facilities, and jointly build a feature matrix as the model input vector.

[0084] The design principle of the feature matrix is ​​as follows: design the input and output relationship of the model, use the date type (week date), holidays, temperature and historical charging and swapping load of the charging station as the input feature quantity of the model, use the charging and swapping load prediction value as the model output, and build the feature input matrix together with the current sample time and the time to be predicted. The input feature matrix of the model is constructed based on the above data and the historical charging and swapping load.

[0085] The input-output relationship design formula of the model is as follows:

[0086]

[0087] Where D (k-m)×7 , H (k-m)×2 , T (k-m)×1 and w (k-m)×1are the input feature quantities X, which represent date type (day of the week), holidays, temperature, and historical charging load of the charging station; is the model output Y, i.e. the predicted value of charging and swapping load; k is the current sample time; k+1 is the time to be predicted; km is the m+1 time before the time to be predicted, including the k time. The input feature matrix X of the model is:

[0088] X=[D (m+1)×7 , H (m+1)×2 , T (m+1)×1 , w (m+1)×1 ]

[0089] In the formula, each training sample is a matrix of (m+1)×11 order; D (m+1)×7 and H (m+1)×2 They are the one-hot encoding matrices for weekdays and holiday types, as shown in the following formula:

[0090]

[0091]

[0092] Where D j1 D j2 D j3 D j4 D j5 D j6 D j7 (j=1, 2, ..., m+1) is a 7-bit binary code, which represents Monday to Sunday in order. If a bit in the code is 1, it means that the date type of the day is the corresponding date of the week. i1 H i2 It is a 2-bit binary code 01 or 10. Binary 01 represents that the day is a holiday, and binary 10 represents that the day is not a holiday.

[0093] T (m+1)×1 and w (m+1)×1 are the column vectors of the air temperature and the historical charging and swapping load sequence, as shown in the following formula:

[0094]

[0095] Where, T j and w j (j=1, 2, ..., m+1) are the decimal values ​​of the temperature and the historical load, in units of °C and kW, respectively. The present invention selects m=23, that is, the historical data of 24 hours before the prediction moment constitutes the input feature matrix to predict the charging load in the next 1 hour, and the input of the model is an input vector composed of several 24×11 input feature matrices.

[0096] S3: Based on the LLE algorithm, data dimension reduction is performed on various types of data.

[0097] Local Linear Embedding (LLE) is a nonlinear dimensionality reduction algorithm based on preserving local linear structures. Its main idea is to learn a set of linear parameters that can reconstruct the original sampling points in high-dimensional space and maintain these parameters in low-dimensional space.

[0098] By using the LLE algorithm to reduce the dimension of charging and swapping data, the significant features of the load data can be extracted, thereby reducing the computational complexity of the subsequent recognition algorithm and improving the prediction accuracy.

[0099] Assume that the high-dimensional data is X = [x1, x2, ..., x N ]∈R D×N , the low-dimensional embedding result is Y = [y1,y2,…,y N ]∈R d×N . Where D is the dimension of the original data set, d is the dimension of the low-dimensional data, N represents the number of samples, and x i is the i-th sample in the high-dimensional space. i is the i-th sample in the low-dimensional space. The specific steps are as follows:

[0100] S3.1 Select neighboring points. Use similarity metrics to calculate the similarity between xi and other sample points, and then select k nearest sample points as the neighboring points of x.

[0101] S3.2 Calculate the reconstruction matrix W. Use the neighboring points of the sample to linearly reconstruct it, and obtain the reconstruction matrix W by minimizing the reconstruction error:

[0102]

[0103] Among them, w ij It means x i With x j The weight coefficient between j Not x i When the neighbor of ij is 0.

[0104] S3.3 obtains the low-dimensional embedding result Y. Use the weight coefficients to reconstruct the sample data in the low-dimensional space and obtain the embedding result by minimizing the loss function J(y):

[0105]

[0106] In the formula, w ij It means x i With x j The weight coefficient between i is the i-th sample in the low-dimensional space;

[0107] S4: Build a charging facility load prediction model based on LLE-CNN-GRU hybrid neural network.

[0108] A hybrid neural network model with a 9-layer structure design was built. The first layer is the input layer, the ninth layer is the output layer, and the middle two to eight layers are the core layers of the LLE-CNN-GRU load forecasting model. First, two layers of CNN reduce the dimension and extract the feature quantity of the input data, then the feature map based on the reduced dimension feature quantity is stretched into a one-dimensional vector and input into the GRU neural network to start simulation training. Finally, a fully connected layer is used to integrate the GRU neural network results and output the predicted value in the specified format.

[0109] The 9-layer model built, except for the input layer and output layer, the specific information of the remaining layers is as follows:

[0110] The second and third layers are convolutional layers, where the input data is translated and convolved to extract feature information, and then activated and pooled to output feature maps. The convolution kernel size of the second layer is set to 3×5, the convolution kernel size of the third layer is set to 3×3, and the step size is set to 1. The pooling is average pooling, and the activation function is the elu function. The outputs of the second and third layers are expressed as follows:

[0111] C1=C NN (X)

[0112] C2=C NN (C1)

[0113] The output graph of CNN is as follows:

[0114] M=C2

[0115] The fourth layer is a flat layer, which stretches the three-dimensional vector array of the feature map M into a one-dimensional vector array N.

[0116] The fifth, sixth and seventh GRU layers are stacked to form a GRU network. The feature map M is converted into a one-dimensional vector N by the flattening layer and then input into the fifth layer. The outputs of the fifth, sixth and seventh GRU layers in step l represent g 1,l , g 2,l , g 3,l , as shown in the following formula:

[0117] g 1,l =G RU (g 1,1-1 , N l )

[0118] g 2,l =G RU (g 2,l-1 , G 1,l )

[0119] g 3,l =G RU (g 3,l-1 , G 2,l )

[0120] Where g 1,l-1 is the output of the fifth layer at step l-1; N l Input the one-dimensional vector array of the fifth layer for step l; g 2,l-1 is the output of the sixth layer at step l-1, G 1,l is the output of the fifth layer at step l; g 3,l-1 is the output of the seventh layer at step l-1; G 2,l is the output of the sixth layer at step l. The output of each layer in the model at step l depends on the input of this step and the output of the previous step.

[0121] The eighth layer is a fully connected layer, which is responsible for integrating the results in G3 and then outputting a vector in a specified format, where the number of neurons matches the number of model outputs. The number of fully connected layers is one, ensuring that the output of the LLE-CNN-GRU load forecasting model is a single-moment charging load forecast value.

[0122] S5: Based on the established LLE-CNN-GRU load forecasting model, the ISSA algorithm based on the hybrid strategy is used to tune the model's hyperparameters to improve its prediction accuracy.

[0123] Among them, the traditional sparrow search algorithm (SSA) is a new type of group intelligent optimization algorithm inspired by the foraging behavior of sparrows. The sparrow population is divided into finders who search for food and share the location of food and joiners who follow the finders to conduct predation behavior. In addition, 10% to 20% of scouts are randomly generated in the entire population to be responsible for the reconnaissance and vigilance of the entire foraging area.

[0124] SSA uses a random generation method to initialize the population. This method has the possibility of aggregation of the initial sparrow population. Therefore, the present invention uses an improved sparrow search optimization algorithm (ISSA) and introduces Circle chaotic mapping. Chaotic sequence mapping has the advantages of randomness, ergodicity and non-repetitiveness. Circle chaotic mapping is used to initialize the sparrow population to make it evenly distributed. The expression of Circle chaotic mapping is as follows:

[0125]

[0126] Where n represents the dimension of the solution; x n is the solution before Circle chaos mapping; x n+1is the solution after the Circle chaotic mapping. When R2 < ST, each dimension of the discoverer's position converges to 0, and the possibility of the algorithm finding the optimal value in the region near 0 increases. The algorithm is prone to falling into local optima. To improve the global search ability of the algorithm and coordinate the global and local search abilities of sparrow individuals, the present invention proposes an update strategy for the leader, and its expression is as follows:

[0127]

[0128] In the formula is the position of the i-th individual in the d-th dimension; F d is the position of the food source in d; u b and l b are the upper and lower limits of the solution respectively; c2 and c3 are both random numbers in the range [0, 1]; c1 is a decay variable, and its expression is as follows:

[0129]

[0130] In the formula, t is the current iteration number; T max is the maximum number of iterations. The update of the discoverer's position is as follows:

[0131]

[0132] For the joiners in the SSA algorithm, when i > Q / 2, the sparrow position is equal to the product of a random number from a standard normal distribution and an exponential function with the natural logarithm as the base. When the population converges, its value converges to 0. Therefore, in the present invention's ISSA algorithm, to ensure that each joiner approaches the discoverer it follows and does not get stuck at 0, the formula is:

[0133]

[0134] Then, based on the above optimization algorithm, hyperparameter optimization is performed on the LLE-CNN-GRU load forecasting model. First, set the number of convolutional kernels in the two CNN layers, the number of hidden neurons in the three GRU layers, the maximum number of iterations, the batch sample size, and the learning rate in the LLE-CNN-GRU model as hyperparameters to be optimized. Among them, the search ranges for the number of convolutional kernels in the two CNN layers and the number of hidden neurons in the three GRU layers are both [8, 128], the search range for the maximum number of iterations is [10, 100], the search range for the batch sample size is [128, 512], and the search range for the learning rate is [0.001, 0.1].

[0135] S6: Finally, the ISSA is used to optimize the hyperparameters of the LLE-CNN-GRU model, and the optimized model is used to predict the load of charging and swapping facilities. The present invention uses Keras in Python as a framework to write the constructed LLE-CNN-GRU deep learning model for load prediction. The grid search method is used to fine-tune the hyperparameters such as the convolutional layer step size, sliding window length, batchsize, etc. in the model, and other hyperparameters are optimized according to the model performance on the validation set. The final hyperparameter results are obtained, and the prediction results of the charging and swapping load are output.

[0136] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive in all respects, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.

Claims

1. A method for predicting electric vehicle charging and swapping load based on a combined neural network, characterized in that: The following steps are involved: S1, collect historical charging and swapping load data and perform data preprocessing; S2, based on the three factors of date type, holiday, temperature and charging and swapping load data, constructs a feature matrix as the input of the charging facility load prediction model; S3, based on the LLE algorithm, the charging and swapping load data is reduced in dimension; S4, build a charging facility load prediction model based on LLE-CNN-GRU hybrid neural network; S5, using an ISSA algorithm based on a hybrid strategy to perform hyperparameter tuning on the charging facility load forecasting model; S6, inputting the characteristic matrix into the optimized charging facility load prediction model to perform charging and swapping facility load prediction.

2. The electric vehicle charging and swapping load prediction method based on combined neural network according to claim 1 is characterized in that: In S1, the preprocessing includes filling in null values ​​and / or normalizing the charging and swapping load data.

3. The method for predicting electric vehicle charging and swapping load based on combined neural network according to claim 1 is characterized in that: The method of filling the empty value is as follows: In the formula, y k Fill in data for missing moments; y k-1 The charging and swapping load value at the same time of the same weekday in the previous week; k+1 It is the charging and swapping load value at the same time of the same day of the following week.

4. The electric vehicle charging and swapping load prediction method based on combined neural network according to claim 1 is characterized in that: The input and output relationship of the charging facility load prediction model is as follows: Where D (k-m)×7 , H (k-m)×2 , T (k-m)×1 and w (k-m)×1 are the input feature quantities X, which represent date type (day of the week), holidays, temperature, and historical charging load of the charging station; is the model output Y, i.e., the predicted value of charging and swapping load; k is the current sample time; k+1 is the time to be predicted; km is the m+1 time before the time to be predicted, including the k time; and the input feature matrix X of the model is: X=[D (m+1)×7 ,H (m+1)×2 ,T (m+1)×1 ,w (m+1)×1 ] In the formula, each training sample is a matrix of (m+1)×11 order; D (m+1)×7 and H (m+1)×2 They are the one-hot encoding matrices for weekdays and holiday types, as shown in the following formula: Where D j1 D j2 D j3 D j4 D j5 D j6 D j7 (j=1, 2, ..., m+1) is a 7-bit binary code, which represents Monday to Sunday in order. If a bit in the code is 1, it means that the date type of the day is the corresponding date of the week. i1 H i2 It is a 2-bit binary code 01 or 10. Binary 01 means that the day is a holiday, and binary 10 means that the day is not a holiday. T (m+1)×1 and w (m+1)×1 are the column vectors of the air temperature and the historical charging and swapping load sequence, as shown in the following formula: Where, T j and w j (j=1,2,…,m+1) are the decimal values ​​of air temperature and historical load respectively.

5. The method for predicting electric vehicle charging and swapping load based on combined neural network according to claim 4 is characterized in that: In S3, the method for reducing the dimension of the charging and swapping load data is as follows: Assume that the high-dimensional data is X = [x1, x2, ..., x N ]∈R D×N , the low-dimensional embedding result is Y = [y1,y2,…,y N ]∈R d×N ; Where D is the dimension of the original data set, d is the dimension of the low-dimensional data, N represents the number of samples, and x i is the i-th sample in the high-dimensional space; y i is the i-th sample in the low-dimensional space; S3.1 selects neighboring points, uses similarity metrics to calculate the similarity between xi and other sample points, and then selects k nearest sample points as neighboring points of x; S3.2 calculate the reconstruction matrix W; Use the neighboring points of the sample to linearly reconstruct it, and obtain the reconstruction matrix W by minimizing the reconstruction error: Among them, w ij It means x i With x j The weight coefficient between j Not x i When the neighbor of ij is 0; S3.3 obtains the low-dimensional embedding result Y; uses the weight coefficient to reconstruct the sample data in the low-dimensional space, and obtains the embedding result by minimizing the loss function J(y): In the formula, w ij It means x i With x j The weight coefficient between i is the i-th sample in the low-dimensional space.

6. The method for predicting electric vehicle charging and swapping load based on combined neural network according to claim 5, characterized in that: The charging facility load prediction model adopts a 9-layer model: The first layer is the input layer, the ninth layer is the output layer, and the middle two to eight layers are the core layers of the LLE-CNN-GRU load forecasting model. First, two layers of CNN reduce the dimension and extract the feature quantity of the input data, then the feature map based on the reduced dimension feature quantity is stretched into a one-dimensional vector and input into the GRU neural network to start simulation training; finally, a fully connected layer integrates the GRU neural network results and outputs the predicted value in the specified format; In the 9-layer model, except for the input layer and the output layer, the specific information of the remaining layers is as follows: The second and third layers are convolutional layers, in which the input data is subjected to translation convolution to extract feature information, and then activated and pooled to output feature maps; the convolution kernel size of the second layer is set to 3×5, the convolution kernel size of the third layer is set to 3×3, and the step size is set to 1; the pooling is average pooling, and the activation function is the elu function; the outputs of the second and third layers are expressed as follows: C1=C NN (X) C2=C NN (C1) The output graph of CNN is as follows: M=C2 The fourth layer is a flat layer, which stretches the three-dimensional vector array of the feature map M into a one-dimensional vector array N; The fifth, sixth and seventh GNR layers are stacked to form a GRU network; the feature map M is converted into a one-dimensional vector N by the flattening layer and then input into the fifth layer; The outputs of the fifth, sixth, and seventh layers of GRU in step 1 represent g 1,l , g 2,l , g 3,l , as shown in the following formula: g 1,l =G RU (g 1,l-1 ,N l ) g 2,l =G RU (g 2,l-1 ,G 1,l ) g 3,l =G RU (g 3,l-1 ,G 2,l ) In the formula, g 1,l-1 is the output of the fifth layer at step l-1; N l Input the one-dimensional vector array of the fifth layer for step l; g 2,l-1 is the output of the sixth layer at step l-1, G 1,l is the output of the fifth layer at step l; g 3,l-1 is the output of the seventh layer at step l-1; G 2,l is the output of the sixth layer at step l; the output of each layer in the model at step l depends on the input of this step and the output of the previous step; The eighth layer is a fully connected layer, which is responsible for integrating the results in G3 and then outputting a vector in a specified format, in which the number of neurons matches the number of model outputs; the number of fully connected layers is one, ensuring that the output of the LLE-CNN-GRU load forecasting model is the charging load forecast value at a single moment.

7. The method for predicting electric vehicle charging and swapping load based on combined neural network according to claim 6, characterized in that: In S5, the method of hyperparameter tuning is as follows: Use Circle chaos map to initialize the sparrow population to make it evenly distributed. The expression of Circle chaos map is as follows: where n represents the dimension of the solution; x n is the solution before the Circle chaotic mapping; x n+1 is the solution after the Circle chaotic mapping; when in R2 <ST, each dimension of the discoverer's position converges to 0, the possibility of the algorithm searching for the optimal value in the region near 0 increases, and the algorithm is prone to falling into local optimum. To improve the global search ability of the algorithm and coordinate the global and local search abilities of sparrow individuals, the present invention proposes an update strategy for the leader, and its expression is as follows: In the formula, is the position of the ith individual in dimension d; F d is the location of the food source at d; u b and l b are the upper and lower limits of the solution respectively; c2 and c3 are both random numbers between [0, 1]; c1 is the decay variable, and the expression is as follows: Where t is the current iteration number; T max is the maximum number of iterations; the finder position is updated as follows: For the joiner in the SSA algorithm, when i>Q / 2, the position of the sparrow is equal to the product of a standard normal distribution random number and an exponential function with a natural logarithm as the base, and its value converges to 0 when the population converges; therefore, in the ISSA algorithm of the present invention, in order to ensure that each joiner approaches the discoverer it follows and does not fall into 0, the formula is: Then, based on the above optimization algorithm, the hyperparameters of the LLE-CNN-GRU load forecasting model are optimized; first, the number of convolution kernels of the two CNN layers, the number of hidden neurons of the three GRU layers, the maximum number of iterations, the batch sample size and the learning rate in the LLE-CNN-GRU model are set as the hyperparameters to be optimized; the optimization range of the number of convolution kernels of the two CNN layers and the number of hidden neurons of the three GRU layers in the convolution layer of the two CNN layers is [8,128], the optimization range of the maximum number of iterations is [10,100], the optimization range of the batch sample size is [128,512], and the optimization range of the learning rate is [0.001,0.1].