Load Forecasting of Battery Electric Vehicle Charging Station based on GA-Prophet-LSTM

Under the general trend of electric vehicles (EV), aiming at the problem of load forecasting accuracy of electric vehicle charging stations (EVCS), this paper proposes a prediction method combining the Prophet model and Long Short-Term Memory (LSTM) neural network. First, the Prophet model and LSTM neural network model are constructed independently; second, the optimal weight of each model is determined by a genetic algorithm (GA), and a new prediction model is obtained by combining the above two models; finally, experiments are carried out with the charging load data of EV in the real scene. According to the analysis of experimental results, it can be proved that the GA-Prophet-LSTM model presented here is more accurate compared to any single model.

Genetic Algorithm (GA) to determine the weight of each model in the combined model to obtain a new prediction model.According to the analysis of experimental results, the GA-Prophet-LSTM model has higher prediction precision.

Prophet model
The prophet model is suitable to handle large-scale time series data characterized by periodicity.The prophet model can take into account the changing trend, periodicity, and holiday effect of data, generate predictive results with strong interpretation, and is very sensitive to data loss and trend change, and can usually handle outliers well.
The Prophet algorithm model is displayed in Equation (1).The model is composed of three parts, including trend (), periodic () and the impact of holidays on the predicted value ℎ() [10].
has two common construction methods: piecewise logical regression and piecewise linear.The piecewise logical regression function is shown in Equation (2).The piecewise linear model uses Linear Additive Model (LAM), and the function expression is shown in Equation (3).
• ℎ() is a function of holidays, representing the impact on forecasted values of potential holidays with non-fixed periods in a time series.Prophet's biggest innovation is to take into account the unique characteristics of the holiday and consider the trend of the holiday alone, as it differs from the pattern of weekday data.The holiday function ℎ() is shown in Equation (5), where  refers to the number of holidays,  refers to the impact range of the holiday.
•  is the error term, which refers to the volatility that is not predicted by the model, and  obeys Gaussian distribution.

LSTM neural network
LSTM is a special type of Recurrent Neural Network (RNN).RNN has more memory function than ordinary neural networks and can be used to solve many problems, such as speech recognition, machine translation, etc.However, it does not deal well with the problem of long-term dependence.By introducing a gating mechanism, LSTM successfully solves the problem of gradient explosion and gradient disappearance of the conventional RNN long sequence during training, which makes LSTM perform better in the longer sequence and can explore the potential temporal and nonlinear relationship in the data.
Figure 1 shows the LSTM network structure diagram.Three control gates are placed in the LSTM basic unit, namely the forgetting gate  , the input gate  and the output gate  .• The function of the forget gate is to determine how much information from the previous time step cell state  should be retained in the current time step  .The calculation method is shown in Equation ( 6): • The function of the input gate is to determine how much network input  in the current time step can be passed to the cell state  and retained.The calculation method is shown in Equation ( 7): • The function of the output gate is to determine how much information about the state  of the control unit is sent to the output value ℎ of the current.The calculation method is shown in Equation ( 8): Under the control of the above three control gates, the current output value of LSTM is calculated as shown in Equations ( 9) - (11): where  refers to the weight coefficient matrix. refers to the bias term. represents  function, as shown in Equation (12).And ℎ represents the hyperbolic tangent function, as shown in Equation (13).

