PyBOP
Provides a comprehensive suite of tools for parameterisation and optimisation of battery models.
https://github.com/pybop-team/pybop
Category: Energy Storage
Sub Category: Battery
Keywords from Contributors
batteries battery-models pybamm solvers climate-model energy-system simulator sharing particles meteorology
Last synced: about 5 hours ago
JSON representation
Repository metadata
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 (almost 2 years ago)
- Default Branch: develop
- Last Pushed: 2025-04-25T09:18:09.000Z (6 days ago)
- Last Synced: 2025-04-27T15:05:04.180Z (3 days ago)
- Language: Python
- Homepage: https://pybop-docs.readthedocs.io
- Size: 69.9 MB
- Stars: 114
- Watchers: 4
- Forks: 33
- Open Issues: 72
- Releases: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Citation: CITATION.cff
README.md
Python Battery Optimisation and Parameterisation
Main Branch Examples Develop Branch Examples
PyBOP provides a complete set of tools for parameterisation and optimisation of battery models, using both Bayesian and frequentist approaches, with example workflows to assist the user. PyBOP can be used to parameterise various battery models, including electrochemical and equivalent circuit models available in PyBaMM. 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:
pip install pybop
To install the most recent state of PyBOP, install from the develop
branch,
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:
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. More installation information is available in our documentation and the extended installation instructions for PyBaMM.
Using PyBOP
PyBOP has two intended uses:
-
Parameter inference from battery test data.
-
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.
Jupyter Notebooks
Explore our example notebooks for hands-on demonstrations:
- Gravimetric design optimisation (SPMe)
- Non-linear constrained ECM parameter identification
- Optimiser comparison for parameter identification
- Parameter identification for spatial pouch cell model
- Estimating ECM parameters from HPPC pulse
Python Scripts
Find additional script-based examples in the examples directory:
- UKF parameter identification (SPM)
- BPX format parameter import/export
- Electrochemical Impendence Spectroscopy (EIS) parameter identification
- Maximum a Posteriori parameter identification (SPM)
- Gradient-based parameter identification (SPM)
Supported Methods
The table below lists the currently supported models, optimisers, and cost functions in PyBOP.
Battery Models | Cost Functions | Optimization Algorithms |
---|---|---|
Single Particle Model (SPM) | Sum of Squared Error (SSE) | Covariance Matrix Adaptation Evolution Strategy (CMA-ES) |
Single Particle Model with Electrolyte (SPMe) | Root Mean Squared Error (RMSE) | Particle Swarm Optimization (PSO) |
Doyle-Fuller-Newman (DFN) | Mean Squared Error (MSE) | Exponential Natural Evolution Strategy (xNES) |
Many Particle Model (MPM) | Mean Absolute Error (MAE) | Separable Natural Evolution Strategy (sNES) |
Multi-Species Multi-Reaction (MSMR) | Minkowski | Weight Decayed Adaptive Moment Estimation (AdamW) |
Weppner-Huggins | Sum of Power | Improved Resilient Backpropagation (iRProp-) |
Equivalent Circuit Models (ECM) | Gaussian Log Likelihood | SciPy Minimize & Differential Evolution |
Grouped-parameter SPMe (GroupedSPMe) | Log Posterior | Cuckoo Search |
Gravimetric Energy / Power Density | Simulated Annealing | |
Volumetric Energy / Power Density | Random Search | |
Gradient Descent | ||
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 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)
License
PyBOP is released under the BSD 3-Clause License.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specifications. Contributions of any kind are welcome! See CONTRIBUTING.md
for ways to get started.
Citation (CITATION.cff)
cff-version: 1.2.0 title: 'PyBOP: A Python package for battery model optimisation and parameterisation' message: >- If you use this software, please cite the article below. authors: - given-names: Brady family-names: Planden orcid: "https://orcid.org/0000-0002-1082-9125" - given-names: Nicola family-names: Courtier orcid: "https://orcid.org/0000-0002-5714-1096" - given-names: Martin family-names: Robinson orcid: "https://orcid.org/0000-0002-1572-6782" - given-names: Agriya family-names: Khetarpal orcid: "https://orcid.org/0000-0002-1112-1786" - given-names: Ferran family-names: Brosa Planella orcid: "https://orcid.org/0000-0001-6363-2812" - given-names: David family-names: Howey orcid: "https://orcid.org/0000-0002-0620-3955" keywords: - "python" - "battery models" - "parameter inference" - "optimization" journal: "arXiv" date-released: 2024-12-20 doi: 10.48550/arXiv.2412.15859 version: "25.3" # Update this alongside new releases repository-code: 'https://www.github.com/pybop-team/pybop'
Owner metadata
- Name: pybop-team
- Login: pybop-team
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/136452226?v=4
- Repositories: 1
- Last ynced at: 2023-07-07T11:24:06.602Z
- Profile URL: https://github.com/pybop-team
GitHub Events
Total
- Create event: 107
- Release event: 3
- Issues event: 77
- Watch event: 43
- Delete event: 110
- Issue comment event: 194
- Push event: 641
- Pull request event: 222
- Pull request review comment event: 141
- Pull request review event: 179
- Fork event: 11
Last Year
- Create event: 107
- Release event: 3
- Issues event: 77
- Watch event: 43
- Delete event: 110
- Issue comment event: 194
- Push event: 641
- Pull request event: 222
- Pull request review comment event: 141
- Pull request review event: 179
- Fork event: 11
Committers metadata
Last synced: 1 day ago
Total Commits: 1,561
Total Committers: 15
Avg Commits per committer: 104.067
Development Distribution Score (DDS): 0.419
Commits in past year: 796
Committers in past year: 12
Avg Commits per committer in past year: 66.333
Development Distribution Score (DDS) in past year: 0.457
Name | Commits | |
---|---|---|
Brady Planden | b****n@g****m | 907 |
NicolaCourtier | 4****r | 300 |
pre-commit-ci[bot] | 6****] | 134 |
Agriya Khetarpal | 7****l | 43 |
allcontributors[bot] | 4****] | 41 |
martinjrobins | m****s@g****m | 33 |
Ferran Brosa Planella | F****a@w****k | 31 |
Mark Blyth | b****7@g****m | 25 |
Dibyendu-IITKGP | d****c@g****m | 22 |
BLYTH Mark UNIVERSITE BRISTOL | M****3@i****r | 18 |
Brady Planden | e****0@e****l | 2 |
Grimm | f****m@i****k | 2 |
David Howey | d****y@e****k | 1 |
Noël Hallemans | 9****s | 1 |
Pip Liggins | p****s@d****k | 1 |
Committer domains:
- dtc.ox.ac.uk: 1
- eng.ox.ac.uk: 1
- ic.ac.uk: 1
- intra.cea.fr: 1
- warwick.ac.uk: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 353
Total pull requests: 468
Average time to close issues: about 1 month
Average time to close pull requests: 10 days
Total issue authors: 24
Total pull request authors: 15
Average comments per issue: 0.76
Average comments per pull request: 1.62
Merged pull request: 413
Bot issues: 0
Bot pull requests: 101
Past year issues: 198
Past year pull requests: 290
Past year average time to close issues: 22 days
Past year average time to close pull requests: 11 days
Past year issue authors: 21
Past year pull request authors: 15
Past year average comments per issue: 0.75
Past year average comments per pull request: 1.6
Past year merged pull request: 258
Past year bot issues: 0
Past year bot pull requests: 65
Top Issue Authors
- BradyPlanden (232)
- NicolaCourtier (56)
- MarkBlyth (10)
- noelhallemans (8)
- Dibyendu-IITKGP (8)
- martinjrobins (5)
- davidhowey (5)
- YannickNoelStephanKuhn (4)
- MarkVeerasingam (3)
- Santiagopeacely (3)
- vharsha12 (2)
- mleot (2)
- brosaplanella (2)
- agriyakhetarpal (2)
- L0tusC00kie (2)
Top Pull Request Authors
- BradyPlanden (216)
- NicolaCourtier (114)
- pre-commit-ci[bot] (72)
- allcontributors[bot] (29)
- Dibyendu-IITKGP (9)
- agriyakhetarpal (7)
- MarkBlyth (4)
- noelhallemans (3)
- f-g-r-i-m-m (3)
- brosaplanella (3)
- martinjrobins (3)
- YannickNoelStephanKuhn (2)
- pipliggins (1)
- herzphi (1)
- arjxn-py (1)
Top Issue Labels
- enhancement (196)
- bug (96)
- priority:high (13)
- good first issue (9)
- difficulty:easy (4)
- priority:medium (3)
- difficulty:medium (3)
- documentation (3)
- blocked (3)
- difficulty:hard (2)
- blocker (1)
- ask (1)
Top Pull Request Labels
- show (26)
- ask (3)
- blocker (3)
- release blocker (2)
- blocked (1)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 555 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 11
- Total maintainers: 1
pypi.org: pybop
Python Battery Optimisation and Parameterisation
- Homepage: https://github.com/pybop-team/PyBOP
- Documentation: https://pybop-docs.readthedocs.io
- Licenses: BSD 3-Clause License Copyright (c) 2023, pybop-team Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- Latest release: 24.9.1 (published 7 months ago)
- Last Synced: 2025-04-29T16:05:34.223Z (1 day ago)
- Versions: 11
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 555 Last month
-
Rankings:
- Dependent packages count: 10.002%
- Stargazers count: 17.078%
- Forks count: 22.629%
- Average: 29.315%
- Dependent repos count: 67.55%
- Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/setup-python v4 composite
- actions/checkout v4 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- pypa/gh-action-pypi-publish release/v1 composite
- sigstore/gh-action-sigstore-python v1.2.3 composite
- numpy >=1.16
- pandas >=1.0
- pints >=0.5
- pybamm >=23.5
- scipy >=1.3
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- actions/cache v4 composite
- actions/checkout v4 composite
- lycheeverse/lychee-action v1.10.0 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- codecov/codecov-action v4 composite
Score: 14.254565169065994