rainflow
Rainflow counting fatigue analysis.
Syntax
C = rainflow(signal)
C = rainflow(signal,numbins)
C = rainflow(signal,numbins,method)
[C,H,R,M] = rainflow(...)
Inputs
- signal
- The stress history.
- numbins
- The number of range/mean bins to create(default: 64 when omitted or []).
- method
- The rainflow cycle counting method.
Outputs
- C
- The cycle count history.
- H
- The histogram matrix of cycle counts for each (mean, range) bin.
- R
- The range bin centers associated with the columns of H.
- M
- The mean bin centers associated with the rows of H.
Example
Compute the rainflow output of a stress history.
signal = [-79.3 -220.4 -210.7 90.2 -28.6 -15.9 -174.1 -36.9 90.4 144.7 158.7 64.9 209.0 ...
264.9 77.9 139.3 110.9 61.3 161.7 117.5 -96.6 -17.7 -35.5 -63.2 -132.9 -148.6 ...
-53.7 -67.8 -52.5 -64.0 -21.1 49.7 37.5 84.2 20.5 56.0 114.4 105.8 1.0 91.8];
[C, H, R, M] = rainflow(signal, 10, '3pt-ASTM')
C = [Matrix] 16 x 5
0.50000 141.10000 -149.85000 1.00000 2.00000
1.00000 12.70000 -22.25000 5.00000 6.00000
1.00000 264.30000 -41.95000 4.00000 7.00000
1.00000 93.80000 111.80000 11.00000 12.00000
1.00000 61.40000 108.60000 15.00000 16.00000
1.00000 100.40000 111.50000 18.00000 19.00000
1.00000 78.90000 -57.15000 21.00000 22.00000
1.00000 14.10000 -60.75000 27.00000 28.00000
1.00000 11.50000 -58.25000 29.00000 30.00000
1.00000 12.20000 43.60000 32.00000 33.00000
1.00000 63.70000 52.35000 34.00000 35.00000
0.50000 485.30000 22.25000 2.00000 14.00000
0.50000 413.50000 58.15000 14.00000 26.00000
0.50000 263.00000 -17.10000 26.00000 37.00000
0.50000 113.40000 57.70000 37.00000 39.00000
0.50000 90.80000 46.40000 39.00000 40.00000
H = [Matrix] 10 x 10
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.50000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
2.00000 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 0.00000
1.00000 0.00000 0.00000 0.00000 0.00000 0.50000 0.00000 0.00000 0.00000 0.00000
1.00000 1.50000 0.50000 0.00000 0.00000 0.00000 0.00000 0.00000 0.50000 0.50000
0.00000 2.00000 1.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
R = [Matrix] 1 x 10
24.26500 72.79500 121.32500 169.85500 218.38500 266.91500 315.44500 363.97500 412.50500 461.03500
M = [Matrix] 10 x 1
-196.13500
-147.60500
-99.07500
-50.54500
-2.01500
46.51500
95.04500
143.57500
192.10500
240.63500
Comments
The purpose of rainflow is to identify the simple hysteresis loops (or cycles) within a complicated stress-strain diagram. The identification is performed by creating an accounting of the peaks of a stress or strain vs. time history that resequences the stress-strain paths to make the loops easily distinguishable. The rainflow output records the ranges and means of the simple loops, which can also be presented as a histogram. Rainflow counting is often a preparation step for damage assessment using an S-N fatigue curve and Miner’s rule.
Outputs H, R and M are typically used to plot the hisogram.
A gate input to control hysteresis slope reversal and remove points due to external noise is currently unsupported.
- The 4 peaks currently being considered.
- Peaks from a previous group 1 that were assigned to a loop, whose analysis has been completed.
- Peaks from a previous group 1 that were not assigned to a loop, that will be reconsidered later.
- Peaks that have not yet entered into a group 1.
Another approach is to perform a circular shift so that the peak with greatest absolute magnitude is repositioned at the start of the history data. When this is done the with the four-point algorithm, the middle segment will always be shorter than the first segment. This allows the algorithm to be reduced to a serial three-point algorithm. Additional sophistication is need to detect half-cycles, which not all three-point algorithms include.
The four-point algorithms are designed for real-time applications. The circular shift in three-point algorithms requires all of the data to be collected prior to identifying the loops.
The recursive three-point and four-point algorithms process all of the segment length comparisons as a batch prior to loop identification to obtain faster processing. Occasional output differences when compared the serial algorithms are possible.
References:
Standard practices for cycle counting in fatigue analysis. ASTM E 1049-85. ASTM International. 2005.
Equivalence of four-point and three-point rainflow cycle counting algorithms. C.H. McInnes and P.A. Meehan. International Journal of Fatigue 30 (2008) 547–559.
Simple rainflow counting algorithms. S. D. Downing and D. F. Socie. International Journal of Fatigue 4 (1982) 31-40.