Original Research
Frontiers in Industrial Engineering ·
Volume 4 - 2026 | https://doi.org/10.3389/fieng.2026.1769776
A hybrid neural network integrating attention mechanism for time series and non-time series multi-factor electric vehicle energy consumption prediction
- Wenqiang Zhang1*corresponding author
- Ruisheng Chai2
- Mingzhe Li2
- Yashuang Mu1
- Peng Li3*corresponding author
- Mitsuo Gen4
- 1School of Artificial Intelligence and Big Data, Henan University of Technology, Zhengzhou, China
- 2College of Information Science and Engineering, Henan University of Technology, Zhengzhou, China
- 3Institute for Complexity Science, Henan University of Technology, Zhengzhou, China
- 4Research Institute for Science & Technology, Tokyo University of Science, Tokyo, Japan
Abstract
In recent years, electric vehicles (EVs) have garnered increasing consumer favor due to their low energy consumption and mechanical simplicity; however, the persistent limitation of short driving range has not been fundamentally resolved and continues to fuel drivers’ range anxiety. To enhance the accuracy of EV energy-consumption prediction, this paper categorizes influencing factors from multiple perspectives and proposes a hybrid neural-network prediction model that integrates temporal features and an attention mechanism. The model first partitions the dataset into time-series and non-time-series subsets based on temporal correlation. A convolutional neural network (CNN) is then employed to extract and reconstruct features from the time-series data to reduce computational complexity, after which an attention-enhanced bidirectional gated recurrent unit (AtBiGRU) further captures sequential dependencies. The resulting fitted representations, together with the non-time-series variables, are fed into a deep neural network (DNN) for ensemble learning, yielding precise energy-consumption predictions. By processing sequential and non-sequential data separately, the method effectively improves computational efficiency and model expressiveness. Experimental results demonstrate that the proposed CNN–AtBiGRU–DNN hybrid model achieves higher prediction accuracy and faster convergence than baseline algorithms. The proposed model validates its effectiveness and advancement in EV energy-consumption prediction.
Keywords
1 Introduction
Due to the escalating issues of rapid depletion of fossil energy sources, significant increase in air pollution and the exacerbation of climate change, global politicians and academics are currently prioritizing the creation of a transportation system that relies on renewable energy sources. An exceptionally encouraging advancement in this realm involves the advocacy for the adoption of electric cars (EVs) as a gradual substitution for internal combustion engine vehicles (ICEs) and hybrid electric vehicles (HEVs) (Needell et al., 2016). Compared to traditional fuel vehicles, EVs have advantages such as zero emissions, high energy efficiency, simpler structure and lower noise. However, their disadvantage lies in their short range (Kucukvar et al., 2022). Therefore, one of the main areas of research focus in recent years has been how to predict pure EVs energy consumption precisely. Energy consumption prediction refers to analyzing energy consumption by analyzing the driving demand and influencing factors in the future. More accurate estimation of the range of EVs can not only effectively improve users’ driving experience, but also when drivers have energy consumption data under specific vehicle conditions, they can perform precise energy management, plan chargiwng time in advance, and avoid emergency charging after the battery runs out. Emergency charging increases battery stress and heat due to high current input, which has an adverse impact on battery life. As a result, accurate energy consumption prediction is instrumental in optimizing battery usage strategies and scientifically extending battery life.
The energy consumption of EVs is influenced by numerous factors, and different factors will affect each other as shown in Figure 1. During the driving process, the driver, electric vehicle, and environment form a closed loop, where the driver interacts with the environment while driving, and changes in the environment in turn affect the driver’s judgment and operation. Each part of this closed loop will possess an effect on the energy consumption of EVs, and its influencing factors are mainly attributed to the following three categories.

