Skip to content

Battery Cycling

This page documents the Battery Cycling (BC) method.

Experimental

Classes with the experimental_ prefix are things that we're still working on or trying to understand. That means these classes are subject to change.

We welcome any feedback and suggestions before making them a permanent part of PyPalmSens.

pypalmsens.energy.experimental_BatteryCycling

Battery cycling CC-CV-CC.

Note: This method is experimental and may be subject to change.

This method implements CC-CV-CC Cycling with Delta-I-V and Passed Charge.

Each cycle consist of:

  1. Charge at a CC (Constant Current) using Chronopotentiometry. When the target voltage is reached (the upper cut-off voltage limit), switch to CV (Constant Voltage) using Chronoamperometry and maintain the applied voltage for a defined period time or until the minimum current is reached (the lower cut-off current limit).
  2. Discharge at a Constant Current (using Chronopotentiometry) until the lower target voltage is reached (the lower cut-off voltage limit).
  3. Plot a point at defined time intervals.
  4. Send I-V versus time data
  5. Send the capacity per charge / discharge step, also known as passed charge (Qpass). The capacity values are absolute and are converted to mAh.

Alternatively for point 3, use "deltas" to reduce data transfer and optimize points.

The time interval will be used for controlling, but some points may be skipped:

  • Delta V: when voltage is being measured, plot a point only when a certain variation is reached.
  • Delta I: when current is being measured, plot a point only when a certain variation is reached.
  • Delta t: plot a point at this defined interval anyway, even if the variation is not met.

The underlying methodscript is described in this application note: https://www.palmsens.com/knowledgebase-article/advanced-battery-cycling-with-methodscript/

Supported devices:

  • Nexus
  • EmStat4 series (EmStat4S, EmStat4X, MultiEmStat4)

Methods:

  • render

    Render the template with model parameters.

  • to_methodscript

    Convert to MethodSCRIPT class.

Attributes:

  • id (Literal['bc']) –

    Unique method identifier.

  • potential_max (int) –

    Maximum potential to charge to (units: mV).

  • current_min (int) –

    Minimum current to stop the CV charge step (units: μA).

  • potential_min (int) –

    Minimum potential to discharge to (units: mV).

  • current_charge (int) –

    Constant current to charge with (units: μA).

  • current_discharge (int) –

    Constant current to discharge with (units: μA).

  • cycles (int) –

    Number of charge and discharge cycles.

  • interval (int) –

    Interval time of each measurement point (units: s).

  • max_time (int) –

    Maximum duration of each step (if the cut-off is not met) (units: s).

  • delta_v (int) –

    Minimum potential variation required for plotting data in CC steps (units: μV).

  • delta_i (int) –

    Minimum current variation reuqired for plotting data in the CV step (units: nA).

  • delta_t (int) –

    Maximum time without plotting data (units: ms).

  • cell_on_ocp (bool) –

    Turns cell on with the measured OCP (Nexus only).

  • mains_frequency (Literal[50, 60]) –

    Set the DC mains filter in Hz.

id class-attribute instance-attribute

id: Literal['bc'] = 'bc'

Unique method identifier.

potential_max class-attribute instance-attribute

potential_max: int = 4300

Maximum potential to charge to (units: mV).

current_min class-attribute instance-attribute

current_min: int = 5

Minimum current to stop the CV charge step (units: μA).

potential_min class-attribute instance-attribute

potential_min: int = 2500

Minimum potential to discharge to (units: mV).

current_charge class-attribute instance-attribute

current_charge: int = 100

Constant current to charge with (units: μA).

current_discharge class-attribute instance-attribute

current_discharge: int = -100

Constant current to discharge with (units: μA).

cycles class-attribute instance-attribute

cycles: int = Field(default=100, gt=0)

Number of charge and discharge cycles.

interval class-attribute instance-attribute

interval: int = Field(default=100, ge=0)

Interval time of each measurement point (units: s).

max_time class-attribute instance-attribute

max_time: int = Field(default=3, ge=0)

Maximum duration of each step (if the cut-off is not met) (units: s).

delta_v class-attribute instance-attribute

delta_v: int = Field(default=100, gt=0)

Minimum potential variation required for plotting data in CC steps (units: μV).

delta_i class-attribute instance-attribute

delta_i: int = Field(default=500, gt=0)

Minimum current variation reuqired for plotting data in the CV step (units: nA).

delta_t class-attribute instance-attribute

delta_t: int = Field(default=100, ge=0)

Maximum time without plotting data (units: ms).

cell_on_ocp class-attribute instance-attribute

cell_on_ocp: bool = False

Turns cell on with the measured OCP (Nexus only).

mains_frequency class-attribute instance-attribute

mains_frequency: Literal[50, 60] = 50

Set the DC mains filter in Hz.

Adjusts sampling on instrument to account for mains frequency. Set to 50 Hz or 60 Hz depending on your region (default: 50).

render

render() -> str

Render the template with model parameters.

Returns:

  • script ( str ) –

    Complete MethodScript code for this method.

Source code in src/pypalmsens/_methods/energy.py
24
25
26
27
28
29
30
31
32
33
34
35
36
37
def render(self) -> str:
    """Render the template with model parameters.

    Returns
    -------
    script : str
        Complete MethodScript code for this method.
    """
    template = env.get_template(self._template)
    return template.render(
        model=self,
        timestamp=datetime.today().replace(microsecond=0),
        version=__version__,
    )

to_methodscript

to_methodscript() -> MethodScript

Convert to MethodSCRIPT class.

Returns:

Source code in src/pypalmsens/_methods/energy.py
39
40
41
42
43
44
45
46
47
48
def to_methodscript(self) -> MethodScript:
    """Convert to MethodSCRIPT class.

    Returns
    -------
    method: MethodScript
        MethodScript class.
    """
    script = self.render()
    return MethodScript(script=script)