Prediction of EV arrivals at Battery Swapping Station using Hybrid Neural Network models

There is an enormous increase in demand for Electric Vehicles (EV) in the present era, as they are environment-friendly when compared to conventional vehicles. Battery Swapping Stations (BSS) are gaining a lot of attention from the EV sector as it is like the gasoline stations. Forecasting of EV arrivals at BSS helps in optimally scheduling the depleted batteries to different charging piles without affecting the State of Health of the battery. Back Propagation Neural Network (BPNN) is widely used in the prediction of real-time data. Training of BPNN using metaheuristic algorithms such as Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) helps to overcome the local optima problem in BPNN. Thus, in the present work forecasting on the EV arrivals is carried out using GA-BPNN and PSO-BPNN hybrid models. Finally, a comparative study is carried out among BPNN, GA-BPNN, and PSO-BPNN models using the performance metrics such as Mean Square Error (MSE), Mean Absolute Error (MAE) and Pearson Correlation Coefficient (PCC). From the results, it was obtained that GA-BPNN model is preferred in forecasting the EV arrivals at BSS as the model has less overfitting. The hybrid models have been simulated in MATLAB/Simulink software.


1.
Introduction With the increasing growth in the automotive industry, there is a great demand for Electric Vehicles, as it can overcome the problems in the usage of conventional vehicles [1][2][3]. The EVs are found to emit less pollutants, has lower maintenance and better performance. The battery inside the EV can be refuelled using Battery Charging (BC), Battery Swapping (BS) techniques.
As battery swapping process offers a good quality of service compared to battery charging [4], Battery Swapping Stations are widely deployed in EV sector. In BSS, the depleted battery is swapped with the fully charged battery. This depleted battery is further charged using different modes of charging in the Battery Charging Station that is in-built with the BSS. The swapping process is conveniently carried out using swapping robots. There is also a battery stock, which consists of fully charged batteries and is used to serve the customers, when there is a high demand at the BSS. The depleted batteries should be charged by maintaining the State of Health (SoH) to ensure the longer durability of the battery. This can be done if the incoming EV arrivals is known in advance at the BSS.
The neural network models are found to be widely used in forecasting, as it can map the non-linearity of the system. BPNN is a supervised algorithm in which the error difference between the desired output and calculated output is back propagated [5]. The training of BPNN is done using traditional training algorithms such as Levenberg Marquardt (LM), Stochastic Gradient (SG), Bayesian Regularization, and Gradient Descent Momentum. It is found that BPNN has a slow convergence and gets stuck at the local optima when trained using such traditional algorithms. This problem can be overcome by training the neural network with metaheuristic algorithms such as Genetic Algorithm, Particle Swarm Optimization, Ant Colony Optimization, Cuckoo Search, etc. [6]. Thus, the hybrid neural network models (Neural Network + Metaheuristics) have better accuracy in forecasting the data. Metaheuristic Algorithm is an algorithm that is inspired from the nature. The structure for the optimization problem is obtained by using the information from the previously evaluated candidate solutions and creates new solutions which have a better quality.
The present work deals with the analysis on forecasting the EV arrivals at BSS using GA-BPNN, PSO-BPNN models. Finally, a comparative study is presented between LM-BPNN and the hybrid models. The remaining section of the paper is organized as follows: Section 2 presents the literature review, Section 3 describes about BPNN, Section 4 explains the mathematical model of hybrid model, Section 5 discusses about the metaheuristic algorithms, Section 6 describes the performance metrics used in the present work and Section 7 discusses about the Results and Analysis for each hybrid model.