It can be seen from the above that the energy consumption of EVs is impacted by a variety of variables, and there are correlations between various factors, so it is difficult to establish a corresponding physical model. At present, common research methods are roughly divided into two categories. The first category is based on the battery state of charge (SOC) as the main research object. By studying the battery SOC during the driving of EVs, a relevant energy consumption prediction model is established. Battery SOC reflects the energy stored in the battery at the current moment and is one of the most critical status quantities of the battery. Currently commonly used research methods based on battery status can be roughly divided into traditional estimation methods (Wu et al., 2023), adaptive filtering methods (Ye et al., 2022) and intelligent estimation methods (Jiaqiang et al., 2022). Studying the battery SOC can establish a relatively accurate battery energy consumption model, but the disadvantage is that this method is mostly used in laboratory environments, and the impact of a certain factor on the battery is considered alone, which may occur in actual road driving scenarios. The combination of these conditions can easily lead to a large error between the estimated results and the actual results. The second type of research method is based on being data-driven, which means making decisions centered around data. The process can be summarized as “data collection - data preprocessing - model establishment - model evaluation - model decision-making” (Sun et al., 2020). The specific implementation method is to first use a test run to conduct tests or use relevant software to conduct simulation tests to obtain a large amount of data. After cleaning and classifying the data, build a model according to its characteristics and calculate the error, ultimately selecting the optimal model to predict and analyze the problem.
There are several key phases in the data-driven development process such as statistical methods, traditional machine learning, and deep learning. Statistical methods represented by Kalman filters (Ma et al., 2021) and early artificial intelligence algorithms such as random forests (Rathore et al., 2023) and support vector machines (Liu et al., 2022) can all solve corresponding problems in the scenarios where their algorithms are applicable, but the similarity is that most of them only a certain characteristic of the object can be analyzed. In terms of EVs energy consumption prediction, statistical methods and traditional machine learning cannot solve this problem well due to the many influencing factors described above. Deep learning is a new research direction in the field of machine learning. Its characteristic is that it can extract and fit the features of input data through multiple multi-layer neural networks, and increase its representation capabilities through a series of nonlinear transformations (How et al., 2020). It is suitable for solving problems where there is a highly complex and difficult-to-understand nonlinear relationship between input samples and output data.
In this paper, the collected driving data is divided into time series and non-time series according to its time characteristics. Time series data is related to specific travel times and can be used to analyze the trends in travel distance and average speed over different time periods. Non-time series data describes the static attributes or environmental conditions of the vehicle, which do not change over time. On this basis, a combined neural network named CNN-AtBiGRU-DNN which based on convolutional neural network (CNN), bidirectional gated recurrent unit integrating attention mechanism (AtBiGRU) and deep neural network (DNN) is proposed. The main contributions of the paper can be briefly summarized as follows:
- It takes into account a variety of factors that can affect the energy consumption of EVs, including the environment, drivers, and vehicles, and divides them into time series and non-time series based on data characteristics.
- By introducing attention mechanism in BiGRU network, the model can focus more on key time series features, which helps to capture important patterns and information in time series and improve prediction performance.
- In the proposed CNN-AtBiGRU-DNN, CNN performs dimensionality reduction processing on the data, AtBiGRU is used to process time series, and DNN is used to process non-time series and time series fitting results. It fully utilizes the benefits of various network structures in learning characteristics to improve the model’s capacity for learning.
The subsequent sections are organized as follows. Section 2 offers a review of related questions and using algorithms. The proposed CNN-AtBiGRU-DNN is detailed in Section 3. Both the computational evaluation and comparison results are demonstrate in Section 4. Lastly, conclusions and future research are drawn in Section 5.
2 Related work
In the last several years, researchers have paid widespread attention to how to predict the energy consumption of EVs accurately. In this study, a number of factors were taken into consideration while predicting the energy consumption of EVs. As much as we are aware of, there are relatively few research that simultaneously consider three factors: EVs, drivers, and environmental conditions. Next, the closely related work is reviewed.
2.1 Research objectives related to the problem
Due to three factors affecting the energy consumption of EVs, the research work on these three aspects will be analyzed and summarized below.
From the driver’s perspective, their age, driving style, driving speed, age, and type of license all have an impact on EV energy consumption. Donkers et al. (2020) categorized driving styles as conservative, normal and aggressive based on driving speed, acceleration, lateral acceleration, and regenerative braking efficiency. Hai et al. (2023) concluded that vehicle driving behavior and acceleration have a significant impact on power consumption based on studies under real road conditions. Wager et al. (2016) selected two different electric vehicles for testing and found that as the driving speed increases, the energy consumption increases.
From the environmental point of view, the environment can be divided into two primary categories: the natural environment and the road environment. The natural environment includes such things as temperature, visibility, barometric pressure, humidity, and wind speed and direction, while the road environment includes gradient, road type, congestion, and number of intersections. With regard to the effect of natural environmental on the energy consumption of EVs, Liu et al. (2018) investigated that the ambient temperature affects the energy consumption by affecting the auxiliary loads and output energy loss. Wager et al. (2016) conducted a study that revealed that driving at higher speeds coupled with headwinds significantly impairs the efficiency of EVs thus significantly reducing its drivable range. Lee et al. (2024) concluded from comparative tests that low temperatures not only increase motor and battery energy consumptions but also hinder regenerative energy recovery during driving. Al-Wreikat et al. (2022) concluded that EVs have less energy consumption when driving in cities than when operating a vehicle in rural or highway areas. ith regard to the effect of road environment on the energy consumption of EVs, Yang et al. (2014) investigated how the slope of the road affected the amount of power used by EVs going uphill and downhill. Zhang and Yao (2015) concluded that when an EV needs to accelerate through an intersection, it is preferable to drive for a little amount of time at maximum acceleration to reduce energy consumption.
From the perspective of electric vehicles, total vehicle mass, battery performance, vehicle usage, vehicle load and battery status also have an effect on EVs energy consumption. Yang et al. (2023) concluded that usage and electricity consumption of air conditioners are higher in winter than in other seasons and correlation analysis showed that energy consumption is most correlated with air conditioner usage. Wager et al. (2014) proposed that there exists a notable disparity in energy consumption and driving range between electric vehicles equipped with manual and automatic transmission systems. Hao et al. (2020) demonstrate that the electricity consumption of electric vehicles varies significantly based on their application. Specifically, the identical EV model when utilized for ridesharing or taxi services, experiences significantly increased driving mileage and requires more frequent recharging.
2.2 Related problem solving algorithms
In order to make precise predictions regarding the energy consumption of EVs, many researchers have proposed various solutions. Early solutions were mostly based on research on battery SOC, which often performed well in experiments but did not perform well in real environments. Chen et al. (2019) proposed a new parameter backtracking strategy to reconstruct the open circuit voltage (OCV) and SOC curves based on the findings of the SOC estimate and the whole online parameter identification. Shrivastava et al. (2021) established the new dual forgetting factor-based adaptive extended Kalman filter (DFFAEKF) to estimate the SOC of Lithium-ion batteries in EV. Xiao et al. (2022) used recursive least squares with forgetting factor (FFRLS) to identify the parameters including the OCV values and the capacity that is accessible were input into AEKF to estimate SOC.
With the rise of deep learning, it has been widely used to predict the energy consumption of EVs. Liu et al. (2021) presented an extended kalman filter (EKF) based data-driven approach for estimating the state of charge (SOC) in lithium-ion batteries, which effectively prevents overcharging and discharging of the battery, thereby extending its lifespan. Sun et al. (2023) introduced an energy management strategy leveraging deep learning and developed an enhanced model predictive control algorithm (LSTM-IMPC) that incorporates long short-term memory (LSTM). The energy management strategy based on LSTM-IMPC proposed has a globally optimal energy-saving efficiency in different environments. Zraibi et al. (2021) proposed a hybrid approach called CNN-LSTM-DNN to improve the long-term predictive performance of lithium-ion batteries in EVs. Compared with a single deep learning method, the proposed algorithm has higher accuracy and lower error rate. Hua et al. (2022) used a neural network architecture named bidirectional long short-term memory (BiLSTM) to accurately estimate energy consumption of EVs in the presence of insufficient data and irregular driving trajectories.
2.3 Research gap
In the current research endeavors, while substantial progress has been made in elucidating the influence of individual or multiple factors on the energy consumption of EVs, the majority of studies have fallen short in comprehensively accounting for the synergistic effects arising from the intricate interplay between EVs, drivers, and environment. This limitation inherently impedes the comprehensiveness and precision of EVs energy consumption predictions. Scholars are increasingly resorting to deep learning techniques to predict energy consumption, yet existing research predominantly focuses on offline predictions. However, in practical scenarios, real-time prediction holds paramount importance for drivers to plan their journeys and for vehicle management systems to optimize operations. Therefore, devising novel methodologies that can achieve both real-time and precise prediction of EVs energy consumption represents a crucial research trajectory that demands further exploration. This research trajectory holds the potential to significantly enhance the accuracy and applicability of energy consumption predictions, ultimately contributing to a more efficient and sustainable EVs ecosystem.
In recent years, attention mechanisms have attracted widespread attention in different research fields. The attention mechanism essentially reallocates resources based on the importance of objects, with the core idea of finding correlations between them based on existing data and highlighting certain important features. Combining attention mechanisms with different neural networks has become a research hotspot. Shen et al. (2023) utilizing attention mechanisms to assist the model in extracting information from the traffic conditions of the road network that is crucial for the current task. Li et al. (2023) suggests a hybrid model that combines a DNN, temporal convolutional network (TCN), gated recurrent unit (GRU), and a dual attention mechanism. TCN integrated with a feature attention mechanism, which is employed to create an encoder module and captured the phenomenon of regeneration with battery capacity.
Addressing the limitations of prior research, this paper categorizes the collected data, taking into account the impact of the use of air conditioning and parking heaters on the energy consumption of electric vehicles from the perspective of EVs. From an environmental perspective, taking into consideration the influence of road conditions, tire types and the number of cities passing through on the energy consumption of EVs. From the driver’s perspective, taking into account the influence of various driving styles on the energy consumption of EVs. And based on the problem, a combination neural network of CNN-AtBiGRU-DNN was proposed, CNN performs dimensionality reduction processing on the data, AtBiGRU is used to process time series, and DNN is used to process non-time series and time series fitting results.
3 Model construction
3.1 CNN model
Convolutional neural networks (CNNs) abstract raw data into higher-level representations through local connectivity and weight sharing, enabling effective automated feature extraction. A typical CNN comprises convolutional, pooling, and fully connected layers; this architecture markedly reduces the number of parameters and overall complexity, thereby improving generalization. In the convolutional layers, multiple kernels operate in a sliding-window manner to capture local patterns at different scales and orientations. Pooling layers downsample the feature maps, compressing dimensionality while enhancing robustness and translation invariance. The fully connected layers further integrate high-level features to perform the final regression task. With this hierarchical design, CNNs automatically learn high-quality feature representations, substantially reducing the burden of manual feature engineering and data reconstruction.
The CNN used in this study is illustrated in Figure 2, and its core hyperparameters are optimized as follows: the network contains two convolutional stages, each employing 64 filters with a kernel size of 1 (i.e., 1 × 1). This configuration follows an incremental strategy intended to progressively enlarge the effective receptive field and strengthen global feature extraction, thereby improving the quality and efficiency of feature representations while keeping model complexity under control.

