AI-Based EV Battery Health Prediction with Explainable AI and Database Integration
Research Article • Article ID: IJREK-2026-00086
Abstract
Scholarly manuscript entitled 'AI-Based EV Battery Health Prediction with Explainable AI and Database Integration'.
Keywords
I. INTRODUCTION
Electric vehicles depend on lithium-ion battery packs whose capacity and power capability decline with use. The State of Health (SOH), commonly defined as the ratio of present capacity to rated capacity, is the key indicator of this decline; a pack is usually considered to reach end of life when SOH falls to about 80% [10]. Knowing SOH accurately and early supports safer operation, warranty decisions, second-life reuse and maintenance planning. SOH cannot be measured directly during driving. Traditional battery management systems (BMS) rely on coulomb counting, look-up tables or equivalent-circuit models, which drift with temperature, ageing and usage. Data-driven methods learn the relation between measurable signals (voltage, temperature, charge time, resistance) and SOH, and have shown strong results on laboratory data [3], [11]. Two practical gaps remain. First, most high-accuracy models are black boxes: an engineer or fleet operator cannot see which signal pushed the estimate down, which limits trust. Second, predictions are rarely stored together with the inputs and explanations that produced them, so the history needed for audit, drift detection and retraining is lost. This paper addresses both gaps in one design. Gradient-boosted and other regressors predict SOH; SHAP [1], [2] explains each prediction; and a relational database keeps cell metadata, cycle features, predictions, per-prediction SHAP values and alerts. The objective is a reproducible, auditable pipeline rather than a claim of record accuracy. The main contributions are: (1) a layered architecture for explainable SOH prediction with database integration; (2) a cell-wise evaluation protocol of five models with grouped cross-validation; (3) a SHAP analysis at global and local level whose outputs are persisted in SQL; and (4) an honest account of limitations, notably that the prototype uses synthetic data.
II. BACKGROUND AND LITERATURE REVIEW
A. Battery Ageing and State of Health Capacity fade and resistance growth in lithium-ion cells result from mechanisms such as solid-electrolyte-interphase growth and lithium plating, and are accelerated by high temperature, high C-rate and deep discharge. Reviews of SOH estimation group methods into direct measurement, model-based and data-driven approaches, and note that real applications demand methods that work from limited and noisy signals [10]. Ageing is typically slow at first and may accelerate after a "knee" point, which makes late-life prediction harder than early-life prediction. B. Data-Driven SOH and Lifetime Prediction Severson et al. showed that features derived from early-cycle discharge voltage curves can predict cycle life with small error using regularised linear models [3]. Roman et al. presented a machine-learning pipeline for SOH estimation from charging data and compared several model families [11]. Hu et al. surveyed battery lifetime prognostics and stressed the role of health indicators and data quality [15]. Public repositories such as the NASA Ames battery data set [4] and the CALCE data from the University of Maryland [16] are widely used for benchmarking. A recurring finding is that well-chosen health indicators often matter as much as model complexity, and that evaluation must split by cell, not by random row, to avoid optimistic estimates. C. Explainable AI Explainable AI aims to make model decisions understandable to humans [13]. SHAP assigns each feature an additive contribution based on Shapley values from cooperative game theory [14] and unifies several earlier explanation methods [1]. For tree ensembles, TreeSHAP computes exact Shapley values efficiently and supports both global importance and local, per-prediction explanations [2]. LIME is a model-agnostic alternative based on local surrogate models [6]. In safety-relevant domains such as EV batteries, such explanations help to check whether a model relies on physically sensible signals. D. Database Integration Fleet-scale battery analytics need persistent storage of telemetry, model outputs and alerts. Relational databases provide structured schemas, foreign-key integrity, indexes and declarative queries, and lightweight engines such as SQLite [12] allow a prototype to be built without a server. Storing explanations next to predictions makes it possible to answer questions such as which feature most often triggered recent alerts. E. Research Gap The literature offers accurate predictors, explanation methods and storage technologies, but they are usually studied separately. This work contributes an integrated, auditable design that links prediction, explanation and persistence, evaluated with a leakage-free cell-wise protocol.
III. PROBLEM STATEMENT AND OBJECTIVES
The problem is that SOH estimators deployed in EVs are either simple but inaccurate, or accurate but opaque and unrecorded. A model that cannot justify its output is hard to trust, and a prediction that is not stored cannot be audited or used to improve the model. Objectives: Predict SOH from cycle-level health indicators with low error on cells never seen during training. Compare classical and ensemble regressors using a cell-wise split and grouped cross-validation. Explain predictions globally and locally using SHAP and check that the drivers are physically sensible. Design a relational schema that stores cell metadata, features, predictions, explanations and alerts. Measure the practicality of the database layer through insertion cost and query latency. Report limitations transparently, including the use of synthetic data.
IV. PROPOSED SYSTEM
The system is modular and can be run as one service or as separate components. Its stages are data acquisition, preprocessing and feature extraction, model training and selection, explanation, database storage and application services such as dashboards and alerts. Fig. 1 summarises the closed loop; the detailed architecture is shown in Section V.
V. ARCHITECTURE AND WORKFLOW
The architecture separates a data path (sensor data, features, predictions, explanations) from a control path (model selection, alerting, retraining). This separation makes failures traceable: a wrong alert can be followed back to the prediction, the features and finally the raw measurements stored in the database.
VI. ALGORITHM AND CONTROL LOGIC
The following procedure describes the training and monitoring workflow. It is model-agnostic and can be implemented as a script, a scheduled job or a service.
| Step | Description |
|---|---|
| Input | Cycle records D with cell identifier, health indicators X and measured SOH y; test fraction; alert threshold T = 80%. |
| Preprocess | Clean D; extract health indicators; keep operating conditions as features. |
| Split | Split D by cell identifier into training cells and unseen test cells (no cell appears in both). |
| Train | Fit each candidate model on the training cells; run grouped 5-fold cross-validation. |
| Evaluate | Compute MAE, RMSE and R2 on the test cells; select the model with the lowest RMSE. |
| Explain | Run TreeSHAP on the selected model; compute global importance and local contributions. |
| Store | Insert cell metadata, cycle features, predictions and SHAP values into the SQL database. |
| Alert | For each cell, raise an alert at the first cycle whose predicted SOH is at or below T. |
| Monitor | Compare stored predictions with new capacity checks; retrain if error or drift exceeds a limit. |
VII. EXPERIMENTAL SETUP
A. Dataset (Synthetic, Physics-Inspired) Important disclosure. No real battery measurements were used in this study. To prototype and test the full pipeline, a synthetic cycling dataset was generated by a script that simulates capacity fade and the resulting changes in measurable signals. It contains 40 cells and 28,201 cycle records. Each cell has its own ambient temperature (15 to 45 °C), C-rate (0.5, 1.0, 1.5 or 2.0), depth of discharge (70 to 100%), initial capacity (about 2.0 Ah, an 18650-class cell) and initial resistance. Capacity fade per cycle grows with temperature, C-rate and depth of discharge, accelerates after a randomly placed knee, and includes random variation. Internal resistance rises, charge time shortens and the dV/dQ peak height falls as SOH drops, with Gaussian measurement noise added to every signal. Cells are cycled until SOH falls below 62% or a cycle limit of 600 to 900 is reached. The dataset and generator are saved so the experiment can be reproduced. Because the signals are generated from SOH by simple formulas, the relationships are cleaner than in real cells. Absolute accuracy figures in this paper must therefore not be read as expected real-world performance. B. Features, Split and Metrics
| Group | Features (12) |
|---|---|
| Operating conditions | C-rate, depth of discharge (dod), ambient temperature (amb temp) _ |
| Charge / discharge | discharge time (disch time min), constant-current charge time (chg time min), average _ _ _ _ voltage (avg voltage) _ |
| Resistance / thermal | internal resistance (internal res), maximum temperature (max temp), average temperature _ _ (avg temp) _ |
| Ageing indicators | dV/dQ peak height (dvdq peak), cumulative throughput (ah throughput), cycle index (cycle) _ _ |
Fig. 7. Evaluation framework: dataset, models, run-and-log stage and four evaluation dimensions. C. Implementation The prototype is written in Python with scikit-learn [9] for the models, the SHAP library [1], [2] for explanations and SQLite [12] for the database. All figures and numbers reported in Section VIII were produced by running the code on this dataset in a single session; timings were measured on the machine used and will differ elsewhere.
VIII. RESULTS AND DISCUSSION
A. Data Characteristics
Fig. 8 shows SOH curves of eight sample cells. Cells cycled at higher temperature or C-rate degrade faster, and several show an accelerated decline after the knee. Fig. 9 shows the correlation of each feature with SOH; internal resistance and the cycle index correlate negatively, whereas the dV/dQ peak height correlates positively.
| Model | MAE | RMSE | R2 | Train time (s) | Inference (ms/sample) |
|---|---|---|---|---|---|
| Ridge Regression | 0.0140 | 0.0174 | 0.9655 | 0.01 | 0.00022 |
| SVR (RBF) | 0.0211 | 0.0284 | 0.9077 | 1.77 | 0.01396 |
| MLP (64-32) | 0.0418 | 0.0611 | 0.5728 | 4.49 | 0.00070 |
| Random Forest | 0.0156 | 0.0213 | 0.9483 | 34.63 | 0.02492 |
| Gradient Boosting | 0.0126 | 0.0170 | 0.9670 | 15.42 | 0.00183 |
| Model | CV MAE (mean ± std) | CV R2 (mean ± std) |
|---|---|---|
| Ridge Regression | 0.0149 ± 0.0021 | 0.947 ± 0.011 |
| SVR (RBF) | 0.0273 ± 0.0086 | 0.749 ± 0.210 |
| MLP (64-32) | 0.0796 ± 0.0213 | -0.814 ± 1.252 |
| Random Forest | 0.0132 ± 0.0026 | 0.945 ± 0.030 |
| Gradient Boosting | 0.0135 ± 0.0066 | 0.948 ± 0.036 |
Fig. 12 plots predicted against actual SOH for the selected model. Residuals have a mean of +0.47 points and a standard deviation of 1.63 points, so the model slightly overestimates SOH on average; the bias is about +1.1 to +1.2 points for cells between 60 and 80% SOH and close to zero (-0.17) for healthy cells above 90%.
Fig. 13 follows one unseen cell (CELL_37) through its life. The prediction follows the downward trend but is noisy and runs above the actual curve in late life, so its first crossing of 80% occurs at cycle 590 against a true crossing at cycle 550 (40 cycles late). Across the test cells, 9 of 12 reached 80% SOH and all 9 triggered an alert, but the alert cycle differed from the true crossing by between -64 and +40 cycles (mean -24, negative meaning early). Early alerts arise mainly because a single noisy prediction can fall below the threshold; smoothing or requiring several consecutive cycles below 80% would be a sensible refinement. Mean absolute error was largest in the 70 to 80% SOH range (1.90 points MAE) and 60 to 70% range (1.82 points), and smallest for healthy cells at 90 to 100% (0.82 points), consistent with the greater variability of late-life behaviour.
| Table | Rows stored |
|---|---|
| battery | 40 |
| cycle data _ | 28,201 |
| prediction | 8,617 |
| explanation (SHAP values) | 7,200 |
| alert | 9 |
| ID | Query | Mean latency (ms) |
|---|---|---|
| Q1 | SOH history of one cell, ordered by cycle | 0.217 |
| Q2 | Latest prediction per cell (join of prediction and cycle data) _ | 6.205 |
| Q3 | Top-3 SHAP features for one prediction | 0.307 |
| Q4 | Active critical alerts | 0.022 |
IX. DESIGN-LEVEL COMPARISON
The table below summarises qualitative design differences between a conventional BMS estimate and the proposed framework. It is a design discussion, not a measured comparison.
| Dimension | Conventional BMS estimation | Proposed AI + XAI + database framework |
|---|---|---|
| Estimation method | Rules, look-up tables, coulomb counting | Learned from cycle-level health indicators |
| Adaptivity | Fixed calibration | Retrainable on stored history |
| Explanation | None | Global and local SHAP explanations |
| Data retention | Limited or none | Features, predictions, explanations and alerts stored |
| Auditability | Hard to trace | Each prediction linked to inputs and explanation |
| Cost / complexity | Low | Higher (training, storage, maintenance) |
| Evidence in this paper | - | Synthetic data only; real-data validation pending |
X. SECURITY, PRIVACY AND GOVERNANCE
Vehicle and battery telemetry can reveal usage patterns and location context, so personal identifiers should be minimised or pseudonymised before storage, and access to the database should be role-based. Model versions and training data snapshots should be recorded so that any alert can be reproduced. SOH predictions should support, not replace, physical capacity tests when decisions affect safety, warranty or resale value.
XI. APPLICATIONS
Fleet management: ranking vehicles by remaining battery life and scheduling maintenance. Warranty and resale: auditable SOH records with explanations for buyers, insurers and service centres. Second-life screening: identifying packs suitable for stationary storage. Charging and usage advice: showing drivers which habits (temperature, fast charging) accelerate ageing. Battery R&D;: using SHAP to compare ageing drivers across chemistries and test conditions.
XII. LIMITATIONS
Synthetic data. All results come from generated data. They show that the pipeline works but do not establish accuracy on real EV batteries. Simplified generator. Real cells show more complex ageing (lithium plating, knee-point variability, chemistry differences) and noisier signals. Small model tuning effort. Hyperparameters were set once; the MLP in particular was not tuned. Selection and testing on the same cells. The best model was chosen from test-set RMSE, which can make its score slightly optimistic; a separate validation split should be used in future work. SHAP reflects the model and the data. Importances partly mirror how the synthetic signals were built, and correlated features can share credit. Simple alert rule. The alert fires at the first single prediction at or below 80%, with no smoothing, so it is sensitive to noise (alerts were on average 24 cycles early here, and one cell was 40 cycles late). Prototype database. SQLite on one machine was used; scalability, concurrency and security were not evaluated. No online monitoring. The retraining loop is part of the design but was not tested.
XIII. CONCLUSION AND FUTURE SCOPE
This paper presented an AI-based framework for EV battery health prediction that couples machine-learning SOH estimation with SHAP explanations and a relational database. In a cell-wise evaluation on a synthetic dataset, gradient boosting reached an MAE of about 1.3 SOH points with R2 = 0.967; SHAP highlighted the dV/dQ peak, internal resistance and cycle count as the main drivers; and the database layer stored predictions and explanations and answered typical queries within milliseconds. The main value of the work is the integrated, auditable design; the numerical results are a proof of concept. Future work should (1) validate the pipeline on real datasets such as NASA [4] and CALCE [16] and on pack-level vehicle data; (2) add remaining useful life prediction and uncertainty estimates; (3) compare SHAP with other explanation methods such as LIME [6]; (4) use a separate validation set, systematic hyperparameter search and a smoothed multi-cycle alert rule; (5) deploy the database on a server engine and test fleet-scale load; and (6) implement and evaluate the drift-triggered retraining loop.
REFERENCES
How to Cite this Contribution
Pranav Sable et al. (2026). AI-Based EV Battery Health Prediction with Explainable AI and Database Integration. International Journal of Research, Exploration & Knowledge (IJREK), 1(1).
Distributed under Creative Commons Attribution 4.0 International (CC BY 4.0).