YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
battery-soh-estimation
State-of-Health estimation for lithium-ion batteries from a single discharge cycle — trained on the NASA Prognostics Center of Excellence Battery Data Set (B. Saha & K. Goebel), cells B0005 / B0006 / B0007 (2 Ah 18650, cycled to end of life at 24 °C).
SOH definition: SOH = discharge capacity / 2.0 Ah (rated capacity).
Results
| Model | Test RMSE (SOH) | Test MAE (SOH) |
|---|---|---|
| Ridge on curve-shape features (this model) | 0.0436 | 0.0386 |
| Linear regression on cycle number (baseline) | 0.0508 | 0.0390 |
| Small MLP on the same features (comparison) | 0.0814 | 0.0664 |
- Protocol (honest for degradation): per-cell chronological split — train on the first 70% of discharge cycles, test on the last 30% (the aged future, never shuffled). Per-cell test RMSE: B0005 0.0372 · B0006 0.0579 · B0007 0.0313.
- Features (9):
cycle, v_mean, v_std, v_min, frac_below_3p5, v_slope_first_third, t_mean, t_max, t_rise— the shape of the discharge curve plus temperature.duration_swas deliberately excluded: under the constant-2A discharge protocol it correlates 0.997 with capacity — using it would be measuring SOH, not estimating it. - Why linear wins: capacity fade here is smooth and near-monotonic; on an extrapolation protocol a regularised linear model extrapolates while a small neural net saturates outside its training range. Inductive bias beats capacity on this task.
Usage
from model import load_model, predict_soh_from_cycle
model = load_model("model.joblib") # sklearn Pipeline: StandardScaler + Ridge
soh = predict_soh_from_cycle(model, time_s, voltage_v, temperature_c, cycle=120)
print(f"estimated SOH: {soh:.3f}") # e.g. 0.812
# or from a precomputed feature dict / DataFrame:
from model import predict_soh
soh = predict_soh(model, {"cycle": 120, "v_mean": 3.68, "v_std": 0.31,
"v_min": 2.71, "frac_below_3p5": 0.42,
"v_slope_first_third": -4.1e-4,
"t_mean": 31.2, "t_max": 36.8, "t_rise": 9.5})
model.joblib is a fitted sklearn.pipeline.Pipeline
(StandardScaler → Ridge(alpha=1.0)); feature standardisation is
applied inside the pipeline, so pass raw feature values.
Limitations (read before deploying)
- Only 3 cells, one chemistry (LiCoO₂ 18650), one temperature (24 °C), one lab protocol. No claim of transfer to EV packs, other chemistries, or variable-load duty cycles.
- Test RMSE ≈ 0.04 SOH: fine for trend monitoring, not for safety-critical cutoff decisions.
- Assumes a full discharge curve with voltage + temperature series is available (what a BMS records during discharge).
Dataset credit
NASA Ames Prognostics Center of Excellence — Battery Data Set, B. Saha and K. Goebel. Mirrored for training via MathWorks support files: https://ssd.mathworks.com/supportfiles/predmaint/batteryagingdata/nasa/BatteryAgingData.zip
Files
model.joblib— fitted sklearn pipeline (the weights)model.py—load_model()/predict_soh()/predict_soh_from_cycle()config.json— hyperparameters, feature spec, metrics
- Downloads last month
- 12