## 2 Materials and Methods
### Multi-Stage Power Consumption Prediction  
In this paper, we propose a multi-stage prediction model to more accurately predict the energy consumption of electric vehicles during driving. The proposed model divides the entire driving route into segments at regular time intervals and performs segment-specific predictions reflecting the characteristics of each segment, significantly improving prediction performance compared to a single model. Specifically, when representing the driving route of an electric vehicle as a time series of GPS coordinates \((x_{1},y_{1}),\ldots,(x_{n},y_{n})\), it is divided into \(m\) segments \(S_{1},\ldots,S_{m}\) as follows based on a time interval \(\Delta t\):  
\[S_{1}=\{(x_{1},y_{1}),\ldots,(x_{k_{1}},y_{k_{1}})\},t\in[t_{1},t_{1}+\Delta t)\]  
\[S_{2}=\{(x_{k_{1}+1},y_{k_{1}+1}),\ldots,(x_{k_{2}},y_{k_{2}})\},t\in[t_{2},t_{ 2}+\Delta t)\]  
\[\ldots\]  
\[S_{m}=\{(x_{k_{m-1}+1},y_{k_{m-1}+1}),\ldots,(x_{n},y_{n})\},t\in[t_{m},t_{n}]\]Here, \(t_{1},\ldots,t_{m}\) represent the start times of each segment, and \(t_{n}\) represents the end time of the drive. For each segment \(S_{j}\), a six-dimensional feature vector \(F_{j}\) is constructed:  
\[F_{j}=[v_{j},a_{j},b_{j},t_{j},w_{j},g_{j}]\]  
where \(v_{j}\): average speed within the segment (km/h); \(a_{j}\): average acceleration within the segment \(m/s^{2}\); \(b_{j}\): battery level at the start of the segment (%); \(t_{j}\): driving time of the segment (sec); \(w_{j}\): average weather information within the segment such as temperature (\({}^{\circ}\)C) and wind speed \(m/s\); \(g_{j}\): average terrain information within the segment such as altitude (m) and slope (rad). These features are composed of factors that have been identified through prior research as having a significant impact on the energy consumption of electric vehicles. Speed and acceleration are directly linked to driving resistance and regenerative braking, which are key variables influencing energy consumption. Additionally, battery level and driving time serve as measures of energy capacity and consumption duration. The segment-specific prediction models \(f_{1},\ldots,f_{m}\), which take the feature vector as input, are independently trained from past driving data. Specifically, given the driving record \(D=\{(F_{j},y_{j})|j=1,\ldots,M\}\), a nonlinear regression model is trained to represent the relationship between the feature vector \(F_{j}\) and the actual consumption \(y_{j}\), as shown in Equation (1):  
\[f_{j}:F_{j}\mapsto\mathbb{R},f_{j}(F_{j})=y_{j}+\epsilon,\epsilon\sim N(0, \sigma^{2}),j=1,\ldots,m \tag{1}\]  
Here, \(\epsilon\) is a normally distributed error term. The trained models \(f_{1},\ldots,f_{m}\) are then applied to segment-specific data collected during real-time driving to predict the energy consumption for each segment \(p_{1},\ldots,p_{m}\). The total energy consumption \(P\) for the entire route is derived as the sum of the segment predictions, as shown in Equation (2):  
\[P=\sum_{j=1}^{m}p_{j}=\sum_{j=1}^{m}f_{j}(F_{j}) \tag{2}\]  
To evaluate the performance of the proposed model, comparative experiments were conducted using actual electric vehicle operation data. The dataset used for evaluation consists of driving records collected from a domestic taxi transportation company from January to December 2019, comprising 3,107,844 driving logs from 1542 vehicles. Each log includes GPS coordinates, speed, acceleration, state of charge (SOC), and energy consumption data recorded every second. The dataset was divided into training (60%), validation (20%), and evaluation (20%) sets, and a single prediction model was trained on the same dataset for comparison. The single model used was a long short-term memory (LSTM) neural network, which considers the inherent feedback memory effect. The same six features as in the multi-stage model were used as inputs, but the entire driving sequence was input in batch. Both models were implemented using the Keras framework and trained in a Tesla V100 GPU environment.