3.2 GRU model
GRU is proficient in capturing semantic associations within extended sequences effectively, and thus is suitable for dealing with the long-term dependency phenomenon present in recurrent neural network (RNN). Compared to LSTM characterized by a large number of parameters, GRU model mitigates the gradient vanishing problem by lowering the quantity of parameters to some extent. GRU takes the long-term memory state at a certain moment as its output and simultaneously modifies that long-term memory state during the output process, thus giving it fewer inputs and a more simplified structure compared to LSTM. The structure is shown in Figure 3 and the computation of its hidden state can be derived from Equations 1–4. where z t is the update gate, r t is the reset gate, h ̃ t is the candidate set, σ is the activation function Sigmoid, x t is the network input at the current moment, h t − 1 is the network output at the previous moment, and 1 − denotes that the link propagates the data forward for 1 − z t. Update gate and reset gate are two important components in GRU, which are employed to regulate the extent to the state information from the preceding moment influences the present state. Through the modification of the values associated with the update gate and reset gate, the GRU model can flexibly control the transmission and effects of the last status information on the current situation, so as to efficiently deal with the dependencies between long sequences. This mechanism makes the GRU model perform well in some sequence modeling tasks.
r t = σ w r ∗ h t − 1 , x t (1)
h ̃ t = t a n h w ∗ r t ∗ h t − 1 , x t (2)
z t = σ w z ∗ h t − 1 , x t (3)
h t = 1 − z t ∗ h t − 1 + z t ∗ h ̃ t (4)

