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.
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.
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.
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
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)
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 | ||
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)
PyBOP is released under the BSD 3-Clause License.
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.