Pulse resistance (DCIR)

Read DC internal resistance at each state of charge from one pulse experiment.

Run one experiment that pulses the cell at falling states of charge, then read each pulse from sol.cycles: the relaxed voltage before it, and the voltage at its end, give the 10 s DC internal resistance.

This example uses a published PyBaMM parameter set, so you can copy it and run it as-is on Ionworks. Set IONWORKS_PYBAMM_LOCAL=1 to run the same script with PyBaMM on your own machine.

import ionworks.pybamm as pybamm
import matplotlib.pyplot as plt

# From 90% SOC: relax, 10 s pulse, rest, then discharge to the next SOC. The
# pulse and the 350 s discharge together remove 10% of capacity (360 s at 1C).
pulses = 8
experiment = pybamm.Experiment(
    [
        (
            "Rest for 30 minutes",
            "Discharge at 1C for 10 seconds",
            "Rest for 40 seconds",
            "Discharge at 1C for 350 seconds",
        )
    ]
    * pulses
)
sim = pybamm.Simulation(
    pybamm.lithium_ion.SPMe(),
    parameter_values=pybamm.ParameterValues("Chen2020"),
    experiment=experiment,
)
sol = sim.solve(initial_soc=0.9)

soc = [90 - 10 * i for i in range(pulses)]
dcir = []
for cycle in sol.cycles:
    relaxed, pulse = cycle.steps[0], cycle.steps[1]
    drop = relaxed["Voltage [V]"].entries[-1] - pulse["Voltage [V]"].entries[-1]
    dcir.append(1000 * drop / pulse["Current [A]"].entries[-1])

fig, ax = plt.subplots()
ax.plot(soc, dcir, "o-")
ax.set_xlabel("State of charge [%]")
ax.set_ylabel("10 s DCIR [mOhm]")
ax.set_ylim(bottom=0)
plt.show()