The application of three-point method and four-point method to the MATLAB realization of rain flow counting method

Source: Internet
Author: User
Tags abs terminates
Introduction

The rain flow counting method was introduced in the 1950s by the British two engineers M.matsuishi and T.endo. The main function of this method is to simplify the measured load process into several load cycles, which is used for estimating fatigue life and compiling fatigue test load spectrum. Based on the two-parameter method, the dynamic strength (amplitude) and static strength (mean) of two variables are considered, which conform to the inherent characteristics of the fatigue load. The rain flow counting method is mainly used in engineering field, especially in the calculation of fatigue life, using very extensive counting rules .

(1) The rain flow in turn from the peak position of the load time journey down the slope downward, (2) The rain flow from a peak point, when encountering a greater peak than its starting peak to stop the flow, (3) The rain flow encountered above the flow of rain, must stop the flow, (4) Take out all the full cycle, Note the amplitude of each loop;

(5) The time history of the divergent convergent load after the first stage count is equivalent to a convergent divergent load time history, and the second stage of the rain flow count. The total count cycle equals the sum of the count cycles of two count stages. Example of calculation

In Figure 1, the rain Flow method starts at 1 o'clock and the point is considered to be the minimum value. Rain flow to 2 points, vertical drop to 3 and 4 points between the amplitude of the 2ˊ point, and then flow to 4 points, and finally stop at 1 points more negative than the value of 5 of the corresponding place. Draw a half cycle from 1 to 4. The next rain stream starts at the peak of 2 o'clock and flows through 3 points, stopping at the opposite of 4 points, since 4 points are the maximum value corrected at 2 points than the beginning, resulting in a half loop of 2-3. The third flow starts at 3 o'clock, because it encounters a rain stream falling from 2 points, so it terminates at the 2ˊ point, resulting in a semi-cyclic 3-2ˊ. Thus, 3-2 and 2-3 form a closed stress-strain loop, which is paired with a complete cyclic 2′-3-2. The next rain stream starts at peak 4, flows through 5 points, drops vertically below the 5ˊ point between 6 and 7, continues down the stream, and drops vertically from 7 to the opposite of the peak 10, because 10 points have a corrected maximum value than 4 points. The half loop 4-5-7 is obtained. The fifth flow starts at 5 o'clock, flows to 6 points, drops vertically, and ends at 7 points, since 7 points have a more negative minimum value than 5 points. Remove the half loop 5-6. The sixth flow starts at 6 o'clock, since it encounters a raindrop dropped by 5 points, so the flow to the 5ˊ point terminates. The half cycle 6-5 and 5-6 are paired with a fully cyclic 5ˊ-6-5, removing the 5ˊ-6-5. The seventh flow starts at 7 o'clock, passes through 8 points, drops to the 8ˊ point on the 9-10 line, then to the last peak 10, takes out the half cycle 7-8-10. The eighth flow starts at 8 o'clock and drops to the opposite end of the 10 point at 9, since 10 points have a corrected maximum value than 8 points. Remove the half loop 8-9. The last flow starts at 9 o'clock and ends at the 8ˊ point because it encounters a rain stream that drops from 8 points. Remove the half-cycle 9-8ˊ. The two half cycles 8-9 and 9-8ˊ are paired to form a complete cyclic 8-9-8ˊ. Thus, the strain-time record shown in Figure 1 includes three full-cycle 8-9-8ˊ,2-3-2ˊ,5-6-5ˊ and three half-cycle 1-2-4,4-5-7,7-8-10. Figure 1 shows that the strain obtained by the rain flow method is consistent with the stress-strain characteristics of the material. As seen in Figure 1, there are three complete loops, which correspond to the closed loops shown in Figure 2 with three shaded lines.



realization of MATLAB by three-point method

CLEAR;CLC c=xlsread (' Load_f ');%%%%%%%%% here to modify the loaded file name, data format has been able to correctly calculate%%% b=c;
A=c;
Q=length (A);
% three-point cyclic counting method; Partial reference SAE ASTM standard percent step a% of the load time course processing so that it contains only the peak Gu Feng Valley alternately appear m=q;
For i=2:1:m-1     if A (i-1) <a (i) &&a (i) <a (i+1)         B (i) =nan;
    ElseIf A (i-1) >a (i) &&a (i) >a (i+1)         B (i) =nan;
    End End B (isNaN (B)) =[];
