Skip to content

Cycle counting

Use rainflow to convert a sampled stress history into a weighted distribution of reversals. Keep the measured time sequence and its units with the result. For more terminology, see the fatigue glossary.

Rainflow cycle counting

Start with a stress history in time order. Rainflow reduces the history to reversals and pairs excursions according to the counting method. For each pair, the stress range is \(\Delta\sigma=\sigma_\max-\sigma_\min\) and the mean is \(\sigma_m=(\sigma_\max+\sigma_\min)/2\). A closed cycle contributes one count. An open excursion at a record boundary can contribute a half cycle. Keep the fractional counts in downstream calculations.

The low-level rows report amplitude \(\Delta\sigma/2\) in the first column. CycleCount.stress_range stores the full range. The low-level function also supports method="fourpoint". Use consistent methods and bin edges when comparing records. The two-dimensional rainflow matrix groups counts by range and mean. The plot colours each point by its bin's weighted count. The weights let a half cycle contribute 0.5. A range histogram sums over the mean bins. The matrix retains information needed for mean stress correction, while the range histogram shows the frequency of each stress excursion. Both aggregate cycles and discard their sequence. See the rainflow API, histogram API, and ASTM E1049.

From sampled stress to a matrix

Reduce the record to alternating peaks and valleys. A monotonic run contributes its turning points rather than one cycle per sample. The ASTM algorithm works through reversals in acquisition order. When the new range closes a preceding excursion, record the preceding range with its mean and count and continue on the remaining reversals. The record boundaries can leave open excursions. For example, the pair \((-25,75)\) MPa has range \(100\) MPa, amplitude \(50\) MPa, mean \(25\) MPa and ratio \(-1/3\). Its contribution is \(1\) when it closes inside the record or \(1/2\) when counted as a boundary half-cycle.

For mean bins \(I_i\) and range bins \(J_j\), the matrix entry and its range marginal are

\[ H_{ij}=\sum_k n_k\, \mathbf 1[M_k\in I_i]\,\mathbf 1[\Delta\sigma_k\in J_j], \qquad h_j=\sum_i H_{ij}. \]

Use shared bin edges when comparing records. Retain unbinned large cycles, small-cycle metadata and residual turning points when serializing. A range-only histogram cannot reconstruct each cycle's mean stress. See half-cycles.

Residuals and low-frequency fatigue damage

A residual is an ordered sequence of turning points left when the counting window ends. At a boundary, a peak in one window can pair with a valley in the next. Counting each window alone changes the excursion ranges used in Miner damage. Even though Miner adds contributions linearly, the damage of an excursion depends nonlinearly on its range through the S–N relation. Therefore the sum of independently counted windows can differ from the damage of the concatenated time series. Marsh et al., rainflow residue processing.

The rainflow background covers the wind turbine application.

Why window damage changes

For a single-slope \(S\)–\(N\) curve, a counted range contributes \(n,\Delta\sigma^m/10^b\) to Miner damage. A cycle spanning two windows can therefore matter even if it is rare. When \(m=3\), one full cycle at \(100\) MPa contributes four times as much as two full cycles at \(50\) MPa. A slow drift in mean stress can leave just the peaks and valleys needed to close a large excursion when the windows are joined. The direction and size of the difference depend on the actual history.

Residual concatenation

Keep consecutive windows in chronological order with compatible units, counting conventions and bins. Add their CycleCount objects to combine their spectra and retain the residual sequence. Call solve_lffd() on the sum to replace the original residual counts with counts from the combined residual signal. For four-point rainflow, pass rainflow_method="fourpoint" both when creating each CycleCount and when resolving the sum.

Check the recovered result

Keep the residuals in acquisition order and count their concatenation using the same algorithm as the original windows. The operation removes the contributions of the original window residual half-cycles and adds the cycles counted across the joined residual. The full cycles already closed within each window stay in the total. Compare the recovered spectrum to a direct whole-record count when both are available. Use the same material curve and numeric precision for the damage comparison. A measurement gap still requires an analysis decision about whether adjacent residuals represent a continuous load history. Residuals and LFFD.

Work through all three examples.