Search

CN-121997126-A - Feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method

CN121997126ACN 121997126 ACN121997126 ACN 121997126ACN-121997126-A

Abstract

The invention discloses a bearing fault diagnosis method for feature projection contrast distillation and memory playback incremental learning, which relates to the technical field of fault diagnosis and comprises the specific steps of firstly carrying out data processing and initial model training, converting bearing vibration signals into RGB time-frequency images, training an initial model by using a ResNet network and a dynamic expandable classifier, and constructing a memory bank; the invention effectively reserves old fault knowledge and flexibly adapts to newly increased fault categories by adopting the design of a feature projection contrast distillation and dynamic expandable classifier, and simultaneously utilizes the balance updating and cosine annealing of a memory bank sample to dynamically adjust a distillation loss weight strategy, thereby improving the stability of incremental training and the utilization efficiency of the sample and guaranteeing the consistency of diagnostic accuracy.

Inventors

  • WANG TINGTING
  • LU XUEHUI
  • WANG HONGZHI
  • YANG XU

Assignees

  • 新疆河润科技股份有限公司

Dates

Publication Date
20260508
Application Date
20260104

Claims (10)

  1. 1. The feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method is characterized by comprising the following specific steps of: S1, in the data processing and initial model training stage, an acquired bearing vibration signal is converted into an RGB time-frequency image of 224 multiplied by 224 pixels through wavelet transformation, a ResNet network is adopted as a feature extractor, the output end of the feature extractor is connected with a dynamic expandable classifier, and an initial fault type sample is used for training an initial model; S2, an incremental training stage, namely taking a model which is completed by the previous round of training as a teacher model and taking a model to be trained in the present round as a student model, projecting 512-dimensional high-dimensional features output by a feature extractor of the teacher model and the student model to 128-dimensional low-dimensional features through a feature projection head and carrying out normalization processing, calculating a feature similarity matrix of the teacher model and the student model, constructing feature projection contrast distillation loss through KL divergence in row and column directions, forming a total loss function by combining cross entropy classification loss, dynamically adjusting the weight of the distillation loss by adopting a cosine annealing method, training the student model by combining a new task sample and a history sample in a memory bank, and updating a weight matrix and a bias vector of a dynamic expandable classifier; And S3, after the incremental training is finished, randomly selecting a preset number of samples from the new task samples, updating the samples to the memory bank, keeping the capacity of the memory bank constant, and repeating the steps S2 to S3 when a new incremental task arrives, so as to finish bearing fault diagnosis corresponding to the new incremental task.
  2. 2. The feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method of claim 1, wherein the dynamically scalable classifier is for a first The mathematical expression of the individual tasks is: , wherein, For the incremental task number currently being executed, Is the first The classifier corresponding to each task outputs a result, D-dimensional feature vectors, d being the dimensions of the feature extractor output features, Is the first Classifier weight matrix corresponding to each task and: , Is the first The number of historical fault categories that have been learned prior to execution of a task, Is the first The number of fault categories that are newly added to the individual tasks, Is the first Classifier bias vectors corresponding to the tasks, the weight matrix By splicing historical weight matrices And newly added category weight matrix The method comprises the following steps: , wherein, A classifier weight matrix corresponding to the historical fault class, The weight matrix of the classifier corresponding to the newly added fault category is the bias vector By stitching historical bias vectors Offset vector with newly added category The method comprises the following steps: , wherein, Classifier bias vectors corresponding to historical fault categories, And a classifier bias vector corresponding to the newly added fault class.
  3. 3. The feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method according to claim 1, wherein the feature projection head is structured to sequentially comprise a linear layer of an input dimension 512 and an output dimension 256, a ReLU activation layer of the input dimension 256 and the output dimension 256, a linear layer of the input dimension 256 and the output dimension 128, and a LayerNorm normalization layer of the input dimension 128 and the output dimension 128.
  4. 4. The method for bearing fault diagnosis based on feature projection contrast distillation and memory playback incremental learning according to claim 1, wherein the feature similarity matrix is calculated by setting a feature matrix output by a feature projection head as H, and an output dimension of the feature projection head as H The temperature coefficient is Feature similarity matrix of teacher model Feature similarity matrix with student model Calculated by the following formula: , wherein, Is the first in the similarity matrix Line 1 The elements of the column are arranged such that, Is the first in the feature matrix H Row d column element.
  5. 5. The feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method of claim 1, wherein the feature projection contrast distillation loss The calculation process of (1) comprises respectively calculating the row direction of the similarity matrix Loss of divergence: in the column direction Loss of divergence: the row and column direction losses were averaged to give the total distillation loss: , wherein, In the row direction of the similarity matrix The loss of the divergence and, For the row vectors of the feature similarity matrix of the student model, For the row vector of the teacher model feature similarity matrix, In the direction of the similarity matrix The loss of the divergence and, For the column vectors of the student model feature similarity matrix, For the column vector of the teacher model feature similarity matrix, Total loss of contrast distillation for the characteristic projection.
  6. 6. The feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method according to claim 1, wherein the total loss function calculation formula is: , wherein, For the total loss of model training, In order to cross-entropy categorize the loss, For the weight of the loss of distillation, Total loss of contrast distillation for the characteristic projection.
  7. 7. The feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method according to claim 1, wherein the cosine annealing method adjusts the expression of the distillation loss weight as: , wherein, Is the first The distillation loss weights corresponding to epoch were trained, For the currently performed training epoch sequence number, For the final value of the distillation loss weight, For the initial value of the distillation loss weight, The total number of epochs trained for a single task, As a cosine function.
  8. 8. The feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method according to claim 1, wherein in the memory bank updating process, a sample balancing strategy is adopted to ensure that the quantity proportion of new task samples and history samples in a training set is balanced, and meanwhile, label space remapping is carried out, and a label space corresponding to the new samples is integrated into an original label space to obtain an updated label space: , wherein, In order for the tag space to be updated, For a tag space corresponding to a historical fault category, And a label space corresponding to the new task fault class.
  9. 9. The method for diagnosing the bearing fault by the feature projection contrast distillation and memory playback incremental learning according to claim 1 is characterized in that the vibration signal is processed by segmenting an acquired vibration signal, wherein the length of each segment of sample is 1024, overlapping sampling or direct sampling is selected for the segmented samples according to the data characteristics, and then the segmented samples are converted into time-frequency images through wavelet transformation.
  10. 10. The method for diagnosing the bearing fault by the feature projection contrast distillation and memory playback incremental learning according to claim 1, wherein the capacity of the memory bank is a preset fixed value, a replacement type update strategy is adopted during update, and samples in a new task are selected to replace part of historical samples in the memory bank so as to keep the capacity of the memory bank constant.