To create a new hidden state, the GRU first takes as inputs the current input, the hidden state from the previous instant, and the output from the previous moment. Then combines these three inputs using an activation function. The GRU will then choose whether to utilize the new hidden state in lieu of the hidden state from the previous instant depending on the update gate’s output. To obtain the final output, GRU inputs the hidden state into the output layer after updating the hidden state based on the output of the reset gate.
3.3 Attention mechanism
Attention mechanism is a mechanism that mimics the allocation of attention in the human brain, which is able to focus attention on important areas at a specific moment, ignoring or diminishing attention to other areas, so as to obtain more detailed information and filter out useless information. The core idea is to flexibly and reasonably adjust the attention to information, amplify the needed information and suppress irrelevant information.
As a form of attention mechanism, the single-head attention mechanism boasts a straightforward and concise structure, efficiently computing attention scores via a single weight matrix. During the calculation of attention weights, it fully utilizes data from the entire input sequence, incorporating both prior and subsequent information, to identify long-term dependencies within the sequence. Additionally, the single-head attention mechanism considers the input sequence as a matrix and derives the predicted sequence directly through matrix transformation. This approach significantly enhances the network’s parallel processing capabilities, consequently speeding up both model training and inference processes. The calculation formula for the single-head attention mechanism is shown as Equations 5–7. where q i is the i t h query vector, k j is the j t h key vector, d k is the dimension of the key vector, α i j is the attention weight of the i t h query vector to the j t h key vector, v j is the j t h value vector, K and V are the sets of all key vectors and value vectors. Firstly, calculate the score between q i and k j through dot product operation. Then, use the S o f t m a x function to normalize these scores and obtain attention weights. Finally, based on these weights, V is weighted and summed to obtain the final attention output.
S c o r e q i , k j = q i ⋅ k j d k (5)
α i j = S o f t m a x S c o r e q i , k j (6)
A t t e n t i o n q i , K , V = ∑ K j = 1 α i j v j (7)
3.4 BiGRU model with an attention mechanism
The transmission of GRU is unidirectional from front to back, which is often applied to scenarios where the model output is only related to historical information, while the output of the EV energy consumption time series is not only affected by historical information, but also greatly related to the information of the future moments. To address this problem, BiGRU is used in this paper to construct two GRU structures with opposite directions under the premise of maintaining the unidirectional and efficient time-series information processing capability of GRU, which is calculated as Equations 8–10. where the nonlinear transformation corresponding to the input temporal data is represented by the GRU function; x t is the input vector input to the memory unit at moment t; h t ⃗ is the output of the forward hidden layer; h t ⃖ is the output of the inverse hidden layer; w t and v t denote the weights associated with the respective forward hidden layer state h t ⃗ and the corresponding inverse hidden layer state h t ⃖ at moment t; and b t denotes the bias of the BiGRU hidden layer corresponding to the moment t.
h t ⃗ = G R U x t , h t − 1 ⃗ (8)
h t ⃖ = G R U x t , h t − 1 ⃖ (9)
h t = w t ∗ h t ⃗ + v t ∗ h t ⃖ + b t (10)
y = φ W ∗ x + b (11)
In this paper, a BiGRU-based attention mechanism model is used. After extracting the global features from the time-series data using the BiGRU network, the attention mechanism computes the correlation between each input and the output result, creates attention weights based on the correlation. The attention weights are multiplied by the output of the BiGRU network to obtain the fitted values. The network structure is shown in Figure 4, where a t refers to the attention probability value assigned by the attention layer to the output of the BiGRU, and y is the final output value of the network.

3.5 DNN mechanism
The structure of DNN is an unsupervised multilayer neural network. The gradual abstraction and representation of the input data is achieved through layer-by-layer feature learning, where the inputs to the following layer are the output features of the preceding layer. DNN has the capability to map features from existing spatial samples to a more abstract feature space, facilitating the learning of an improved feature representation for the input data. The feature transformation of deep neural networks involves multiple nonlinear mappings and thus has the ability to fit highly complex functions. Figure 5 illustrates the specific structure of a deep neural network.

DNN is divided into input layer, hidden layer and output layer. The input layer receives raw data, the hidden layer learns features, and the output layer generates results. The layers are fully connected to each other, and the complex relationship between input and output is learned by readjusting the connection weights. The layers satisfy the linear relationship between layers as shown in Equation 8, where x represents the input vector, φ represents the activation function. In this paper, the R e L u function is selected as the activation function based on the features of the problem, W is the matrix of weight coefficient, b is the bias vector and y is the neuron output (Equation 11).
3.6 CNN-AtBiGRU-DNN mechanism
This study integrates a convolutional neural network (CNN), an attention-enhanced bidirectional gated recurrent unit (AtBiGRU), and a deep neural network (DNN) to form a hybrid architecture (CNN–AtBiGRU–DNN) that fully exploits the strengths of each component in feature extraction and sequence modeling. In this framework, the CNN first extracts local patterns from raw time-series data and, through convolution and pooling operations, enhances feature representations while reducing dimensionality, thereby providing more expressive inputs for subsequent sequence modeling. The resulting feature maps are then flattened and fed into a bidirectional GRU (BiGRU), which captures temporal dependencies in both forward and backward directions to learn long- and short-range dynamics more comprehensively.
To further increase sensitivity to salient temporal information, an attention mechanism is applied on top of the BiGRU (AtBiGRU). By assigning learnable weights to the hidden states across time steps, the model autonomously focuses on those segments most influential for energy-consumption prediction, effectively amplifying informative signals while suppressing noise. Finally, the attention-weighted sequence representation is fused with non-time-series features and jointly fed into a fully connected DNN to produce the final integrated prediction. This design not only leverages the complementarity between temporal and non-temporal information but also, through structured feature extraction and attention weighting, markedly enhances the model’s expressive power and interpretability. Figure 6 illustrates its particular procedure, the specific procedure is shown in Algorithm 1.

