Lithium-ion batteries are the beating heart of the electric vehicle revolution, but they are also dangerously sensitive to heat. When a cell discharges rapidly, internal reactions generate warmth that, if left unchecked, accelerates capacity fade, degrades performance, and in the worst cases can trigger thermal runaway — the runaway chain of exothermic reactions that can end in fire or explosion. Now, a team of researchers from institutions across India has developed a machine-learning framework that predicts battery temperature during discharge cycles with remarkable accuracy, and — crucially — on battery cells the models have never seen before. The work, published in Frontiers in Mechanical Engineering, tackles one of the most quietly deceptive problems in battery diagnostics: the inflated confidence that comes from testing a model on data it has already partially memorized.
The research team, led by Anuj Prajapati of Trinity Institute of Technology and Research in Bhopal, together with colleagues at MIT Art Design and Technology University in Pune and partner institutions, drew on the NASA Ames Prognostics Center of Excellence lithium-ion battery ageing dataset. This publicly available resource documents commercial 18,650-format cells cycled repeatedly until they lost roughly 30 percent of their nominal 2.0 ampere-hour capacity, dropping to about 1.4 ampere-hours. From four batteries — designated B0005, B0006, B0007, and B0018 — the researchers extracted 169,766 discharge-cycle samples recorded at an ambient temperature of 24 degrees Celsius under an approximately 2 ampere discharge current, corresponding to roughly a 1C rate relative to nominal capacity. The sampling interval was non-uniform, varying between approximately 9 and 20 seconds, a detail that would prove important for how the team engineered its features.
What distinguishes this study from many prior efforts is its insistence on what the authors call leakage-safe validation. Conventional temperature-prediction studies often split data randomly across samples, which means that measurements from the same physical battery can appear in both the training and test sets. The model effectively gets glimpses of the very cell it is being evaluated on, and the resulting accuracy figures — sometimes approaching perfect correlation — can dramatically overstate real-world performance. The Indian team instead adopted a leave-one-battery-out strategy: in each of four validation runs, one complete battery was held out as an entirely unseen test cell, while data from the remaining three batteries were combined for training. Training sets ranged from 121,467 to 137,775 samples, and test sets from 31,991 to 48,299, depending on which battery was withheld. This design mirrors what a real battery management system must do — estimate temperature on a new cell it has never encountered, not merely interpolate within a familiar one.
The feature engineering was equally deliberate. Rather than feeding raw signals alone, the researchers constructed five physically meaningful inputs: measured voltage, measured current, instantaneous discharge power, cycle-wise cumulative discharged energy, and voltage drop. Power was computed as the product of measured voltage and the absolute magnitude of discharge current, ensuring a positive quantity in watts despite the negative sign convention of discharge current. Because the sampling interval was non-uniform, cumulative energy was calculated by integrating instantaneous power over each time increment between consecutive samples, with the accumulation restarted at the beginning of every discharge cycle to prevent energy carry-over between independent cycles. Voltage drop — the difference between the charge or reference voltage and the measured voltage — served as a proxy for internal-resistance losses. Measured temperature was the prediction target, and the battery identifier was used only for grouping during validation, never as a model input.
Descriptive analysis before model training revealed striking relationships. Measured voltage and power each showed strong negative correlations with temperature, with correlation coefficients of approximately −0.92, while cumulative discharged energy showed a strong positive correlation of roughly 0.90 — confirming that temperature climbs as a cell expends more energy over a discharge cycle. Voltage drop showed only a weak positive association, and measured current displayed negligible direct linear correlation. Yet the team retained current as an input, reasoning that tree-based ensemble learners can capture nonlinear and interaction effects that linear correlation statistics miss entirely. Smoothed trend curves reinforced the picture: average temperature rose consistently with cumulative energy, though the rise flattened somewhat at higher energy levels, while the temperature–power relationship was nonlinearly inverse, reflecting the fact that voltage and power are highest during the early, cooler stages of discharge and decline as the cell warms toward later states.
Three supervised models competed for the crown. Linear Regression served as the interpretable baseline, Random Forest brought bootstrap-aggregated decision trees to bear on the nonlinear electrothermal behaviour, and Light Gradient Boosting Machine — LightGBM — represented the state of the art, with its leaf-wise tree growth strategy and histogram-based optimization well suited to high-frequency thermal data. The results were decisive. LightGBM achieved the strongest overall generalization, with a mean root mean square error of 1.070 degrees Celsius and a mean coefficient of determination of 0.910 across the four unseen-battery runs. Random Forest was closely competitive, with a mean RMSE of 1.081 degrees Celsius, an R² of 0.909, and the lowest mean absolute error of the three models at 0.893 degrees Celsius. Linear Regression trailed badly, with a mean RMSE of 1.826 degrees Celsius, a mean absolute error of 1.576 degrees Celsius, and an R² of just 0.744. Relative to the linear baseline, LightGBM reduced RMSE by approximately 41.4 percent, cut mean absolute error by 43.0 percent, improved R² by 22.3 percent, and reduced unexplained variance by roughly 64.8 percent.
The battery-wise breakdown revealed instructive variation. Both ensemble models performed best on cell B0007, where LightGBM posted an RMSE of just 0.678 degrees Celsius and an R² of 0.967, while errors were comparatively higher for B0006 and B0018 — suggesting that cell-specific ageing behaviour and cycle-level operating differences genuinely influence how well a model trained on other cells transfers to a new one. Uncertainty analysis, quantified through the standard deviation of metrics across the four validation runs, showed that the ensemble models delivered far more stable performance than the linear baseline, whose larger error bars betrayed its brittleness. The team also partitioned the measured temperature data into four ranges — 20 to 30 degrees, 30 to 35 degrees, 35 to 40 degrees, and above 40 degrees Celsius — and found that prediction error increased at elevated temperatures for all models, indicating that the nonlinear, cell-specific behaviour of hot batteries is inherently harder to model under unseen-cell conditions. Breusch–Pagan and White heteroscedasticity tests, both returning p-values below 0.001 for every model, confirmed statistically that residual variance was non-constant across the prediction range, validating the temperature-range-wise approach to stability assessment.
Residual diagnostics painted the same story in finer grain. The linear model’s residuals stretched from roughly −9 to +6 degrees Celsius, were not centred on zero, showed a clear bimodal tendency, and exhibited curved, widening bands against predicted temperature — with systematic underprediction at higher temperatures that betrayed its inability to capture the nonlinear thermal response. Random Forest narrowed the residual spread to within approximately ±3 degrees Celsius, though a mild downward trend persisted at elevated predictions. LightGBM matched that compact error distribution while maintaining the best overall balance between accuracy, residual control, and explanatory power. The team then turned to SHAP — SHapley Additive exPlanations — a game-theoretic interpretability method that assigns each feature a contribution value for every prediction. The analysis identified power, cumulative discharged energy, and measured voltage as the dominant predictors. Lower power values pushed predictions toward higher temperatures, consistent with the discharge progression in which power falls as cells warm, while higher cumulative energy shifted predictions upward and lower voltage readings signalled hotter states. Intriguingly, the SHAP dependence analysis showed that power’s influence was not independent: below roughly 7 watts, its SHAP values were predominantly positive, but beyond that threshold they shifted toward zero and then negative, with the direction modulated by the simultaneous voltage condition of the cell — a genuine interaction effect that a linear model could never represent.
The practical implications reach deep into battery management system design. Because the framework identifies which parameters matter most, engineers can focus sensor selection and data acquisition on the electrical and electrothermal variables that genuinely govern thermal behaviour, rather than instrumenting everything indiscriminately. The residual and uncertainty analyses offer a template for assessing reliability before deployment, and the SHAP results give designers a physically interpretable map of how instantaneous loading, cumulative energy throughput, and voltage response jointly control thermal evolution. The authors are candid about limitations: the study rests on a single dataset of four 18,650 cells under controlled conditions, with no information on exact cell chemistry, sensor accuracy, or data-acquisition hardware, and no inclusion of ageing indicators, impedance response, coolant behaviour, or real driving-load profiles. Future work, they argue, should extend validation to broader chemistries, C-rates, ambient temperatures, and dynamic drive cycles, and pursue hybrid physics-informed machine learning that fuses data-driven prediction with electrochemical and thermal-domain knowledge. For now, the study stands as a compelling demonstration that honest validation — testing on cells the model has truly never seen — is not just methodological rigour, but the difference between a temperature estimate that looks good in a notebook and one that can be trusted inside a moving electric vehicle.
Subject of Research: Machine learning prediction of lithium-ion battery temperature during discharge cycles with battery-wise validation and SHAP interpretability
Article Title: Optimizing temperature prediction in automotive lithium-ion battery discharge cycles using machine learning and SHAP analysis
Article References: Prajapati, A., Thorat, S. G., Pradhan, G., Gund, S., Paraye, P., & Singh, V. (2026). Optimizing temperature prediction in automotive lithium-ion battery discharge cycles using machine learning and SHAP analysis. Frontiers in Mechanical Engineering, 12, Article 1949090. https://doi.org/10.3389/fmech.2026.1949090
Image Credits: AI Generated
DOI: 10.3389/fmech.2026.1949090
Keywords: lithium-ion batteries, machine learning, LightGBM, Random Forest, SHAP analysis, thermal management, battery management systems, electric vehicles, NASA battery dataset, temperature prediction, leave-one-battery-out validation, feature engineering
News Source: Faith Mcneil. (October 17, 2026). Machine Learning Predicts EV Battery Temperature on Cells It Has Never Seen. Scienmag.



