Converter tool

Rainflow Cycle Counting for Fatigue

Count cycles in a load, stress or strain history with ASTM E1049 rainflow, build range-mean and from-to matrices, and turn them into Miner damage and a damage-equivalent load.

One channel, one value per row

1. Your data

Or paste the table

Rainflow Cycle Counting for Fatigue

Operator: Abdulla Al Fahad. How tools are built and checked

Fatigue damage is caused by cycles, but a measured load history is a wiggly line, not a list of cycles. Rainflow counting is the standard way to pull closed hysteresis loops out of it, so that each loop can be given a range, a mean and a place on an S-N curve.

ASTM E1049 gives a nine-point history, -2, 1, -3, 5, -1, 3, -4, 4, -2, whose answer is known: ranges of 3, 4, 6, 8 and 9 counted 0.5, 1.5, 0.5, 1 and 0.5 times, four cycles in all. The page returns exactly that, then does the same for histories of hundreds of thousands of samples.

Key features

  • Peak-valley extraction with a hysteresis gate that drops reversals smaller than a range you set
  • Three-point (E1049) counting, with the residue taken as half cycles or the history rotated so every cycle closes
  • Range-mean and from-to (Markov) matrices with bin counts you choose, an exceedance plot, and simple-range and level-crossing counts for comparison
  • Palmgren-Miner damage on a Basquin curve with a knee and cut-off, or an EN 1993-1-9 detail category, with Goodman, Gerber, Soderberg or Smith-Watson-Topper mean-stress correction
  • Damage-equivalent load for a Wohler exponent and a number of cycles you choose
  • A cycle list that keeps the first and last sample of every cycle, so each one can be found again in the signal

How cycles are counted and damage is summed

The column can hold any one channel: stress, strain, force or a turning-point list. Every value must be a finite number; the page names the first bad row. Up to 2,000,000 samples are accepted, though the file reader keeps 300,000 rows of a spreadsheet or CSV. A gate of 0 keeps every reversal; in the 400-sample example, 224 reversals remain with no gate, 190 with a gate of 1, 134 with a gate of 2 and 88 with a gate of 5, in the unit of the load.

The three-point rule reads each new reversal and compares the latest range X with the one before it, Y. If X is smaller it reads on. If X is at least Y and Y contains the starting point, Y is counted as a half cycle and the starting point is dropped; otherwise Y is counted as a full cycle and both its points are removed. What remains at the end is the residue, and consecutive ranges in it are half cycles. Over 200 random 60-point histories this gave the same cycles as the four-point method every time.

A cycle keeps its range, mean, the values it runs from and to, and the first and last sample index, so it can be traced back in the signal. The exports list the first 200,000 cycles; the damage always uses all of them.

How it works

The S-N curve is Basquin on a range or amplitude basis: N = N_ref x (S_ref / S)^m up to an optional knee, then a second slope, and no damage beyond the cut-off. The EN 1993-1-9 preset takes the detail category as the range at 2 million cycles with m = 3 to 5 million cycles, m = 5 to 100 million and no damage below that: for category 100 the knee is at 73.7 and the cut-off at 40.5.

With a mean-stress correction every cycle is corrected on its own mean before it is read on the curve, so damage is summed cycle by cycle instead of by grouped range. Goodman divides the amplitude by 1 - mean/ultimate: amplitude 100 at mean 50 with an ultimate strength of 400 becomes 114.3.

Matrix bins are derived from the data: the range bin width is the largest range divided by the number of range bins, the mean bins span the observed means, and the from-to matrix uses up to 20 levels between the lowest and highest value of any cycle. Those widths are written into every export.

The damage-equivalent load is (sum of n x range^m / N_eq)^(1/m). For three cycles of range 100 and N_eq = 3 it returns 100.00 for m = 3 and m = 5 alike.

Common use cases

  • A test rig repeats a short block of loads. Counted once with the residue as half cycles, the E1049 block gives ranges 3, 4, 6, 8 and 9 with counts 0.5, 1.5, 0.5, 1 and 0.5; rotated to its largest value so it can repeat, the same block gives ranges 3, 4, 7 and 9 once each. Both total 4 cycles, but the repeat form is the one that matches a block run over and over.
  • A measured history is noisy, and the gate decides how many tiny cycles exist. Gates of 0, 1, 2 and 5 leave 224, 190, 134 and 88 reversals in the page's example, and the exports show which gate was used so a second analyst can reproduce the count.
  • A weld detail of category 90 has its constant-amplitude cut-off at 36.4 MPa. In the example 93.2 percent of the counted cycles fall below it and add nothing, while the few ranges near 115 MPa carry all of the 3.72e-6 damage.

How to use this tool

  1. Drop the history, choose the channel column and unit label, set the hysteresis gate to the smallest range you consider real, and choose how the residue is treated.
  2. Read the cycle table, the exceedance plot and the matrices, then choose an S-N curve and mean-stress rule, or only a Wohler exponent for the damage-equivalent load.
  3. Download the cycle CSV, the XLSX of every table or the PDF; each lists the gate, residue rule and bin widths.

Example

The page's 400-sample stress history in MPa (a slow cycle of 90 MPa range with ripples), gate 2 MPa, residue as half cycles, EN 1993-1-9 category 90, Wohler exponent 3 at 1,000,000 cycles

A slow cycle plus faster ripples of about 28 and 10 MPa; 400 samples reduced to 134 reversals

Counting and damage

61 full and 11 half cycles, 66.5 cycles in all, largest range 115.35 MPa
Miner damage 3.72e-6 per repeat of the history, so about 268,800 repeats; 93.2% of the cycles fall below the cut-off and add nothing
Damage-equivalent range at 1,000,000 cycles and m = 3: 1.80 MPa

Tips for best results

  • Re-run with the gate at half and twice its value: if the damage barely moves, the gate is on a plateau and your choice is safe.
  • Use a damage-equivalent load with m near the S-N slope of the detail, so loads from different histories can be compared at one N_eq.
  • Check the units twice before reading damage: ranges in kN against a curve in MPa quietly gives a wrong answer that looks plausible.

Common pitfalls

The S-N curve and any safety factors are yours. EN categories are a convenient preset of numbers, not the text of the standard, and none of this is a fatigue certification.

One channel is counted at a time. Multi-axial histories need a combined stress first, and range-pair counting and carrying the residue into a following block are not offered.

Bin widths and the residue rule change the damage: coarse range bins do not (damage is summed on exact ranges), but a matrix from coarse bins loses detail if you rebuild damage from it elsewhere.

Common errors and how to fix them

"Fewer than 3 reversals remain, so there are no cycles"
The gate is larger than every swing, or the history has fewer than three turning points. Lower the gate or check the column.

Frequently asked questions

Why do the two residue options give different totals?

With half cycles, the unclosed part of the history is counted as ranges of 0.5 each. Rotating to the largest value closes them as full cycles, so the numbers of cycles can differ by the paired halves, and damage shifts slightly.

Is the three-point count the same as the textbook four-point count?

For every history tried, yes; the page also compares them in its own checks. The three-point rule is simply the one specified in ASTM E1049.

Why is the damage zero for a loaded structure?

Every cycle is below the constant-amplitude cut-off of the curve. That is a property of the S-N curve you chose; use a curve without a cut-off if you want to see damage from small cycles.