2.
Literature Review The present section deals with the literature in accordance with the present work.
G. Battapothula et.al in [7] discussed the formulation of the multi-objective optimization problem to optimize the battery stock level, battery charging damage, and electricity charging costs for different charging piles at BSS. An assumption is made that the incoming arrival of EV is known to the owner of BSS. The proposed objectives are tested for the random model and the optimized model. Optimal scheduling of depleted batteries for different charging piles at BSS is done using a multi-objective optimization problem in [8]. To accomplish these objectives, forecasting on the number of EV arrivals is done to predict the EV arrivals so to schedule the depleted batteries. The EV arrivals at the BSS are given by advanced notice. A brief overview of the different Metaheuristic algorithms such as GA, PSO and how it can overcome the local minima trap is discussed in [9]. It also provides the classification of Metaheuristic Algorithm based on adaptive and mutation mechanism.
Ping Wang discussed the forecasting of typhoon rainfall using PSO-BPNN. A comparison was carried out using BPNN and PSO-BPNN hybrid model and it was found that the typhoon rainfall could be predicted accurately using PSO-BPNN hybrid model [10]. Strain prediction on wind turbine blades is performed using intelligent algorithms such as GA-PSO hybrid model and is found to perform well in terms of robustness and accuracy. It was also able to overcome the non-linear fitting and multi-input parameters [11]. In haze prediction, the model was designed using BPNN. It was found that due to the limitations in BPNN, the prediction model showed less accuracy. So, this was improved using PSO [12]. G Bo et.al discussed the wind forecasting using PSO-BPNN, as PSO helps to overcome the limitations of BPNN and is used to get the optimal initial weights and biases of BPNN neural network. A comparison is carried out using BP, PSO-BP, and GA-BPNN. The performance metrics used for the comparison are MAE and Root Mean Square Error (RMSE) [13]. N Nikentari et.al discussed about the forecasting of tide data using the hybrid model such as GA-BPNN and PSO-BPNN. A comparison is carried out to show that PSO-BPNN model has a better accuracy compared to GA-BPNN in tide level forecasting. Results of prediction using GA-BPNN and PSO-BPNN are compared with actual data and the accuracy of prediction is measured by MAPE [14]. Gonçalo Nazaré et.al discussed the shortterm wind speed forecasting using neural network model with training algorithms such LM and PSO on the wind speed and wind power data. The training algorithms are used to update the weights and bias of the ANN. From the results, it was obtained that PSO-BPNN model has a good accuracy in forecasting [15].
Time series prediction on L&T stock market, surface roughness, concrete strength and humidity is performed in [16]. A comparative study in forecasting has been carried out between LM-BPNN and GA with BPNN model. Chenyang Liu et.al in [17] discussed the prediction of soil thermal conductivity based on various factors such as natural density, moisture content, and porosity. The forecasting on the data collected has been performed using BPNN and GA-BPNN hybrid model. GA-BPNN model has 3 better accuracy in forecasting as it overcomes the local optima problem in BPNN [16][17]. Chao Yi Zhang et.al, discussed the prediction model for the water jet falling pointing fire extinguishing and it was observed that the slow convergence and local optimality problem of BPNN could be overcome using GA, where the GA operators are used to achieve a better result and the performance metric used for comparison is MSE [18]. A short-term electric load forecasting model based on GA-PSO-BPNN is performed in [19] as it has the advantage of both GA and PSO to overcome the local optima problem in BPNN. A comparison is carried out amongst GA-BPNN, PSO-BPNN and GA-PSO-BPNN. Jianzhuo Yan et.al discussed the time series prediction in the quality of freshwater in Beihai Lake in Beijing using a hybrid optimized algorithm such as GA-BPNN and PSO-BPNN. The performance of the model is evaluated using APE, MAPE, RMSE and PCC [20]. The knapsack problem is solved for six different genetic crossover operators [21] for the different dimensions of the knapsack problem.
It was observed from the literature review that the limitations in BPNN can be overcomed by training the network using metaheuristic algorithms (GA, PSO). Thus, in the present work prediction on EV arrivals at BSS is carried out using hybrid neural network models. The following section gives a brief idea of BPNN.

