A battery in an electric vehicle, a UPS or a grid store never sees the neat 100 % → 0 % → 100 % cycle of a datasheet. Its state of charge (SOC) drifts down over a drive, jumps up a few points at every regenerative stop, sags again, and is topped up at night. So the practical engineering question is simple to ask and awkward to answer: how many cycles did the battery actually do today, and how deep were they?
The method most battery-life models use for this was borrowed from metal fatigue: rainflow cycle counting, standardised in ASTM E1049-85 (Standard Practices for Cycle Counting in Fatigue Analysis). This note shows how it works, runs it on an illustrative SOC trace, and shows why the result for a hybrid battery–supercapacitor design depends on one number you have to measure.
The mechanism: count closed loops, not swings
Rainflow counting first reduces a signal to its turning points (peaks and valleys). It then walks through them with a stack. Each time a swing is at least as large as the swing before it, the earlier, smaller swing is "closed" and counted as one full cycle of its range; it is removed, and the larger excursion carries on as if the small one had never interrupted it. Whatever is left at the end is counted as half cycles.
The key property is that a small dip and recovery in the middle of a large discharge is counted as a small cycle plus one unbroken large cycle. A naive count of every swing as a half cycle instead chops the large cycle into many short pieces.
The counted cycles are then turned into damage with a cycle-life curve and the Palmgren–Miner sum:
N(d) = N₁₀₀ · d^(−k)
D = Σ nᵢ / N(dᵢ)
where d is the cycle depth as a fraction of capacity, N₁₀₀ is the cycle life at 100 % depth, k is the depth exponent, nᵢ is the number of cycles of depth dᵢ, and end of life is reached when D = 1. With k = 1, damage is proportional to charge throughput (equivalent full cycles). With k > 1, deep cycles cost more per kWh than shallow ones.
Xu, Oudalov, Ulbig, Andersson and Kirschen (IEEE Transactions on Smart Grid, 2018) built their cell-life model on this structure: rainflow counting splits an irregular SOC profile into cycles, a depth-dependent stress function scores each one, and calendar ageing, temperature and average SOC are added as separate stress factors.
A worked example (Python)
The trace below is illustrative, not measured: a vehicle leaves at 90 % SOC, discharges to an 18 % low point over the day, and 40 regenerative stops each push the SOC back up by 2 percentage points on the way down. It is recharged to 90 % at night.
import numpy as np def reversals(x): out = [x[0]] for v in x[1:]: if v == out[-1]: continue if len(out) >= 2 and (out[-1] - out[-2]) * (v - out[-1]) > 0: out[-1] = v # same direction: extend the swing else: out.append(v) # direction changed: new turning point return out def rainflow(x): stack, cycles = [], [] for p in reversals(x): stack.append(p) while len(stack) >= 3: X = abs(stack[-1] - stack[-2]) Y = abs(stack[-2] - stack[-3]) if X < Y: break if len(stack) == 3: # range includes the start: half cycle cycles.append((Y, 0.5)); stack.pop(0) else: # closed loop: full cycle cycles.append((Y, 1.0)) last = stack.pop(); stack.pop(); stack.pop(); stack.append(last) cycles += [(abs(b - a), 0.5) for a, b in zip(stack, stack[1:])] return cycles def damage(cycles, k): # Miner sum in units of one 100 % cycle (N_100 cancels) return sum(w * (r / 100) ** k for r, w in cycles) Running it on the trace gives:
- one cycle of 72 points (90 % → 18 % → 90 %, as two half cycles), and
- 39 full cycles of 2 points (the 40th regenerative bump merges into the large cycle at the low point).
Throughput is 1.5 equivalent full cycles, and the rainflow total agrees with it, as it must.
Now score the day with three illustrative depth exponents (k is cell-specific and must come from test data):
| Depth exponent k | Daily damage (in 100 %-cycle units) | Share from the 2-point cycles | Naive half-swing count vs rainflow |
|---|---|---|---|
| 1.0 | 1.500 | 52.0 % | same |
| 1.5 | 0.721 | 15.3 % | 31 % too low |
| 2.0 | 0.534 | 2.9 % | 47 % too low |
Two things follow. First, the naive count is only right when damage is proportional to throughput (k = 1); as soon as deep cycles cost more, chopping the 72-point cycle into short swings hides 31 % to 47 % of the damage in this trace. Second, whether the many small cycles matter depends almost entirely on k: they are half of the day's damage at k = 1 and under 3 % at k = 2.
What it means for designers
Suppose a fast store (a supercapacitor bank) takes every regenerative bump, so the battery sees only the single 72-point cycle. The battery's daily damage falls by:
- 53.3 % if k = 1.0,
- 18.8 % if k = 1.5,
- 8.2 % if k = 2.0.
So the same buffer can look very useful or nearly pointless for cycle ageing, depending on an exponent that is set by the cell chemistry, temperature and current. Four practical consequences:
- Count with rainflow, not by swings or by throughput alone. Throughput is a correct damage measure only when k = 1.
- Fit k for your cell from cycle-life tests at several depths, at the temperature and C-rate of the application, before using the count to size anything.
- Do not stop at cycle depth. Rainflow with Miner's rule assumes damage adds up regardless of order and ignores mean SOC, current, temperature and calendar time. Xu and co-authors treat those as separate stress factors for that reason.
- Count on SOC, not on voltage. Voltage contains I·R drops that look like cycles but move no charge.
The counting method is standard; the conclusion is not universal. A design claim of the form "the buffer extends battery life by X %" needs the measured k for that cell and a measured duty cycle, not a generic one.
How this connects to the Hybrid Power Pack
The Hybrid Power Pack, my patented architecture (US 10,523,019 B2, with grants in India, Europe (DE/GB/CH), Japan, Canada, Eurasia, UAE, Vietnam and Mexico), places a battery and a supercapacitor bank on separately switched paths under one controller, so that short charge and discharge events can be routed to the capacitor. Rainflow counting is the tool for asking what that routing changes in the battery's cycle spectrum; how much cell life it buys in a given application has to be measured for that cell and duty cycle, and is not something the patent claims.
Sources
- ASTM E1049-85 (reapproved 2017, 2023), Standard Practices for Cycle Counting in Fatigue Analysis, ASTM International.
- B. Xu, A. Oudalov, A. Ulbig, G. Andersson and D. S. Kirschen, "Modeling of Lithium-Ion Battery Degradation for Cell Life Assessment," IEEE Transactions on Smart Grid, vol. 9, no. 2, pp. 1131–1140, 2018. doi:10.1109/TSG.2016.2578950
The example trace and the depth exponents above are illustrative; the code above, with the damage function, reproduces every number in this note.
Links
- About Hemant K. Rohera: https://hemantrohera.com/
- Patent register: https://hemantrohera.com/patent-register.html
- All articles: https://hemantrohera.com/hemant-rohera-articles.html
- Hybrid Power Pack licensing and OEM evaluation: https://nextgenpowerpack.com/
Hemant K. Rohera, inventor, Pune
