Battery health prediction using machine learning models
This repository contains transformer model for predicting battery capacity / remaining useful life (RUL).
Project description
Developed deep learning models based on Transformer architectures to predict Li-ion battery capacity degradation and estimate remaining useful life using time-series charge–discharge data. The codebase is implemented using python utilizing pytorch, leveraging voltage, current, and temperature trends with feature engineering and sliding time windows for temporal modeling. The Transformer achieved the best prediction accuracy, while GRU and CNN–LSTM provided efficient alternatives for smaller datasets. The work highlights effective data-driven approaches for battery health monitoring, critical for electric vehicles and energy storage systems. The plot of the capacity of all batteries used is shown below.
Figure 1: Capacity degradation trends across cycles for all batteries.
Repository structure
transformer.ipynb — Contains code for data processing, model architecture, training and evaluation for transformer based model.
artifacts-v1.zip - Contains model artifacts to use for inference.
Requirements
Install core Python packages used by the notebooks: