Offline Estimators (m.estimators.offline)#

Tools which estimate parameters of battery health and performance after-the-fact.

class moirae.estimators.offline.OfflineEstimator#

Bases: object

Base class for tools which estimate battery health parameters given many measurements of the battery performance over time.

Create the class by passing a fully-configured Loss() then perform the estimation using the estimate() function.

estimate() tuple[GeneralContainer, HealthVariable, Any]#

Compute an estimate for the initial state and ASOH.

Returns:

  • Estimate for the initial state

  • Estimate for the ASOH parameters

  • Diagnostic unique to the type of estimator

loss: BaseLoss#

Function being minimized

Scipy Estimators (m.e.offline.scipy)#

Estimate the state of health using SciPy optimizers

class moirae.estimators.offline.scipy.ScipyMinimizer(objective: BaseLoss, **kwargs)#

Bases: OfflineEstimator

Estimate using SciPy’s minimize function.

Parameters:
  • objective – Objective function to be optimized

  • kwargs – Passed to the minimize function. Refer to the documentation to minimize

estimate() tuple[GeneralContainer, HealthVariable, OptimizeResult]#

Compute an estimate for the initial state and ASOH.

Returns:

  • Estimate for the initial state

  • Estimate for the ASOH parameters

  • Diagnostic unique to the type of estimator

Loss Functions (m.e.offline.loss)#

Interfaces that evaluate the fitness of a set of battery state parameters provided as a NumPy array.

class moirae.estimators.offline.loss.BaseLoss(cell_model: CellModel, asoh: HealthVariable, transient_state: GeneralContainer, observations: BatteryDataset)#

Bases: object

Base class for objective functions which evaluate the ability of a set of battery health parameters to explain the observed performance data.

All Loss classes should follow the convention that better sets of parameters yield values which are less than worse parameters. There are no constraints on whether the values need to be positive or negative.

asoh: HealthVariable#

Initial guess for battery health

cell_model: CellModel#

Cell model used to compute

get_x0() ndarray#

Generate an initial guess

Returns:

A 1D vector used as a starting point for class to this class

observations: BatteryDataset#

Observed data for the battery performance

state: GeneralContainer#

Initial guess for battery transient state

class moirae.estimators.offline.loss.MeanSquaredLoss(cell_model: CellModel, asoh: HealthVariable, transient_state: GeneralContainer, observations: BatteryDataset)#

Bases: BaseLoss

Score the fitness of a set of health parameters by the mean squared error between observed and predicted terminal voltage.