Main Content

fitECM

Perform impedance parameter estimation for battery ECM from time-based HPPC data

Since R2025a

Description

The fitECM function performs impedance parameter estimation for a battery equivalent circuit model (ECM) from time-based hybrid pulse power characterization (HPPC) data. These parameters are then stored inside an ECM object that you can use to parameterize a Battery Equivalent Circuit block.

You can view a table with a summary of the parameter values by accessing the ParameterSummary property of the ECM object.

You can obtain the pulse power data at different battery operating conditions, such as different states of charge, temperature, load currents, and current directionality. You can specify the HPPC input as a matrix, table, or timetable containing information for a single constant current pulse, HPPCTest object, or HPPCTestSuite object.

To specify the ECM topology used to fit the data, set the ECM name-value argument. You can specify the desired fitting algorithm by defining the FittingMethod name-value argument.

This figure shows the typical workflow to estimate the parameters of an equivalent circuit model from HPPC test data:

batteryECM = fitECM(pulseData) performs impedance parameter estimation for an ECM object with default properties from the HPPC data, pulseData. The function returns an ECM object with the estimated parameters.

batteryECM = fitECM(pulseData,Name=Value) performs impedance parameter estimation from the HPPC data, pulseData, and specifies additional options using name-value arguments. The function returns an ECM object with the estimated parameters.

Input Arguments

collapse all

Time-based HPPC data used to perform impedance parameter estimation, specified as a matrix, table, timetable, HPPCTest object, or HPPCTestSuite object.

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: batteryECM = fitECM(myData,SegmentToFit="Relaxation")

Equivalent circuit model used to fit the HPPC data, specified as an ECM object.

Segment or section of the pulse to fit, specified as "Load", "LoadAndRelaxation", or "Relaxation".

Data Types: char | string

Time duration of the relaxation to add to the fit, specified as a positive scalar.

Data Types: double

Time frame, in seconds, at which to calculate the instantaneous resistance R0, specified as a positive scalar. This threshold serves as the definition for the value of R0.

Data Types: double

Optimization or fitting method used to find the parameters of the ECM that best fit the time-based impedance data, specified as "fminsearch", "tfest", "curvefit", or "mbc".

The "tfest" option requires a license for the System Identification Toolbox™.

The "curvefit" option requires a license for the Curve Fitting Toolbox™.

The "mbc" option requires a license for the Model-Based Calibration Toolbox™.

Data Types: char | string

Sign convention of the input current during a discharge, specified as "negativeDischarge" or "positiveDischarge".

Data Types: char | string

Threshold current value, in amperes, that indicates whether a charge or discharge is occurring, specified as a scalar.

Data Types: double

Initial parameter values of the ECM used in the first iteration of the fitting method, specified as a vector of nonnegative elements.

Data Types: double

Lower parameter bounds of the equivalent circuit parameters used in the fitting method, specified as a vector of nonnegative elements.

Data Types: double

Upper parameter bounds of the equivalent circuit parameters used in the fitting method, specified as a vector of nonnegative elements.

Data Types: double

Fitting options for the method you specify in the FittingMethod name-value argument, specified as "fitoptions", ""idoptions.tfest", or "optimset".

Data Types: string | char

Time step to use for the input data when the input data has a variable time step sampling, specified as a positive scalar.

Data Types: double

Voltage detrending strategy when you set the FittingMethod name-value argument to "tfest", specified as "constantOCV" or "hppcTestOCV".

Data Types: string | char

Open-circuit voltage variable, specified as vector, table, or timetable.

Data Types: double | table | timetable

Name of the time variable, specified as a string scalar or character vector.

Data Types: string | char

Name of the voltage variable, specified as a string scalar or character vector.

Data Types: string | char

Name of the current variable, specified as a string scalar or character vector.

Data Types: string | char

Name of the open-circuit voltage variable, specified as a string scalar or character vector.

Data Types: string | char

Output Arguments

collapse all

Battery equivalent circuit model with the estimated parameters from the specified time-based HPPC data, returned as an ECM object.

Version History

Introduced in R2025a