Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pybop-team/PyBOP
A parameterisation and optimisation package for battery models.
https://github.com/pybop-team/PyBOP
Last synced: 3 months ago
JSON representation
A parameterisation and optimisation package for battery models.
- Host: GitHub
- URL: https://github.com/pybop-team/PyBOP
- Owner: pybop-team
- License: bsd-3-clause
- Created: 2023-06-13T10:44:32.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2024-04-14T11:55:06.000Z (7 months ago)
- Last Synced: 2024-04-14T16:07:15.644Z (7 months ago)
- Language: Python
- Homepage: https://pybop-docs.readthedocs.io
- Size: 16.4 MB
- Stars: 33
- Watchers: 4
- Forks: 5
- Open Issues: 47
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
- open-sustainable-technology - PyBOP - Provides a comprehensive suite of tools for parameterisation and optimisation of battery models. (Energy Storage / Battery)
README
# Python Battery Optimisation and Parameterisation
[![Scheduled](https://github.com/pybop-team/PyBOP/actions/workflows/scheduled_tests.yaml/badge.svg)](https://github.com/pybop-team/PyBOP/actions/workflows/scheduled_tests.yaml)
[![Contributors](https://img.shields.io/github/contributors/pybop-team/PyBOP)](https://github.com/pybop-team/PyBOP/graphs/contributors)
[![Last Commit](https://img.shields.io/github/last-commit/pybop-team/PyBOP/develop?color=purple)](https://github.com/pybop-team/PyBOP/commits/develop)
[![Python Versions from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fpybop-team%2FPyBOP%2Fdevelop%2Fpyproject.toml&label=Python)](https://pypi.org/project/pybop/)
[![Forks](https://img.shields.io/github/forks/pybop-team/PyBOP?style=flat)](https://github.com/pybop-team/PyBOP/network/members)
[![Stars](https://img.shields.io/github/stars/pybop-team/PyBOP?style=flat&color=gold)](https://github.com/pybop-team/PyBOP/stargazers)
[![Codecov](https://codecov.io/gh/pybop-team/PyBOP/branch/develop/graph/badge.svg)](https://codecov.io/gh/pybop-team/PyBOP)
[![Open Issues](https://img.shields.io/github/issues/pybop-team/PyBOP)](https://github.com/pybop-team/PyBOP/issues/)
[![License](https://img.shields.io/github/license/pybop-team/PyBOP?color=blue)](https://github.com/pybop-team/PyBOP/blob/develop/LICENSE)
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pybop-team/PyBOP/blob/develop/)
[![Static Badge](https://img.shields.io/badge/https%3A%2F%2Fpybop-team.github.io%2Fpybop-bench%2F?label=Benchmarks)](https://pybop-team.github.io/pybop-bench/)
[![Releases](https://img.shields.io/github/v/release/pybop-team/PyBOP?color=gold)](https://github.com/pybop-team/PyBOP/releases)## PyBOP
PyBOP provides a complete set of tools for parameterisation and optimisation of battery models, using both Bayesian and frequentist approaches, with [example workflows](https://github.com/pybop-team/PyBOP/tree/develop/examples/notebooks) to assist the user. PyBOP can be used to parameterise various battery models, including electrochemical and equivalent circuit models available in [PyBaMM](https://pybamm.org/). PyBOP prioritises clear and informative diagnostics for the user, while also allowing for advanced probabilistic methods.The diagram below shows the conceptual framework of PyBOP. This package is currently under development, so users can expect the API to evolve with future releases.
## Installation
Within your virtual environment, install PyBOP:
```bash
pip install pybop
```To install the most recent state of PyBOP, install from the `develop` branch,
```bash
pip install git+https://github.com/pybop-team/PyBOP.git@develop
```To install a previous version of PyBOP, use the following template and replace the version number:
```bash
pip install pybop==v24.3
```To check that PyBOP is installed correctly, run one of the examples in the following section. For a development installation, see the [Contribution Guide](https://github.com/pybop-team/PyBOP/blob/develop/CONTRIBUTING.md#Installation). More installation information is available in our [documentation](https://pybop-docs.readthedocs.io/en/latest/installation.html) and the [extended installation instructions](https://docs.pybamm.org/en/latest/source/user_guide/installation/gnu-linux-mac.html) for PyBaMM.
## Using PyBOP
PyBOP has two intended uses:1. Parameter estimation from battery test data.
2. Design optimisation under battery manufacturing/use constraints.
These include a wide variety of optimisation problems that require careful consideration due to the choice of battery model, data availability and/or the choice of design parameters.
### Notebooks
PyBOP comes with a number of [example notebooks](https://github.com/pybop-team/PyBOP/blob/develop/examples), which can be found in the examples folder. A few noteworthy ones are listed below.- [Gravimetric design optimisation of a single particle model](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/spm_electrode_design.ipynb)
- [Experimental GITT fitting of an ECM for an LG M50](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/LG_M50_ECM/1-single-pulse-circuit-model.ipynb)
- [Compare PyBOP optimisers for parameter identification](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/multi_optimiser_identification.ipynb)
- [Parameter identification for a spatial pouch cell model](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/pouch_cell_identification.ipynb)### Scripts
Additional script-based examples can be found in the [examples directory](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/). Some notable scripts are listed below.- [Unscented Kalman filter parameter identification of a SPM](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/spm_UKF.py)
- [Import and export parameters using Faraday's BPX format](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/BPX_spm.py)
- [Maximum a posteriori parameter identification of a SPM](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/BPX_spm.py)
- [Gradient based parameter identification of a SPM](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/spm_AdamW.py)### Supported Methods
The table below lists the currently supported [models](https://github.com/pybop-team/PyBOP/tree/develop/pybop/models), [optimisers](https://github.com/pybop-team/PyBOP/tree/develop/pybop/optimisers), and [cost functions](https://github.com/pybop-team/PyBOP/tree/develop/pybop/costs) in PyBOP.| Battery Models | Optimization Algorithms | Cost Functions |
|
|-----------------------------------------------|-------------------------------------------------------------|------------------------------------------|
| Single Particle Model (SPM) | Covariance Matrix Adaptation Evolution Strategy (CMA-ES) | Sum of Squared Errors (SSE)
| Single Particle Model with Electrolyte (SPMe) | Particle Swarm Optimization (PSO) | Root Mean Squared Error (RMSE) |
| Doyle-Fuller-Newman (DFN) | Exponential Natural Evolution Strategy (xNES) | Gaussian Log Likelihood |
| Many Particle Model (MPM) | Separable Natural Evolution Strategy (sNES) | Gaussian Log Likelihood w/ known variance |
| Multi-Species Multi-Reactants (MSMR) | Adaptive Moment Estimation with Weight Decay (AdamW) | Maximum a Posteriori (MAP) |
| Equivalent Circuit Models (ECM) | Improved Resilient Backpropagation (iRProp-) | Unscented Kalman Filter (UKF) |
| | SciPy Minimize & Differential Evolution | Gravimetric Energy Density |
| | Gradient Descent| Volumetric Energy Density |
| | Nelder-Mead | |## Code of Conduct
PyBOP aims to foster a broad consortium of developers and users, building on and learning from the success of the [PyBaMM](https://pybamm.org/) community. Our values are:
- Inclusivity and fairness (those who wish to contribute may do so, and their input is appropriately recognised)
- Interoperability (modularity for maximum impact and inclusivity)
- User-friendliness (putting user requirements first via user-assistance & workflows)
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Brady Planden
🚇 ⚠️ 💻 💡 👀
NicolaCourtier
💻 👀 💡 ⚠️
David Howey
🤔 🧑🏫
Martin Robinson
🤔 🧑🏫 👀 💻 ⚠️
Ferran Brosa Planella
👀 💻
Agriya Khetarpal
💻 🚇 👀
Faraday Institution
💵
UK Research and Innovation
💵
IntelLiGent Consortium
💵
Muhammed Nedim Sogut
💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specifications. Contributions of any kind are welcome! See `CONTRIBUTING.md` for ways to get started.