Contenido principal

batteryPulseFeatures

R2026b

Extract features from battery pulse test data

Since R2026b

Description

Extract Battery Features from a Table or Timetable

[featureTable,pulseData] = batteryPulseFeatures(tbl,CurrentVariable=currentvar,VoltageVariable=voltagevar,TimeVariable=timevar) extracts battery health features and pulse segment data from pulse-test data stored in the table or timetable tbl that contains the variable names specified in currentvar, voltagevar, and timevar.

example

Extract Features from a Matrix

[___] = batteryPulseFeatures(data) extracts battery health features from the N-by-3 numeric matrix data with columns containing measurements for voltage, current, time].

example

Extract Features from Separate Vectors

[___] = batteryPulseFeatures(voltage,current,time) extracts battery health features using separate vectors for voltage, current, and time measurements.

[___] = batteryPulseFeatures(voltage,current,samplingRate) extracts battery health features using voltage and current vectors, as well as a scalar sampling rate in Hz. This syntax generates a time vector from the sampling rate.

example

Specify Additional Options

[___] = batteryPulseFeatures(___,Name=Value) allows you to specify additional parameters using name-value arguments. You can use this syntax with any of the previous input and output argument combinations.

Examples

collapse all

Load battery pulse test data from a CSV file and extract health features by specifying the variable names.

tbl = readtable('hppc_test.csv');

Load battery pulse test data from a CSV file.

[features, pulses] = batteryPulseFeatures(tbl, CurrentVariable="Current", VoltageVariable="Voltage", TimeVariable="Time");

Extract pulse features from the table by specifying the names of the current, voltage, and time variables.

Extract battery health features from separate voltage and current vectors using a sampling rate.

[features, pulses] = batteryPulseFeatures(voltage, current, 1000);

Extract pulse features using voltage and current vectors with a 1000 Hz sampling rate.

Extract battery health features from an N-by-3 data matrix.

data = [voltage, current, time];

Construct an N-by-3 matrix with voltage, current, and time columns.

[features, pulses] = batteryPulseFeatures(data);

Extract pulse features from the matrix input.

Extract features with custom valid pulse duration range and post-pulse relaxation duration.

[features, pulses] = batteryPulseFeatures(tbl, CurrentVariable="Current", VoltageVariable="Voltage", TimeVariable="Time", ValidPulseDurationRange=[5, 30], PostPulseMaxDuration=120);

Extract features using custom pulse duration range of 5 to 30 seconds and a maximum post-pulse relaxation duration of 120 seconds.

Input Arguments

collapse all

Input data containing battery pulse test measurements, specified as a table or timetable.

  • For a table input, the table must contain variables for voltage, current, and time.

  • For a timetable input, no explicit time variable is necessary because the timetable provides time in the rowtimes property.

Name of the current measurement variable when tbl provides the pulse-test data, specified as a string scalar.

Name of the voltage measurement variable when tbl provides the pulse-test data, specified as a string scalar.

Name of the time measurement variable when tbl provides the pulse-test data, specified as a string scalar.

Input data containing battery pulse test measurements, specified as an N-by-3 numeric matrix. The columns must be ordered as [voltage, current, time].

Voltage measurements from the battery pulse test, specified as a numeric vector.

Current measurements corresponding to the voltage data, specified as a numeric column vector. The current vector must have the same number of elements as the voltage vector.

Time measurements corresponding to the voltage and current data, specified as a numeric vector, duration vector, or datetime vector. The time vector must have the same number of elements as the voltage vector.

Sampling rate of the measurements, specified as a positive scalar in Hz. The function generates a time vector from the sampling rate.

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:

Name of the variable in the input table that contains step index data, specified as a string scalar. When specified, the function uses the step index to identify pulse segments instead of automatic change point detection. The step index values must be numeric, nonempty, real, finite, and non-NaN.

Maximum duration for the post-pulse relaxation period, specified as a positive scalar in seconds.

Minimum and maximum valid pulse duration, specified as a 1-by-2 vector of positive values [min, max] in seconds. The values must be nondecreasing. Pulses with durations outside this range are excluded.

Minimum and maximum valid voltage range, specified as a 1-by-2 vector of nonnegative values [min, max] in volts. The values must be nondecreasing. Data with voltages outside this range are excluded.

Minimum current change threshold for identifying pulse transitions, specified as a positive scalar in amperes.

Output Arguments

collapse all

Extracted battery health features for each identified pulse, returned as a table.

The table contains the following variables:

FeatureDescription
OCVOpen circuit voltage in V
R0Ohmic resistance in Ω
RTotalTotal resistance in Ω
DeltaVoltageVoltage drop during pulse in V
RelaxationVoltageVoltage at end of relaxation period in V
RecoveryVoltageVoltage recovered after pulse in V
RecoveryRateVoltage recovered after pulse in V/s
Energy Energy delivered during pulse in J
VoltageMeanMean voltage in V
VoltageStandardDeviationVoltage standard deviation during pulse in V

Pulse segment information for each identified pulse, returned as a table. The table contains the following variables.

VariableDescription
DirectionalityCharge or discharge direction
PulseStepIndexStep index of pulse, included only when StepIndexVariable is specified
PulseCurrentAverage current during pulse, in A
PulseDurationDuration of pulse, in s
PulseStartIndexStarting index of pulse in original data
PulseEndIndexEnding index of pulse in original data

Version History

Introduced in R2026b