Trip-End Battery State of Charge Prediction for Electric Vehicles Using a Physics-Constrained Machine Learning Stacking Ensemble
Abstract
This study proposes an approach for predicting the state of charge (SoC) of an electric vehicle battery at the end of an individual operational interval using parameters available before the start of the trip. The input features included the initial SoC, trip distance, and ambient temperature. The driving range estimated by the onboard system was also considered, as it summarizes information about the vehicle’s previous operating conditions. The direct target variable was the change in state of charge over the operational interval (Delta SoC), which was subsequently used to calculate the state of charge at the end of the interval (Current SoC). The study was conducted using operational data from a 2020 Kia Niro EV, comprising 352 operational intervals from 81 discharge cycles. The obtained performance metrics characterize the vehicle investigated in this study and the range of operating conditions represented in the dataset. Cross-vehicle generalizability was not evaluated within the scope of this study. Nevertheless, the proposed methodology is general in its structure and can be applied to other electric vehicles, provided that the models are retrained and independently validated using relevant operational data. Model performance was evaluated using repeated five-fold cycle-aware GroupKFold validation. The primary Physics-Constrained Stacking configuration combined ten regression models using non-negative weights. For Current SoC, this configuration achieved an RMSE of 2.1183 percentage points, an MAE of 1.2532 percentage points, and an R2 of 0.9804. The absolute prediction error did not exceed 2 percentage points for 84.48% of the predictions. Normalized split conformal prediction provided a mean empirical coverage of 92.85% for nominal 90% prediction intervals. Explainable artificial intelligence (XAI) analysis showed that travel distance was the primary predictor of Delta SoC, whereas the initial SoC was the dominant predictor of Current SoC. The proposed approach enables accurate, physically consistent, and interpretable prediction of the final state of charge while also quantifying predictive uncertainty.