Skip to main content

Python Battery Optimisation and Parameterisation

Project description

logo.svg

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.

pybop_arch.svg

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

Brady Planden
Brady Planden

🚇 ⚠️ 💻 💡 👀
NicolaCourtier
NicolaCourtier

💻 👀 💡 ⚠️
David Howey
David Howey

🤔 🧑‍🏫
Martin Robinson
Martin Robinson

🤔 🧑‍🏫 👀 💻 ⚠️
Ferran Brosa Planella
Ferran Brosa Planella

👀 💻 💡
Agriya Khetarpal
Agriya Khetarpal

💻 🚇 👀
Faraday Institution
Faraday Institution

💵
UK Research and Innovation
UK Research and Innovation

💵
Horizon Europe IntelLiGent Consortium
Horizon Europe IntelLiGent Consortium

💵
Muhammed Nedim Sogut
Muhammed Nedim Sogut

💻
MarkBlyth
MarkBlyth

💻
f-g-r-i-m-m
f-g-r-i-m-m

💡
Dibyendu-IITKGP
Dibyendu-IITKGP

💡 ⚠️ 💻
Noël Hallemans
Noël Hallemans

💡
Pip Liggins
Pip Liggins

💻

This project follows the all-contributors specifications. Contributions of any kind are welcome! See CONTRIBUTING.md for ways to get started.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybop-25.3.tar.gz (124.4 kB view details)

Uploaded Source

Built Distribution

pybop-25.3-py3-none-any.whl (153.9 kB view details)

Uploaded Python 3

File details

Details for the file pybop-25.3.tar.gz.

File metadata

  • Download URL: pybop-25.3.tar.gz
  • Upload date:
  • Size: 124.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pybop-25.3.tar.gz
Algorithm Hash digest
SHA256 4b1361fd08b05d11ad398141414aac7bd447e9a2c3bef213bb0b9fd0fbdec342
MD5 cca4ef7e1689f971a5a94083ac5ef9a1
BLAKE2b-256 8263b1993f7ff309cc4062e1c1aad9b59daafcb91f9f35f30919e29e6132b1cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybop-25.3.tar.gz:

Publisher: release_action.yaml on pybop-team/PyBOP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pybop-25.3-py3-none-any.whl.

File metadata

  • Download URL: pybop-25.3-py3-none-any.whl
  • Upload date:
  • Size: 153.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pybop-25.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7d018b0deba678620778dfb537d8a003c8f81544e5efba809496bf6f0e5c473a
MD5 fa5f43191e87e950b50a0b4fd81fd06d
BLAKE2b-256 fc9895688730badb0a089f655737d8920ee8dd11245d1b7d40616559dd23ff61

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybop-25.3-py3-none-any.whl:

Publisher: release_action.yaml on pybop-team/PyBOP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page