Performance Analysis of LSTMs for Daily Individual EV Charging Behavior Prediction

In this paper, we evaluate and analyze the performance of long short-term memory networks (LSTMs) for individual electric vehicle (EV) charging behavior prediction over the next day. The charging behavior consists of the charging duration level within a certain upper and lower range, the time slots in which charging will take place, the number of times charging will take place in each time slot, and whether the next day will be a charging day or not. Unlike existing work, we evaluate the behavior prediction performance for increasing resolutions of charging duration levels and charging time slots, using varying lengths of training data. The performance of the proposed approach is validated using real EV charging data, and comparison with other machine learning methods shows its generally superior prediction accuracy for all resolutions. We show that the best performance is achieved when around 8–10 months of data are used as training data. It is also shown that although the performance of the LSTMs degrades with increasing resolution, the performance for charging time slot prediction is affected less compared to that for charging duration prediction. We further propose, analyze and evaluate a new technique that improves the charging duration prediction performance.


I. INTRODUCTION
Electric vehicles (EVs) can help in reducing pollution by replacing the traditional internal combustion engine-based vehicles. The number of EVs is expected to increase sharply in the coming years, e.g., the EV new sales market share is expected to increase to more than 20% in 2025 in the USA [1]. Large-scale grid connection for these vehicles will significantly impact the grid, especially if the users charge the EVs in the same time period, which will increase the maximum power load, aggravate the load peak and off-peak difference, increase the difficulty of power grid optimization, impact power quality, and reduce the life of distribution transformers [2]. The localized distributed network will be more vulnerable in the presence of a large number of EVs as they are mainly connected to the local residential areas where the networks are sometimes heavily loaded [3].
To deal with the aforementioned issues, accurate load forecasting is essential for intelligent control of EV charging systems [4]. It is also essential to understand the charging and discharging behavior of the EVs in order to achieve optimal The associate editor coordinating the review of this manuscript and approving it for publication was Emre Koyuncu . planning of distribution networks with a large penetration of EVs [3]. Electric vehicle charging load prediction can reduce the impact on power grid caused by the EVs connected to the grid, and provide a reference for optimization operation and planning of power grid [2].
The EVs can be considered as zero-emission vehicles if they are charged using renewable energy [5]. Smart charging stations can help in utilizing renewable energy to the greatest extent while accommodating the current power demand for households as well as the power demand for EV transportation. Smart chargers can maximize the use of solar power for the charging process. However, due to the lack of an interface for obtaining the state of charge directly from an EV's battery manager, prediction of required energy is needed in order to effectively use the smart chargers [6]. In the next subsection, we carry out a review of different methods of EV load/charging behavior prediction.

A. LITERATURE REVIEW
The authors in [7] predicted idle time at EV charging stations, which can help policy makers minimize the impact of irregular charging behavior. The authors also proposed using several well-known regression methods such as the gradient boosting (XGBoost), decision trees (DT), random forests (RF) and support vector machines (SVM) to predict the charging behavior of a user. This behavior was defined in terms of how long the user would stay at the parking lot after the EV was fully charged, as well as the energy consumption when the user plugged in. The authors in [8] compared different EV load forecasting techniques, such as the seasonal AR integrated moving average with exogenous regressors (SARIMAX), RF, XGBoost, SVM and artificial neural networks (ANN). The authors showed that the SARIMAX performed the best, followed by the RF. The other techniques were unable to outperform the SARIMAX models, probably due to the small size of the training data set.
To enable smart EV charging services for households equipped with PV panels, it is important to create a charging plan that maximizes the use of solar energy while still ensuring that the EV will be charged when needed. For this purpose, the authors in [6] predicted the amount of energy needed for fully charging an EV considering machine learning and conditional probability models. The authors considered training with a single user, all users and clusters of similar users. The conditional probability methods worked best for single users. The second-best results were obtained for XGBoost trained on clusters of similar users. The authors in [9] modeled a power-based energy consumption model to obtain precise range estimation.
The authors in [10] predicted the charging demand for each charging session at an EV charging station. Three machine learning approaches were evaluated: XGBoost, RF and SVMs. The XGBoost-based approach slightly outperformed other methods. In [11], the authors provided a comprehensive review of supervised and unsupervised machine learning as well as deep learning for charging behavior analysis and prediction. The deep learning methods were mostly based on the recurrent neural networks (RNNs) and their variants, as well as a few uses of CNNs and deep generative methods. The authors in [12] analyzed five-year real-world charging event log from a total of 455 charging stations in Kansas city, USA. The authors expressed charging patterns in functional forms, where the patterns included daily usage occupancy, daily energy consumption and station level occupancy. In [13], the authors forecasted charging load at EV charging stations by using Q-learning to choose either between ANN or RNN at each time step.
In [14], the authors presented the model of a fast EV charging station and proposed an optimal energy management strategy to use the renewable energy systems and reduce the impact of EV charging on utility grid. In [15], the authors proposed an energy management system (EMS) for a public EV charging station. The authors forecasted the community load demand using a nonlinear autoregressive eXogenous (NARX) method. The authors in [16] proposed an EMS for battery swapping station, where the discharged battery was replaced by a fully charged battery. The authors forecasted the total EV load demand at a charging station and the energy price using the daily mileage probability and an NARX-ANN, respectively.
The authors in [2] analyzed the travel characteristics of EVs, then used the fuzzy inference system to emulate the process of drivers' decisions to charge their cars. The authors in [3] used Monte Carlo based simulation method to create EV charging and discharging load profiles. The authors in [4] compared RNNs, long short term memory networks (LSTMs), gated recurrent units (GRUs) and deep neural networks (DNNs) for forecasting the EV charging load from the charging station perspective. The GRUs performed the best on hour-based historical data charging scenario. The authors in [5] considered minute-level data from EV charging stations and aggregated data for commercial building chargers, which showed more random and fluctuating behavior. The authors showed that the LSTMs outperformed other methods for forecasting minute-level charging load. The authors in [17] calculated the EV charging load for a large number of EVs via the Monte Carlo simulation algorithm, and showed that the charging load peaked at 9:00 and 19:00.

B. MOTIVATION AND CONTRIBUTIONS
It was shown in [18] that the users most often employed their private charging stations and only seldom public charging stations and normal sockets. Hence, it is necessary to predict charging behavior pattern for a single user, or a small group of users. In the work presented in [18], a number of users participated in trials where they had to fill one-week travel and charging diaries and completed a two-three hour faceto-face interviews including questionnaires. The average user reported 3.1 charging events in a typical week, and the users typically recharged their EVs when the EV battery was still sufficiently charged.
Machine learning-based individual EV charging behavior prediction methods were proposed in [19] and [20]. In the former reference, the authors used RF to predict the number of times an EV would be charged the next day. The charging start times and durations for each EV were then sampled from a 2D distribution derived from charging data of several users. In [20], several machine learning algorithms were combined to predict the hours on the next day during which the EV would charge, and whether the next day would be a charging day or not.
In [21], the authors used LSTMs to predict the individual charging time of EV users at a charging station. The authors showed that the charging behavior of regular users can be predicted accurately, while that of irregular users is difficult to predict. In [22], due to highly random nature of individual charging behavior data, the charging duration, and the charging start times for every hour in a day were discretized into four levels. It was shown that the LSTMs could accurately predict the charging behavior for the next day using around 10 months of training data.
In this paper, we present results and analyze the performance of LSTMs for individual EV load forecasting at higher levels of discretization for charging duration and charging time slots. The higher levels of discretization are essential for predicting the charging behavior at a finer resolution. The analysis of the results shows the degradation of prediction performance with higher discretization levels, as well as how the discretization affects charging duration and charging start times predictions. We further show the performance with varying number of training data samples. Unlike [19] that is more appropriate at an aggregate level, our approach does not require information about the charging behaviors of several users. Hence, it is suitable in current scenarios where there are a small number of EVs present in a neighborhood. Furthermore, unlike [21] and [22], we further present an improved method for forecasting charging duration prediction that uses predicted start time slots as an extra input.

