Live Demo → https://battery-digital-twin-using-pinn.streamlit.app/
GitHub → https://github.com/SelloP28/battery-digital-twin-using-pinn
Research Paper → https://docs.google.com/document/d/1X6xZpqRJoDhlB5KsJRPdk-Kfus1bAb6tsDn-2e6upF0/edit?usp=drive_link
Built → Dec 2025
Tags → PINN • PyBaMM • Digital Twin • Battery Energy Storage • Renewable Energy • Deep Learning
In real Battery Energy Storage Systems (BESS) and EVs we can only measure voltage, current, and surface temperature.
What happens inside the cell (lithium concentration gradients, SEI growth, plating risk) remains invisible — yet these invisible states determine safety, performance, and lifetime.
A Physics-Informed Neural Network that acts as a real-time digital twin:
- Input: measurable V(t), I(t), T(t)
- Output: full 1D lithium concentration profiles in negative & positive electrodes + SEI thickness
- Trained 100% on synthetic data generated with PyBaMM (Doyle-Fuller-Newman model)
- Physics equations (solid-phase diffusion + Butler-Volmer) baked directly into the loss function
Result: the model extrapolates perfectly to unseen temperatures and C-rates where pure data-driven models fail.
| Metric | Value | Note |
|---|---|---|
| Li⁺ concentration RMSE (mol/m³) | 38.2 | vs 180+ for data-only NN |
| SEI thickness MAE (nm) | 1.9 | Tracks degradation over 1000+ cycles |
| Extrapolation to +20 °C unseen T | Works | Pure NN fails completely |
| Inference time | < 15 ms per cycle | Real-time capable on CPU |
- Interactive sliders: Temperature (−10 to 60 °C), C-rate (0.5–5C), Cycle number
- Real-time heatmaps of lithium concentration inside the electrode
- Predicted vs ground-truth SEI growth curve
- Toggle “With Physics” vs “Data-Only” to see the power of PINNs
- Data Generation → PyBaMM (DFN model)
- PINN Framework → PyTorch + custom physics loss
- Alternative quick version → DeepXDE (included in repo)
- Frontend → Streamlit (deployed free on Streamlit Community Cloud)
- Plots → Plotly & Matplotlib
- Directly solves a top-3 pain point in grid-scale BESS (2025–2030)
- Uses the hottest technique in scientific ML right now (PINNs)
- Zero real data needed → you can prototype in weeks
- Deployable live demo = instant credibility
- Add electrochemical impedance spectroscopy (EIS) virtual sensor
- Multi-cell pack with cell-to-cell variation
- Real-time deployment on edge device (Raspberry Pi + BESS test bench)
Built with ❤️ and a lot of help from Grok (xAI) in December 2025.