Load the Battery Feature parquet file: https://ev-battery-predictor-kkbexxj9qfkxcwdbrbb3wn.streamlit.app/
This project is an end-to-end Machine Learning Operations (MLOps) system designed to predict the Remaining Useful Life (RUL) and State of Health (SOH) of Li-ion batteries.
Unlike simple regression models, this solution utilizes Deep Learning (PyTorch) to model the temporal degradation patterns of batteries. We ingest raw experimental data from NASA, process it into time-series sequences, and serve predictions via a modern API.
- Deep Learning Model: An LSTM (Long Short-Term Memory) network built with PyTorch to capture non-linear degradation trends over time.
- Custom Data Loaders: PyTorch
Datasetclasses designed to handle variable-length battery cycle sequences. - ETL Pipeline: Parses complex NASA
MATLABfiles into a structured PostgreSQL database. - Real-time Inference: A FastAPI microservice that accepts recent battery history and returns SOH forecasts.
- Dashboard: Dash/Plotly visualization of the "Degradation Curve"—comparing Actual vs. Predicted capacity.
- Core: Python 3.9+
- Deep Learning: PyTorch (v2.0+)
- Data Source: NASA PCoE Li-ion Battery Dataset.
- Frontend: Streamlit
- Containerization: Docker.
- Visualisation: Matplotlib.
-
- Data Processing: Pandas, NumPy, PyArrow
*Current Approach: The model utilizes avg_voltage and time_to_discharge as proxies for internal resistance changes. *Limitation: It does not integrate direct Electrochemical Impedance Spectroscopy (EIS) data. Therefore, degradation modes like anode/cathode active material loss are inferred via capacity fade rather than measured directly through impedance growth (R_internal).
*Develop a secondary classification model to detect thermal runaway precursors (e.g., rapid temperature spikes combined with voltage sag) to predict safety risks alongside SOH.
- Clone the repo.
- Run
python src/data/download.pyto fetch NASA data. - Run
docker-compose up --build. - Train the model:
docker-compose exec api python src/models/train.py. - View dashboard at
http://localhost:8050.