主要内容

batteryDifferentialCurves

Compute incremental capacity, differential voltage, and differential temperature curves from battery constant current (CC) measurements for analyzing battery behavior and performance characteristics

Since R2026a

Description

[dQdV,dVdQ,dTdV] = batteryDifferentialCurves(V,I,T,t) computes incremental capacity (IC), differential voltage (DV), and differential temperature (DT) curves from battery constant current (CC) measurements.

These differential curves transform raw voltage, current, and temperature data into sensitive indicators of battery electrochemical processes, enabling you to perform detailed analysis of battery health, degradation mechanisms, and performance characteristics.

[___] = batteryDifferentialCurves(V,I,[],t) sets T to an empty array. Use this syntax when you have no temperature data. The function returns an empty table for dTdV.

[___] = batteryDifferentialCurves(___,Name=Value) specifies additional options using one or more name-value arguments that control data preprocessing, smoothing, and interpolation parameters, allowing you to optimize curve generation.

You can use this syntax with any of the previous input argument combinations.

Input Arguments

collapse all

Voltage measurements from the battery specified as a numeric vector.

Current measurements from the battery specified as a numeric vector that is the same size as V.

Temperature measurements during battery operation, specified as a numeric vector that is the same size of V or, if no temperature data is available, an empty table. When T is an empty vector, the function returns output dTdV as an empty table as well.

Time stamps or durations for each measurement, specified as a datetime vector or a duration vector.

These vectors must be the same size as V and strictly increasing.

The function computes cumulative features such as energy and charge with these measurements.

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: featureTable = batteryDifferentialCurves(V,I,T,NoiseTolerance=1e-3)sets the noise tolerance to 1e-3 and excludes time values.

Tolerance threshold for validating battery data consistency, specified as a positive scalar. This parameter controls two critical checks:

  1. Phase detection—Current values with absolute magnitude below NoiseTolerance are treated as zero. After filtering these near-zero values, the remaining currents must all have the same sign (all positive for charging or all negative for discharging) for the data to pass single-phase validation.

  2. Constant current verification— Determines the acceptable variation range for current measurements during constant current (CC) mode operation. Current fluctuations must remain within the tolerance bounds to confirm CC mode. Lower values result in stricter requirements for data consistency, while higher values allow more variation in the measurements.

Example: Say that NoiseTolerance = 0.01. In this case, currents between [-0.01,0.01] A are considered negligible. The remaining non-zero currents must maintain consistent polarity, and current variations during CC mode must stay within ±0.01 A of the nominal value.

Preprocessing smoothing method, specified as one of the values in this table

MethodDescription
"none"

No smoothing.

"movmean"

Average over each window of measurement. This method is useful for reducing periodic trends in data.

"movmedian"

Median over each window of measurement. This method is useful for reducing periodic trends in data when outliers are present.

"gaussian"

Gaussian-weighted average over each window of measurement.

"lowess"

Linear regression over each window of measurement. This method can be computationally expensive, but results in fewer discontinuities.

"loess"

Quadratic regression over each window of measurement. This method is slightly more computationally expensive than "lowess".

"rlowess"

Robust linear regression over each window of measurement. This method is a more computationally expensive version of the method "loess", but it is more robust to outliers.

"rloess"

Robust quadratic regression over each window of measurement. This method is a more computationally expensive version of the method "loess", but it is more robust to outliers.

"sgolay"

Savitzky-Golay filter, which smooths according to a quadratic polynomial that is fitted over each window of measurement. This method can be more effective than other methods when the data varies rapidly.

For more information on these smoothing methods, see smoothdata.

Window size for the presmoothing method before differential curve calculation, specified as a positive integer. Larger windows provide more smoothing but can reduce feature resolution. The window is centered about the current element.

Postprocessing smoothing method, specified as one of the values in this table

MethodDescription
"gaussian"

Gaussian-weighted average over each window of measurement.

"none"

No smoothing.

"movmean"

Average over each window of measurement. This method is useful for reducing periodic trends in data.

"movmedian"

Median over each window of measurement. This method is useful for reducing periodic trends in data when outliers are present.

"lowess"

Linear regression over each window of measurement. This method can be computationally expensive, but results in fewer discontinuities.

"loess"

Quadratic regression over each window of measurement. This method is slightly more computationally expensive than "lowess".

"rlowess"

Robust linear regression over each window of measurement. This method is a more computationally expensive version of the method "loess", but it is more robust to outliers.

"rloess"

Robust quadratic regression over each window of measurement. This method is a more computationally expensive version of the method "loess", but it is more robust to outliers.

"sgolay"

Savitzky-Golay filter, which smooths according to a quadratic polynomial that is fitted over each window of measurement. This method can be more effective than other methods when the data varies rapidly.

For more information on these smoothing methods, see smoothdata.

Window size for the postprocessing-smoothing method after differential curve calculation, specified as a positive integer. Larger windows provide more smoothing but can reduce feature resolution. The window has length PostSmoothingWindowSize and is centered about the current element.

Number of points for interpolating the differential curves, specified as a positive integer.

More points provide smoother curves but increase computation time. Interpolation is applied differently for each differential‑curve type

Interpolation method, specified as "linear", "nearest","next", "previous", "pchip", "v5cubic""v5cubic", "makima", or "spline"

The interpolation method that the function applies depends on the differential-curve type.

  • IC curves interpolate the voltage signal.

  • DV curves interpolate the time signal.

  • DT curves interpolate the voltage signal.

Each interpolation strategy balances smoothness and accuracy differently, influencing how well fine features are preserved.

For more information on interpolation methods, see interp1.

Output Arguments

collapse all

Incremental capacity curve table, returned as a table containing the incremental capacity (IC) curve data with the following variables:

  • "IC" — Incremental capacity values (dQ/dV) in Ah/V

  • "interpolatedVoltage" — Interpolated voltage values in V

  • "interpolatedTime" — Interpolated time values in seconds.

Differential voltage curve table, returned as a table containing the differential capacity (dV/dQ) curve data with the following variables:

  • "DV" — Differential voltage values (dV/dQ) in V/Ah.

  • "interpolatedVoltage" — Interpolated voltage values in V

  • "interpolatedTime" — Interpolated time values in seconds.

Differential temperature curve table, returned as a table containing the differential temperature (dT/dV) curve data with the following variables:

  • "DT" — Differential temperature values (dT/dV in °C/V.

  • "interpolatedVoltage" — Interpolated voltage values in V

  • "interpolatedTemperature" — Interpolated temperature values in °C.

This output is empty if no temperature is provided in the input.

Version History

Introduced in R2026a