Skip to content

pybop-team/PyBOP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4d9d732 Β· Feb 11, 2024
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Python Battery Optimisation and Parameterisation

Scheduled contributors last update forks stars codecov open issues license open In colab releases

PyBOP

PyBOP offers a full range of tools for the parameterisation and optimisation of battery models, utilising both Bayesian and frequentist approaches with example workflows to assist the user. PyBOP can be used to parameterise various battery models, which include electrochemical and equivalent circuit models that are present in PyBaMM. PyBOP prioritises clear and informative diagnostics for users, while also allowing for advanced probabilistic methods.

The diagram below presents PyBOP's conceptual framework. The PyBOP software specification is available at this link. This product is currently undergoing development, and users can expect the API to evolve with future releases.

Data flows from battery cycling machines to Galv Harvesters, then to the     Galv server and REST API. Metadata can be updated and data read using the web client, and data can be downloaded by the Python client.

Getting Started

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 alternatively install PyBOP from a local directory, use the following template, substituting in the relevant path:

pip install -e "path/to/pybop"

To check whether PyBOP has been installed correctly, run one of the examples in the following section. For a development installation, please refer to the contributing guide.

Prerequisites

To use and/or contribute to PyBOP, first install Python (3.8-3.11). On a Debian-based distribution, this looks like:

sudo apt update
sudo apt install python3 python3-virtualenv

For further information, please refer to the similar installation instructions for PyBaMM.

Virtual Environments

To create a virtual environment called pybop-env within your current directory:

virtualenv pybop-env

Activate the environment:

source pybop-env/bin/activate

Later, you can deactivate the environment:

deactivate

Using PyBOP

PyBOP has two general types of intended use cases:

  1. parameter estimation from battery test data
  2. design optimisation subject to battery manufacturing/usage constraints

These general cases encompass a wide variety of optimisation problems that require careful consideration based on the choice of battery model, the available data and/or the choice of design parameters.

PyBOP comes with a number of example notebooks and scripts which can be found in the examples folder.

The spm_pso.py script illustrates a straightforward example that starts by generating artificial data from a single particle model (SPM). The unknown parameter values are identified by employing a sum-of-squared errors cost function using the terminal voltage as the observed signal and a particle swarm optimisation algorithm. To run this example:

python examples/scripts/spm_pso.py

Alternatively, spm_CMAES.ipynb provides an example in notebook form. This example estimates SPM parameters based on a sum-of-squared errors cost function and a CMA-ES optimiser.

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)

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

πŸ‘€
Faraday Institution
Faraday Institution

πŸ’΅
UK Research and Innovation
UK Research and Innovation

πŸ’΅

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

About

A parameterisation and optimisation package for battery models.

Resources

License

Citation

Stars

Watchers

Forks