Description

Feature projection contrast distillation and memory playback incremental learning bearing fault diagnosis method Technical Field The invention relates to the technical field of fault diagnosis, in particular to a bearing fault diagnosis method for feature projection contrast distillation and memory playback incremental learning. Background In the field of industrial equipment operation and maintenance, a bearing is a core transmission component, and the timeliness and accuracy of fault diagnosis of the bearing are directly related to the stable operation of a production system. Along with the increasing complexity of industrial scenes, bearing fault modes are characterized by diversification and dynamic addition, the traditional fault diagnosis models are mostly trained based on fixed fault types, when new fault types occur, the full-quantity fault data retraining models are acquired again, a large amount of time and data acquisition cost are consumed, the requirement of dynamic expansion of the fault types in actual production is difficult to adapt, and the bearing fault diagnosis technology with incremental learning capability becomes a research focus in the field. The current mainstream bearing fault incremental diagnosis technology has a plurality of limitations. On one hand, the traditional incremental learning model is easy to largely forget the mastered old fault identification capability when learning the new fault class, so that the diagnosis precision of the old fault class is obviously reduced, on the other hand, the traditional classifier structure is difficult to flexibly adapt to the new fault class, the model structure reconstruction is often regulated, the complexity of technology landing is increased, meanwhile, most schemes do not dynamically optimize sample distribution and loss weight in training, the problem of training unbalance is easy to occur, and the stability and reliability of the whole diagnosis effect are finally influenced. Disclosure of Invention The invention aims to make up the defects of the prior art and provides a bearing fault diagnosis method for feature projection contrast distillation and memory playback incremental learning. The method comprises the steps of converting vibration signals into RGB time-frequency images, training an initial model by utilizing ResNet networks and dynamic classifiers, training a student model by means of feature projection and distillation loss in an increment stage, keeping old knowledge and learning new types at the same time, and updating a memory library by a memory playback mechanism to ensure sample balance. The scheme improves the stability and the diagnosis precision of incremental learning and is suitable for the dynamically-changed industrial environment. The invention provides a method for diagnosing faults of a bearing by characteristic projection contrast distillation and memory playback incremental learning, which aims to solve the technical problems and comprises the following specific steps: S1, data processing and initial model training stages, namely converting an acquired bearing vibration signal into an RGB time-frequency image of 224 multiplied by 224 pixels through wavelet transformation, adopting ResNet networks as feature extractors, connecting the output ends of the feature extractors with dynamic expandable classifiers, and training an initial model by using initial fault class samples; S2, incremental training, namely taking a model which is completed by the previous round of training as a teacher model and taking a model to be trained in the current round as a student model, projecting 512-dimensional high-dimensional features output by a feature extractor of the teacher model and the student model to 128-dimensional low-dimensional features through a feature projection head and carrying out normalization processing, calculating a feature similarity matrix of the teacher model and the student model, constructing feature projection contrast distillation loss through KL divergence in row and column directions, forming a total loss function by combining cross entropy classification loss, dynamically adjusting the weight of the distillation loss by adopting a cosine annealing method, training the student model by combining a new task sample and a history sample in a memory bank, and updating a weight matrix and a bias vector of a dynamic expandable classifier; And S3, in a memory playback stage, after the incremental training is finished, randomly selecting a preset number of samples from the new task samples, updating the samples to the memory bank, keeping the capacity of the memory bank constant, and repeating the steps S2 to S3 when a new incremental task arrives, so as to finish bearing fault diagnosis corresponding to the new incremental task. Further, the dynamically scalable classifier is directed to the firstThe mathematical expression of the individual tasks is: , wherein, For the incremental task number