[0073] Example 1:
[0074] refer to figure 1 shown, figure 1 A schematic diagram of steps of a spectrum-based bearing wear early warning method provided by the present invention. like figure 1 As shown, this embodiment discloses a specific implementation of a spectrum-based bearing wear early warning method (hereinafter referred to as "method").
[0075] The vibration caused by the bearing is called bearing tone, all rolling bearings produce a certain degree of tone, the more serious the bearing wear, the higher the degree of bearing tone. Therefore, the remaining vibration signal obtained by removing the low-frequency vibration component can be used to judge the degree of bearing wear.
[0076] Specifically, the method disclosed in this embodiment mainly includes the following steps:
[0077] refer to figure 2 , and perform step S1 : use the sensor to obtain the raw data of the vibration of the device, process the raw data, and convert the processed raw data into a first spectrogram.
[0078] Wherein, step S1 specifically includes the following content:
[0079] Step S11: use the sensor to obtain time series data of the vibration of the device;
[0080] Step S12: Fourier transform is performed on the time series data, and the time series data is converted into frequency domain data;
[0081] Step S13: using a high-pass filter to filter the low-frequency data in the frequency-domain data to obtain high-frequency data;
[0082] Step S14: Convert the high frequency data into the first spectrogram.
[0083] Then, step S2 is performed: setting a step size, and performing a sliding window on the first spectrogram according to the step size according to the time sequence, to obtain several first spectrogram segments.
[0084] Step S3 is performed: according to the original data, the first language spectrum picture segment is labeled, if there is a failure, the label is 1, if there is no failure, the label is 0, and the first language spectrum picture that is labeled will be labeled. segments as training samples.
[0085] refer to image 3 , and perform step S4: use tripletloss as the loss function and resnet50 as the feature extraction network, and train the feature extraction network to obtain reference features.
[0086] Specifically, the input is a triple where,
[0087] a: anchor normal data;
[0088] p: positive, which is a sample of the same category as a;
[0089] n: negative, and a are samples of different categories.
[0090] The formula is:
[0091] L=max(d(a,p)-d(a,n)+margin)
[0092] So the final optimization goal is to shorten the distance between a and p, and shorten the distance between a and n.
[0093] Wherein, step S4 specifically includes the following content:
[0094] Step S41 : P and N pairs are formed between the first spectrogram segments, and negative: positive is set from 1:1 to 1:4.
[0095] refer to Figure 4 , step S41 specifically includes:
[0096] Step S411: adjusting the size of the first grammatical picture segment to an appropriate size;
[0097] Step S412: Disorganize the sequence of the first grammatical picture segments, and select one of the first grammatical picture segments of the same or different categories in random order to form the first grammatical picture segment. P, N pair;
[0098] Step S413: Initial negative: positive=1:1, multiply by 1.01 after each epoch until negative:positive=1:4.
[0099] Step S42: Train the feature extraction network by weighting the losses respectively, and obtain reference features based on the trained feature extraction network.
[0100] refer to Figure 5 , step S42 specifically includes:
[0101] Step S421: Calculate and weight the gradients of the three losses respectively;
[0102] Among them, initial learning rate: start 0.001 last 5% epoch 0.0001. The gradients of the three losses are calculated and weighted respectively. Among them, the verification loss has a weight of 1, and the other two identifcation losses are 0.5.
[0103] Step S422: Remove the softmax layer from the trained feature extraction network, and use the output of the fully connected layer as the extracted feature. The fully connected layer has 512 nodes, corresponding to 512 dimensions of the output vibration feature.
[0104] Step S423: Calculate the mean value of the features of the normal data in the test set to obtain the reference feature. The datum feature is a 512-dimensional vector.
[0105] Then step S5 is performed: the test data is processed into a second spectrogram according to the step S1, and the second spectrogram is cut according to the step size to obtain a second spectrogram segment, and the trained spectrogram is used. The feature extraction network takes the second spectrogram segment as an input, and obtains vibration features within the time period. Among them, the vibration feature is a 512-dimensional vector.
[0106]Finally, perform step S6: calculate the Euclidean distance between the vibration feature and the reference feature of each period of time, if the Euclidean distance is less than the warning value, it is a normal vibration; if the Euclidean distance is greater than the fault value, then it is a fault; If the Euclidean distance is greater than the warning value and less than the fault value, a warning is given.
[0107] Below, please refer to Figure 6-9 , the specific application process of this method is as follows:
[0108] 1. Use the sensor to obtain the vibration data of the equipment, refer to the data map Image 6.
[0109] 2. Perform Fourier transform on the data to convert the time series data into the frequency domain, such as Figure 7 shown.
[0110] 3. Use a high-pass filter to filter the low-frequency (below 500Hz) data, and the obtained high-frequency data is used for fault warning, such as Figure 8 shown.
[0111] 4. Convert the filtered data into spectrogram, such as Figure 9 shown.
[0112] 5. Taking 0.5 seconds as a step, sliding the window on the spectrogram according to the time sequence, and obtaining n spectrogram segments with a length of 0.5 seconds. And label these segments according to the original data, with a faulty label of 1, and no faulty label of 0. These data serve as training samples.
[0113] 6. Training methods
[0114] This method uses triplet loss as the loss function and resnet50 as the feature extraction network.
[0115] The input is a triple
[0116] a: anchor normal data
[0117] p: positive, a sample of the same category as a
[0118] n: negative, and a are samples of different categories
[0119] The formula is:
[0120] L=max(d(a,p)-d(a,n)+margin)
[0121] So the final optimization goal is to shorten the distance between a and p, and shorten the distance between a and n.
[0122] 1) Data preprocessing:
[0123] Adjust the cut spectrum image segment to 256*256 size;
[0124] The dataset is shuffled, using a random order of pictures, and then choosing a picture from the same or different categories to form P, N pairs with it;
[0125] Initial negative: positive=1:1, multiplied by 1.01 after each epoch until 1:4 to prevent overfitting.
[0126] 2) Training:
[0127] Initial learning rate: start 0.001 last 5% epoch 0.0001;
[0128] The gradients of the three losses are calculated and weighted respectively, the verification loss weight is 1, and the other two identification losses are 0.5;
[0129] Extracting spectrogram segment features is used to represent the vibration information in this time period. After training, we can obtain a feature extraction network, remove the last softmax layer, and use the output of the penultimate fully connected layer as the extracted feature. This layer has 512 nodes, corresponding to 512 dimensions of the output vibration feature.
[0130] 7. Determine whether the vibration is abnormal according to the threshold
[0131] Calculate the mean of the normal data features in the test set, and get a 512-dimensional vector as the benchmark feature.
[0132] Process the test data into a spectrogram (repeat steps 1-4), and use the model trained in step 6, with every 0.5-second segment as input, to obtain vibration features (512-dimensional vector) within that time period.
[0133] Calculate the Euclidean distance d between the feature and the reference feature for each period of time. According to the test, when the distance d<0.7 is normal vibration, when d>0.9 is a fault, and when 0.7