C. ORGANIZATION
The rest of the paper is organized as follows: In Section II, we present the notations, system model and problem formulation. In Section III, we describe the proposed approach. Section IV evaluates the performance of the proposed method as well as compares it with different ML methods. Section V presents the improved technique and compares its performance with respect to the approach presented in Section III. Section VI presents the conclusion.

II. PROBLEM FORMULATION
In this paper, a bold symbol such as x x x or x p x p x p refers to a set or vector, whereas a non-bold symbol such as x p /x p or x q p refers to the p th element of x x x, or the q th element of x p x p x p , respectively. A non-bold symbol such as X refers to a scalar. A function f using a vector x x x as input is written as f (x x x). Its output can be a vector or a scalar. The time of the day is represented by hh : mm, where hh represents the hour, and mm represents the minutes.
We consider a single EV in a household, and it is assumed that the type of EV remains unchanged during the time period considered. It is also assumed that the EV is charged using a normal EV wall-charger. We consider the charging behavior data to be available over M consecutive days for several months. As explained in [22], the EV charging load time-series data are highly unbalanced, and due to this reason, the EV charging behavior is modeled in terms of the following parameters: 1) The number of times an EV is being charged in a day, i.e., the number of times an EV is plugged into the EV wall-charger. The quantity representing the number of times an EV is charged is denoted as N i T for the i th day. For a total of M days, this charging frequency is represented by 2) The charging start time, which is the time at which an EV starts charging by being plugged into the EV wall-charger. The charging start time when the EV is being charged on the i th day is given by t i,j s , where j represent the charging event number and, therefore, i, j represent the j th charging event on the i th day. The total charging start times for the i th day are given by The charging start times are written as t s t s 3) The total charging duration per day, which is the total time in a day during which an EV is charged, i.e., the total time over which the charging load is non-zero. We denote by δt i,j the charging duration corresponding to the j th charging event on the i th day. This duration corresponds to the time duration between the charging start time and the time at which the EV is plugged out of the EV wall-charger. The total charging duration for the i th day is represented by

5) Note that in this work, a charging event that starts on
i th day and ends on (i + 1) th day is considered as two separate charging events on i th and (i+1) th day: 1) a first event where the charging ends on the i th day at 23:59, and 2) a second event where the charging starts at 00:00 on the (i + 1) th day. Given the charging behavior information per day over M days, the aim of charging behavior modeling is to find different functions using this information such that the charging behavior can be modeled as a function of time. We consider that using these functions, the charging behavior information can be predicted for the next day, i.e., where f N T , f t s , f δt and f d represent the functions that can predict the charging frequency per day, charging start times, total charging duration per day, and the presence or absence of charging on a day, respectively. The symbols N M +1 represent the estimated charging frequency per day, estimated charging start times, estimated total charging duration, and estimated charging/no charging on the (M + 1 th ) day, respectively. These estimates should be as close as possible to the actual values, i.e., In the next section, we shall describe our approach for modeling the charging behavior based on LSTMs.