Percent step two%% of the load time process reengineering, so that from the maximum (small) value to be disassembled, before and after stitching, so that the maximum value from the beginning of the end [A,b]=max (b);
N=length (B);
B1=b (B:N);
B2=b (1:B); B=[B1;
B2];
The percent step is three% of the percentage and then only the crest trough, prevent the splicing place unreasonable data a=b;m=length (B);
For i=2:1:m-1     if A (i-1) <a (i) &&a (i) <a (i+1)         B (i) =nan;
    ElseIf A (i-1) >a (i) &&a (i) >a (i+1)         B (i) =nan;
    End End B (isNaN (b)) =[];n=length (b); %%%%%%%%%%%%%%%%%%%%%%%%  b for the post-retrofit load time history   N for the number of peaks and troughs in B four%% rain flow count factor   1 amplitude F 2 mean j  open no brain cycle mode f=[];
J=[];D =b;
While length (b) >=1     N=length (b);    If n==1         break     ElseIf n>1         for j=1:n-2   &NBSP ;
        S1=abs B (j+1)-B (j));
            S2=abs (B (j+1)-B (j+2));
            e3= (B (j) +b (j+1))/2;
            If S1&LT;=S2                 F=[F;S1];
                J=[J;E3];
                B (j) =[];
                B (j) =[];
                n=length (B);
                break;
            else                 continue; 
            end         end     End     Continue end Percent step five%% picture imageThree-dimensional hist three-dimensional image x=[j,f];
FIGURE;HIST3 (x,[30 30]);
Xlabel (' mean value ');
Title (' Rain Flow counting Method-three-point cyclic counting Operation Logic ');
Ylabel (' amplitude value ');
Zlabel (' Number of cycles '); The percent test shows that the% load_ftest operation is consistent with the hand calculation, the amplitude F of the calculated result with other languages, the mean value J has been, the other data also proves that the problem that can be correctly run%%%% the splicing data may be lost after stitching, unknown whether the results will be biased%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright Reprint please indicate the original source URL%

Out of the result diagram, reference


realization of four-point method

CLEAR;CLC
c=xlsread (' load_f1 ');%%%%%%%%% here to modify the loaded file name, data format has been able to correctly calculate%%%
b=c; A=c;
Q=length (A);
% four-point cyclic counting method
a
percentage of a percent of the process of load time is processed so that it contains only the peak Gu Feng Valley alternating occurrence
m=q;
For i=2:1:m-1
    if A (i-1) <a (i) &&a (i) <a (i+1)
        B (i) =nan;
    ElseIf A (i-1) >a (i) &&a (i) >a (i+1)
        B (i) =nan;
    End
End
B (isNaN (b)) =[];n=length (b);
Percent step two percent
f=[]; J=[];D =b;
While Fun (B) ==1| | Fun (b) ==0
 if fun (b) ==1 for
    j=1:n-4
    s1=abs (b (j+1) b (j+2));
    S0=abs B (j+3)-B (j));
    E3= (B (j+2) +b (j+1))/2;
        If S1<=s0
            f=[f;s1];
            J=[J;E3];
            B (j+1) =[];
            B (j+1) =[];
            N=length (B);
            Break
        Else
            continue
        end
    End
 ElseIf Fun (B) ==0
     break
 end
 Continue
End
percent step three% of the picture image three-dimensional hist three-dimensional
image
X=[j,f];
Figure;hist3 (x,[30);
Xlabel (' mean value ');
Title (' Rain Flow counting Method-four-point cyclic counting Operation Logic ');
Ylabel (' amplitude value ');
Zlabel (' Number of cycles ');

Out of the result diagram


The code of the fun function which is applied

function Re=fun (b)
n=length (b); re=0;
For j=1:n-4
    s1=abs (B (j+1) b (j+2));
    S0=abs B (j+3)-B (j));
    If S1<=s0
        re=1;
        Break
    else
        re=0;
        Continue
    End
End

The above is all the code, the following provides the download address of the source file, including three functions, some test data, a word version of the hand results and the results of the two calculations in a simple case of comparison. The download URL is https://download.csdn.net/download/u011391128/10286545, or can be found in my own upload file. to 2 C-coins, I do not know what this is, choose not 0 on the choice of 2.


I hope to communicate with you in the industry how to improve, if someone can add a GUI interface, thank you very much, I am not familiar with the GUI, but you have to put my source note ah. Finally, if you are a student of Ronche teacher, say hello to him for me, by the way this problem will no longer become a topic.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.