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.

README.md

Python Battery Optimisation and Parameterisation

Scheduled
Contributors
Python Versions from PEP 621 TOML
Codecov
License
Open in Colab
nbviewer
Static Badge
Releases

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:

  1. Parameter inference 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.

Jupyter Notebooks

Explore our example notebooks for hands-on demonstrations:

Python Scripts

Find additional script-based examples in the examples directory:

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


GitHub Events

Total
Last Year

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 Email 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:


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

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/pybop-team/pybop

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

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

.github/workflows/scheduled_tests.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/release_action.yaml actions
  • 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
pyproject.toml pypi
  • numpy >=1.16
  • pandas >=1.0
  • pints >=0.5
  • pybamm >=23.5
  • scipy >=1.3
.github/workflows/periodic_benchmarks.yaml actions
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
.github/workflows/lychee_links.yaml actions
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • lycheeverse/lychee-action v1.10.0 composite
.github/workflows/nightly_dependency_tests.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/test_on_pull_request.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v4 composite

Score: 14.254565169065994