Skip to main content

A universal cycling protocol

Project description

aurora-biologic logo aurora-biologic logo


Overview

aurora-unicycler defines a universal battery cycling protocol that can be exported to different formats.

Features

  • Define a cycling protocol based on a Python Pydantic model, with validation
  • Save a unicycler protocol as a human-readable .json
  • Export protocols into different formats:
    • Biologic .mps
    • Neware .xml
    • tomato 0.2.3 .json
    • PyBaMM string list

This is particularly useful for high-throughput battery experiments, as protocols can be programmatically defined, and sample IDs and capacities can be attached at the last second.

Check out our standalone APIs for controlling cyclers with Python or command line:

We also have a full application with a GUI, including a graphical interface to create these protocols:

Installation

Install on Python >3.10 with

pip install aurora-unicycler

Usage

Making a protocol

Define a protocol using Python

from aurora-unicycler import *

my_protocol = Protocol(
    measurement = MeasurementParams(
        time_s=10,
        voltage_V=0.1,
    ),
    safety = SafetyParams(
        max_voltage_V=5,
        min_voltage_V=0,
        max_current_mA=10,
        min_current_mA=-10,
    ),
    method = [
        Tag(
            tag="my_tag",
        ),
        ConstantCurrent(
            rate_C=0.5,
            until_voltage_V=4.2,
            until_time_s=3*60*60,
        ),
        ConstantVoltage(
            voltage_V=4.2,
            until_rate_C=0.05,
            until_time_s=60*60,
        ),
        ConstantCurrent(
            rate_C=-0.5,
            until_voltage_V=3.5,
            until_time_s=3*60*60,
        ),
        Loop(
            loop_to="my_tag",
            cycle_count=100,
        )
    ]
)

You can also create a protocol from a python dictionary or JSON - you will not get type checking in an IDE, but it will still validate at runtime.

my_protocol = Protocol.from_dict(
    {
        "measurement": {"time_s": 10, "voltage_V": 0.1}
        "safety": {"max_voltage_V": 5}
        "method": [
            {"step": "open_circuit_voltage", "until_time_s": 1},
            {"step": "tag", "tag": "tag1"},
            {"step": "constant_current", "rate_C": 0.5, "until_voltage_V": 4.2},
            {"step": "constant_voltage", "voltage_V": 4.2, "until_rate_C": 0.05},
            {"step": "constant_current", "rate_C": -0.5, "until_voltage_V": 3.0},
            {"step": "loop", "loop_to": "tag1", "cycle_count": 100},
        ],
    ]
)
my_protocol = Protocol.from_json("path/to/file.json")

Converting a protocol

Once you have a protocol object, you can optionally attach a sample name and capacity and convert to other formats.

  • Biologic MPS settings, tested on MPG2 cyclers with EC-lab 11.52 and 11.61:
mps_string = my_protocol.to_biologic_mps(
    sample_name="test-sample",
    capacity_mAh=45,
    save_path="some/location/settings.mps"
)
  • Neware XML, tested on BTS8:
xml_string = my_protocol.to_neware_xml(
    sample_name="test-sample",
    capacity_mAh=45,
    save_path="some/location/protocol.xml"
)
  • Tomato, tested on 0.2.3:
json_string = my_protocol.to_tomato_json(
    sample_name="test-sample",
    capacity_mAh=45,
    save_path="some/location/protocol.json"
)
  • PyBaMM experiment (list of strings):
pybamm_list = my_protocol.to_pybamm_experiment()

Contributors

Acknowledgements

This software was developed at the Laboratory of Materials for Energy Conversion at Empa, the Swiss Federal Laboratories for Materials Science and Technology, and supported by funding from the IntelLiGent project from the European Union’s research and innovation program under grant agreement No. 101069765, and from the Swiss State Secretariat for Education, Research, and Innovation (SERI) under contract No. 22.001422.

IntelLiGent logo IntelLiGent logo     EU flag     Swiss secretariat

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

aurora_unicycler-0.3.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aurora_unicycler-0.3.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file aurora_unicycler-0.3.0.tar.gz.

File metadata

  • Download URL: aurora_unicycler-0.3.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.4

File hashes

Hashes for aurora_unicycler-0.3.0.tar.gz
Algorithm Hash digest
SHA256 82300c451a33f102aa6635e96b31201da4f08894bece28102517c8f2bc5448c7
MD5 43c9b380dc7f01489f1cb4c009429991
BLAKE2b-256 0d49f8f0a115cbfa3b7e49abc39a7eb73f53823bc33b6bc7a5468d666a683c97

See more details on using hashes here.

File details

Details for the file aurora_unicycler-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aurora_unicycler-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e762384ad5e29827605d13fe5b8f5534afb7f1f3734ec178ce26ff96011ea3e3
MD5 c8948b07b2f7e85dcbd9a2ac437c3cd1
BLAKE2b-256 07517844554b5481b4d77bc105423023e2c047f065b4fd8178cbb5d6b2654c04

See more details on using hashes here.

Supported by

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