Electric vehicle charging load prediction method based on IGwood-Attention-LSTM
Optimizing the LSTM model through the IGWO-Attention-LSTM method solves the problem of time variability and uncertainty in electric vehicle charging demand, achieves more accurate and stable load forecasting, reduces energy waste and peak period costs, and ensures grid stability.
Patent Information
- Application Number
- CN202410690369.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-08-30
AI Technical Summary
The time-varying and uncertain charging demand of electric vehicles makes charging station load forecasting complex. Existing technical models are complex to build and consume large amounts of resources, making it difficult to accurately predict the load during peak hours.
An electric vehicle charging load prediction method based on IGWO-Attention-LSTM is used, combined with the gray wolf optimization algorithm and attention mechanism, to optimize the hyperparameter settings and time series prediction results of the LSTM model, integrate charging load data, and reduce prediction errors.
It improves the accuracy and stability of load forecasting for electric vehicle charging stations, reduces energy waste and peak period costs, helps charging stations rationally arrange resources, avoid resource waste and congestion, and ensure stable operation of the power grid.
Smart Images

Figure CN118569576A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power systems, and in particular to an electric vehicle charging load prediction method based on IGwo-Attention-LSTM. Background Art
[0002] In the power system, the charging demand of electric vehicles is highly time-varying and uncertain. Since the charging behavior of electric vehicle users is random and may also be affected by external factors such as meteorological conditions and holidays, the complexity of load forecasting for electric vehicle charging stations is increased, resulting in large fluctuations in charging load, especially during peak hours. This brings certain difficulties to the load forecasting work of electric vehicle charging stations.
[0003] Existing technologies have achieved certain results using statistical methods, time series prediction methods, and wavelet analysis prediction methods, but the construction of these models is very complex and consumes a lot of resources in the prediction process. Therefore, it is necessary to consider using the attention mechanism and GWO algorithm to improve the prediction results of the LSTM algorithm model. Summary of the invention
[0004] The purpose of the present invention is to provide an electric vehicle charging load prediction method based on IGwo-Attention-LSTM, which gives full play to the characteristics of the LSTM algorithm, improves the safe operation and economic operation of the vehicle charging station, and reduces the impact of the prediction error on the load prediction of the electric vehicle charging station.
[0005] The technical solution adopted by the present invention is:
[0006] A method for predicting electric vehicle charging load based on IGwo-Attention-LSTM includes the following steps:
[0007] Step 1: After collecting the charging load consumption of the charging station, filter out the missing values or abnormal values in the data, and output the filtered data in the form of a load curve as the real power load value; initialize the gray wolf population x for constructing the gray wolf algorithm i , initialize the convergence factor a, random variable coefficients (A, C) and the current number of iterations (t) to 0;
[0008] Step 2: Calculate the gray wolf population x using the gray wolf algorithm i The fitness of each gray wolf in the game is calculated and the α wolf, β wolf and δ wolf with the best fitness are selected, and the values of X are assigned to them respectively. α ,X β ,X δ ;
[0009] Step 3: Update the current position of the gray wolf and calculate the fitness of all gray wolves and update X α ,X β ,X δ , and output the three gray wolf individual combinations with the best fitness, pass the optimal parameter combination to the LSTM model, update the model's inertia weight w, optimize the number of parameters dim, the lower bound lb of the parameter value, and the upper bound ub of the parameter value;
[0010] Step 4: Initialize the LSTM model, select the training set, input the date and weather to be predicted, and then arrange the real-time data points and several previous data points in order according to the input quantity set by the LSTM model. Then use the LSTM neural network to calculate, calculate the error between the training results and the actual power load value, and feed back the calculation results to the population initialization of the gray wolf algorithm in real time to update the data of the gray wolf algorithm.
[0011] Step 5: When the maximum number of iterations is reached, the iteration is stopped and the optimal parameter combination is output. All results are integrated to calculate the current load and compare the power load data error with the true value. If the error meets the requirements, the training is stopped and the training model is retained; if it does not meet the requirements, the weight matrix and bias matrix of the forget gate, input gate and output gate are updated and recalculated until the error requirements are met; according to the input date and weather, the prediction is made to obtain the final charging load value;
[0012] Step 6: Use the Attention mechanism to simulate the attention allocation of the human brain when processing information, integrate the charging load value through the attention mechanism and output the charging load curve.
[0013] Furthermore, before executing step 2, the convergence factor a is adjusted using a logarithmic function, and the mathematical expression is as follows:
[0014]
[0015] Among them, t represents the current number of iterations, Max_iter represents the maximum number of iterations; a initial and a final Represents the starting and ending values of the convergence factor a, which are generally set to 2 and 0.
[0016] Furthermore, when executing step 3, the influence of the three wolves on the population is considered, and the improved rule of wolf movement is applied. The mathematical expression of the rule is as follows:
[0017]
[0018] Where t represents the current number of iterations; r1, r2∈[0,1] are random values; c1, c2 represent the global learning factor and the leader learning factor respectively, and their values are constants between [0,1]; w is the inertia weight.
[0019] Furthermore, when executing step four, after inputting the date and weather data to be predicted, when collecting data, due to various external environmental factors or subjective human interference, brief data processing is required to process the missing values that may appear in the algorithm, discard the load forecast data that exceeds the preset threshold, and use Newton interpolation to fill in the load forecast data that does not exceed the preset threshold.
[0020] Furthermore, when executing step 4 above, after inputting the date and weather data to be predicted, data collection requires brief data processing due to various external environmental factors or subjective human interference, and outliers that may appear in the algorithm are processed. Outliers are determined through box plot detection, outlier analysis, empirical rules, and Z-score detection methods. If they are determined to be outliers, all identified outliers are replaced with the maximum value in the data set except for the outliers.
[0021] The beneficial effects of the present invention are:
[0022] (1) Combining the GWO optimization algorithm, the IGWO and IACO algorithms are proposed to improve the hyperparameter setting of the LSTM model, thereby improving the performance and generalization ability of the model; and the Attention mechanism is introduced to integrate the prediction results of multiple time steps of the LSTM, so that the model can better capture the relevance and importance of time series data; at the same time, by improving the shortcomings of the GWO algorithm, the IGWO-Attention-LSTM algorithm shows higher accuracy and stability in load forecasting. Accurate load forecasting can help charging stations prepare in advance during peak hours, avoid energy waste and increase energy costs during peak hours, and thus save energy costs.
[0023] (2) The IGWO-Attention-LSTM algorithm shows a smaller absolute error in the load forecasting of electric vehicle charging stations, which improves the prediction accuracy and reliability. By accurately predicting the charging load, the charging station can reasonably arrange the use of charging piles, avoid resource waste and congestion, and improve charging efficiency. At the same time, it can help the charging station smooth the load curve, avoid the impact of sudden high load on the power system, and is conducive to the stable operation of the power grid.
[0024] (3) Comparison of visualization images and error indicator functions shows that the IGWO-Attention-LSTM algorithm has better prediction results than the traditional LSTM algorithm, providing a more reliable model support for charging station load prediction. By accurately predicting the charging load, charging stations can reasonably arrange the use of charging piles, avoid resource waste and congestion, and improve charging efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a model diagram of an electric vehicle charging load prediction method based on IGwo-Attention-LSTM in an embodiment of the present invention;
[0026] Figure 2 It is a convergence factor curve diagram of different calculation methods using a nonlinear function to adjust the convergence factor a in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0028] like Figure 1 As shown, the embodiment of the present invention provides an electric vehicle charging load prediction method based on IGwo-Attention-LSTM, the steps are as follows:
[0029] Step 1: After collecting the charging load consumption of the charging station, first filter whether there are missing values or abnormal values in the data, and output the filtered data in the form of a load curve as the actual power load value. Initialize the gray wolf algorithm a, A, C, t = 0, initialize the gray wolf population x i =30, the maximum number of iterations is 200, and the algorithm optimizes the dimension.
[0030] In the embodiment of the present invention, the optimization goal is to reduce the prediction error index. In order to speed up the early stage of the global search and increase the search intensity in a relatively small local space to ensure the accuracy of the round-up, a nonlinear function is used to adjust the convergence factor a, and the expression result is as follows:
[0031]
[0032] At the same time, in order to further highlight the leading role of wolf α as the leader of the wolf pack, considering the impact of the prey position on the wolf pack position, data information is used to help complete the wolf pack position update, and its expression is as follows:
[0033]
[0034] Among them, the construction of the improved algorithm model for adjusting the convergence factor a with a nonlinear function is aimed at the mining of local information by the gray wolf algorithm to improve the accuracy of the encirclement and capture target. The improved algorithm model for updating the wolf pack position with data information is to highlight the leading role of the α wolf as the leader of the wolf pack position and consider the influence of the prey position on the wolf pack position.
[0035] Step 2: Calculate the fitness of each individual gray wolf through the gray wolf algorithm; select the α wolf, β wolf, and δ wolf individuals with the best fitness and assign them X α ,X β ,X δ .
[0036] The Gray Wolf (GWO) optimization algorithm is an optimization algorithm based on the behavior of gray wolf groups in nature, proposed by Mirjalili et al. in 2014. The algorithm simulates the social behavior and hierarchical structure of gray wolf groups, and optimizes the solution of the problem by simulating the predation behavior of wolves. The core idea of the gray wolf optimization algorithm is to simulate the social behavior of gray wolf groups, including the cooperation and competition between leaders and followers. In the algorithm, each gray wolf represents a candidate solution, and the position of each gray wolf represents a potential solution. Gray wolves adjust their positions by simulating predation behavior to find the optimal solution. Wolves represent the top predators in the food chain. They hunt through collective action and division of labor. The prey they target is often difficult to escape. The gray wolf algorithm is an algorithm that simulates the predation behavior of excellent predators. As gray wolves like to live in groups, they have a very strict social hierarchy within them. The gray wolf algorithm simulates this hierarchy to create a pyramid-structured social hierarchy structure of wolves.
[0037] In the mathematical model of the GWO algorithm, each gray wolf represents an alternative solution in the wolf pack, among which the optimal solution is α, the suboptimal solution is β, the next optimal solution is δ, and all other solutions are considered ω. The principle of the GWO algorithm is that through the leadership of the three leading wolves α, β, and δ, the remaining wolf pack ω always follows these three wolves and finally completes the hunting task.
[0038] (1) Searching and hunting prey
[0039] First, a global search is performed within the entire value range. The search is mainly carried out by the three leading wolves α, β, and δ, and they disperse to find prey. In order to establish a divergent model, two random variables A and C are introduced. A is used to search for prey. When |A| < 1, the gray wolf individual will be close to the prey. When |A| > 1, the gray wolf individual will be away from the prey and hope to find stronger prey. C∈[0,2] provides different weights for the prey in order to strengthen or weaken the influence of the prey position on the gray wolf's next move. The calculation formulas for A and C are as follows:
[0040] A=2ar1-a
[0041] C=2r2
[0042] r1,r2: are random values in [0,1].
[0043] a: Convergence factor, which is generally in the range of [0,2] and decreases linearly with the increase of iteration times, further ensuring the wolf pack's exploration of local key areas in the later stage.
[0044] After searching for the prey, we start to surround the prey. The specific mathematical model is as follows:
[0045] D=|C×X p (t)-X(t)|
[0046] X(t+1)=X p (t)-A×D
[0047] t: represents the current iteration number.
[0048] A, C: coefficients of random variables.
[0049] X P : The location of the captured prey.
[0050] X: The location of the gray wolf.
[0051] (2) Attacking prey
[0052] After the capture is completed, the gray wolf group will start to attack. The attack is mainly directed by the alpha wolf, and the beta and delta wolves will also participate in the command of the attack. The mathematical model of the position of the wolf group tracking the prey under the leadership of the leader wolf is described as follows:
[0053]
[0054] D α ,D β ,D δ : Represent the distances between α wolf, β wolf and δ wolf and other wolf individuals.
[0055] Xα ,X β ,X δ : Represent the current positions of α wolf, β wolf and δ wolf respectively.
[0056] C α ,C β ,C δ : random number.
[0057] X: The current location of the individual wolf pack member.
[0058]
[0059] X1, X2, X3: represent the influence of α wolf, β wolf and δ wolf respectively, and the position of ω wolf pack after adjustment. The final position of the wolf pack adjusted is moved by taking the average value.
[0060] The gray wolf algorithm needs to build an improved algorithm model based on data information to help complete the update of the wolf pack position for optimization. In the last part of the gray wolf algorithm, the adjustment of the wolf pack position by α wolf, β wolf and δ wolf generally adopts a simple average method, which cannot further highlight the leading role of α wolf as the leader of the wolf pack position, nor does it consider the influence of the prey position on the wolf pack position. In this regard, the present invention applies an improved new rule for the movement of the wolf pack, and the mathematical expression is as follows:
[0061]
[0062] In the above formula, t represents the current number of iterations; r1, r2∈[0,1] are random values; c1, c2 represent the global learning factor and the learning factor for the leader, respectively, and their values are constants between [0,1]; w is the inertia weight.
[0063] The gray wolf algorithm needs to construct an improved algorithm model based on nonlinear function to adjust the convergence factor a for optimization. In the wolf pack search process, we hope to speed up the early part of the global search and increase the search intensity in a relatively small local space to ensure the accuracy of the capture. To this end, the present invention applies a strategy of adjusting the convergence factor using a logarithmic function, and the mathematical expression is as follows:
[0064]
[0065] Among them, t represents the current number of iterations, Max_iter represents the maximum number of iterations; a initial and a final Represents the starting and ending values of the convergence factor a, which are generally set to 2 and 0.
[0066] Step 3: Feed the best α wolf, β wolf, and δ wolf individuals back to the starting point to calculate the fitness of the gray wolf population and update the current gray wolf individual position again. At the same time, calculate the fitness of all gray wolves and update X α ,X β ,X δ , and output the three gray wolf individual combinations with the best fitness, pass the optimal parameter combination to the LSTM model, update the model's inertia weight w, optimize the number of parameters dim, the lower bound lb of the parameter value, and the upper bound ub of the parameter value.
[0067] Step 4: Initialize the LSTM model, with 200 iterations, a learning rate of 0.01, a maximum allowable error of 10e-5, 2 input layer nodes, and 180 hidden layer nodes; the inputs are holidays and real-time electricity prices. Select the training set, set the training time step to 31, and for each data point involved in the training, arrange the real-time data point and several previous data points in order according to the input number set by the LSTM model, then use the LSTM neural network to calculate the error, and feed the calculation results back to the population initialization of the gray wolf algorithm in real time to update the data of the gray wolf algorithm.
[0068] When the IGWO algorithm is used to optimize LSTM, the feedback from IGWO is the prediction error of the LSTM neural network. Before the IGWO-LSTM algorithm load forecasting is officially carried out, the IGWO algorithm will train the LSTM, allowing the LSTM algorithm to select different hyperparameters to train the data set and predict the output results. According to the error between the prediction results and the actual load value, the hyperparameters that can allow the wolf pack to attack and capture the prey are determined, and the optimal solution is output after the number of iterations is completed, and the value is assigned to the LSTM neural network to determine the final LSTM neural network prediction model.
[0069] When executing step 4, if some missing values appear during data collection due to subjective reasons such as sensors or human interference, it is necessary to process the missing values that may appear in the algorithm. The algorithm for processing missing values mainly includes two parts: one is how to judge whether the number of missing values in the same day is large or small; the other is how to process the missing data when there is not much missing data.
[0070] For the first part, whether the missing values are deleted or supplemented, the purpose is to improve the validity of the data set and ultimately improve the reliability of the training model. The load data time interval in the present invention is 15 minutes, that is, there are 96 load data in one day, and there are situations where charging stations generate loads in various time periods of the day. Therefore, the present invention determines the number of missing values according to the percentage of missing values in the overall data. Generally speaking, the limit for defining a large number of missing values is 5%-30%. The present invention takes 10%-11%, that is, when the missing values of a certain day's data exceed 10, it is considered that there are many missing values, and all the load forecast data for that day are discarded.
[0071] For the second part, the problem of filling missing values is considered. Common filling methods mainly include linear interpolation, polynomial interpolation, Lagrange interpolation, Newton interpolation and other algorithms. The present invention adopts Newton interpolation when filling missing values. Compared with other interpolation methods, the calculation process of Newton interpolation is simpler. When a new interpolation point needs to be added, only the function value related to the new point needs to be calculated without repeating the previously calculated steps. And as more points are added, Newton interpolation can use the previous calculation results, thereby reducing the required amount of calculations. This means that as time goes by, the calculations required by Newton interpolation will become less and less. And the Newton interpolation formula is simple in form, which makes it relatively easy to understand and operate in practical applications. The specific formula is as follows:
[0072] First, for discrete load data, select n points near the missing value and calculate the order difference quotients of the unknown point f(x):
[0073]
[0074] The interpolation of missing values is:
[0075] f(x)=f(x0)+f[x0,x1](x-x0)+f[x0,x1,x2](x-x0)(x-x1)
[0076] +…+f[x0,x1,…,x n ](x-x0)(x-x1)…(xx n-1 )
[0077] In addition, outliers that may appear in the algorithm are processed. Outliers are determined as follows:
[0078] If the load data has negative values, the negative values are removed and directly replaced with 0; if it is a non-negative value, the outliers can be determined by box plot detection, outlier analysis, empirical rules, Z-score detection and other methods. Z-score is a standardized method to measure the deviation of data from the mean, which can measure the degree of deviation between the data point and the mean. By setting the threshold, it is easy to identify those outliers with large deviations. The specific calculation formula is as follows:
[0079] Z-score=(X-μ)
[0080] σ
[0081] Where μ is the mean of the data set:
[0082]
[0083] σ is the standard deviation of the data set:
[0084]
[0085] Among them, X is the actual value of the data point. Generally speaking, a Z-score with an absolute value greater than 3 can be identified as an outlier.
[0086] If it is determined to be an outlier, all identified outliers are replaced by the maximum value in the data set except the outlier.
[0087] Step 5: When the maximum number of iterations is reached, stop the iteration and output the optimal parameter combination. Integrate all the results to calculate the current load and compare the power load data error with the true value. If the error meets the requirements, stop training and keep the training model. If it does not meet the requirements, update the weight matrix and bias matrix of the forget gate, input gate and output gate, and recalculate until the error requirements are met. Make predictions according to the input date and weather to get the final prediction results.
[0088] When executing the above step 5, in order to exclude the influence of other unnecessary factors on step 5, it is necessary to construct a correlation analysis model for each factor based on the MIC value in the algorithm, use the maximum information coefficient to measure the degree of correlation of different factors to the charging station load prediction, and use the function formula to perform statistical calculations on the data of the entire sample to explore the correlation between different influencing factors and load curves from a global perspective.
[0089] The maximum information coefficient is a statistical method used to measure the strength of a nonlinear relationship between two variables. It can discover various types of relationships, including linear and nonlinear relationships, and can work effectively even when there is noise in the data. Compared with the traditional correlation coefficient, the maximum information coefficient has a simpler calculation formula and has outstanding robustness, which can better capture complex relationships. The maximum information coefficient MIC ranges from [0,1] and has symmetry, good universality and fairness. If variables X and Y are independent, MIC(X,Y) = 0; if there is a definite relationship between X and Y, MIC(X,Y) = 1.
[0090] The specific formula is as follows:
[0091]
[0092] Among them, a and b are the number of grids divided in the (x, y) scatter plot in the x and y directions, which is essentially a grid distribution. B is a variable randomly set based on the experimental results. The present invention sets the size of B to the 0.6 power of the amount of data in the data set. I(X, Y) is the mutual information formula, which is mathematically expressed as:
[0093]
[0094] Where p(x,y) represents the probability that X and Y take the values x and y, and p(x) and p(y) represent the marginal probabilities of X and Y respectively.
[0095] Step 6: Use the Attention mechanism to simulate the attention allocation of the human brain when processing information, and integrate and output the results through the attention mechanism.
[0096] The attention mechanism is a computational model that mimics the way humans allocate attention and is commonly used in the fields of machine learning and artificial intelligence. Its basic idea is to simulate the attention allocation mechanism of the human brain when processing information. By weighting the input data, the model can pay more attention to important information, thereby improving the performance and effect of the model. The attention mechanism model assigns different attention weights to different parts of the input data, so that the model can pay more attention to important parts when processing data and ignore insignificant parts. This method can help the model better understand the internal structure and association of the input data, thereby improving the generalization ability and accuracy of the model.
[0097] The main idea of the Attention algorithm is to calculate the weight of the output in each time step in the final load forecast output, and then take the weighted average based on the obtained weights to obtain the final power load forecast value of the electric vehicle charging station. The specific weight calculation is shown below.
[0098]
[0099] Among them, W, U, W v is the weight matrix, which is used to adjust the importance of the input signal when it propagates in the neural network. The weight matrix determines the strength of the connection between different neurons, thus affecting the transmission and processing of information; b, b v is a bias matrix, which is used to adjust the activation threshold of neurons, that is, the threshold that determines whether neurons are activated. The bias matrix can help neural networks better fit data and learn complex patterns; tanh is a nonlinear activation function, which is a commonly used nonlinear activation function. In neural networks, the role of the activation function is to introduce nonlinear factors so that neural networks can learn and represent more complex functional relationships; the softmax layer is an intermediate processing layer between the algorithm and the final result. This is an intermediate processing layer between the algorithm and the final result. It may refer to a specific processing layer in the neural network, which is used to further process and transform the data to finally obtain the desired output result.
[0100] This electric vehicle charging load prediction algorithm is now applied to a charging station in a certain area, and the data after filtering outliers and missing values in the area is output in the form of a load curve. The load power of the area is 125KW at each moment. The present invention collects the power grid data and sends it to the cloud platform, where the algorithm randomly generates an initial population of 30 in the range of 0 to 125KW; at the same time, the IGWO-Attention-LSTM algorithm parameter settings and LSTM algorithm parameter settings are as follows:
[0101] Table 1 LSTM algorithm parameter settings
[0102]
[0103] Table 2 IGWO-Attention-LSTM algorithm parameter settings
[0104]
[0105]
[0106] After the first step of initialization is completed, the fitness of the gray wolf population is calculated and updated, so that the top three gray wolves in terms of fitness are assigned the value X α ,X β ,X δ ; Step 2: When the current number of iterations t is less than the maximum value, update the individual position of the gray wolf and the random variable coefficients A and C, calculate the fitness of the gray wolf population at this time and update X α ,X β ,X δ; The third step is to initialize the LSTM model, with holidays and real-time electricity prices as input, select the training set, and set the training time step to 31. For each data point involved in the training, the real-time data point and the previous data points are arranged neatly according to the number of inputs set by the LSTM model; the fourth step is to integrate the results of all time steps to calculate the current prediction value, and minimize the error between the prediction value and the true value. If the error meets the requirements, stop training and retain the training model; if it does not meet the requirements, update the weight matrix and bias matrix of the forget gate, input gate, and output gate, and recalculate until the error requirements are met; the fifth step is to use the Attention mechanism to simulate the attention allocation of the human brain when processing information, and integrate and output the predicted load curve through the attention mechanism.
[0107] The convergence factor curves under different calculation methods using nonlinear functions to adjust the convergence factor a are as follows: Figure 2 As shown in the figure, the linear descent strategy curve of the original convergence factor and the improved nonlinear descent strategy curve based on the logarithmic function are shown. It can be clearly seen from the figure that compared with the original linear descent convergence factor, the improved linear descent curve is faster in the initial global search and pays more attention to the local search part in the middle stage, which helps the gray wolf algorithm to mine local information and improve the accuracy of capturing targets.
[0108] The present invention has the following advantages:
[0109] 1. The present invention provides a basis for the prediction of charging load of electric vehicle charging stations taking errors into consideration through an improved algorithm model based on nonlinear function to adjust the convergence factor a, an improved algorithm model based on data information to help complete the update of wolf pack positions, a correlation analysis model of various factors based on MIC value, and research on the occurrence of missing values or abnormal values. The LSTM algorithm is used for solving the problem with the goal of reducing the impact of prediction errors on the load prediction of electric vehicle charging stations. It is an innovative research based on algorithm exploration. Among them, the improved algorithm model based on nonlinear function to adjust the convergence factor a speeds up the early part of the global search, and increases the search intensity in a relatively small local space to ensure accuracy. The goal is to speed up the response speed of the prediction method model; the improved algorithm model that helps to complete the update of the wolf pack position based on data information aims to highlight the leading role of the α wolf as the leader in the wolf pack position, and the influence of the prey position on the wolf pack position, so as to increase the accuracy of the prediction method model; the correlation of each factor based on the MIC value is to quantify the degree of correlation of the selected factors and ensure that reliable data support is provided for the subsequent abandonment of factors; for the research on the occurrence of missing values or outliers, the quality of the data set is improved to make it more suitable for modeling and analysis, so as to increase the sensitivity of the model to data fluctuations, improve the generalization ability of the model, and provide more reliable support for business decisions.
[0110] 2. In the present invention, by accurately predicting the charging load, the charging station can reasonably arrange the use of charging piles, avoid waste of resources and congestion, and improve charging efficiency; help the charging station smooth the load curve, avoid the impact of sudden high load on the power system, which is beneficial to the stable operation of the power grid; help the charging station to carry out reasonable operation management, reduce electricity costs, and improve economic benefits.
[0111] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for predicting electric vehicle charging load based on IGwo-Attention-LSTM, characterized in that: The steps include: Step 1: After collecting the charging load consumption of the charging station, filter out the missing values or abnormal values in the data, and output the filtered data in the form of a load curve as the real power load value; initialize the gray wolf population x for constructing the gray wolf algorithm i , initialize the convergence factor a, random variable coefficients (A, C) and the current number of iterations (t) to 0; Step 2: Calculate the gray wolf population x using the gray wolf algorithm i The fitness of each gray wolf in the game is calculated and the best α wolf, β wolf and δ wolf individuals are selected and assigned values X respectively. α ,X β ,X δ ; Step 3: Update the current position of the gray wolf and calculate the fitness of all gray wolves and update X α ,X β ,X δ , and output the three gray wolf individual combinations with the best fitness, pass the optimal parameter combination to the LSTM model, update the model's inertia weight w, optimize the number of parameters dim, the lower bound lb of the parameter value, and the upper bound ub of the parameter value; Step 4: Initialize the LSTM model, select the training set, input the date and weather to be predicted, and then arrange the real-time data points and several previous data points in order according to the input quantity set by the LSTM model. Then use the LSTM neural network to calculate, calculate the error between the training results and the actual power load value, and feed back the calculation results to the population initialization of the gray wolf algorithm in real time to update the data of the gray wolf algorithm. Step 5: When the maximum number of iterations is reached, the iteration is stopped and the optimal parameter combination is output. All results are integrated to calculate the current load and compare the power load data error with the true value. If the error meets the requirements, the training is stopped and the training model is retained. If the requirements are not met, the weight matrix and bias matrix of the forget gate, input gate and output gate are updated and recalculated until the error requirements are met; the final charging load value is obtained by predicting the input date and weather; Step 6: Use the Attention mechanism to simulate the attention allocation of the human brain when processing information, integrate the charging load value through the attention mechanism and output the charging load curve.
2. The electric vehicle charging load prediction method based on IGwo-Attention-LSTM according to claim 1 is characterized in that: Before executing step 2, use the logarithmic function to adjust the convergence factor a. The mathematical expression is as follows: Among them, t represents the current number of iterations, Max_iter represents the maximum number of iterations; a initial and a final Represents the starting and ending values of the convergence factor a, which are generally set to 2 and 0.
3. The electric vehicle charging load prediction method based on IGwo-Attention-LSTM according to claim 1 is characterized in that: When executing step three, consider the impact of these three wolves on the population and apply the improved rule of wolf pack movement. The mathematical expression of this rule is as follows: Where t represents the current number of iterations; r1, r2∈[0,1] are random values; c1, c2 represent the global learning factor and the leader learning factor respectively, and their values are constants between [0,1]; w is the inertia weight.
4. The electric vehicle charging load prediction method based on IGwo-Attention-LSTM according to claim 1 is characterized in that: When executing step 4, the missing values that may appear in the algorithm are processed, the load forecast data that exceeds the preset threshold is discarded, and the load forecast data that does not exceed the preset threshold is filled using the Newton interpolation method.
5. The electric vehicle charging load prediction method based on IGwo-Attention-LSTM according to claim 1 is characterized in that: When executing step 4 above, the outliers that may appear in the algorithm are processed and determined through box plot detection, outlier analysis, empirical rules, and Z-score detection methods. If they are determined to be outliers, all identified outliers are replaced with the maximum value in the data set except for the outliers.
Citation Information
Cited By
Energy management method, system and device of distributed storage and charging system and storage medium
CN119315592A
Method and system for predicting short-term load of charging station
CN120784863A
Magnetorheological damper parameter identification method and system based on improved grey wolf optimization algorithm
CN120873691A