Algorithm 1 CNN-AtBiGRU-DNN.
3.7 Model evaluation indicators
After each round of training, the model was evaluated using a complete test set, using three indicators: mean squared error (MSE), mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination ( R 2 ) to measure the capacity for prediction of the model. The formulaes for calculation are shown in Equations 12–15, where Y i is the true value in the original data, Y ̂ i is the predicted value, and Y ̄ i is the average of the true values.
M S E = 1 n ∑ n i = 1 Y i − Y ̂ i 2 (12)
M A E = 1 n ∑ n i = 1 Y i − Y ̂ i (13)
R M S E = 1 n ∑ n i = 1 Y i − Y ̂ i 2 (14)
R 2 = ∑ n i = 1 Y i − Y ̂ i 2 ∑ n i = 1 Y i − Y ̄ i 2 (15)
S = M S E + M A E + 1 R 2 (16)
4 Experimental results and discussion
4.1 Data analysis and processing
The data used in this study comes from a new energy vehicle testing platform in the U.S.A 1 The dataset consists of historical operation data of an EV spanning January 2017 to June 2023 (2017.1–2023.6). The detailed parameters of this EV are shown in Table 1. The original dataset was analyzed and screened to remove records irrelevant to this study, and the retained fields are listed in Table 2.
TABLE 1. Basic parameters of electric vehicle.
| Parameters | Numerical value |
|---|---|
| Wheelbases (mm) | 2631 |
| Maximum output power (kW) | 85 |
| Maximum speed (km/h) | 160 |
| Maximum torque (N/m) | 270 |
| Battery capacity (kWh) | 24.2 |
| Maximum motor horsepower (PS) | 109 |
TABLE 2. Data fields and definitions.
| Field name | Field definitions |
|---|---|
| fuel_date | Date of data set collection |
| trip_distance (km) | Distance traveled in 1 day |
| tire_type | Tire type (0: Winter tire, 1: Summer tire) |
| City | Number of cities traveled in the day |
| motor_way | Highway driving |
| country_roads | Rural road driving |
| driving_style | Driving style (0: Aggressive, 1: Normal, 2: Conservative) |
| Consumption (kWh/100 km) | Energy consumption per 100 km |
| A/C | Air conditioning usage (0: not used, 1: Used) |
| park_heating | Parking heater (0: not used, 1: Used) |
| avg_speed (km/h) | Average speed while traveling |
For modeling and evaluation, the dataset was split chronologically into training, validation, and test subsets as follows: January 2017 to March 2022 (2017.1–2022.3) was used as the training set (80% of the data), April 2022 to November 2022 (2022.4–2022.11) was used as the validation set (10%), and December 2022 to June 2023 (2022.12–2023.6) was used as the test set (10%). This single chronological split preserves temporal order and prevents information leakage from the future into the past.
During the pre-processing of automobile driving data, the following measures need to be implemented to ensure the credibility and accuracy of the data: First, outliers and redundant values in the data are detected and processed through appropriate statistical methods and domain knowledge to ensure the consistency and accuracy of the data. Second, for missing data caused by reasons such as delayed and lost sensor signals, appropriate filling methods, such as linear interpolation, need to be used to maintain data continuity and integrity. In addition, the distribution of missing data values is plotted through visualization techniques, which can provide a more intuitive understanding of the pattern and degree of missingness and provide a reference basis for subsequent processing and analysis. Finally, on the premise that the missing data comprises only a minimal fraction of the entire dataset and is of relatively low importance in the automobile driving data, it is recommended that this part of the missing data be discarded to ensure the quality of the data.
The distribution of energy consumption recorded in the dataset by year is shown in Figure 7. It demonstrates that in the energy consumption distribution the use of air conditioning as well as the parking heater makes the energy consumption much higher in winter than in summer, and the highest energy consumption is close to twice the lowest value, which is corresponds to the real circumstances. Figure 8 shows the density of the total energy consumption distribution, and it is evident that the average value of energy consumption is 14.4 kWh/100 km, and 50% of the data is located between 11.8∼16.7 kWh/100 km.


