Gearbox fault diagnosis model training method, diagnosis method and device
Patent Information
- Application Number
- CN202310339485.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-03-31
AI Technical Summary
但是,齿轮箱的异常数据较难获得,且主要为齿轮箱齿轮断齿故障数据,其他故障类数据(如点蚀、啮合磨损等)占比较少,用传统机器学习的方法易造成误判、漏判
[0047]通过本申请提供的上述方法,利用元学习及步骤S200中机理特征提取的方式,解决了小样本及样本不平衡的问题,经训练的第一神经网络具有很好的泛化能力,使得针对不同的目标任务,仅使用少量标记样本就可以快速训练出有效的故障诊断模型。并且,在步骤S400中,孪生网络采用两个输入,使用与嵌入相同的权重对其进行编码,解释嵌入的差异,并输出两个输入属于同一类的概率。孪生网络双头对比输入可以增强数据鲁棒性,提高故障诊断模型的泛化能力。
Smart Images

Figure CN116629314B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fault diagnosis technology, and in particular to a gearbox fault diagnosis model training method, diagnosis method, device and electronic equipment. Background Technology
[0002] Gearboxes are crucial for the normal operation of mechanical equipment. However, early wear signals in gearboxes often occur at high frequencies and are easily drowned out by high-frequency noise, resulting in a low signal-to-noise ratio. Therefore, early wear and pitting faults in gearboxes are difficult to detect and thus difficult to provide early warnings. Furthermore, in actual industrial scenarios, due to high levels of noise and equipment complexity, when gearbox faults are detected, it is difficult to differentiate between various gearbox faults (such as pitting, meshing failure, and broken teeth) using diagnostic rules.
[0003] Currently, there are two methods for detecting mechanical vibration in gearboxes: one is to use traditional offline manual analysis of the spectrum based on fault mechanisms and expert experience; the other is to train a model through supervised learning methods to achieve automatic judgment.
[0004] The first drawback is that it cannot meet the requirements of real-time detection and makes it difficult to provide predictive maintenance and analysis services in a timely manner.
[0005] The second method requires a high-quality fault dataset, necessitating a large and evenly distributed dataset to effectively train a model with high accuracy and strong generalization ability. However, abnormal data for gearboxes is difficult to obtain, primarily consisting of gear tooth breakage faults, with other fault types (such as pitting and meshing wear) accounting for a smaller proportion. Using traditional machine learning methods can easily lead to misjudgments and missed detections. Therefore, the second method is difficult to rapidly and effectively promote in practice. Summary of the Invention
[0006] To address the aforementioned technical problems, embodiments of this application provide a gearbox fault diagnosis model training method, a diagnostic method, an apparatus, an electronic device, and a storage medium. This gearbox fault diagnosis model training method can solve the aforementioned technical problems.
[0007] Firstly, this application provides a method for training a gearbox fault diagnosis model, the training method comprising:
[0008] S100, acquire the vibration signal dataset of the gearbox;
[0009] S200, a portion of the data in the vibration signal dataset is used as a training set, and the remaining data in the vibration signal dataset is used as a test set. A first set of feature values characterizing the complexity and abrupt change of the vibration signal is calculated and obtained based on the training set, and a second set of feature values characterizing the abrupt change is calculated and obtained based on the test set.
[0010] S300, based on the first feature set, and trained and obtained a first neural network through a meta-learning method;
[0011] S400, the first neural network is used as two branches of the twin neural network, and the twin neural network is trained based on the first feature set and the second feature set to obtain the fault diagnosis model.
[0012] Optionally, step S100 includes:
[0013] S101: Obtain the set of preprocessed vibration signals;
[0014] S102: Perform time-domain synchronous averaging on the preprocessed vibration signal set to obtain a first signal dataset;
[0015] S103: Based on the first signal dataset, perform corner domain resampling using an interpolation algorithm to obtain the second signal dataset;
[0016] S104: Superimpose the first signal dataset and the second signal dataset, and perform a fast Fourier transform to obtain the order spectrum;
[0017] S105: Based on the order spectrum, extract clear order signals and gearbox sideband signals to obtain the vibration signal dataset.
[0018] Optionally, the first feature set includes a first time-domain feature set and a first frequency-domain feature set; the second feature set includes a second time-domain feature set and a second frequency-domain feature set.
[0019] Optionally, training and obtaining the first neural network through the meta-learning method includes: performing inner and outer two-layer loop training through meta-knowledge learning and learning of various tasks to obtain the first neural network.
[0020] Optionally, obtaining the first neural network through two-layer iterative training—inner and outer layers—by learning meta-knowledge and learning each task includes:
[0021] S301: Initialize network weights;
[0022] S302: Generate a training task set that includes multiple meta-tasks;
[0023] S303: Randomly select multiple batches of training tasks from the training task set;
[0024] S304: Update network weights based on each batch of training tasks.
[0025] Optionally, S304 includes:
[0026] S3041 is: randomly select a support set D containing K data points and a query set Q containing M data points from a meta-task;
[0027] S3042: Using the cross-entropy loss function or the mean squared error loss function, compute the loss function value and the gradient T1 of the loss function pair on the support set D of the meta-task;
[0028] S3043: On this meta-task, the inner layer weights are updated using a single gradient descent based on the backpropagation algorithm, with an update step size of gradient T1.
[0029] S3044: Using the cross-entropy loss function or the mean squared error loss function, compute the loss function value and the gradient T2 of the loss function pair on the test set Q of this meta-task;
[0030] S3045: After all meta-tasks in a batch have executed steps S3041 to S3044, the gradients T2 in that batch are summed and averaged to obtain the average gradient T3.
[0031] S3046: Use the gradient mean T3 as the update step size to update the outer network weights and complete one batch of training.
[0032] Optionally, training the Siamese neural network based on the first feature value set and the second feature value set includes: S401: concatenating the first feature value set and the pooling layer feature values of the first neural network to obtain a third feature value set;
[0033] S402: Input the feature values in the second feature value set and the third feature value set into the two branches of the Siamese neural network respectively to obtain the first feature vector and the second feature vector;
[0034] S403: Calculate the loss function value L based on the first feature vector and the second feature vector.
[0035] Secondly, this application provides a gearbox fault diagnosis method, including:
[0036] S501, acquire the vibration signal dataset of the gearbox;
[0037] S502, Calculate and obtain a set of feature values characterizing the complexity and abrupt change of the vibration signal based on the vibration signal dataset;
[0038] S503, obtain the pooling layer feature value set of the first neural network based on the feature value set;
[0039] S504, the feature value set and the pooling layer feature value set are concatenated and input into the fault diagnosis model as described in any one of claims 1-7 to obtain the gearbox fault diagnosis result.
[0040] Thirdly, this application provides an apparatus for training a gearbox fault diagnosis model, the apparatus being used to train and obtain the aforementioned gearbox fault diagnosis model, the apparatus comprising:
[0041] The signal acquisition module is used to acquire the vibration signal dataset of the gearbox;
[0042] The feature calculation module is used to calculate feature values that characterize the complexity and abrupt change of the vibration signal based on the vibration signal dataset;
[0043] A network training module is used to train and obtain a first neural network based on the first feature set;
[0044] The model generation module uses the first neural network as two branches of the twin neural network, and trains the twin neural network based on the first feature set and the second feature set to obtain the diagnostic model.
[0045] Fourthly, this application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the steps of the gearbox fault diagnosis model training method and / or the gearbox fault diagnosis method described above.
[0046] Fifthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the gearbox fault diagnosis model training method and / or the gearbox fault diagnosis method described above.
[0047] The method provided in this application, utilizing meta-learning and the mechanistic feature extraction in step S200, solves the problems of small sample size and sample imbalance. The trained first neural network exhibits excellent generalization ability, enabling the rapid training of an effective fault diagnosis model using only a small number of labeled samples for different target tasks. Furthermore, in step S400, the Siamese network uses two inputs, encodes them with the same weights as the embeddings, interprets the differences in the embeddings, and outputs the probability that the two inputs belong to the same class. The dual-head comparison of the Siamese network's inputs enhances data robustness and improves the generalization ability of the fault diagnosis model. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating an example of a gearbox fault diagnosis model training method provided in this application embodiment;
[0049] Figure 2 This is a flowchart illustrating another example of a gearbox fault diagnosis model training method provided in this application embodiment;
[0050] Figure 3 This is a flowchart illustrating another example of a gearbox fault diagnosis model training method provided in this application embodiment;
[0051] Figure 4 This is a flowchart illustrating another example of a gearbox fault diagnosis model training method provided in this application embodiment;
[0052] Figure 5 This is a flowchart illustrating another example of a gearbox fault diagnosis model training method provided in this application embodiment;
[0053] Figure 6 This is a flowchart illustrating another example of a gearbox fault diagnosis model training method provided in this application embodiment;
[0054] Figure 7 This is a flowchart of another example of a gearbox fault diagnosis model training method provided in the embodiments of this application.
[0055] List of reference numerals in the attached diagram:
[0056] S100: Acquire the vibration signal dataset of the gearbox;
[0057] S200: Use a portion of the data in the vibration signal dataset as a training set and the remaining data in the vibration signal dataset as a test set. Calculate and obtain a first set of feature values characterizing the complexity and abrupt change of the vibration signal based on the training set, and calculate and obtain a second set of feature values characterizing the abrupt change based on the test set.
[0058] S300: Based on the first feature set, a first neural network is trained and obtained through a meta-learning method;
[0059] S400: Using the first neural network as two branches of the twin neural network, the twin neural network is trained based on the first feature set and the second feature set to obtain the fault diagnosis model;
[0060] S301: Initialize network weights; S302: Generate a training task set including multiple meta-tasks;
[0061] S303: Randomly select multiple batches of training tasks from the training task set;
[0062] S304: Update network weights based on each batch of training tasks.
[0063] S3041: Randomly select a support set D consisting of K data points and a query set Q consisting of M data points from a meta-task;
[0064] S3042: Using the cross-entropy loss function or the mean squared error loss function, compute the loss function value and the gradient T1 of the loss function pair on the support set D of the meta-task;
[0065] S3043: On this meta-task, the inner network weights are updated using a single gradient descent based on the backpropagation algorithm, with the update step size being the gradient T1.
[0066] S3044: Using the cross-entropy loss function or the mean squared error loss function, compute the loss function value and the gradient T2 of the loss function pair on the test set Q of this meta-task;
[0067] S3045: After all meta-tasks in a batch have executed steps S3041 to S3044, the gradients T2 in the batch are summed and averaged to obtain the average gradient T3.
[0068] S3046: Use the average gradient T3 as the update step size to update the weights of the outer network and complete one batch of training.
[0069] S401: Concatenate the first feature value set and the pooling layer feature values of the first neural network to obtain a third feature value set;
[0070] S402: Input the feature values in the second feature value set and the third feature value set into the two branches of the Siamese neural network respectively to obtain the first feature vector and the second feature vector;
[0071] S403: Calculate the loss function value L based on the first feature vector and the second feature vector;
[0072] S501: Obtain the vibration signal dataset of the gearbox;
[0073] S502: Calculate and obtain a set of feature values characterizing the complexity and abrupt change of the vibration signal based on the vibration signal dataset;
[0074] S503: Obtain the pooling layer feature value set of the first neural network based on the feature value set;
[0075] S504: Concatenate the feature value set and the pooling layer feature value set, and input them into the above fault diagnosis model to obtain the gearbox fault diagnosis result;
[0076] 601: Signal acquisition module; 602: Feature calculation module; 603: Network training module; 604: Model generation module. Detailed Implementation
[0077] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0078] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0079] To facilitate the detection of gearbox faults, this application provides a gearbox fault diagnosis model training method. The fault diagnosis model obtained by this method can detect gearbox faults in real time with relatively high accuracy.
[0080] refer to Figure 1 The training method includes:
[0081] Step S100: Obtain the vibration signal dataset of the gearbox.
[0082] Step S200: Use a portion of the data in the vibration signal dataset as a training set and the remaining data in the vibration signal dataset as a test set. Calculate and obtain a first set of feature values characterizing the complexity and abrupt change of the vibration signal based on the training set, and calculate and obtain a second set of feature values characterizing the abrupt change based on the test set.
[0083] Step S300: Based on the first feature value, a first neural network is trained and obtained through a set of meta-learning methods;
[0084] Step S400: Using the first neural network as two branches of the twin neural network, the twin neural network is trained based on the first feature set and the second feature set to obtain the fault diagnosis model.
[0085] Based on the above training method, the problems of small sample size and sample imbalance are solved by utilizing meta-learning and the mechanistic feature extraction in step S200. The trained first neural network has excellent generalization ability, enabling the rapid training of an effective fault diagnosis model using only a small number of labeled samples for different target tasks. Furthermore, in step S400, the Siamese network uses two inputs, encodes them with the same weights as the embeddings, interprets the differences in the embeddings, and outputs the probability that the two inputs belong to the same class. The dual-head comparison of inputs in the Siamese network enhances data robustness and improves the generalization ability of the fault diagnosis model.
[0086] Among them, reference Figure 2 Step S100 includes:
[0087] Step S101: Obtain the set of preprocessed vibration signals.
[0088] Specifically, vibration sensors can be installed to acquire the initial vibration signal of the gearbox, which is a time-domain signal. However, due to the complex internal structure of the gearbox, the acquired initial vibration signal set may contain noise interference. In practical applications, noise interference needs to be removed to improve the signal-to-noise ratio before fault analysis can be performed based on the initial vibration signal. Therefore, the initial vibration signal set can be preprocessed to obtain a preprocessed vibration signal set. Preprocessing methods can include anti-aliasing filtering and low-frequency filtering. The preprocessed vibration signal makes it easier to pick up abnormal features during subsequent mechanism feature extraction. Using this acquisition method, the initial vibration signal can be acquired online in real time, reducing reliance on manual intervention.
[0089] Step S102: Perform time-domain synchronous averaging on the preprocessed vibration signal set to obtain the first signal dataset.
[0090] Time-domain synchronous averaging (TSA) is an analytical method for extracting periodic signals from signals mixed with noise interference; it is also known as coherent detection. TSA can be understood as follows: assuming the amplitude of the dominant frequency signal at a certain measurement node remains constant over time, while the amplitude of the noise signal fluctuates, the signals collected by the sensors at that measurement node are averaged. The amplitude of the dominant frequency signal (such as the small gear passing frequency, large gear passing frequency, or 1st meshing frequency of a gearbox) remains constant, while the amplitude of the noise signal decreases due to neutralization, thus amplifying the dominant signal. In simple terms, TSA averages vibration signals of the same phase.
[0091] Time-domain synchronous averaging can be used for gear fault diagnosis. The method is roughly as follows: vibration signals are sampled using the gear rotation period T as the sampling period. The collected N vibration signals are then linearly averaged. The gear rotation frequency, meshing frequency, and the amplitude of their harmonics remain essentially constant, while the aperiodic components fluctuate. Averaging gradually eliminates the aperiodic components, reducing interference to an acceptable level. This allows the retention of primarily the periodic components related to gear faults, reducing interference from non-gear rotation periodic components and noise, and improving the signal-to-noise ratio. After time-domain averaging, more obvious faults can be reflected in the time-domain waveform.
[0092] Since the preprocessed vibration signal set still has a high signal-to-noise ratio after preprocessing, the time-domain synchronous averaging technique can be used to process the preprocessed vibration signal set to achieve further noise reduction.
[0093] Clearly, the key to time-domain synchronous averaging lies in sampling the vibration signal and ensuring that the measurement nodes of each sampled signal correspond, thus enabling subsequent superposition and averaging operations. There are two methods for sampling the vibration signal. The first is to record a speed synchronization pulse signal while measuring the gearbox vibration acceleration. When performing time-domain averaging, this pulse signal is used to trigger the A / D converter, ensuring that the signal is truncated according to the gear shaft's rotation cycle, and that the starting point of each sample corresponds to a specific rotation angle of the shaft. The second method is based on signal truncation processing technology using the speed signal. Its principle is to consider that the signal is stable and the sampling frequency is constant. Therefore, the time for one rotation of the equipment is fixed, and the number of signal points within one rotation is also the same, i.e., N = 1 / w*fs is a constant, where w is the equipment rotation frequency (Hz) and fs is the signal sampling frequency.
[0094] The first method has high hardware requirements. This application can use the second method to sample vibration signals. However, gearboxes often operate under variable speed conditions with uneven rotational speeds. This can result in the gearbox's rotation period not being an integer multiple of the sampling period. In such cases, the vibration signals acquired using the second method will have different phases. Superimposing these signals using time-domain synchronous averaging will actually weaken the dominant frequency signal. In other words, the equally timed signals sampled using time-domain synchronous averaging are not stationary vibration signals. Using these non-stationary vibration signals for fault analysis will lead to omissions and inaccurate fault analysis.
[0095] To address this issue, step S103 can be performed: angular domain resampling is performed based on the first signal dataset using an interpolation algorithm to obtain the second signal dataset.
[0096] That is, firstly, the transient signal of gearbox acceleration and deceleration is synchronously sampled in the time domain, then the time domain signal is resampled at equal angles to convert it into a stationary signal in the angular domain, and then the angular domain signal is averaged in the angular domain to eliminate the influence of interference noise.
[0097] Then, step S104 can be performed: superimpose the first signal dataset and the second signal dataset, and perform a fast Fourier transform (FFT) to obtain the order spectrum based on instantaneous frequency estimation that reflects the fault characteristics of the gearbox.
[0098] Finally, proceed to step S105: extract clear order signals and gearbox sideband signals based on the order spectrum to obtain a vibration signal dataset. At this point, the signal data in the vibration signal dataset has a balanced discrete distribution, which is beneficial for accurate fault analysis.
[0099] By using wavelet transform to extract and reconstruct the signal in step S100, the optimal signal can be found, which is beneficial for capturing the most effective features in subsequent steps and for training an accurate fault diagnosis model, so that the fault can be accurately located and analyzed when using the fault diagnosis model.
[0100] Next, features need to be extracted from the vibration signal dataset, that is, step S200 is continued: a portion of the data in the vibration signal dataset is used as a training set, and the remaining data in the vibration signal dataset is used as a test set. A first set of feature values characterizing the complexity and abrupt change of the vibration signal is calculated and obtained based on the training set, and a second set of feature values characterizing the complexity and abrupt change of the vibration signal is calculated and obtained based on the test set.
[0101] The first eigenvalue set includes a first time-domain eigenvalue set and a first frequency-domain eigenvalue set. All vibration signals in the test set are calculated to obtain their respective first time-domain eigenvalues and first frequency-domain eigenvalues.
[0102] The first time-domain eigenvalues may include: the mean P1 representing the signal energy; the standard deviation P2 representing the dispersion of the signal energy; the root mean square amplitude P3 representing the signal vibration amplitude and energy transformation; the root mean square P4 representing the effective value of the signal; the peak-to-peak value P5 representing the maximum free wave within a periodic signal; the skewness P6 representing the degree of energy transformation of the waveform; the kurtosis factor P7 representing the smoothness of the waveform; the peak factor P8 representing the extreme degree of the signal peak in the waveform; the margin factor P9 representing the distribution of cyclic impulses in the signal; and the impulse factor P1 representing the distribution of cyclic impulse information in the signal. 10 The waveform factor P characterizes the amplitude distribution of a signal. 11 .
[0103] The corresponding calculation formulas (1) to (11) for the eleven first time-domain eigenvalues are as follows:
[0104]
[0105] In formulas (1) to (11),
[0106] N is the total number of sampling points of the signal, n is the subscript from 1 to N, and x(n) refers to the sampling signal sequence of n = 1, 2, ..., N.
[0107] The first frequency domain characteristic value may include: the spectral mean P, which characterizes the energy of the spectral signal. 12 The spectral amplitude variance P, which characterizes the degree of dispersion of spectral amplitude energy, 13 The spectral amplitude skewness value P, which characterizes the degree of distribution of spectral amplitude energy, is... 14 The spectral amplitude kurtosis value P characterizes the distribution of the cyclic impact energy value of a signal. 15 The frequency of the centroid P represents the frequency of the centroid. 16 The average amplitude P of the spectrum, which characterizes the average distribution of the spectrum amplitude energy. 17 The standard deviation P of the frequency distribution, representing the degree of dispersion of the spectral amplitude energy, is... 18 The frequency distribution kurtosis index P, which characterizes the extreme degree of signal peaks in the spectrum, is... 19 Spectral entropy P, which characterizes the extreme degree of signal peak in the spectrum. 20 The square root ratio P, which characterizes the degree of change in the main frequency positions. 21 The frequency distribution skewness value P, which characterizes the degree of variation in the main frequency positions, is... 22 The frequency distribution kurtosis value P, which characterizes the degree of variation in the main frequency positions. 23 The standard deviation frequency P, which characterizes the degree of variation in the location of the main frequency, 24 .
[0108] The corresponding calculation formulas (12) to (24) for the thirteen first frequency domain eigenvalues are as follows:
[0109]
[0110] In formulas (12) to (24),
[0111] K is the number of spectral lines, f k s(k) is the frequency value of the spectral line, and s(k) is the spectral sequence of k = 1, 2, ..., K.
[0112] Similarly, the second eigenvalue set includes a second time-domain eigenvalue set and a second frequency-domain eigenvalue set. All vibration signals in the training set are calculated to obtain their respective second time-domain eigenvalues and second frequency-domain eigenvalues. The second time-domain eigenvalues are the same as the first time-domain eigenvalues, and the second frequency-domain eigenvalues are the same as the second frequency-domain eigenvalues; this will not be elaborated further in this application.
[0113] After obtaining the aforementioned feature values, step S300 can be continued: based on the first feature value set, a first neural network is trained and obtained through a meta-learning method. Through this step, the meta-learning method fully considers the characteristics of different fault data and finds the optimal weights of the first neural network through global optimization, thereby obtaining the optimal fault diagnosis model. When using the fault diagnosis model, it can extract features from multiple different fault datasets, thus enabling accurate and efficient clarification and prediction of alarm signals.
[0114] Training and obtaining the first neural network through meta-learning methods includes: obtaining the first neural network through two-layer loop training, involving meta-knowledge learning and learning of various tasks.
[0115] refer to Figure 3 The first neural network is obtained by learning meta-knowledge and learning various tasks through two-layer loop training, including step S301: initializing network weights.
[0116] The network weights include inner network weights and outer network weights. The outer network weights include the network weights of the meta-learner, the feature extractor, and the task discriminator. The inner network weights include the network weights of the category predictor. Therefore, initializing the network weights includes initializing the network weights of the meta-learner, the feature extractor, the task discriminator, and the category predictor. The meta-learner, feature extractor, and task discriminator are artificial neural networks. Different category predictors have the same network structure as the meta-learner. The feature extractor is configured to map the first time-domain feature value and the first frequency-domain feature value to the feature space. The feature extractor includes two convolutional layers and two pooling layers. After obtaining the trained first neural network, the features of the pooling layers on the feature extractor can be obtained. Each category predictor is configured to predict the fault category it represents based on the mapped first time-domain feature value and the first frequency-domain feature value. The task discriminator is configured to determine which training task the mapped first time-domain feature value and the first frequency-domain feature value come from. The meta-learner is configured to learn network weights from the category predictors of different training tasks to initialize the network weights of the corresponding category predictors.
[0117] Step S302: Generate a training task set that includes multiple meta-tasks. Specifically, the first feature set and the second feature set can be combined to form a task distribution P(T), which is the training task set.
[0118] Step S303: Randomly select multiple batch training tasks from the training task set. Each batch training task may include n meta-tasks, for example, 10 meta-tasks. Each meta-task contains a support set, a query set, and labels. Different meta-tasks within a batch training task have the same labels. Different meta-tasks are provided with different class predictors, and different class predictors correspond to different fault categories.
[0119] Step S304: Update the network weights based on each batch of training tasks. That is, update the outer network weights once after each batch of training tasks is completed.
[0120] For details, please refer to Figure 4 Step S304 includes:
[0121] Step S3041: Randomly select a support set D containing K data points and a query set Q containing M data points from a meta-task;
[0122] Step S3042: Using the cross-entropy loss function or the mean squared error loss function, calculate the loss function value and the gradient T1 of the loss function pair on the support set D of the meta-task. Specifically, calculate the average loss of K data points on the support set D as the loss function value on the support set D, which is also the loss function value of the inner loop.
[0123] Step S3043: On this meta-task, the inner layer weights are updated using gradient descent once based on the backpropagation algorithm, with an update step size of gradient T1.
[0124] Step S3044: Using the cross-entropy loss function or the mean squared error loss function, compute the loss function value and the gradient T2 of the loss function pair on the test set Q of the meta-task. Specifically, calculate the average loss of M data points on the support set D as the loss function value on the test set Q. Average the loss function values on the test set Q in a batch of training tasks to obtain the loss function value of the outer loop, which will be used when updating the outer layer weights.
[0125] Step S3045: After all meta-tasks in a batch have performed steps S3041 to S3044 above, the gradients T2 in that batch are summed and averaged to obtain the average gradient T3.
[0126] Step S3046: Use the gradient mean T3 as the update step size to update the outer network weights and complete one batch of training.
[0127] The outer network weights obtained after each batch of training tasks are used as the initial values of the inner network weights and the outer network weights for the next batch of training tasks. This process is repeated continuously, with both inner and outer layers being updated until the model converges.
[0128] Before executing step S304, the number of update steps for the outer network weights can be set, for example, 1000 steps. After the update steps are completed, the trained first neural network can be obtained, and the features of the pooling layer on the feature extractor can be obtained.
[0129] Here, the execution order of the three steps—updating the network weights of the meta-learner, updating the network weights of the feature extractor, and updating the network weights of the task discriminator—can be parallel or performed in a different order, and this application does not impose any restrictions.
[0130] After obtaining the first neural network, proceed to step S400: use the first neural network as two branches of the Siamese neural network, train the Siamese neural network based on the first feature set and the second feature set, and obtain the diagnostic model. After using the first neural network as two branches of the Siamese neural network, a classifier can be constructed using two fully connected layers, a loss function, and Euclidean distance to classify and identify faults.
[0131] refer to Figure 5 Step S400 includes:
[0132] S401: Concatenate the first feature value set and the pooling layer feature values of the first neural network to obtain a third feature value set;
[0133] S402: Input the feature values in the second feature value set and the third feature value set into the two branches of the Siamese neural network respectively to obtain the first feature vector and the second feature vector;
[0134] Specifically, a feature value can be randomly selected from the second feature value set and a feature value can be randomly selected from the third feature value set each time. The two feature values are then input into the two branches of the Siamese neural network to obtain the first feature vector and the second feature vector.
[0135] S403: Calculate the loss function value L based on the first feature vector and the second feature vector;
[0136] Specifically, step S403 includes the following steps:
[0137] S4031: Subtracting the first eigenvector and the second eigenvector yields a vector representing the Euclidean distance.
[0138] S4032: Input the vector into a fully connected layer to obtain a scalar d. Specifically, in the fully connected layer, an activation function can be used to scale the scalar d to (0,1); the activation function can be the sigmoid function.
[0139] S4033: Input the scalar into the loss function formula to obtain the loss function value L.
[0140] The loss function formula (25) for calculating the loss function value L can be:
[0141]
[0142] In formula (25), N is the total number of samples in a training batch, i is the index from 1 to n, margin = 0.45 (empirical value), d is the scalar calculated in step S4032, and y is the label of whether two samples match. y = 1 means match, and y = 0 means no match. That is, if the two feature values in step S402 come from the same batch of training tasks in step S303, the two feature values have the same label, y = 1; otherwise, y = 1.
[0143] If the two feature values in step S402 correspond to the same fault type, then the loss function value L should be close to 1; conversely, if the two feature values do not correspond to the same fault type, the loss function value L should be close to 0.
[0144] Finally, after all the feature values in the second and third feature value sets have been paired and extracted, and step S403 has been executed, the training is completed, and the fault diagnosis model is obtained.
[0145] Secondly, this application also provides a gearbox fault diagnosis method, such as... Figure 6 The flowchart shown includes diagnostic methods:
[0146] Step S501: Obtain the vibration signal dataset of the gearbox. This step is implemented in the same way as step S100. Please refer to the description of step S100 above. It will not be repeated here.
[0147] Step S502 involves calculating and obtaining a set of feature values characterizing the complexity and abrupt changes of the vibration signal based on the vibration signal dataset. This step is implemented in the same way as step S200, and can be referred to the description of step S200 above; it will not be repeated here. Of course, the set of feature values here refers to the set of all feature values calculated based on the vibration signal dataset in step S501.
[0148] Step S503: Obtain the pooling layer feature value set of the first neural network based on the feature value set;
[0149] Step S504: The feature value set and the pooling layer feature value set are concatenated and input into the above fault diagnosis model to obtain the gearbox fault diagnosis result.
[0150] This gearbox fault diagnosis method eliminates the need to use common sense to find the frequency band of the envelope spectrum and analyze the spectrum through personal experience, as is done in existing technologies. Instead, it can automatically analyze and extract feature values. It can automatically learn relevant features using meta-learning without the need for manual bandpass detection, obtain reliable diagnostic results, and automatically and intelligently recommend fault results.
[0151] Thirdly, this application also provides an apparatus for training a gearbox fault diagnosis model, such as... Figure 7 As shown, the device is used to train the aforementioned gearbox fault diagnosis model, and the device includes:
[0152] The signal acquisition module 601 is used to acquire the vibration signal dataset of the gearbox; for details, please refer to the relevant content of step S100 in the embodiment of the method of the present invention, which will not be repeated here.
[0153] The feature calculation module 602 is used to calculate feature values that characterize the complexity and abrupt change of the vibration signal based on the vibration signal dataset; for details, please refer to the relevant content of step S200 in the embodiment of the method of the present invention, which will not be repeated here.
[0154] The network training module 603 is used to train and obtain a first neural network based on the first feature value set; for details, please refer to the relevant content of step S300 in the embodiment of the method of the present invention, which will not be repeated here.
[0155] The model generation module 604 is used to employ the first neural network as two branches of the twin neural network, and to train the twin neural network based on the first feature value set and the second feature value set to obtain the diagnostic model. For details, please refer to the relevant content of step S400 in the embodiment of the method of this invention, which will not be repeated here.
[0156] Fourthly, this application also provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the steps of the gearbox fault diagnosis model training method and / or the gearbox fault diagnosis method described above.
[0157] Fifthly, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the gearbox fault diagnosis model training method and / or the gearbox fault diagnosis method described above.
[0158] Furthermore, the specific implementation of each step in the program can be found in the corresponding descriptions of the steps and units in the above method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0159] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of the present invention can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.
[0160] The methods described above according to embodiments of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.
[0161] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of the present invention.
[0162] The above embodiments are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present invention, and the patent protection scope of the embodiments of the present invention should be defined by the claims.
Claims
1. A method for training a gearbox fault diagnosis model, characterized in that, The training method includes: S100, acquire the vibration signal dataset of the gearbox; S200, a portion of the data in the vibration signal dataset is used as a training set, and the remaining data in the vibration signal dataset is used as a test set. A first set of feature values characterizing the complexity and abrupt change of the vibration signal is calculated and obtained based on the training set, and a second set of feature values characterizing the abrupt change is calculated and obtained based on the test set. S300, based on the first feature set, and trained and obtained a first neural network through a meta-learning method; S400, using the first neural network as two branches of the twin neural network, the twin neural network is trained based on the first feature set and the second feature set to obtain the fault diagnosis model. The step of training the Siamese neural network based on the first feature set and the second feature set includes: S401, the first feature value set and the pooling layer feature values of the first neural network are concatenated to obtain a third feature value set; S402, input the feature values in the second feature value set and the third feature value set into the two branches of the Siamese neural network respectively to obtain the first feature vector and the second feature vector; S403, calculate the loss function value L based on the first feature vector and the second feature vector.
2. The gearbox fault diagnosis model training method according to claim 1, characterized in that, Step S100 includes: S101, Obtain the set of preprocessed vibration signals; S102, Perform time-domain synchronous averaging on the preprocessed vibration signal set to obtain a first signal dataset; S103, Based on the first signal dataset, perform corner domain resampling using an interpolation algorithm to obtain the second signal dataset; S104, superimpose the first signal dataset and the second signal dataset, and perform a fast Fourier transform to obtain the order spectrum; S105, Based on the order spectrum, extract clear order signals and gearbox sideband signals to obtain the vibration signal dataset.
3. The gearbox fault diagnosis model training method according to claim 1, characterized in that, The first eigenvalue set includes a first time-domain eigenvalue set and a first frequency-domain eigenvalue set; the second eigenvalue set includes a second time-domain eigenvalue set and a second frequency-domain eigenvalue set.
4. The gearbox fault diagnosis model training method according to claim 1, characterized in that, The process of training and obtaining the first neural network through meta-learning methods includes: obtaining the first neural network by performing inner and outer two-layer iterative training through meta-knowledge learning and learning of various tasks.
5. The gear fault diagnosis model training method according to claim 4, characterized in that, The method of obtaining the first neural network through two-layer iterative training, involving meta-knowledge learning and learning from various tasks, includes: S301, Initialize network weights; S302, Generate a training task set that includes multiple meta-tasks; S303, randomly select multiple batches of training tasks from the training task set; S304 updates network weights based on each batch of training tasks.
6. The gear fault diagnosis model training method according to claim 5, characterized in that, S304 includes: S3041, randomly select a support set D containing K data points and a query set Q containing M data points from a meta-task; S3042, using the cross-entropy loss function or the mean squared error loss function, compute the loss function value and the gradient T1 of the loss function pair on the support set D of this meta-task; S3043, on this meta-task, the inner network weights are updated using a single gradient descent based on the backpropagation algorithm, with the update step size being the gradient T1; S3044, using the cross-entropy loss function or the mean squared error loss function, compute the loss function value and the gradient T2 of the loss function pair on the test set Q of this meta-task; S3045, after all meta-tasks in a batch have executed steps S3041 to S3044, the gradients T2 in the batch are summed and averaged to obtain the average gradient T3. S3046, use the average gradient T3 as the update step size to update the outer network weights and complete one batch of training.
7. A method for diagnosing gearbox faults, characterized in that, include: S501, acquire the vibration signal dataset of the gearbox; S502, Calculate and obtain a set of feature values characterizing the complexity and abrupt change of the vibration signal based on the vibration signal dataset; S503, obtain the pooling layer feature value set of the first neural network based on the feature value set; S504, the feature value set and the pooling layer feature value set are concatenated and input into the fault diagnosis model as described in any one of claims 1-6 to obtain the gearbox fault diagnosis result.
8. An apparatus for training a gearbox fault diagnosis model, characterized in that, The device is used to train and obtain the gearbox fault diagnosis model as described in any one of claims 1-6. The device comprises: The signal acquisition module (601) is used to acquire the vibration signal dataset of the gearbox; The feature calculation module (602) is used to calculate feature values characterizing the complexity and abrupt change of the vibration signal based on the vibration signal dataset; The network training module (603) is used to train and obtain a first neural network based on the first feature set; The model generation module (604) uses the first neural network as two branches of the twin neural network, trains the twin neural network based on the first feature set and the second feature set, and obtains the fault diagnosis model.
9. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to said at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, causes the at least one processor to perform the steps of the gearbox fault diagnosis model training method as described in any one of claims 1-6 and / or the gearbox fault diagnosis method as described in claim 7.
Citation Information
Patent Citations
Fan gear box fault diagnosis model establishing method and device
CN106932196A
Rotating part fault diagnosis method and device based on improved CNN and relation module
CN113111820A
Aero-engine bearing fault diagnosis method based on twin neural network
CN114970678A
Gear fault diagnosis method and system and computer readable storage medium
CN115031959A