III. PROPOSED SOLUTION
We consider that there is a dedicated smart meter (SM) for measuring the electricity consumed by the EV at periodic time intervals during a day. It is assumed that the SM is equipped with a mathematical unit that converts this measured time-series data into the charging behavior information described in Section II. The information is then transmitted to the utility or the energy supplier that can analyze the behavior.
As described in Section I, machine and deep learning methods are suitable for modeling the complex EV charging behavior. Moreover, it has been shown in [5] that the deep learning methods can outperform the machine learning methods for predicting EV charging loads at the EV charging stations. However, as we have described in [22], the individual EV charging behavior such as total charging duration, charging start times and daily charging frequency show highly varying behavior. In order to solve this problem, the total charging duration and start times were discretized into four levels in [22]. In this section, we generalize this approach to solve (1) by discretizing the charging behavior into several levels, and analyze the prediction performance with respect to different levels of discretization.
We combine the charging start times and charging frequency into a single parameter s s s. We consider a total number of C charging time slots in a day, where each slot represents a certain time-period in a day. We follow the procedure given below for generating this parameter for each day: 1) The charging start times for the i th day are discretized by dividing the 24 hours in a day into C time-slots of equal duration, which are denoted by . These time-slots correspond to the charging start times between an upper and a lower limit, described as follows: 2) The number of times charging takes place in the time range corresponding to each time slot is counted, and the final counted value is assigned to the relevant timeslot. In this way, the c th entry in s i s i s i will represent the charging frequency in the c th time slot, and the sum of s i s i s i is equal to total number of times charging took place on the i th day, i.e., N i T .
3) The presence/absence of charging on the i th day can be represented by noting the sum of s i s i s i . If it is nonzero/zero, it indicates the charging/no-charging day. This can be represented as follows: where d i is the indicator for the i th day. 4) This process is continued for the M days over which the charging data are available.
This discretization results in a vector s s s of total size C × M over the whole year, where the i th entry of the vector is given by s i s i s i . Note that this parameter combines a total of three charging behaviors: 1) Time-slot in which charging takes place, 2) Charging frequency, 3) Charging/no-charging day.
Similarly, the charging duration per day is discretized into L levels, where each level has a lower and upper charging duration associated with it. These charging durations are represented by c l d,min and c l d,max , respectively, for the l th level. The charging duration for the i th day, represented as c i d , belongs to the l th level if it is between c l d,min and c l d,max . This is shown below: This process is carried out over M days for which the charging duration data are available, resulting in a vector To model the individual EV user's charging behavior, we use the charging behavior data to train two functions f s and f c d using deep learning, where the former can be used to predict the charging start time slots and charging frequency, and the latter predicts the charging duration level. We predict the user's behavior over the next day, therefore, for training, we use the data delayed by one day as input and the discretized data from the present day as the expected output for training the ML models, i.e., The output of the trained function f s can also be used to predict whether the next day will be a charging day or not, i.e., In the above expression, d M +1 is an indicator function that predicts whether the (M + 1) th day is a charging day or not, and s M +1 c is the c th predicted time slot level for the (M + 1) th day. Note that we evaluate the charging day prediction performance in Section IV in addition to the charging start time slot prediction performance, because d M +1 can be considered as the binarized form of the sum of the entries of s M +1 s M +1 s M +1 and, therefore, the performance of predicting the former variable may be different from that of the latter variable.
The charging behavior data represent a time-series set, where the value of the time-series at the current time-stamp VOLUME 9, 2021 can be closely related to its values in the previous time window. An RNN can predict the next element in a time-series by learning considerably complex models than those obtained with traditional time-series modeling. The RNN can be considered as consisting of a number of layers where each layer corresponds to a single time-instant. Each layer has a hidden state, which is computed based on the current input and the hidden state of the previous layer. The hidden state acts as a memory that holds information about the past data that the network has encountered. The output of the RNN is computed by multiplication of the hidden state with a weight matrix. However, as the same weight matrix is used at each timestamp, one of the key problems encountered by the RNN is that of instability due to which it can only learn short-term trends present in the data. This instability is compensated by a variant of the RNN, known as the long short-term memory networks (LSTMs). The LSTMs can learn long-term trends present in the input training data. These networks have an additional cell state, which retains a part of the information from the earlier states by using a combination of partial ''forget'' and ''increment'' operations. The cell states from the previous time-stamp are either (i) reset to zero to forget the past data, or (ii) incremented to incorporate new information into the long-term memory [23]. As described earlier, we have discretized the charging behavior data, due to which the problem becomes a classification problem. Therefore, the LSTMs consist of a final softmax layer, which outputs the probability of the prediction belonging to one of the discretized levels. The level with the highest probability assigned to it is chosen as the predicted output level.
Other than facilitating the application of deep learning models for charging behavior prediction, there are two further advantages of the discretization approach presented above: 1) The privacy of the user can be preserved effectively as the discretization for the charging start times only provides the charging behavior within a certain upper and lower limit, and only the total charging duration is used.
2) The discretized charging behavior information can be even provided by the user himself/herself in the form of a questionnaire as such information can be measured without requiring any sophisticated measurement equipment. Thus, this approach can be used in the present-day scenario even when a dedicated SM may not be available for an EV in a household.