4.2 Experimental environment and parameter settings
In this paper, a personal computer serves as the experimental platform, the CPU is Intel (R) Core (TM) i5-12500H, 2.3 GHz, the GPU is NVIDIA RTX3050, the model compilation environment is Python, and the experiments are carried out using open-source TensorFlow libraries and Keras libraries and employing the GPU engine.
The model iterations are set to 100, with the final energy consumption value designated as the prediction target. Prediction experiments are conducted based on the optimization results of each parameter, and the optimization target S is established as shown in Equation 16. The smaller S indicates that the comprehensive prediction performance is better, and the parameter setting is more reasonable. The optimization parameter of CNN is the size of convolutional neurons and convolutional kernel of the two-layer convolutional neural network, and the parameter setting method of incremental increase is taken to extract global features in a better way. The optimization parameters for BiGRU encompass the number of neurons, while for DNN involves the number of neurons in the hidden layer. Taking C 64,1 − B 128 − D 64 as an example, it implies that the CNN network has 64 convolutional neurons with a convolutional kernel size of 1, the AtBiGRU network consists of 128 neurons, and the hidden layer of the DNN network has 64 neurons. The prediction performances of different network structures are shown in Table 3, and it can be seen that the selected network structure 4 has the best performance.
TABLE 3. Model performance under different network structures.
| Index | Network structure | M A E | M S E | R 2 | S |
|---|---|---|---|---|---|
| 1 | C 64,1 − B 128 − D 64 | 0.5372 | 0.2583 | 0.9707 | 1.8257 |
| 2 | C 128,1 − B 64 − D 32 | 0.5103 | 0.2394 | 0.9792 | 1.7709 |
| 3 | C 64,3 − B 128 − D 64 | 0.5011 | 0.2011 | 0.9779 | 1.7248 |
| 4 | C 128,3 − B 64 − D 32 | 0.4872 | 0.1987 | 0.9806 | 1.7057 |
| 5 | C 64,1 − B 64 − D 64 | 0.5501 | 0.2787 | 0.9673 | 1.8626 |
| 6 | C 128,1 − B 64 − D 64 | 0.5276 | 0.2415 | 0.9721 | 1.7978 |
4.3 Ablation study
This study adopts the BiGRU-DNN-based energy consumption prediction algorithm as the baseline model and sequentially incorporates two enhancement strategies: the attention mechanism and the convolutional neural network (CNN). The results of the ablation experiments are presented in Table 4. As shown in Table 4, the integration of these enhancement strategies significantly improves the accuracy of electric vehicle energy consumption prediction. Specifically, incorporating the attention mechanism into the BiGRU-DNN model alone reduces the mean absolute error (MAE) by 4.8% and the mean squared error (MSE) by 31.2%, demonstrating its capability to independently identify and emphasize key spatiotemporal features such as vehicle speed and acceleration that critically influence energy consumption. When the attention mechanism is combined with CNN, the CNN-AtBiGRU-DNN model achieves a 5.5% reduction in MAE and a 35.9% reduction in MSE compared to the baseline BiGRU-DNN model. This improvement can be attributed to the introduction of convolutional neural networks (CNN) and the attention mechanism. Specifically, CNNs can efficiently and automatically extract deep hierarchical features from the input data, while the attention mechanism uses a single weight matrix to efficiently calculate attention scores, enabling rapid focus on key information. The core lies in modeling the global information of the entire input sequence and capturing the dependencies between preceding and subsequent data, accurately identifying the core spatiotemporal features that affect energy consumption, and avoiding judgment biases caused by local information. It further refines the feature representation by adaptively assigning higher weights to significant spatiotemporal factors, thereby suppressing irrelevant information. The single-head attention mechanism, with its core advantages of capturing global dependencies and efficient weight allocation, not only independently achieves significant reduction in prediction errors but also forms functional complementarity with the convolutional neural network (CNN), ultimately enhancing the overall prediction performance of the model.
TABLE 4. Results of ablation study with different models.
| CNN | Attention mechanism | M A E | M S E | R 2 |
|---|---|---|---|---|
| | | 0.6217 | 0.3102 | 0.9762 |
| ✓ | | 0.6163 | 0.2874 | 0.9773 |
| | ✓ | 0.5918 | 0.2134 | 0.9798 |
| ✓ | ✓ | 0.5872 | 0.1987 | 0.9806 |
4.4 Comparison of prediction results
In this study, four different deep learning models including BiLSTM, GRU-DNN, BiLSTM-DNN, and the proposed CNN-AtBiGRU-DNN were used for comparative experiments. To ensure a fair and rigorous comparison, all models were consistently trained with identical data splitting, preprocessing steps, and training protocols: the training process utilized all collected driving segment data in each round, with a total of 100 training rounds conducted. The MSE variation during training is presented in Figure 9. It is observed from the MSE metric variation that the prediction error of the models gradually decreases and the degree of fitting gradually improves as training progresses. When the number of training rounds approaches 20, all models near convergence. Among the four models, the CNN-AtBiGRU-DNN model exhibits the fastest convergence speed, with its MSE metric stabilizing earlier.

For the MAE, RMSE and R 2 metrics in Table 5, the CNN-AtBiGRU-DNN model shows a small advantage at the end of training. Compared to the BiGRU-DNN model, the MAE and RMSE of the proposed model have decreased by 7.7% and 11.6% respectively, while the R 2 metrics has increased by approximately 0.9%.
TABLE 5. Comparison of prediction effects of different methods.
| Evaluation indicators | M A E | M S E | R M S E | R 2 |
|---|---|---|---|---|
| BiLSTM | 1.2109 | 0.5372 | 1.8573 | 0.2583 |
| GRU-DNN | 0.7233 | 0.5972 | 0.8115 | 0.9621 |
| BiLSTM-DNN | 0.6361 | 0.3991 | 0.6798 | 0.9718 |
| CNN-AtBiGRU-DNN | 0.5872 | 0.1987 | 0.6009 | 0.9806 |
As can be seen from Figure 10, comparing with the rest of the comparison algorithms, the predicted values of the BiGRU-DNN model with the addition of the attention mechanism and the combination of CNN are closer to the true values and have the highest degree of curve closeness to the true values in the three stages of testing conducted, which demonstrates the effectiveness of the CNN-AtBiGRU-DNN model presented in this paper in predicting the energy consumption of EVs.

Based on a thorough Pearson correlation coefficient analysis of the filtered data in Figure 11, a significant positive correlation has been observed between avg_speed, tire_type, and the energy consumption of EVs. This indicates that as these factors increase, the energy consumption of EVs will also rise proportionately. Conversely, factors like country_roads and city exhibit a weak correlation with energy consumption, suggesting they have a comparatively minor impact on the overall energy consumption of EVs.

For this purpose, input data is processed by removing avg_speed and tire_type separately, and then trained and predicted using the proposed CNN-AtBiGRU-DNN model. The MSE, MAE, RMSE, and R 2 metrics of the trained model are shown in the Figure 12. It is evident that alterations to the input variable exert a minimal influence on the R 2 metrics. Notably, when compared to training with the full dataset, excluding the avg_speed variable led to a modest reduction of approximately 26.9% in the MSE index, alongside marginal declines of 5.2% and 7.5% in the MAE and RMSE respectively. Conversely, the degree of decrease in these indicators was relatively small when tire_type was removed.

These results are then compared with the accurate values and the results obtained from training the model with the complete data set as illustrated in Figure 13. Upon examining the prediction outcomes, it becomes evident that after removing the factors with the strongest correlation to energy consumption in time series and non-time series data respectively, the prediction results show significant differences compared to those obtained from training and predicting with the complete data set, with a decrease in accuracy. This indicates that avg_speed and tire_type have had a certain influence on the experimental results.

