The card below names the data source and the course-project notebook this demo is based on. The settings of the models on this page are in “How the current models were trained” below and in “Did the models learn the training series?”.
Data source. NASA Battery Dataset — per-cycle discharge capacity for lithium-ion cells B0005, B0006, B0007 and B0018, as the two CSVs in original_data/ hold it. Detailed dataset provenance and usage conditions are on the Dataset page.
Notebook lineage
- Source / context
- PC5251 course project submission — a student project titled "Lithium-ion Battery capicity Life Prediction" (the misspelling is the notebook's). Written in Google Colab. Its motivation cell cites doi 10.19799/j.cnki.2095-4239.2022.0341 as the paper whose CEEMDAN + random-forest approach it follows.
- Notebook
- CapicityPrediction.ipynb
What the data files contain
Each row sets one statement from the notebook’s source record (“Card says”) beside what
the raw files in original_data/ actually contain, measured by reading the files
(“The file says”). The verdict gives the result; dataset identity and unit are confirmed by the
Dataset page’s check against NASA’s official files.
| Property | Card says | The file says | Verdict |
|---|
Data file: original_data/NASAbattery.csv — sha256 a03c4c961de3ca65…, 12,717 bytes, 168 data rows. Collection span, read from original_data/metadata.csv: 2008-04-02 → 2008-08-20. Origin and citation: see the Dataset page.
How the current models were trained
Each LSTM: LSTM(1,16) → LSTM(16,8) → Linear(8,1). It reads a window of 16 values; each series is standardized using its training values only; Adam optimizer, learning rate 0.001. Settings were chosen by fitting cycles 1–88 and forecasting cycles 89–118 recursively; for this step CEEMDAN was recomputed on cycles 1–88 only. The chosen settings were then refitted on cycles 1–118, with CEEMDAN recomputed on those cycles. Raw LSTM: delta target, 300 epochs. Component LSTMs: delta target, 300 epochs (delta = predict the change from the last value). The residue is constant to rounding error and is carried forward without a model.
What the capacity curve itself shows
The capacity of battery B0005 (the charge one full discharge delivers, in Ah), one value per charge–discharge cycle, before anything is decomposed. The split is fixed first: cycles 1–118 are the training interval and the shaded band, cycles 119–168, is used only for scoring. CEEMDAN, the random forest and every LSTM see the training interval alone. As in the Battery SOH demo (SOH: state of health), the aim is to forecast the decline and read off the remaining useful life: the number of cycles until capacity falls below a failure threshold.
Capacity falls from 1.856 Ah to 1.325 Ah over 168 cycles, and first stays at or below 1.4 Ah for five consecutive cycles at cycle 125. The question is whether a model fitted only on cycles 1–118 can forecast this decline.
Findings
Five facts about the decomposition and the split, each computed from the saved results.
The residue is zero
CEEMDAN splits the curve into intrinsic mode functions (IMFs: oscillating components, ordered fast to slow) plus a residue, whatever is left over. Here the 4 IMFs already add up to the curve on their own.
largest |residue| 4.4 × 10^-16 Ah, rounding error, across 118 values · energy share 0.0% · forest importance 0.0%
In effect the decomposition has 4 components, not 5. The residue column stays in every table so that the components still add up exactly; it contributes nothing.
One component is the degradation curve
IMF 4 is the slow trend: it holds almost all the variance and tracks capacity almost perfectly, while the fast components together hold what is left.
IMF 4: energy 98.2% · r = 0.993 · importance 73.8% — every other component together: energy 1.8%
Forecasting this curve is, to a first approximation, forecasting one component. That is why the slow component’s extrapolation matters most.
The decomposition is exactly additive
Adding all 5 component values at a cycle returns the measured capacity at that cycle, to floating-point precision.
max |Σ components − capacity| = 0.0 × 10^0 Ah across 118 training cycles
This is why a random forest given the components reconstructs capacity almost perfectly (training R² 0.9978): the target is the sum of its inputs.
The held-out cycles are kept out of every fit
Every component series stops at the split, and every prediction series starts one cycle after it.
components 118 values · predictions 50 values · 118 + 50 = 168 cycles in the file
This removes the leakage in the original notebook, which decomposed all 168 cycles, so its components were computed from the same data its model was then scored on.
Failure happens inside the held-out window
Capacity crosses both failure thresholds after the split, so finding the remaining useful life on this battery takes a real forecast.
1.4 Ah at cycle 125 (7 after the split) · 1.3 Ah at cycle 162 (44 after the split)
A forecast has to cross the threshold to give a remaining useful life at all, whatever its average error.
What a row and a column are here
Rows × columns handed to the random forest
One row per training cycle, one column per CEEMDAN component. A random forest (many decision trees, averaged) learns to reproduce each row's measured capacity, shown in the key column beside the matrix, from these columns; its importance scores rank the components. The 50 held-out cycles are not in this matrix.
How a row is built
- A row is one training cycle. Row X[i,:] holds the 5 component values at that cycle, and they sum to the cycle's measured capacity.
- A column is one component. Column X[:,j] is a whole time series — IMF 1, IMF 2, IMF 3, IMF 4, residue — produced by CEEMDAN from the training interval alone.
- A cell x_ij is one component's contribution to one cycle. Column magnitudes run from 4.4 × 10^-16 to 1.833 Ah, which is why the colour scale is per column.
- Nothing is dropped. All 118 training cycles become rows; the 50 held-out cycles are excluded by the split rule, not by a filter.
The matrix itself
One thin strip per training cycle, one block column per component, plus a key column with the measured capacity the forest is asked to reproduce. Hover over a cell to read its value. Click a cell to select its row X[i,:], its column X[:,j] and the cell itself x_ij; the Row view and Column view update to show them.
Rows sorted by cycle (chronological), ascending — the matrix, the key column and the table below all use this one order, so a row means the same thing in all three.
Row view
The 5 numbers CEEMDAN produced for cycle 1. Each bar is that value against its own column maximum, because the columns are orders of magnitude apart.
Column view
A column is a time series: IMF 4 over the 118 training cycles. Energy share 98.2% · correlation with capacity 0.993 · forest importance 73.8%. The dashed marker is the selected row, cycle 1.
Colour: each column is scaled by its own largest absolute value (printed beside the column name) and mapped onto a diverging colour scale centred on zero. One scale for the whole matrix would not work: IMF 4 reaches 1.833 Ah while every other column stays at or below 0.0386 Ah, so 4 of the 5 columns would look blank. The key column uses a sequential colour scale over measured capacity, low to high.
The matrix as numbers — every row, the same values the colours encode
| cycle | IMF 1 | IMF 2 | IMF 3 | IMF 4 | residue | Σ row | capacity |
|---|---|---|---|---|---|---|---|
| 1 | 0.00628 | 0.00810 | 0.00948 | 1.83263 | -0.00000 | 1.85649 | 1.85649 |
| 2 | 0.00089 | 0.00531 | 0.00736 | 1.83277 | 0.00000 | 1.84633 | 1.84633 |
| 3 | -0.00510 | 0.00260 | 0.00499 | 1.83286 | 0.00000 | 1.83535 | 1.83535 |
| 4 | -0.00195 | 0.00182 | 0.00249 | 1.83290 | 0.00000 | 1.83526 | 1.83526 |
| 5 | -0.00088 | 0.00264 | 0.00000 | 1.83289 | 0.00000 | 1.83465 | 1.83465 |
| 6 | 0.00132 | 0.00394 | -0.00242 | 1.83282 | -0.00000 | 1.83566 | 1.83566 |
| 7 | 0.00316 | 0.00400 | -0.00472 | 1.83270 | -0.00000 | 1.83515 | 1.83515 |
| 8 | -0.00309 | 0.00322 | -0.00691 | 1.83253 | 0.00000 | 1.82576 | 1.82576 |
| 9 | -0.00137 | 0.00282 | -0.00898 | 1.83230 | 0.00000 | 1.82477 | 1.82477 |
| 10 | 0.00089 | 0.00259 | -0.01088 | 1.83202 | 0.00000 | 1.82461 | 1.82461 |
| 11 | 0.00364 | 0.00179 | -0.01250 | 1.83168 | 0.00000 | 1.82462 | 1.82462 |
| 12 | -0.00343 | 0.00012 | -0.01378 | 1.83129 | 0.00000 | 1.81420 | 1.81420 |
| 13 | -0.00079 | -0.00161 | -0.01469 | 1.83084 | 0.00000 | 1.81375 | 1.81375 |
| 14 | 0.00302 | -0.00470 | -0.01520 | 1.83033 | -0.00000 | 1.81344 | 1.81344 |
| 15 | -0.00228 | -0.00959 | -0.01530 | 1.82976 | 0.00000 | 1.80260 | 1.80260 |
| 16 | 0.00294 | -0.01503 | -0.01494 | 1.82914 | 0.00000 | 1.80211 | 1.80211 |
| 17 | 0.00462 | -0.01639 | -0.01409 | 1.82845 | 0.00000 | 1.80258 | 1.80258 |
| 18 | -0.00147 | -0.01040 | -0.01276 | 1.82769 | 0.00000 | 1.80307 | 1.80307 |
| 19 | -0.01461 | 0.00149 | -0.01097 | 1.82686 | -0.00000 | 1.80278 | 1.80278 |
| 20 | 0.01572 | 0.01415 | -0.00880 | 1.82596 | 0.00000 | 1.84703 | 1.84703 |
| 21 | 0.00862 | 0.02015 | -0.00632 | 1.82497 | 0.00000 | 1.84742 | 1.84742 |
| 22 | -0.00301 | 0.01889 | -0.00359 | 1.82389 | -0.00000 | 1.83618 | 1.83618 |
| 23 | -0.00918 | 0.01293 | -0.00068 | 1.82271 | 0.00000 | 1.82578 | 1.82578 |
| 24 | -0.00379 | 0.00516 | 0.00230 | 1.82144 | 0.00000 | 1.82511 | 1.82511 |
| 25 | 0.00339 | -0.00310 | 0.00523 | 1.82006 | 0.00000 | 1.82558 | 1.82558 |
| 26 | -0.00161 | -0.01095 | 0.00802 | 1.81857 | 0.00000 | 1.81403 | 1.81403 |
| 27 | 0.00494 | -0.01767 | 0.01053 | 1.81697 | -0.00000 | 1.81477 | 1.81477 |
| 28 | 0.00449 | -0.01843 | 0.01266 | 1.81525 | 0.00000 | 1.81397 | 1.81397 |
| 29 | -0.01140 | -0.01353 | 0.01429 | 1.81340 | 0.00000 | 1.80277 | 1.80277 |
| 30 | -0.01889 | -0.00372 | 0.01525 | 1.81143 | -0.00000 | 1.80408 | 1.80408 |
| 31 | 0.02015 | 0.00693 | 0.01538 | 1.80934 | 0.00000 | 1.85180 | 1.85180 |
| 32 | -0.00295 | 0.01202 | 0.01450 | 1.80713 | 0.00000 | 1.83070 | 1.83070 |
| 33 | -0.00915 | 0.01174 | 0.01251 | 1.80480 | 0.00000 | 1.81990 | 1.81990 |
| 34 | -0.01065 | 0.00806 | 0.00954 | 1.80236 | 0.00000 | 1.80931 | 1.80931 |
| 35 | -0.00363 | 0.00260 | 0.00584 | 1.79979 | 0.00000 | 1.80461 | 1.80461 |
| 36 | 0.00205 | -0.00147 | 0.00170 | 1.79710 | 0.00000 | 1.79938 | 1.79938 |
| 37 | -0.00084 | -0.00240 | -0.00262 | 1.79429 | 0.00000 | 1.78844 | 1.78844 |
| 38 | 0.00133 | -0.00294 | -0.00682 | 1.79136 | 0.00000 | 1.78292 | 1.78292 |
| 39 | -0.00184 | -0.00279 | -0.01063 | 1.78830 | 0.00000 | 1.77303 | 1.77303 |
| 40 | 0.00207 | -0.00045 | -0.01370 | 1.78511 | -0.00000 | 1.77304 | 1.77304 |
| 41 | -0.00043 | 0.00206 | -0.01556 | 1.78180 | -0.00000 | 1.76787 | 1.76787 |
| 42 | -0.00241 | 0.00216 | -0.01580 | 1.77836 | -0.00000 | 1.76232 | 1.76232 |
| 43 | 0.00787 | -0.00081 | -0.01424 | 1.77480 | 0.00000 | 1.76762 | 1.76762 |
| 44 | 0.00618 | -0.00346 | -0.01116 | 1.77111 | 0.00000 | 1.76267 | 1.76267 |
| 45 | -0.00400 | -0.00462 | -0.00694 | 1.76729 | 0.00000 | 1.75173 | 1.75173 |
| 46 | -0.01563 | -0.00385 | -0.00201 | 1.76335 | -0.00000 | 1.74185 | 1.74185 |
| 47 | -0.02563 | -0.00071 | 0.00314 | 1.75929 | 0.00000 | 1.73609 | 1.73609 |
| 48 | 0.02634 | 0.00413 | 0.00804 | 1.75511 | 0.00000 | 1.79362 | 1.79362 |
| 49 | 0.01295 | 0.00721 | 0.01220 | 1.75083 | 0.00000 | 1.78319 | 1.78319 |
| 50 | -0.00257 | 0.00837 | 0.01513 | 1.74644 | 0.00000 | 1.76736 | 1.76736 |
| 51 | -0.00886 | 0.00752 | 0.01642 | 1.74193 | -0.00000 | 1.75702 | 1.75702 |
| 52 | -0.01135 | 0.00489 | 0.01602 | 1.73731 | 0.00000 | 1.74687 | 1.74687 |
| 53 | -0.00573 | 0.00061 | 0.01426 | 1.73258 | 0.00000 | 1.74172 | 1.74172 |
| 54 | 0.00125 | -0.00408 | 0.01151 | 1.72774 | 0.00000 | 1.73642 | 1.73642 |
| 55 | 0.00194 | -0.00662 | 0.00819 | 1.72281 | 0.00000 | 1.72632 | 1.72632 |
| 56 | -0.00065 | -0.00599 | 0.00467 | 1.71778 | 0.00000 | 1.71581 | 1.71581 |
| 57 | 0.00035 | -0.00374 | 0.00126 | 1.71267 | -0.00000 | 1.71053 | 1.71053 |
| 58 | 0.00101 | -0.00069 | -0.00178 | 1.70747 | 0.00000 | 1.70601 | 1.70601 |
| 59 | 0.00104 | 0.00126 | -0.00419 | 1.70220 | 0.00000 | 1.70031 | 1.70031 |
| 60 | 0.00219 | 0.00140 | -0.00587 | 1.69686 | 0.00000 | 1.69458 | 1.69458 |
| 61 | 0.00027 | 0.00010 | -0.00693 | 1.69146 | 0.00000 | 1.68490 | 1.68490 |
| 62 | -0.00307 | -0.00078 | -0.00768 | 1.68600 | -0.00000 | 1.67447 | 1.67447 |
| 63 | 0.00284 | -0.00033 | -0.00843 | 1.68049 | 0.00000 | 1.67457 | 1.67457 |
| 64 | -0.00238 | 0.00052 | -0.00936 | 1.67495 | 0.00000 | 1.66372 | 1.66372 |
| 65 | -0.00031 | 0.00053 | -0.01056 | 1.66936 | 0.00000 | 1.65901 | 1.65901 |
| 66 | 0.00198 | 0.00003 | -0.01191 | 1.66375 | -0.00000 | 1.65385 | 1.65385 |
| 67 | -0.00174 | -0.00055 | -0.01317 | 1.65812 | -0.00000 | 1.64265 | 1.64265 |
| 68 | -0.00013 | -0.00030 | -0.01417 | 1.65246 | 0.00000 | 1.63786 | 1.63786 |
| 69 | 0.00018 | 0.00060 | -0.01485 | 1.64680 | 0.00000 | 1.63274 | 1.63274 |
| 70 | 0.00096 | 0.00092 | -0.01526 | 1.64112 | 0.00000 | 1.62775 | 1.62775 |
| 71 | 0.00171 | 0.00043 | -0.01546 | 1.63545 | 0.00000 | 1.62213 | 1.62213 |
| 72 | -0.00151 | -0.00134 | -0.01559 | 1.62978 | 0.00000 | 1.61133 | 1.61133 |
| 73 | 0.00161 | -0.00334 | -0.01581 | 1.62411 | 0.00000 | 1.60656 | 1.60656 |
| 74 | 0.00305 | -0.00371 | -0.01629 | 1.61845 | 0.00000 | 1.60151 | 1.60151 |
| 75 | -0.00353 | -0.00183 | -0.01709 | 1.61281 | 0.00000 | 1.59037 | 1.59037 |
| 76 | -0.00560 | 0.00227 | -0.01808 | 1.60719 | 0.00000 | 1.58579 | 1.58579 |
| 77 | -0.00528 | 0.00768 | -0.01906 | 1.60160 | 0.00000 | 1.58494 | 1.58494 |
| 78 | 0.00731 | 0.01201 | -0.01983 | 1.59603 | 0.00000 | 1.59553 | 1.59553 |
| 79 | -0.00821 | 0.01265 | -0.02021 | 1.59049 | -0.00000 | 1.57473 | 1.57473 |
| 80 | -0.00871 | 0.00870 | -0.02007 | 1.58499 | 0.00000 | 1.56490 | 1.56490 |
| 81 | -0.00177 | 0.00139 | -0.01938 | 1.57953 | 0.00000 | 1.55977 | 1.55977 |
| 82 | 0.01088 | -0.00744 | -0.01807 | 1.57411 | 0.00000 | 1.55948 | 1.55948 |
| 83 | 0.01815 | -0.01609 | -0.01611 | 1.56874 | 0.00000 | 1.55469 | 1.55469 |
| 84 | 0.02128 | -0.02236 | -0.01347 | 1.56342 | 0.00000 | 1.54887 | 1.54887 |
| 85 | 0.01493 | -0.02475 | -0.01010 | 1.55816 | 0.00000 | 1.53824 | 1.53824 |
| 86 | 0.00419 | -0.02315 | -0.00608 | 1.55295 | -0.00000 | 1.52791 | 1.52791 |
| 87 | -0.00160 | -0.01608 | -0.00161 | 1.54782 | 0.00000 | 1.52853 | 1.52853 |
| 88 | -0.01949 | -0.00365 | 0.00305 | 1.54274 | 0.00000 | 1.52265 | 1.52265 |
| 89 | -0.03858 | 0.01067 | 0.00765 | 1.53775 | 0.00000 | 1.51749 | 1.51749 |
| 90 | 0.03808 | 0.02297 | 0.01195 | 1.53283 | 0.00000 | 1.60582 | 1.60582 |
| 91 | -0.00800 | 0.02817 | 0.01569 | 1.52799 | 0.00000 | 1.56385 | 1.56385 |
| 92 | -0.02078 | 0.02698 | 0.01865 | 1.52324 | 0.00000 | 1.54809 | 1.54809 |
| 93 | -0.02762 | 0.02066 | 0.02076 | 1.51857 | 0.00000 | 1.53238 | 1.53238 |
| 94 | -0.02089 | 0.01179 | 0.02205 | 1.51401 | 0.00000 | 1.52695 | 1.52695 |
| 95 | -0.01787 | 0.00269 | 0.02260 | 1.50953 | 0.00000 | 1.51696 | 1.51696 |
| 96 | -0.01052 | -0.00520 | 0.02246 | 1.50516 | -0.00000 | 1.51190 | 1.51190 |
| 97 | -0.00442 | -0.01160 | 0.02170 | 1.50089 | -0.00000 | 1.50656 | 1.50656 |
| 98 | -0.00014 | -0.01542 | 0.02038 | 1.49673 | 0.00000 | 1.50155 | 1.50155 |
| 99 | -0.00371 | -0.01669 | 0.01857 | 1.49267 | 0.00000 | 1.49084 | 1.49084 |
| 100 | -0.00360 | -0.01558 | 0.01633 | 1.48873 | 0.00000 | 1.48587 | 1.48587 |
| 101 | -0.00633 | -0.01188 | 0.01372 | 1.48490 | 0.00000 | 1.48041 | 1.48041 |
| 102 | -0.01048 | -0.00635 | 0.01086 | 1.48119 | 0.00000 | 1.47521 | 1.47521 |
| 103 | 0.00057 | -0.00012 | 0.00786 | 1.47759 | 0.00000 | 1.48590 | 1.48590 |
| 104 | 0.01272 | 0.00437 | 0.00488 | 1.47413 | -0.00000 | 1.49609 | 1.49609 |
| 105 | 0.00214 | 0.00584 | 0.00203 | 1.47078 | 0.00000 | 1.48080 | 1.48080 |
| 106 | -0.00197 | 0.00477 | -0.00062 | 1.46757 | -0.00000 | 1.46975 | 1.46975 |
| 107 | -0.01012 | 0.00265 | -0.00313 | 1.46450 | 0.00000 | 1.45390 | 1.45390 |
| 108 | -0.00218 | 0.00036 | -0.00558 | 1.46155 | 0.00000 | 1.45415 | 1.45415 |
| 109 | 0.00548 | -0.00114 | -0.00807 | 1.45875 | 0.00000 | 1.45502 | 1.45502 |
| 110 | 0.00484 | -0.00122 | -0.01067 | 1.45609 | -0.00000 | 1.44904 | 1.44904 |
| 111 | -0.00126 | -0.00030 | -0.01335 | 1.45358 | 0.00000 | 1.43867 | 1.43867 |
| 112 | -0.00252 | 0.00079 | -0.01603 | 1.45121 | 0.00000 | 1.43345 | 1.43345 |
| 113 | 0.00171 | 0.00128 | -0.01858 | 1.44899 | 0.00000 | 1.43340 | 1.43340 |
| 114 | 0.00114 | 0.00084 | -0.02085 | 1.44693 | 0.00000 | 1.42806 | 1.42806 |
| 115 | 0.00071 | -0.00017 | -0.02265 | 1.44503 | 0.00000 | 1.42292 | 1.42292 |
| 116 | -0.00027 | -0.00180 | -0.02379 | 1.44329 | 0.00000 | 1.41743 | 1.41743 |
| 117 | -0.00255 | -0.00268 | -0.02407 | 1.44171 | 0.00000 | 1.41241 | 1.41241 |
| 118 | -0.00222 | -0.00214 | -0.02336 | 1.44030 | -0.00000 | 1.41258 | 1.41258 |
Additive components, fast to slow
The idea being tested. Fast components tend to be measurement noise; the slow component is the degradation trend. Decompose-then-forecast assumes that forecasting each smooth component is easier than forecasting the noisy sum: split the curve, forecast the pieces, add them back up. This section tests that idea on battery B0005: first the components, then which of them the random forest relies on, then the error on the held-out cycles.
CEEMDAN splits the training interval (cycles 1–118) into intrinsic mode functions (IMFs) plus a residue. Each row shows one component over the training cycles; hover over a curve to read its values. The bar is the random forest’s importance for that component; energy share and correlation with capacity add two further measures.
Which components carry the curve
How to read the importance chart
Each bar is one component's share of the forest's importance; hover over a bar for its energy share and correlation. IMF 4 dominates: 73.8% of the importance, 98.2% of the component energy and correlation 0.993 with capacity. That is the slow degradation trend. The fast components carry little energy and little importance: they add little to reconstructing the curve.
Did the models learn the training series?
How settings were chosen: each model was fitted on cycles 1–88 and then forecast cycles 89–118 recursively. Two targets (the next value, “level”, or the change from the last value, “delta”) and three training lengths (100, 300 and 600 epochs) were compared. The setting with the lowest validation RMSE was refitted on cycles 1–118.
| Pipeline | Target | Epochs | Validation RMSE (Ah) |
|---|---|---|---|
| Raw LSTM | delta | 300 | 0.02846 |
| CEEMDAN + LSTM | delta | 300 | 0.04392 |
Training fit versus repeating the previous value
One-step errors on the training cycles for each series: the fitted model against simply repeating the previous value. The residue, which is constant, is skipped.
| Series | Fitted MSE (Ah²) | Previous-value MSE (Ah²) |
|---|---|---|
| Raw capacity | 2.158e-4 | 2.335e-4 |
| IMF 1 | 7.101e-5 | 1.816e-4 |
| IMF 2 | 1.409e-6 | 2.455e-5 |
| IMF 3 | 8.127e-7 | 6.427e-6 |
| IMF 4 | 1.185e-7 | 1.692e-5 |
| residue | 0.000e+0 | 4.254e-32 |
Training loss for the raw LSTM and for the LSTM fitted to each component, on the training interval. Lower means a closer fit to the training cycles.
Training MSE in Ah² (original units, log scale), recorded every tenth update. Each line ends at the number of epochs chosen on the validation cycles. The constant residue has no model.
Predict the next 50 cycles from the known past
All forecasts start after cycle 118 and feed their predictions back as input, without receiving later measurements. The raw LSTM is one LSTM trained on the capacity curve directly; CEEMDAN + LSTM adds up one LSTM forecast per component; persistence repeats the last training value; the linear trend extends the slope of the last 16 values.
How to read this chart: the measured line is the battery’s capacity on cycles 119–168; each coloured line is one forecast (legend at the top of this section). The dashed line is the failure threshold chosen in the Failure threshold menu. Hover to compare every forecast with the measurement at one cycle.
Scored on cycles 119–168 (50 values). Lowest RMSE under recursive rollout: Raw LSTM at 0.018 Ah.
Model diagnostics · one-step prediction
Here the raw LSTM gets the 16 true previous measurements at every step (teacher forcing), so each prediction is only one cycle ahead. Comparing it with the same model’s recursive forecast shows how much error builds up when predictions become inputs.
| Raw LSTM evaluation | RMSE (Ah) | MAE (Ah) |
|---|---|---|
| One step with measured history | 0.0098 | 0.0064 |
| Recursive 50-cycle forecast | 0.0178 | 0.0149 |
Only the raw LSTM is evaluated one step ahead.
Held-out error
Cycles 119–168, 50 values, using recursive rollout. RMSE and MAE are in Ah, MSE in Ah². Lower is better.
| model | MSE | RMSE | MAE |
|---|---|---|---|
| Raw LSTM | 3.17e-4 | 0.018 | 0.015 |
| CEEMDAN + LSTM | 2.65e-3 | 0.052 | 0.047 |
| Linear trend | 5.60e-3 | 0.075 | 0.065 |
| Persistence | 5.82e-3 | 0.076 | 0.068 |
Remaining useful life
The first cycle at which capacity stays at or below 1.4 Ah for five consecutive cycles, for the measured curve and for each recursive forecast. Error is the distance from the measured crossing; “no crossing” means the forecast never reaches the threshold by cycle 168.
| curve | crossing cycle | error |
|---|---|---|
| Measured capacity | 125 | — |
| Raw LSTM | 123 | 2 cycles |
| CEEMDAN + LSTM | 144 | 19 cycles |
| Persistence | — | no crossing |
| Linear trend | 120 | 5 cycles |
What this analysis shows
Retraining improved the CEEMDAN + LSTM forecast
Its recursive RMSE on cycles 119–168 fell from 0.2961 Ah in the archived run to 0.0515 Ah. The rerun changed scaling, network architecture, optimizer settings and how settings were chosen, all at once.
How the forecasts rank
Recursive RMSE on cycles 119–168, lowest first: Raw LSTM 0.0178 Ah · CEEMDAN + LSTM 0.0515 Ah · Linear trend 0.0748 Ah · Persistence 0.0763 Ah. Given measured history at every step (one step ahead), the raw LSTM reaches 0.0098 Ah.
Settings were chosen on cycles 89–118
Each pipeline’s target and training length were chosen by forecasting cycles 89–118 from a fit on cycles 1–88; cycles 119–168 were used only for the final scores.
Glossary
Terms used on this page, with what they mean for this battery and this analysis.
The measurement
The charge a full discharge delivers, one number per cycle. On battery B0005 it starts at 1.856 Ah and ends at 1.325 Ah.
One charge followed by one discharge. Cycles are numbered from 1; they are the x-axis of every chart and the rows of the design matrix. The Dataset page numbers the same discharges from 0, so its discharge 0 is cycle 1 here.
The downward drift of capacity with cycling. It is not monotonic: the curve recovers locally, which is why a smooth fit and a decomposition disagree about what is noise.
A capacity level treated as end of life. Two are used here, 1.4 Ah and 1.3 Ah, and a crossing counts only when it is sustained for five consecutive cycles, so a single dip does not declare failure.
The number of cycles until that sustained crossing. Here it is read off a forecast curve, so a model that never crosses has no RUL at all rather than a large error.
The decomposition
Complete Ensemble Empirical Mode Decomposition with Adaptive Noise. It splits a 1-D signal into additive, data-adaptive oscillations plus a residue by repeatedly sifting the signal with small noise realisations added (100 of them here, noise seed 100). It is not a fixed filter bank: the components are derived from this signal, so decomposing a longer signal gives different components.
One additive component, ordered fast to slow. Here there are 4: the first three are small oscillations and IMF 4 is the degradation trend.
What is left after every IMF is removed. On this run it is empty: all 118 stored values are approximately zero at floating-point precision, so it is carried through the arithmetic and contributes nothing.
The variance of one component as a fraction of the total across components. It answers “how much of the movement is this?”, which is a different question from importance.
Pearson r between a component and the training capacity curve. High r means the component follows the level of the curve, not merely part of its variance.
Using information that would not be available at prediction time. EMD-family methods compute every component from the whole signal, so decomposing the full curve and then scoring on its tail lets the tail influence its own features. This demo avoids it by decomposing the training cycles only.
The split rule used here: cycles 1–118 for everything that is fitted, cycles 119–168 excluded from fitting and from choosing settings.
The models and the scoring
The 118 × 5 table handed to the random forest: one row per training cycle, one column per component, target = measured capacity.
The share of split quality attributable to a column, averaged over the trees. Because the columns sum to the target, it measures how much each component contributes to reconstructing capacity.
Long short-term memory network: a neural network that reads a sequence step by step and keeps a memory of earlier steps. Here: LSTM(1,16) → LSTM(16,8) → Linear(8,1), with standardized inputs and a target that is either the next value (level) or the change from the last value (delta). The target and number of epochs are chosen on cycles 89–118 (see “How the current models were trained”).
The 16 consecutive values a model sees as input. It also sets how much history a rollout needs before it can start.
Scoring in which each prediction receives the true previous window. Errors cannot accumulate, so it measures the one-step fit and not forecasting.
Scoring in which each prediction is fed back as input. Errors compound, which is what a real forecast has to survive.
Repeat the last training measurement for every held-out cycle. It has no parameters, so it sets the minimum a learned model has to beat to show any skill.
Fit a straight line to the last 16 values, step one cycle forward, repeat. This extrapolates a local slope without training a neural model.
Mean squared error, its square root, and mean absolute error, all over the 50 held-out cycles. RMSE is in Ah, so it is directly comparable with the capacity axis.
Fraction of variance explained. Reported here only for the random forest on its training rows, where it is near 1 because the components add up to capacity.