IV. RESULTS
In this section, we evaluate the performance of the proposed method in terms of varying discretization levels and the amount of training and testing data, using real EV charging time series from [24]. 1 The time series data consist of electricity consumed for a single EV charging in a house. These data are provided every 15 minutes for one year. We first preprocess the data to obtain the data as described in Section II. These data include charging start times per day, and the total charging duration per day. The former also provides the number of charging events per day. The charging start times and the total charging duration are discretized into different levels and the EV charging behavior performance is then assessed for each discretization level. The performance is evaluated in terms of error ratio (ER), which is defined as the number of incorrect predictions divided by the total number of data samples in the test data set. The ER is averaged over 50 simulation runs. We also calculate the average level difference (LD) between the predicted and actual levels for start times and charging durations. If the values of ERs are similar to those of the average LD, it would indicate a LD of one, i.e., the estimated level is one unit lower or higher than the actual level.
The training and testing data are varied in proportions of the total available data, where the proportions vary from 0.1 to 0.9. We also compare the performance of the proposed technique with traditional machine learning-based forecasting, including Decision Forest, RF, Logistic Regression, ANN, SVM, k-nearest neighbors (KNN) and Naive Bayes, which were implemented using Python [25] and Scikit-learn ML library [26]. For all the experiments, the parameters of the existing ML methods were adjusted by trial-and-error to obtain the best possible performance. The proposed method was implemented using the deep learning toolbox in Matlab [27]. The structure of the LSTM consisted of a single layer with 100 units per layer for forecasting start time and total charging duration, and the Adam optimizer was utilized during the training phase.

A. PREDICTION OF START TIME FORECASTING
We first show the performance of start time forecasting. The proportion of training data (test data) is varied from 0.1 (0.9) to 0.9 (0.1) of the total samples. Figure 1 shows the results of ER versus varying training data proportions for four, eight and 12 discretization levels. Note that the results in this sub-section show the performance of predicting both the start times and the charging frequency because s M +1 s M +1 s M +1 provides the charging frequency information in each charging start time slot. It can be observed from Fig. 1(a) that for four discretization levels, the ER decreases as the proportion of training data is varied from 0.1 to 0.6, where the drop is the sharpest when the training data proportion increases from 0.3 to 0.4. There is a slight increase when the training data proportion is 0.8, which may be because the test data in this case have a higher variation percentage compared to the test data sets with other proportions, or because of overfitting. The average LD values are also shown in the same figure, where the y-axis on the right-hand side of the figure represents the scale for the LD. The LD values are slighter higher than the ER values for training data proportions of 0.1 and 0.2. For The results for eight discretization levels in Fig. 1(b) show that the ER and LD increase till the training data proportion is 0.3, which may be due to under-fitting as there is more information present in the data due to higher discretization, but not enough training samples. The ER and LD then show a significant drop at the training data proportion of 0.4, and decrease further as the training data proportion increases to 0.5. Afterwards, the ER stays roughly stable while the LD shows a slight increase. Overall, there is a small difference between the ER and LD values. Figure 1(c) shows the results versus varying training data proportions for 12 discretization levels. The ER increases as the training data proportion increases to 0.2, followed by a decrease till the training data proportion of 0.6. The ER again increases for training data proportion greater than 0.6. This increase may be due to overfitting or perhaps because the data have a higher percentage variation compared to the training data. The trend shown by the ER values is similar to that shown by the LD values. Similar to the LD values shown in Figs. 1(a) and 1(b), the LD values in Fig. 1(c) are slightly higher than the ER values. The difference between the two show a small decrease as the training data proportion increases.
From these three figures, we can note the following trends: • As the discretization levels increase, the difference between the maximum and minimum ERs decreases, which means that increasing the number of training samples is less effective at improving the forecasting performance for a higher number of discretization levels.
• For four discretization levels, the ER decreases in general as the proportion of training data increases. However, for eight and 12 discretization levels, the ER stops decreasing for training data proportions of 0.7 and 0.6, respectively. This may indicate the presence of overfitting.
• The minimum ER is the lowest with four discretization levels. However, the maximum ER is also the highest with four discretization levels, which may be because a lower number of training samples is not enough to properly train the network.
• The LD values show generally similar trends to those shown by the ER values at all discretization levels and training data proportions. The ER and LD values are also similar, which indicates that at most there is a forecasting level difference of one.
Therefore, the start times forecasting performance can be considered as accurate, because not only the ER values are low indicating a low number of prediction errors, the incorrectly predicted start time values are also considerably close to the actual values.