Based on the experimental results presented above, the proposed CNN-AtBiGRU-DNN model demonstrates superior prediction accuracy and faster convergence compared to the baseline models, with notable improvements in the R2 metric. Furthermore, the ablation study reveals that different input variables exert varying degrees of influence on the prediction performance. Nevertheless, several limitations of this study should be acknowledged. First, the integration of multiple neural network components inherently introduces a substantial number of trainable parameters, resulting in increased computational complexity and higher resource requirements during the training phase. More importantly, all experiments in this study were conducted on data collected from a single vehicle operating under specific conditions. While the model achieves satisfactory performance on the current dataset, its generalization capability to unseen scenarios remains to be further validated. In particular, factors such as variations in vehicle specifications (e.g., battery capacity, curb weight, and powertrain configuration), heterogeneous driving behaviors (e.g., aggressive versus conservative driving styles), and diverse geographical and environmental conditions (e.g., terrain topography, climatic factors, and traffic patterns) may potentially affect the model’s predictive accuracy. Future research will prioritize extending the validation of the proposed framework to encompass multiple vehicle platforms and a broader range of real-world driving conditions, thereby providing a more comprehensive assessment of its generalization performance.
5 Conclusion
This paper establishes a deep learning model CNN-AtBiGRU-DNN for EVs energy consumption prediction. Considering a series of factors related to electric vehicle energy consumption, an effective data analysis and processing method is established based on real data. Upon data analysis, it was discovered that the energy consumption values are significantly higher during winter, attributed to the utilization of heating and air conditioning. The collected data was divided into time series and non time series for training, and the results were compared with BiLSTM, GRU-DNN, and BiLSTM-DNN. CNN-AtBiGRU-DNN has faster fitting speed and higher accuracy, which enhances its predictive ability for large batches of real-time driving data. Training the model with different input variables reveals that avg_speed and tire_type have a certain impact on the prediction results. Future work will focus on continuously improving the architecture of deep learning models to accommodate growing data sets and more complex driving scenarios while also paying particular attention to additional factors that might impact energy consumption.
Generative AI statement
The author(s) declared that generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Footnotes
Edited by: Muhammad Sultan, Bahauddin Zakariya University, Pakistan
Reviewed by: Ildiko Tulbure, 1 Decembrie 1918 University, Romania
Omer Can TOLUN, Adana Alparslan Turkes Science and Technology University, Türkiye
Footnotes
The data used in this paper can be obtained from https://www.spritmonitor.de/en/detail/786327.html
Statements
- Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
- Funding
The author(s) declared that financial support was received for this work and/or its publication. This research work is supported by the National Natural Science Foundation of China (62006071), Natural Science Foundation of Henan Province (252300421884), and Zhengzhou Science and Technology Collaborative Innovation Project (21ZZXTCX19).
- Data availability
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding authors.
- Author contributions
WZ: Project administration, Formal Analysis, Funding acquisition, Writing – review and editing, Supervision, Conceptualization, Methodology. RC: Methodology, Investigation, Writing – review and editing, Data curation, Writing – original draft. ML: Validation, Writing – review and editing, Software, Writing – original draft, Visualization. YM: Project administration, Writing – review and editing, Methodology, Conceptualization, Funding acquisition. PL: Supervision, Project administration, Writing – review and editing, Formal Analysis. MG: Writing – review and editing, Formal Analysis, Supervision.
References
- Al-Wreikat Y., Serrano C., Sodré J. R. (2022). Effects of ambient temperature and trip characteristics on the energy consumption of an electric vehicle. Energy 238, 122028. doi:10.1016/j.energy.2021.122028
- Chen X., Lei H., Xiong R., Shen W., Yang R. (2019). A novel approach to reconstruct open circuit voltage for state of charge estimation of lithium ion batteries in electric vehicles. Appl. Energy 255, 113758. doi:10.1016/j.apenergy.2019.113758
- Donkers A., Yang D., Viktorović M. (2020). Influence of driving style, infrastructure, weather and traffic on electric vehicle performance. Transp. Research Part D Transport Environment 88, 102569. doi:10.1016/j.trd.2020.102569
- Hai T., Dhahad H. A., Jasim K. F., Sharma K., Zhou J., Fouad H. (2023). Deep learning-based prediction of lithium-ion batteries state of charge for electric vehicles in standard driving cycle. Sustain. Energy Technol. Assessments 60, 103461. doi:10.1016/j.seta.2023.103461
- Hao X., Wang H., Lin Z., Ouyang M. (2020). Seasonal effects on electric vehicle energy consumption and driving range: a case study on personal, taxi, and ridesharing vehicles. J. Clean. Prod. 249, 119403. doi:10.1016/j.jclepro.2019.119403
- How D. N., Hannan M. A., Lipu M. S. H., Sahari K. S., Ker P. J., Muttaqi K. M. (2020). State-of-charge estimation of li-ion battery in electric vehicles: a deep neural network approach. IEEE Trans. Industry Appl. 56, 5565 – 5574. doi:10.1109/tia.2020.3004294
- Hua Y., Sevegnani M., Yi D., Birnie A., McAslan S. (2022). Fine-grained rnn with transfer learning for energy consumption estimation on evs. IEEE Trans. Industrial Inf. 18, 8182 – 8190. doi:10.1109/tii.2022.3143155
- Jiaqiang E., Zhang B., Zeng Y., Wen M., Wei K., Huang Z. (2022). Effects analysis on active equalization control of lithium-ion batteries based on intelligent estimation of the state-of-charge. Energy 238, 121822.
- Kucukvar M., Onat N. C., Kutty A. A., Abdella G. M., Bulak M. E., Ansari F. (2022). Environmental efficiency of electric vehicles in Europe under various electricity production mix scenarios. J. Clean. Prod. 335, 130291. doi:10.1016/j.jclepro.2021.130291
- Lee G., Song J., Lim Y., Park S. (2024). Energy consumption evaluation of passenger electric vehicle based on ambient temperature under real-world driving conditions. Energy Convers. Manag. 306, 118289. doi:10.1016/j.enconman.2024.118289
- Li L., Li Y., Mao R., Li L., Hua W., Zhang J. (2023). Remaining useful life prediction for lithium-ion batteries with a hybrid model based on TCN-GRU-DNN and dual attention mechanism. IEEE Trans. Transp. Electrification. 9.3, 4726 – 4740.
- Liu K., Wang J., Yamamoto T., Morikawa T. (2018). Exploring the interactive effects of ambient temperature and vehicle auxiliary loads on electric vehicle energy consumption. Appl. Energy 227, 324 – 331. doi:10.1016/j.apenergy.2017.08.074
- Liu X., Li K., Wu J., He Y., Liu X. (2021). An extended kalman filter based data-driven method for state of charge estimation of li-ion batteries. J. Energy Storage 40, 102655. doi:10.1016/j.est.2021.102655
- Liu Z., He H., Xie J., Wang K., Huang W. (2022). Self-discharge prediction method for lithium-ion batteries based on improved support vector machine. J. Energy Storage 55, 105571. doi:10.1016/j.est.2022.105571
- Ma X., Miao R., Wu X., Liu X. (2021). Examining influential factors on the energy consumption of electric and diesel buses: a data-driven analysis of large-scale public transit network in beijing. Energy 216, 119196. doi:10.1016/j.energy.2020.119196
- Needell Z. A., McNerney J., Chang M. T., Trancik J. E. (2016). Potential for widespread electrification of personal vehicle travel in the United States. Nat. Energy 1, 1 – 7. doi:10.1038/nenergy.2016.112
- Rathore H., Meena H. K., Jain P. (2023). “ Prediction of ev energy consumption using random forest and xgboost,” in 2023 international conference on power electronics and energy (ICPEE) (IEEE), 1 – 6.
- Shen H., Zhou X., Ahn H., Lamantia M., Chen P., Wang J. (2023). Personalized velocity and energy prediction for electric vehicles with road features in consideration. IEEE Trans. Transp. Electrification. 9.3, 3958 – 3969.
- Shrivastava P., Soon T. K., Idris M. Y. I. B., Mekhilef S., Adnan S. B. R. S. (2021). Combined state of charge and state of energy estimation of lithium-ion battery using dual forgetting factor-based adaptive extended kalman filter for electric vehicle applications. IEEE Trans. Veh. Technol. 70, 1200 – 1215. doi:10.1109/tvt.2021.3051655
- Sun H., Fu Z., Tao F., Zhu L., Si P. (2020). Data-driven reinforcement-learning-based hierarchical energy management strategy for fuel cell/battery/ultracapacitor hybrid electric vehicles. J. Power Sources 455, 227964. doi:10.1016/j.jpowsour.2020.227964
- Sun X., Fu J., Yang H., Xie M., Liu J. (2023). An energy management strategy for plug-in hybrid electric vehicles based on deep learning and improved model predictive control. Energy 269, 126772. doi:10.1016/j.energy.2023.126772
- Wager G., McHenry M. P., Whale J., Bräunl T. (2014). Testing energy efficiency and driving range of electric vehicles in relation to gear selection. Renew. Energy 62, 303 – 312. doi:10.1016/j.renene.2013.07.029
- Wager G., Whale J., Braunl T. (2016). Driving electric vehicles at highway speeds: the effect of higher driving speeds on energy consumption and driving range for electric vehicles in Australia. Renew. Sustainable Energy Reviews 63, 158 – 165. doi:10.1016/j.rser.2016.05.060
- Wu L., Lyu Z., Huang Z., Zhang C., Wei C. (2023). Physics-based battery soc estimation methods: recent advances and future perspectives. J. Energy Chem. 89, 27 – 40.
- Xiao R., Hu Y., Jia X., Chen G. (2022). A novel estimation of state of charge for the lithium-ion battery in electric vehicle without open circuit voltage experiment. Energy 243, 123072. doi:10.1016/j.energy.2021.123072
- Yang S., Li M., Lin Y., Tang T. (2014). Electric vehicle’s electricity consumption on a road with different slope. Phys. A Stat. Mech. Its Appl. 402, 41 – 48.
- Yang D., Liu H., Li M., Xu H. (2023). Data-driven analysis of battery electric vehicle energy consumption under real-world temperature conditions. J. Energy Storage 72, 108590. doi:10.1016/j.est.2023.108590
- Ye Y., Li Z., Lin J., Wang X. (2022). State-of-charge estimation with adaptive extended kalman filter and extended stochastic gradient algorithm for lithium-ion batteries. J. Energy Storage 47, 103611. doi:10.1016/j.est.2021.103611
- Zhang R., Yao E. (2015). Eco-driving at signalised intersections for electric vehicles. IET Intell. Transp. Syst. 9, 488 – 497. doi:10.1049/iet-its.2014.0145
- Zraibi B., Okar C., Chaoui H., Mansouri M. (2021). Remaining useful life assessment for lithium-ion batteries using cnn-lstm-dnn hybrid method. IEEE Trans. Veh. Technol. 70, 4252 – 4261. doi:10.1109/tvt.2021.3071622
Citation
Zhang, W., et al. (2026). A hybrid neural network integrating attention mechanism for time series and non-time series multi-factor electric vehicle energy consumption prediction. Frontiers in Industrial Engineering, Volume 4. https://doi.org/
- Received
- Accepted
- Published
- Volume
- 4 - 2026
Copyright
Copyright © 2026 Zhang, Chai, Li, Mu, Li and Gen.
License: https://creativecommons.org/licenses/by/4.0/
*Correspondence: Wenqiang Zhang; Peng Li
Article metrics
- Views
- 0
- Downloads
- 0
- Citations
- 0
- Shares
- 0
