Clear Filters
Clear Filters

determining the number of range to obtain the number of cycles using rainflow counting

10 views (last 30 days)
I was wondering if anyone could help me on how to get the number of cycles for the indicated number of stress ranges using the Rainflow count. Using the matlab rainflow function I get the range of stresses for 1 or 0.5 load cycles. I would like the function to give me the stress for a number of load cycles of e.g. 4 as shown in the picture.
Any help would be appreciated.
Thank you

Answers (1)

Kartik Saxena
Kartik Saxena on 16 Jan 2024
Hi,
If you want to get the stress ranges associated with a specific number of load cycles, such as 4 cycles, you can sum the counts from the 'rainflow' output until they add up to the desired number of cycles.
Here's an example of how you can use the 'rainflow' function and then filter the results to get the stress ranges for a specific number of load cycles:
% Perform rainflow counting
[rf_counts, rf_ranges, rf_means] = rainflow(data);
% Initialize the sum of cycles and an empty array to store stress ranges
sum_cycles = 0;
target_stress_ranges = [];
% Loop through the counts and add up the cycles
for i = 1:length(rf_counts)
sum_cycles = sum_cycles + rf_counts(i);
target_stress_ranges(end+1) = rf_ranges(i);
if sum_cycles >= target_cycles
break;
end
end
For more information on the 'rainflow' function, you can refer to the following MathWorks documentation: https://www.mathworks.com/help/signal/ref/rainflow.html
I hope this resolves your issue.

Categories

Find more on Vibration Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!