B. PREDICTION OF TOTAL CHARGING DURATION
Next, we show the performance in terms of the ER with varying discretization levels for total charging duration prediction in Fig. 2. The minimum and maximum total charging durations were 0 and 555 minutes, respectively. The daily total charging duration was divided into five, eight, 14 and  It can be observed from Fig. 2 that the ER decreases as the training data proportion increases for all the discretization levels. However, the decrease of the ER becomes less prominent as the discretization levels increase, because as the levels increase, there are more transitions in the data, which makes it more difficult to correctly predict the data. Overall, we can observe the following trends: • The maximum and minimum ER values increase as the number of discretization levels increases.
• The ERs for five and eight levels with training data proportion equal to 0.8 show an increase in the ER compared to lower or higher training data proportions. This behavior may be due to a higher proportion of random behavior in the test data set.
The corresponding LD values for charging duration prediction are shown in Section V, where we propose a novel method to improve the charging duration prediction performance.

C. PREDICTION OF CHARGING/NO-CHARGING DAYS
Next, we show the performance of the LSTM-based forecasting for the estimation of charging/no-charging day with varying discretization levels. We show the performance via ER, false negative (FN) and false positive (FP) in Figs. 3(a), 3(b) and 3(c), respectively. The last two metrics can be seen equivalent to the ER for prediction of no-charging and charging days, respectively. The ER and LD values are identical for prediction of charging/no-charging days, because there are only two prediction levels. Hence, we only show the performance in terms of the ER. With four discretization levels, the ER decreases as the training data proportion increases to 0.5, and then stays almost constant. The FN shows an erratic behavior till the training data proportion of 0.7, after which it decreases to 0. The reason for this erratic behavior may be due to a very small number of no-charging days present in the test data, due to which the percentage of the incorrectly-forecasted nocharging days can vary dramatically. The trend shown by FP is almost the same as that shown by the ER, because most of the days are charging days, hence the behaviors of ER and FP will be similar.
The performance of ER with eight discretization levels demonstrates a generally decreasing trend, except at training data proportion of 0.9. When the training data proportion is 0.9, the corresponding test data have a single no-charging day at the beginning of the data set. However, the predicted result includes more than a single no-charging day, which causes as increase in the ER. The FN shows no obvious trend, but it can be observed that the FN values are very small. The trend shown by FP is identical to that shown by the ER. Again, as the number of no-charging days in small, the values of FN are erratic.
The ER with 12 discretization levels shows a decreasing trend till the training data proportion is 0.6. Afterwards, an increasing trend is seen. This trend resembles that shown for the twelve discretization levels. The trend for FN shows an increase till 20% of the training data are used, followed by a decrease. The trend for FP resembles that for the ER, similar to the trends shown for four and eight discretization levels. We can observe the following trends based on Figs. 3(a), 3(b) and 3(c): • The maximum ER and FP with four levels are higher than those with eight and 12 levels. This is because a higher number of discretized levels increases the training and testing data. As long as any slot within a charging day is predicted as a charging slot, the day will be correctly identified as a charging day. This is possible with a higher number of discretization levels.
• The results with FN are a bit erratic due to a low number of no-charging days. It is possible that with the change in the number of training/testing data samples, there may be as low as one or two no-charging days present in either the training or testing data, due to which the prediction behavior does not show a regular pattern.

