Skip to content

matlab/matlab-agentic-toolkit / skills-catalog/control-systems/matlab-extract-battery-features

matlab-extract-battery-features

Verified

Extract battery features in MATLAB from voltage, current, and temperature measurements: multi-cycle cycling tests, HPPC / pulse tests, EIS impedance sweeps, or a single in-field charge or discharge segment. Use when the user asks for battery features, or for SOH, RUL, degradation, internal-resistance, or impedance analysis that needs them. Output is a feature table; does not train SOH / RUL models. Do not trigger only because battery data is present. Triggers on battery* functions such as batteryTestDataParser, batteryTestFeatureExtractor, batteryPulseFeatures, batteryEISFeatures.

references/cycling/postprocess.md

View on GitHub
# Cycling Postprocessing — Visualization & Feature Ranking

Load this when the user picks **Visualize** or **Rank features** as a next step after cycling feature extraction (see `references/cycling-pipeline.md` Phase 7). Nothing here runs before the feature table is extracted and reported.

## Visualization Options

Offer the plot type that matches what was extracted; roll each with base MATLAB (no skill-owned plot helpers ship on this branch):

| Plot type | Shows | Offer when | One-liner |
|-----------|-------|------------|-----------|
| **Segmented data** | V + I for one cycle, colored by CyclingMode (CC/CV/Rest) | Always — validates segmentation | `gscatter(time, voltage, segmented.CyclingModes)` (or two-panel `tiledlayout` for V and I) |
| **IC/DV/DT curves across cycles** | Overlaid differential curves at regular cycle intervals | When IC/DV/DT extracted | loop `computeDifferentialCurves` across selected cycles, overlay in `tiledlayout` colored by cycle |
| **Feature trends over cycles** | Selected features vs cycle number | Always — degradation trajectory | `tiledlayout` grid, one tile per feature: `plot(featureTable.(cycleVar), featureTable.(name))` |
| **Single feature trend** | One feature vs cycle with trend line | User asks about a specific feature | `plot` + `lsline` |

## Feature Ranking (correlation-based)

When the user has a target variable (capacity, SOH, or cycle number as an age proxy):

```matlab
targetVar = "Discharge_CycleCumulative_capacity";   % or user-specified
cycleVar  = parser.CycleIndexVariable;
featureCols = featureTable(:, ~ismember(featureTable.Properties.VariableNames, {targetVar, cycleVar}));

% Drop NaN/constant columns, then correlate with the target
validCols = varfun(@(x) ~all(isnan(x)) & std(x,'omitnan')>0, featureCols, OutputFormat="uniform");
featureCols = featureCols(:, validCols);
corrValues = corr(table2array(featureCols), featureTable.(targetVar), Rows="complete");
[~, sortIdx] = sort(abs(corrValues), 'descend');
rankedNames = featureCols.Properties.VariableNames(sortIdx);   % present top-10
```

After presenting the top-N, explain the physical meaning of the leading features using `references/cycling/feature-selection.md`, and compare the ranked list against that file's *expected* top features: agreement means the ranking has physical grounding; a list dominated by "watch for noise" entries means too few cycles, over-smoothing, or a spurious trend.

----

Copyright 2026 The MathWorks, Inc.

----
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall