Table of Contents
BattGP: Battery systems modeling from field data using Gaussian processes.
This project contains the code corresponding to publication [1].
The manuscript contains the technical details and equations describing the Guassian Process (GP) implementation and fault probabilities.
This software was developed to analyze and model 8s1p LFP battery systems from field data.
The dataset is openly available on Zenodo: https://zenodo.org/records/13715694.
There are two main modes available:
(1) Excat GP (full_gp) using a specified number of data points. Exact GPs usually scale with O(n^3). Thus, you will either be limited by memory or compute. On an NVIDIA A1000, you can use up to 40k data points.
(2) Recursive spatiotemporal (spatio_temporal) GPs. These GPs can use all data points and take minutes to run on a powerful Laptop computer using hundreds of thousands/millions of data points. There are approximations in the spatial domain basis vectors, and the computational complexity depends on the number of basis vectors.
We would like to invite others to collaborate with us on the effort of making fault detection for lithium-ion batteries from field data better, more open and more accessible. All figure numbers mentioned below are in correspondance to this article and the supplemental information.
Despite taking care in designing this software and testing its functionality there are likely bugs remaining.
- Clone the repo
git clone https://github.com/JoachimSchaeffer/BattGP.git- Creta a new environment using conda/miniconda. If you want to use an existing environment jump to step 3.
conda create -n "battgp" python=3.10 ipython- Activate the environment
conda activate battgp- Install dependencies
pip install -r requirements.txtFirst you should download the battery field data set for which this package was developed. The data set is publicaly available on Zenodo https://zenodo.org/records/13715694.
Place the file field_data.zip inside the data folder.
If you want to use your own data, it might still make sense to familiarize yourself with how this software works by using the default data set. More information of how to use this software with your own data can be found below.
There are three scripts for data visualization:
- To get started execute
data_vis_general.ipynbfirst. The first time you run it might take a while to serialize the data. data_vis_big_timeseries.ipynbcontains the datashader code, allowing to visualize millions of timeseries data pointsdata_vis_ridgeline_plot.pycontains the code for the ridgeline plots, a.k.a. fancy barcharts of statistics for each system in the data set.
tutorial_recursive_spatiotemporal_gp.pyis a short tutorial to introduce the basics of the recursive spatiotemporal GP approach we are using.example_usage_battgp.pycontains a lot of comments on how to use this software and how to get started.gp_runner.pyruns the different models for the data set and reproduces the results of the associated manuscripts [Cell Reports Physical Science, NeurIPS BDU Workshop].
The easiest way to use this software with your own data is to write a new BattData class that preprocesses your data. More development is needed to allow the processing of data from larger packs with parallel strings.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the BSD 3-Clause License. See LICENSE.txt for more information.
Joachim Schaeffer - [email protected]
BattGP Project Link: https://github.com/JoachimSchaeffer/BattGP
- Co-authors: Many thanks to all the co-authors involved in [1] and [2].
- Anonymous data provider: Many thanks for sharing the data set with us. You sparked this project.
- ReadMe Template
If you found this software useful for your research, please cite:
[1] Cell Reports Physical Science:
@article{schaeffer2024_battgp,
title = {Gaussian process-based online health monitoring and fault analysis of lithium-ion battery systems from field data},
author = {Joachim Schaeffer and Eric Lenz and Duncan Gulla and Martin Z. Bazant and Richard D. Braatz and Rolf Findeisen},
journal = {Cell Reports Physical Science},
pages = {102258},
year={2024}
doi = {https://doi.org/10.1016/j.xcrp.2024.102258},
}[2] Short version NeurIPS workshop paper highlighting open areas for future work:
@inproceedings{schaeffer2024lithium,
title={Lithium-ion battery system health monitoring and resistance-based fault analysis from field data using recursive spatiotemporal {Gaussian} processes},
author={Schaeffer, Joachim and Lenz, Eric and Gulla, Duncan and Bazant, Martin Z and Braatz, Richard and Findeisen, Rolf},
booktitle={NeurIPS 2024 Workshop on Bayesian Decision-making and Uncertainty}
}