Drive cycle setup

Drive cycles are vital for accurate battery modeling, simulating real-world scenarios and behaviors in vehicle usage. Engineers utilize drive cycles to optimize battery designs, evaluate degradation patterns, and enhance efficiency for electric vehicles and grid storage. Understanding battery behavior relies on the insights provided by drive cycles.

To simulate a drive cycle with JuliaSim Batteries, first build a function that interpolates the drive cycle data. The drive_cycle function should take a time as an input and return the current at that time.

using JuliaSimBatteries
cell = DFN(NMC())

expt = current((u, p, t) -> drive_cycle(t))

sol = solve(cell, expt, SOC_initial = 1)

The plot below shows agreement with experimental agreement with an NMC cell.

Simple discharge experiment