The model to fit. Default is a SPM with the options
‘{“working electrode”:”electrode”}’.
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.
solver: pybamm.BaseSolver
The solver to use for the simulation. Default is model.default_solver.
simulation_kwargs: dict
Keyword arguments to pass to the simulation (pybamm.Simulation). Default is None. Note that the “solver” option takes precedence if “solver” if also in simulation_kwargs.
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.
interpolant_rtol: float
Relative tolerance for the current interpolant. Default is the solver rtol.
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.
See Objective. By default, this objective sets the parameter
“Initial concentration in {electrode} electrode [mol.m-3]” using the function
get_initial_concentration_from_half_cell_data, which finds the initial concentration
by matching the initial voltage in the data to the open-circuit potential
parameter.
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.
Model that returns the initial concentration in the positive electrode of half-cell
by matching the initial voltage in the data to the open-circuit potential parameter.