Genetic algorithm
The genetic algorithm is an intelligent optimization algorithm with Mendel's biological genetics and Darwin's theory of biological evolution as the theoretical prototype.It uses processes similar to those of evolution in nature to find the best solution.And it is a mathematical simulation of the biological evolution law of "survival of the fittest " [11].Its main feature is that it can directly manipulate structural objects and is not constrained by derivative and function continuity.It can adjust the search direction adaptively, so it has a better global optimization search ability.In this paper, GA is used to find the weight parameters of the Prophet-LSTM combination model to achieve a better prediction effect.
Selection, crossover, and mutation are the three core operations that constitute the genetic algorithm.The specific operations of the three genetic operators are as follows: • Selection refers to the selection of individuals with strong vitality in the old population to make them exist in the new population.The selection probability of an individual is proportional to its fitness.Individuals with higher fitness will be more likely to be selected, and their genetic genes will expand in the population.Let the fitness of individual  be  .If the population size is , the probability of individual i being selected is shown in equation ( 14): • Crossing refers to selecting two individuals at random from the population and inheriting the excellent genes of the parent to their offspring through the exchange and combination of two chromosomes, thus producing new good individuals.In this paper, the single-point crossover method is used.The specific operations are as follows: first, the random pairing operation is performed on the individuals of the population; then, a pair of paired chromosomes are randomly set at a crossing point; finally, two new chromosomes can be obtained by exchanging the right part of the crossing point of the parent's chromosomes.• Mutation is used to simulate the gene mutation phenomenon caused by accidental factors in the genetic process of organisms.This method can avoid the influence of local optimal solution.In this paper, the single-point mutation method is used to operate, that is, to randomly change the value of a bit in a chromosome with a small probability.Taking the binary coding for an example, the mutation is shown as randomly changing a gene of a chromosome from 1 to 0, or from 0 to 1.

Combined forecasting model based on GA-Prophet-LSTM
The load sequence of EVCS studied in this paper is a complex nonlinear sequence, which contains linear, nonlinear, periodic, and other data characteristics.However, a single model is one-sided, and it is difficult to fully capture the various characteristics of the data.To alleviate this problem and further improve the precision of prediction results, this paper makes the most of the advantages of the Prophet model and LSTM neural network, comprehensively considers the changing trend, periodicity, holiday effect, and long-term historical data characteristics, and proposes a combined model of Prophet-LSTM based on genetic algorithm for load forecasting of EVCS.
• The LSTM neural network prediction model is constructed, including three hidden layers, namely the LSTM layer, the Dropout layer, and the Dense layer.To prevent the model from over-adapting to training data during training, the dropout algorithm is applied.In each training process, some neurons are randomly discarded with a probability of 0.01.• The optimal weight of the combination model is found through the iteration of the genetic algorithm, and the error value of the prediction result is used as the individual fitness evaluation function.Suppose the Prophet model prediction result is  and the weight is  , and the LSTM model prediction result is  and the weight is  .Then the predicted value  of the combined model as shown in equation ( 16): Further, the prediction effects of the four models are quantitatively compared through the RMSE and MAPE evaluation indicators, as shown in Table 3.By comparing the results, the ARIMA model has the lowest prediction accuracy; the RMSE index of the Prophet model is lower than that of the LSTM model, while the MAPE index is higher than that of the LSTM model.The two indicators of the GA-Prophet-LSTM combination model are lower than the other three models.Therefore, the GA-Prophet-LSTM model predicts the closest result to the true value, with a better prediction effect.

Conclusion
In this thesis, we propose a combined model based on GA-Prophet-LSTM for load prediction of EVCS.The experiment is conducted through the daily charging load data of EVCS in real scenarios, and the following three conclusions are drawn: • The combination of the Prophet model and LSTM neural network can combine Prophet's periodic prediction trend with the distinct advantages of high prediction precision of LSTM at a single point and have a better prediction effect on the load of EVCS.• The optimal parameters of the combined model are determined by the genetic algorithm, and the probabilistic optimization method can effectively avoid the adverse effects of manually selecting parameters based on experience, so as to improve the prediction effect of electric vehicle charging load.
• This model only considers historical load data and does not consider the impact of weather, temperature, and other factors.Subsequently, relevant data can be introduced for multidimensional time series analysis to further improve the precision and interpretability of EV charging load forecasting.

•
() is a periodic function, or seasonal function, generally in weeks or years.Based on the Fourier series, () provides a flexible model, as shown in Equation (4). represents the time of the cycle.If it is in weeks,  = 7; if it is in years,  = 365.25.() = ∑ (  +   )

Figure 2 .•
Figure 2. GA-Prophet-LSTM combination model algorithm flowchart.FIG. 2 shows the algorithm flow chart of the GA-Prophet-LSTM model, and the specific operations of each step are as follows:

Table 3 .
Comparison of prediction results.