Objective for pulse experiments (e.g. GITT, HPPC, ICI). By default, the objective
compares the model voltage to the data voltage. However, it can also compute other
variables, such as overpotentials, resistances, and ICI features, and these can be
selected by passing the appropriate objective variables function.
The model to fit. No default is provided, but this option is required
(a model must be passed in).
correct OCV difference: str
Whether to correct for the difference between the true OCV and the
simulated OCV in the objective function. Default is false, but
correcting for this difference can improve the fit.
simulation_kwargs: dict
Keyword arguments to pass to the simulation (iwp.Simulation). Default is None.
objective variables: callable
A function that takes the model or data and returns a dictionary of
objective variables. Default is voltage_objective_variables,
which returns the voltage.
Other useful functions are
overpotential_objective_variables, which returns the overpotential
at various points in the pulses
resistances_objective_variables, which returns the resistance at
various points in the pulses
ici_features_objective_variables, which returns the ICI features
(concentration overpotential and ICI square-root slope)
gitt_features_objective_variables, which returns the GITT features
(concentration overpotential, relaxation time, ohmic voltage drop,
GITT and ICI square-root slopes)
interpolant_atol: float
Absolute tolerance for the current interpolant. Default is the solver atol
if a solver is provided in simulation_kwargs, otherwise 1e-6.
interpolant_rtol: float
Relative tolerance for the current interpolant. Default is the solver rtol
if a solver is provided in simulation_kwargs, otherwise 1e-4.
interactive_preprocessing: bool
Whether to use interactive preprocessing to adjust interpolant_atol and
interpolant_rtol based on the current data. Default is False.
solver_max_save_points: int
Maximum number of points to save in the solver. Default is 10000.
callbackslist of callable, optional
A class with methods that get called at various points during the datafit
process
custom_parametersdict, optional
A dictionary of parameters to use within this objective only.The following default
custom parameters are used:
For all models:
Initial temperature [K]: Function to calculate the initial temperature.
Default is iwp.data_fits.custom_parameters.initial_temperature.
Ambient temperature [K]: Function to calculate the ambient temperature.
Default is iwp.data_fits.custom_parameters.initial_temperature.
For full-cell models:
Initial concentration in negative electrode [mol.m-3]: Function to calculate
the initial concentration in the negative electrode for full cells.
Default is iwp.data_fits.custom_parameters.initial_concentration_from_voltage(“full”, “negative”).
Initial concentration in positive electrode [mol.m-3]: Function to calculate
the initial concentration in the positive electrode for full cells.
Default is iwp.data_fits.custom_parameters.initial_concentration_from_voltage(“full”, “positive”).
For half-cell models:
Initial concentration in {working_electrode} electrode [mol.m-3]: Function to calculate
the initial concentration in the working electrode for half cells.
Default is iwp.data_fits.custom_parameters.initial_concentration_from_voltage(“half”, {working_electrode}).
These custom parameters are functions that take parameter_values and data as arguments
and return the calculated value. They can be overridden by providing new functions in the
custom_parameters dictionary.
Calculate the overpotentials for each on pulse in the Pulse data. The overpotentials
are defined as the difference between the voltage at the end of the previous pulse,
and the voltage at various points in the current pulse (after 1s, 60s, and at the
end of the pulse).
Calculate the resistance for each on pulse in the Pulse data. The resistances are
calculated as the overpotentials divided by the mean current during the step. The
overpotentials are defined as the difference between the voltage at the end of the
previous pulse, and the voltage at various points in the current pulse (see
overpotentials_objective_variables for more details).
Calculate the ICI (Intermittent Current Interruption) features from the Pulse data.
The features used in the fit are the potential change and the ICI square-root slope
during the slope. See [2] for more details.
The following function is used to obtain the square-root slope and offsets
where $t_0$ refers to the start of the rest phase. The square-root
function fitted to the rest phase gives the potential change as $U_0$ and
the ICI square-root slope as $frac{d U}{d sqrt{t}}$.
Calculate the GITT features from the Pulse data. The feature used in the fit are the
voltage directly after the current has been shut off (concentration overpotential),
the relaxation time during the current on pulses, the ohmic voltage drop, and the
GITT and ICI (Intermittent Current Interruption) square-root slopes during the
current on pulse and rest periods, respectively. See [1] for more details.
The following function is used to obtain the square-root slopes and offsets
where $t_0$ refers to the start of the current on pulse or the start of the rest phase.
The square-root function fitted to the current on pulse gives the ohmic voltage drop
as $U_0$ and the GITT square-root slope as $frac{d U}{d sqrt{t}}$. The square-root
function fitted to the rest phase gives the concentration overpotential as $U_0$ and
the ICI square-root slope as $frac{d U}{d sqrt{t}}$. To get the relaxation time
$ au$ , we use the following exponential fit function on the current pulse:
\[U = U_0 + \Delta U \exp\left(-\frac{t - t_0}{\tau}\right)\]
where $t_0$ refers to the start of the current pulse.