D. COMPARISON WITH MACHINE LEARNING TECHNIQUES
We further compare the performance of forecasting total charging duration, charging start times, and charging/nocharging days using 80% of the data as training data and varying discretization levels in Tables 1, 2    The proposed technique significantly outperforms the existing techniques for charging start times prediction. Note that the machine learning techniques show improved performance as the discretization levels increase, because as these levels increase, the number of charging slots increases. As the number of slots increases, the slots in which there is no charging will increase. The machine learning techniques can correctly predict the no-charging slots, but are unable to correctly predict the charging start time slots. As the number of no-charging time slots in the test data increase, the ER values with the machine learning techniques show a decrease because these techniques can correctly predict the no-charging time slots.
Next, we discuss the ER, FN and FP for prediction of charging/no-charging day. It can be observed that the proposed technique outperforms existing techniques for four and eight discretization levels in terms of ERs and FNs. However, for 12 levels, the ER and FP obtained with the proposed technique can be described as second best. The reason for worse performance is due to a large number of charging days in the test data. Other algorithms only predict charging days, which increases the FN but results in a low FP.

V. IMPROVED CHARGING DURATION PREDICTION
As shown in the previous section, the forecasting of charging duration level has a higher ER compared to that for the charging start times prediction. In this section, we propose an approach to improve performance by using an extra input feature. This input is derived from the forecasted start times prediction results. It can be noted that the charging start times prediction results are very accurate, especially at four levels. We used the prediction results to calculate the Then, the predicted charging duration for the (M +1) th day is given as Next, we compare the results obtained using the ''normal'' approach introduced in Section III, and the ''improved'' approach proposed earlier in this section. These results are shown in Figs. 4-7. Figure 4 shows the ERs obtained using the normal and improved techniques for five discretization levels. It is evident that the ERs decrease with the improved technique for all the training data proportions, except for training data proportion of 0.9, where this improvement is small, probably because there is not much room for improvement. The figure further shows the average LD comparison, where the y-axis on the right-hand side of the figure represents the scale for the LD. It can be seen that for higher training data proportions,  the average LD and ER values are almost the same for both techniques, which means that there are a few errors in estimation and these errors are within one level. The improved technique is of course better because it gives lower ERs. Figures 5-7 show the ERs and LDs for eight, 14 and 26 discretization levels. It is clear that especially for higher training data proportions, both ER and LD decrease. It can be noted that for eight discretization levels and training data proportions greater than 0.5, the improved technique is mostly able to limit the prediction errors to a single level, while for the normal technique, a few errors are also higher than a single level, as shown by the difference between the ER and level value difference values. For 14 discretization levels, several estimation errors are higher than a single level for both techniques, except for training data proportion higher than 0.8, where almost all the errors remain within a single charging level for the improved technique. For 26 discretization levels, the prediction errors increase to more than a single charging level for both techniques, but remains less than two levels for training data proportion higher than 0.6 for the improved technique. It is evident from these results that the proposed improvement can enhance the estimation accuracy with respect to the normal technique. Especially for training data proportion of 0.8, the ER with the improved technique shows a prominent decrease with respect to the normal technique.
We measure the training time taken by the improved technique for total charging duration prediction with a training data proportion of 0.8. We use a computer with Intel i5-4200U 1.6 GHz processor and 12 GB RAM. The total training times were equal to 15.14 s, 15

VI. CONCLUSION
In this paper, we analyzed the use of LSTMs for individual EV charging behavior prediction. The LSTMs were trained using the expected output data delayed by one day as input. We showed the prediction performance with respect to different discretization levels and training data proportions for total charging duration per day, charging start time slots, number of times charging took place in each time slot, and charging/no charging day. We demonstrated that using 70-80% of one-year data, i.e., 8-10 months of data for training resulted in the best performance. We showed that the prediction performance degraded as the discretization levels increased, but the performance of total charging duration was worse than the charging start times prediction performance. We proposed an improvement that used the predicted number of total number of times charging took place over the next day as an extra input, and showed that it could ameliorate the charging duration prediction to some extent.