3.
Back Propagation Neural Network BPNN is one of the neural network models which is frequently used in forecasting. The structure of BPNN consists of an input layer, hidden layer, and output layer. The neurons in the input layer and output layer realize the inputs and targets respectively [22]. The neurons in the successive layers of the network are connected using weights and biases. Due to its simplicity, a uni hidden layer BPNN is used in most of the studies. The architecture of BPNN is depicted in figure 1. The non-linear activation function between the input layer and hidden layer makes the network suitable in predicting the nonlinear data. Binary sigmoidal function is chosen as the activation function and its formulation is given in equation (1). Prediction using BPNN is carried by training of feed-forward network, backpropagation of errors and weight updation. The training algorithms optimizes the weights and biases in the BPNN to achieve the least error. However, the traditional optimization training algorithms such as LM, SG tends to get stuck at the local optima as they use the principle of differentiation to update the weights and biases. This problem can be overcome using metaheuristic algorithms. Thus, better accuracy in the prediction can be guaranteed using the hybrid BPNN models.
(1) Figure 1. Architecture of BPNN The following section describes the mathematical model for the hybrid BPNN model which is essential in the prediction of EV arrivals in BSS.

Mathematical Model
The main objective of the hybrid model is to reduce MSE in the prediction, which is defined by equation (2). The predicted EV arrival at time step i is defined in equation (3). The value of the k th hidden neuron for training sample 't' is defined in equation (4). Equations (3) and (4)  variable non-linear unconstrained real optimization problem. The decision variables are wk, b, wmk, and bk . These decision variables are optimized using the metaheuristic algorithms to achieve less error in the prediction.
Where, yi represents normalized EV arrival at time step i, ̂ represents predicted EV arrival at time step i, U is the length of input vector, i.e.., Normalized EV arrivals, T is the number of training samples, Htk represents the value of 'k th ' hidden neuron for training sample 't', N represents the number of hidden neurons, wk is the weight between k th hidden neuron and output neuron, b represents bias for output neuron, Xp represents normalized EV arrival at time step 'p', bk is the bias for hidden neuron 'k', wmk is the weight between input neuron 'U' and hidden neuron 'k'. The following section discusses about the metaheuristic algorithms used in the present work for weight updation in BPNN.

Metaheuristic Algorithms
Metaheuristic is a method that inherits its properties from one or more heuristics, seeks to find nearoptimal solution. Metaheuristics can escape from the local optima, thus providing better solutions compared to traditional optimization algorithms. In the present work, BPNN is trained using metaheuristic algorithms such as GA and PSO.

5.1.
Genetic Algorithm GA is an evolutionary algorithm that can be used in optimizing the weights and biases of BPNN. The flow diagram of GA is depicted in figure 2. The process starts with the creation of a population of specified size, where each individual member in the population represents the entire weights and biases of BPNN. Each individual has a fitness value (equation (2)) which denotes their survival. The member having the highest fitness value has more chance of survival. For the creation of the subsequent generations, the individual gets selected as the parents. The parents get selected based on their fitness value. The individual having the best fitness value has more probability to get selected as a parent. The selected parents produce offsprings which becomes the individuals for the next generation. The off springs are produced by using the vector entities of two parents (crossover) and by making some random changes in the vector entity of a single parent (Mutation). This process continues until the termination condition occurs [23]. Termination arises in GA when the specified generation exceeds or when there is no improvement in the objective function (equation (2)) over the stall generations.

