A Real-Time Framework for Segment-Level SOC Variation Prediction in Electric Vehicles Using a Stacking Ensemble
Abstract
Accurate prediction of state-of-charge (SOC) variation is important for range estimation and energy management in battery electric vehicles (BEVs), but segment-level SOC consumption is jointly affected by driving behavior, battery condition, and traffic context. This study proposes a real-time SOC variation prediction framework based on real-world EV operational data and ensemble machine learning. High-resolution vehicle records are cleaned and converted into structured segment-level samples, from which multi-source features are extracted, including driverprofile features based on exponentially weighted historical statistics, empirical battery-condition indicators, and spatial-temporal traffic descriptors. An XGBoost regressor first predicts the mean speed of the upcoming segment using only pre-departure information, and the predicted speed is then used as a prior feature for SOC prediction. A two-layer stacking ensemble is further constructed with Random Forest, Extra Trees, XGBoost, and LightGBM as base learners and Ridge regression as the metalearner, with hyperparameters optimized by the Differentiated Creative Search (DCS) algorithm. Experiments on a real-world dataset show that the proposed method achieves the best test performance, with an RMSE of 1.0820, an MAE of 0.6172, and an $R^{2}$ of 0.9692.