5.2.
Particle Swarm Optimization PSO is a metaheuristic algorithm based on Swarm Intelligence that can be used in optimizing weights and biases of BPNN. The process of PSO is shown in figure 3. The algorithm begins with the creation of the swarm of specified size, where each particle in the swarm represents the entire weights and biases of BPNN. In the beginning, each particle is assigned with random positions and velocities. Based on their position, the fitness value of each particle (equation (2)) is calculated. This is compared with fitness at pbest (personal best position of the particle) and gbest (global best position of the swarm). If the calculated fitness value is found to be better than fitness at pbest, then the pbest is updated with the present location of the particle. A similar process is carried for the updation of gbest. Then, the particle's velocity is updated. The velocity update of the particle is given by equation (5).
Where and represents the velocity and position of j th particle at d-dimension in l th generation respectively. and represent the personal best position location and global best location of j th particle at d-dimension in l th generation, respectively. r1 l , r2 l are random numbers at generation 'l'. 'w' represents the inertia weight that controls the effect of previous generation velocity on the present generation's velocity. The inertia weight at iteration l is given by equation (6). c1, c2 are the acceleration coefficients which represents the weight of acceleration of the particle towards pbest and gbest. 'X' represents the constriction factor that is responsible for the convergence of the algorithm.
The best performance is achieved for wmax = 0.9, wmin= 0.4, c1 = 2.05, c2 = 2.05 and X = 0.729 [14,[24][25][26][27]. The particle's velocity is then checked for the limits, if it exceeds the limit, the particle's velocity in that iteration corresponds to the limit it has violated. In the next step, the particle's position is updated. The position update of the particle is defined using equation (7). Then the new fitness value of the particle is calculated and compared with pbest and gbest. This process continues until the termination occurs [28][29][30]. The block diagram of PSO-BPNN is depicted in figure 4. The hybrid models such as GA-BPNN and PSO-BPNN can be simulated in MATLAB/Simulink environment to predict the EV arrivals at BSS. The next section describes the performance metrics used in the present work which helps in choosing the appropriate hybrid model for forecasting the EV arrivals at BSS.

6.
Performance Metrics Performance metrics help in analysing the best prediction model for a real-time application. The performance metrics used in the present work are MSE, MAE, and PCC. The predicted error ei at time step i in forecasting is defined by equation (8). Let 'n' be the data size. Table 1  Indicates the average squared errors Indicates the average absolute error Indicates the linearity between actual and predicted data Where ̅ represents the mean of actual EV arrivals and ̅ represents the mean of predicted EV arrivals.
The following sections depict the analysis of each hybrid model in the prediction of EV arrivals at BSS.

Results and Analysis
The hourly Electric Bus arrivals for 168 days at Changi Airport is considered for the study. The Electric Bus arrivals are derived based on the passenger arrivals. The BSS is assumed to operate between 7 am and 9pm. Thus, the total time steps are 2352. The EV arrivals data is normalized using equation (9) to get better accuracy in forecasting. 70% of the normalized data is considered for training BPNN and 30% of the normalized data i.e., 706-time steps are considered for testing. The layout of BPNN in the present study is depicted in figure 5.
Where, x = actual value of the EV arrivals y = normalized value of the EV arrivals , = maximum and minimum values of EV arrival for a particular time period In the present work, the EV arrival at 15 th -time step is predicted using the previous 14-time steps. Thus, the input layer and output layer have 14 neurons and 1 neuron respectively. The number of hidden neurons is fixed as 3. Binary sigmoidal function is chosen as the activation function between input and hidden layer and linear function chosen as the activation function between the hidden layer and output layer. The number of weights between the successive layers is the product of the neurons in both the layers and the biases between the successive layers is the number of neurons in the second layer. Thus, there are 49 weights and biases in the BPNN which are needed to be optimized using the metaheuristic algorithms such as GA, PSO to achieve less error in forecasting. The following sub-sections describe the analysis of GA-BPNN and PSO-BPNN models in forecasting the EV arrivals at BSS.  [25] is choosen as crossover operator and gaussian function is taken as the mutation operator. Crossover fraction denotes the fraction of crossover offsprings. In the present study, it is taken as 0.8. The generated offsprings become individuals for the next generation. The process of generating off springs continues until the termination condition occurs. The best performance in prediction is achieved for the population size of 400 and 150 generations. Figure 6 depicts the plot of training MSE vs generations for GA-BPNN model. From figure  6, it is inferred that the mean fitness of the entire population is decreasing with an increase in generations. This indicates that the entire population is moving towards the optimal region with an increase in generations.

7.2.
PSO-BPNN Each particle in the swarm has 49 dimensions representing the weights and biases of BPNN. For the first generation, the particles are assigned with random positions using the uniform probability distribution in the range [-1,1]. Then, the pbest and gbest locations are updated according to the fitness value of each particle. The particle's velocity is updated using equation (6), where the particle's velocity was restricted to [-0.6,0.6]. Then, the new position of the particle is evaluated (using equation (7)). The new fitness value of each particle is evaluated and again compared with pbest and gbest. This process continues until the termination occurs. The best performance in predicting the EV arrivals at BSS is achieved for the swarm size of 100 and 300 generations. Figure 7 depicts the MSE plot of PSO-BPNN. The mean fitness of PSO-BPNN has shown a better convergence towards the best fitness compared to GA-BPNN. This is due to two reasons: (1) variable inertia weight and (2) Constriction factor. The variable inertia weight brings the exploration and exploitation conditions to the algorithm. This ensures that the particles will not be able to escape from the optimal region when it is found. The constriction factor brings convergence to the algorithm by controlling the particle's velocity. Table 2 depicts the comparison of the training algorithms used in BPNN for the prediction of EV arrivals at BSS.  The weights and biases which were updated in LM-BPNN to reduce the error between actual data and predicted data couldn't be able to reduce the MSE, MAE values because of its ability to get stuck at local optima. The testing correlation of LM-BPNN shows a strong association. Since GA belongs to the class of metaheuristic algorithms which escape from local optima, the weights and biases of BPNN trained using GA have shown better performance in MSE, MAE, PCC compared to LM-BPNN. However, the system simulation time in GA-BPNN is more compared to LM-BPNN since it is a population-based optimization algorithm. The system simulation time in the hybrid model can be reduced by using high computing machines. The weights and biases of BPNN trained using PSO has the best performance on the training data because of its powerful convergence (constriction factor), variable inertia weight and the ability to escape from the local optima. Thus, it has the best training MSE, training MAE and training PCC. However, there is no improvement in testing MSE in the PSO-BPNN model compared to GA-BPNN model. This has led to more overfitting of the model. Hence, GA-BPNN model can be used for forecasting the EV arrivals at BSS as the model showed less overfitting compared to PSO-BPNN. Figure 8 shows the time series response of GA-BPNN during testing. Conclusions and Future Scope In the present work, forecasting of EV arrivals at BSS is carried out by training BPNN using metaheuristic algorithms such as Genetic Algorithm and Particle Swarm Optimization. Forecasting of EV arrivals helps in the optimal planning of BSS. The hybrid models have been simulated in MATLAB/Simulink environment. The performance of GA-BPNN and PSO-BPNN models in forecasting is compared with the LM-BPNN model using performance metrics such as MSE, MAE and PCC. It has been observed that the two metaheuristic algorithms (GA, PSO) overcome the local optima problem in the LM-BPNN model thus showing a better accuracy in prediction of EV arrivals at BSS. Though, PSO-BPNN model has the least training MSE there is no improvement seen in the testing MSE compared to GA-BPNN model. Thus, PSO-BPNN hybrid model has more overfitting compared to GA-BPNN model and thus cannot be used in forecasting the EV arrivals at BSS. Hence, GA-BPNN model can be used in forecasting the EV arrivals at BSS. The testing MSE in GA-BPNN model is improved by 7.43% compared to LM-BPNN. In the future, forecasting can be carried using hybrid model of GA, PSO through BPNN as the hybrid metaheuristic algorithm alleviates the disadvantages in the standalone algorithms. The architecture of BPNN can be also increased to get better accuracy in forecasting and prediction can be performed using high computing machines.