Bearing fault diagnosis method and device, medium and equipment
Through the Inver-transformer model and the learnable pruning mechanism, combined with historical examples and high-quality samples, the problem of "knowledge catastrophic forgetting" in bearing fault diagnosis is solved, and the model's balance of the retention of old knowledge and the learning ability of new data is achieved, and diagnostic accuracy and adaptability are improved.
Patent Information
- Application Number
- CN202510104606.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-03-04
AI Technical Summary
The existing technology has the problem of "knowledge catastrophic forgetting" in bearing fault diagnosis. When new faults occur, the model needs to be retrained, resulting in a degradation of old fault recognition performance.
The Inver-transformer model is combined with the learning pruning mechanism, and by freezing the model parameters of historical instances and selecting high-quality old samples to combine them with new samples, network pruning and multi-objective training are performed to balance the model's retention of old knowledge and learning ability of new data.
It realizes the preservation of old fault features while learning new fault features, avoids the model's forgetting of old task knowledge, enhances the learning ability of new fault data, and improves the stability and plasticity of the diagnostic model.
Smart Images

Figure CN119557626A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mechanical fault diagnosis, and in particular to a bearing fault diagnosis method, device, medium and equipment. Background Art
[0002] Bearings are an essential and important part of wind turbines. Due to their harsh working environment, bearings usually deteriorate over time. Once a bearing fails, it will cause economic losses, production losses, and failure of maintenance plans, and even endanger personal safety. Therefore, it is an urgent task to implement fault diagnosis technology for bearings in wind power systems to reduce power generation costs and improve their power generation safety.
[0003] At present, the main research on bearing fault diagnosis is based on deep learning. The premise for the reliability of intelligent diagnosis methods based on deep learning is to collect sufficient data reflecting all operating conditions and to have the same distribution of training data and test data. In fact, due to the operating environment and variable working conditions, bearings often have unexpected failures. When the trained model faces a sudden increase in failures, the model needs to be retrained to identify new fault types.
[0004] However, using new types of data to directly train deep models will cause catastrophic forgetting (the recognition performance of old fault types will drop sharply), and retaining too many old fault features will cause the recognition performance of new faults to decrease. Therefore, it is necessary to balance the model's ability to retain old knowledge (stability) and its ability to learn new data (plasticity). Summary of the invention
[0005] Based on this, in order to solve the technical problems in the prior art, the present invention provides a bearing fault diagnosis method, device, medium and equipment.
[0006] The present invention provides a bearing fault diagnosis method, comprising: exist G The multi-sensor time series data generated by the bearing operation are collected under different fault conditions to construct G datasets: {first dataset, ..., the G data sets}, each data set corresponds to a different bearing fault type.
[0007] A first deep learning network is constructed, and the first deep learning network is trained using a first data set to obtain a first fault diagnosis model that has learned the bearing fault characteristics in the first data set; the first deep learning network is constructed based on an Inver-transformer model, and the bearing fault characteristics in the data set are learned through the learning expression ability of the Inver-transformer model for sensor time series data; the Inver-transformer working steps specifically include: Input the multi-sensor time series signal X and embed the multi-sensor time series signal X into M tokens: ; in, InverEmb () is the token embedding operation, H 0 It is the embedding operation result of the 0th layer output of the Inver-transformer model; Perform L reverse attention operations in parallel on M tokens: ; Among them, H l-1 It is the Inver-transformer model l-1 The output of the layer, l =1,..., L ; InverAttn () is the reverse attention operation; Norm() is the normalization operation; Information is passed through the feedforward network in the Inver-transformer model to obtain the output of the first deep learning network: ; ; Among them, H l It is the Inver-transformer model l The output of the layer; FeedForw () is a feed-forward neural network; It is the first deep learning network; It is the bearing fault prediction result output by the deep learning network.
[0008] Select historical instances from the first data set and merge them with the second data set to obtain a first merged data set; select historical instances from the first data set to the s-1th data set and merge them with the s The datasets are merged to train the sth deep learning network by selecting historical instances that satisfy the following objective function: (1) in, are selected historical examples,d = 1, ..., t , t is the number of historical instances; represents the historical instance selected in the s - 1 stage, s = 1, ..., G ; Ds represents at s stage corresponding to the s dataset; Nc is the number of training samples of the c - th category in the s stage; f s () represents s stage corresponding to the s deep learning network.
[0009] Freeze some parameters in the first fault diagnosis model to obtain a second deep learning network. The frozen parameters are the parameters of the s - 1 fault diagnosis model corresponding to the historical instance . .
[0010] Prune the second deep learning network. The network pruning operation specifically includes: Step I: Obtain the weight W, fault data X, target pruning rate R t and the number of loops E of the Inver - transformer model in the s - 1 stage; Step II: Initialize the current loop count e, the first Lagrange multiplier , the second Lagrange multiplier , the significant score T, and the threshold parameter ; Step III: When e < E, construct a supervised learnable threshold based on the following formula: (2) (3) where R is the current parameter pruning rate; the sigmoid function () is used to generate a hierarchical pruning rate by restricting the threshold parameter , ; is the number of parameters of the layer of the Inver - transformer model; Num is the total number of parameters of the Inver - transformer model; Step IV: Obtain the binary mask : (4) in, is corresponding to The significance score of Is used to return middle The meaning of this formula is: if the saliency score can be learned No more than , then the binary mask will transform the weight matrix of the multi-head reverse attention in the Inver-transformer model The corresponding row vectors in are set to zero; Step V: Calculate the mask weight matrix MMIA : (5) in, InverAttn (H l-1 ) is the first l-1 The result obtained by performing the reverse attention operation on the layer; Step VI: Output the pruned Inver-transformer model : (6) Among them, F s * It is the Inver-transformer model before pruning; cNum is s The number of training samples of the cth category in the stage; is the qth binary mask of the Inver-transformer model in stage s; is the weight matrix of the qth projection layer in the Inver-transformer model at stage s; is the first phase of the Inver-transformer model l layer; Step VII: Calculate the current pruning rate R based on the model gap before and after pruning; Step VIII: Calculate the loss function: (7) (8) (9) in, is the first total loss function; is the cross entropy loss function; is the threshold loss function; represents the historical instance selected in the s-1 stage, s =1,..., G ; Ds Representatives in s The corresponding stage s Datasets; represents the frozen s-1th fault diagnosis model; The sth deep learning network; is the predicted fault label corresponding to the i-th instance in the fault data X output by the s-th fault diagnosis model; is the probability of the corresponding class of the i-th instance obtained by softmax in stage s; is the trimmed model; It is the class embedding code in the Inver-transformer model at stage s; is a learnable scaling parameter that controls the kurtosis of the softmax distribution; Step IX: Update the saliency score by formulas (10) and (11); and update the learnable threshold by formula (2): (10) (11) In the formula, the subscript l Inverter-transformer model l Layer, subscript s indicates s stage; Step X: When e>E, stop the loop and output the pruned model; otherwise return to step III.
[0011] The pruned second deep learning network is trained using the first merged data set to obtain a second fault diagnosis model that has learned the bearing fault features from the first data set to the second data set; the loss function used in the network training operation is: (12) (13) in, is the total loss function of stage s; is the cross entropy loss function; It is the inter-class distance differentiation loss function in stage s; is the adjustment coefficient; .
[0012] Repeat the operation of selecting historical instances, merging data sets, freezing parameters, pruning networks, and training networks until the first to third data sets are learned. G The firstG Fault diagnosis model; wherein the second deep learning network ~ the Gth deep learning network are pruned based on the first fault diagnosis model ~ the G-1th fault diagnosis model respectively; using the G The fault diagnosis model diagnoses the bearing fault.
[0013] The present invention provides a bearing fault diagnosis device, comprising: Data acquisition module for G The multi-sensor time series data generated by the bearing operation are collected under different fault conditions to construct G datasets: {first dataset, ..., the G data sets}, each data set corresponds to a different bearing fault type; An initial model building module, used to build a first deep learning network, train the first deep learning network using a first data set, and obtain a first fault diagnosis model that learns the bearing fault characteristics in the first data set; The incremental model building module is used to select historical instances from the first data set and merge them with the second data set to obtain a first merged data set; freeze some parameters in the first fault diagnosis model to obtain a second deep learning network, prune the second deep learning network, and use the first merged data set to train the pruned second deep learning network to obtain a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set; repeat the operation of selecting historical instances, merging data sets, freezing parameters, pruning networks, and training networks until a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set is obtained. G The first G Fault diagnosis model; Fault diagnosis module for using G The fault diagnosis model diagnoses the bearing fault.
[0014] The present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned bearing fault diagnosis method is implemented.
[0015] The present invention provides a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the above-mentioned bearing fault diagnosis method is implemented when the processor executes the program.
[0016] At least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects: In the bearing fault diagnosis method provided by the present invention, by repeatedly performing the operation of selecting historical instances, merging data sets, freezing parameters, pruning networks, and training networks, while learning new fault features, the memory of the old fault features that have been learned is retained, and the model's ability to retain old knowledge (stability) and its ability to learn new data (plasticity) are balanced. Specifically: by selecting high-quality old samples and new samples from historical data and freezing some parameters in the trained fault diagnosis model, the model avoids forgetting old task knowledge while updating its parameters, and enhances the model's memory of learned fault features; in order to enhance the ability to learn new fault features while retaining the learned historical fault features, the model is pruned to overcome the negative impact of the fixed network model structure on learning new features, thereby enhancing the learning ability of the new network model for newly added fault features. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 A schematic flow chart of a bearing fault diagnosis method provided by the present invention; Figure 2 A schematic diagram of a bearing fault diagnosis model framework provided by the present invention; Figure 3 The experimental results comparison diagram provided by the present invention is as follows: Figure 3 (a) is the F score value at different stages. Figure 3 (b) is the standard deviation std value at different stages; Figure 4 A schematic diagram of the framework of a bearing fault diagnosis device provided by the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in combination with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Deep learning methods and their corresponding improved algorithms are widely used in bearing fault diagnosis due to their advantages in mining large amounts of data and automatically identifying fault categories. However, the reliability of intelligent diagnosis methods based on deep learning is premised on: (1) the need to collect sufficient data reflecting all operating conditions; (2) the test data and training data follow the "closed set" assumption. In fact, due to the operating environment and variable working conditions, machines often experience unexpected failures, resulting in the need to retrain the trained model to identify new fault types when faced with a sudden increase in faults. In fact, since bearing failure is a slow process, it is difficult to collect rich data containing all potential bearing conditions in advance at industrial sites, and the assumption that all test data and training data conform to the same distribution or that the label data is a subset of historical data limits the applicability of the diagnosis model in actual industrial processes. Most importantly, this type of method will experience model saturation when a new fault occurs, and the diagnosis results of old samples will tend to be identified as new faults, that is, there is a problem of "catastrophic forgetting" of the learned historical knowledge.
[0020] To this end, the present invention designs a new low-speed fault diagnosis method for wind power systems by combining lifelong learning, Inver-transformer and learnable pruning mechanism while considering the following three key core issues. In order to solve the above problems, the diagnostic model not only has high-precision diagnostic capability, but also has strong generalization capability.
[0021] (1) Model stability-plasticity. The proposed diagnostic model needs to balance the model’s ability to retain old knowledge (stability) and its ability to learn new data (plasticity), especially when adding multiple fault data in one stage.
[0022] (2) Quality of historical instances. The key to solving “catastrophic forgetting” is whether the basic model can preserve historical instances in high quality in the learned samples.
[0023] (3) The necessity of multi-sensor data. Multiple available sensors not only effectively provide complete information about the machine status, but also solve problems such as measurement uncertainty, intentional sensor tampering, and misoperation, thereby making trustworthy decisions.
[0024] Example 1 Due to its excellent data mining ability, deep learning has made good progress in the intelligent diagnosis of complex rotating machinery faults. However, it was found in the research process that the intelligent diagnosis method based on deep learning has the problem of "catastrophic forgetting of knowledge" when facing a sudden increase in faults. Therefore, an Inver-transformer lifelong learning method is proposed to solve the above problem. First, based on the Inver-transformer as the basic model, the time series signals of multiple sensors are independently embedded into tokens, while the global features of the sequence are aggregated, and the local receptive field is expanded through multiple attention mechanisms to capture feature details. Secondly, the Inver-transformer model is expanded as a new branch to learn the newly added multiple fault state data, and the new branch model is streamlined through a learnable pruning mechanism to overcome the negative impact of the predefined and fixed model structure on the model accuracy, so as to enhance the learning ability of the new branch model for the newly added data. Finally, a multi-objective training strategy is used to solve the class imbalance problem caused by adding multiple faults in the incremental stage, while ensuring the model's ability to remember the learned knowledge and enhancing the model's learning ability for the newly added fault data, so as to balance the stability and plasticity of the model.
[0025] Figure 1 The process of the bearing fault diagnosis method provided by this embodiment is shown. Figure 1 The method is described in detail and specifically comprises the following steps: S1: G The multi-sensor time series data generated by the bearing operation are collected under different fault conditions to construct G datasets: {first dataset, ..., the G data sets}, each data set corresponds to a different bearing fault type.
[0026] S2: construct a first deep learning network, use the first data set to train the first deep learning network, and obtain a first fault diagnosis model that learns the bearing fault characteristics in the first data set. Specifically including: In the initial stage (s=0), the first deep learning network is established through Inver-transformer, and Inver-transformer is used as the basic model to improve the representation learning ability of time series signals in multi-sensors and improve the quality of historical instances for storing old knowledge. Specifically, it includes: Input multiple sensor signals , N is the data length, M is the number of sensors. Transpose the input data, that is , .
[0027] Embed the multi-sensor time series signal X into M tokens: ; in, InverEmb () is the token embedding operation, H 0 It is the embedding operation result of the 0th layer output of the Inver-transformer model; Perform L reverse attention operations in parallel on M tokens: ; Among them, H l-1 It is the Inver-transformer model l-1 The output of the layer, l =1,..., L ; InverAttn () is the reverse attention operation; Norm() is the normalization operation; Information is passed through the feedforward network in the Inver-transformer model to obtain the output of the first deep learning network: ; ; Among them, H l It is the Inver-transformer model l The output of the layer; FeedForw () is a feedforward neural network, which is used to transfer information to M tokens; It is the first deep learning network; It is the bearing fault prediction result output by the deep learning network.
[0028] S3: Select historical instances from the first data set and merge them with the second data set to obtain a first merged data set; freeze some parameters in the first fault diagnosis model to obtain a second deep learning network, prune the second deep learning network, and use the first merged data set to train the pruned second deep learning network to obtain a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set; repeat the operation of selecting historical instances, merging data sets, freezing parameters, pruning networks, and training networks until a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set is obtained. G The first G Fault diagnosis model. Specifically includes: In the incremental stage (s≥1), a learnable pruning mechanism for the Inver-transformer model extension is proposed to ensure the model's ability to remember the learned knowledge while improving the model's ability to learn multiple new fault signals. The framework for building a bearing fault diagnosis model in the incremental stage is as follows: Figure 2 As shown, the following steps are included: S301: Complete the preservation of historical instances through formula (1): (1) In the formula, is the selected historical instance, d = 1,..., t , t is the number of historical instances; represents selecting historical instances from the 0 to s - 1 stages, s = 1,..., G ; Ds represents the s stage corresponding to the s data set; Nc is the number of training samples of the c-th category in the s stage; f s () represents the s stage corresponding to the s deep learning network. According to the historical instance selected in the s - 1 stage and its corresponding s - 1 fault diagnosis model parameters are all frozen and used for model training in the s stage to solve the "knowledge catastrophic forgetting" problem. A new diagnostic branch model based on Inver-transformer is simultaneously established to learn the newly added fault data, where , are the weight parameters to be updated in the s stage, and the fault features learned by the new diagnostic branch model in the s stage are .
[0029] S302: Implement a learnable model pruning mechanism for the new diagnostic branch model , and the specific steps are as follows: Step I: Obtain the weights W, fault data X, target pruning rate R t and the number of loops E of the Inver-transformer model in the s - 1 stage.
[0030] Step II: Initialize the current number of loops e, the first Lagrange multiplier , the second Lagrange multiplier , the significance score T, and the threshold parameter ; where e = 0, , .
[0031] Step III: When e < E, construct a supervised learnable threshold as in formula (2): (2) (3) In the formula, R is the current parameter pruning rate; R is the target pruning rate; sigmoid function () is used to limit the threshold parameter To generate the layered pruning rate ; It is the Inver-transformer model The number of parameters of the layer; Num is the total parameter of the Inver-transformer model Fs.
[0032] Step IV: Obtain the binary mask using formula (4) : (4) in, is corresponding to The learnable saliency score of Is used to return middle The meaning of this formula is: if the saliency score can be learned No more than , then the binary mask will transform the weight matrix of the multi-head reverse attention in the Inver-transformer model The corresponding row vectors in are set to zero, n , h and g Both are weight matrices Dimension. Contains query ( )、key( ) and value( ).
[0033] Step V: Calculate the mask weight matrix using formula (5): (5) in, InverAttn (H l-1 ) is the first l-1 The result obtained by performing the reverse attention operation on the layer.
[0034] Step VI: Output the pruned model according to formula (6) , (6) Among them, Fs * It is the Inver-transformer model before pruning; cNum is s The number of training samples of the cth category in the stage; is the qth binary mask of the Inver-transformer model in stage s; is the weight matrix of the qth projection layer in the Inver-transformer model at stage s; is the first phase of the Inver-transformer model l layer.
[0035] Step VII: Calculate the current pruning rate R based on the model gap before and after pruning.
[0036] Step VIII: Calculate the loss function according to formula (7): (7) (8) (9) in, is the first total loss function; is the cross entropy loss function; is the threshold loss function; represents the historical instance selected in the s-1 stage, s =1,..., G ; Ds Representatives in s The corresponding stage s Datasets; represents the frozen s-1th fault diagnosis model parameters; The sth fault diagnosis model; is the predicted fault label corresponding to the i-th instance in the fault data X output by the s-th fault diagnosis model; is the probability of the corresponding class of the i-th instance obtained by softmax in stage s; is the trimmed model; is the class embedding code in the Inver-transformer model at stage s The average value of is a learnable scaling parameter that controls the kurtosis of the softmax distribution to constrain the cosine similarity in [-1, 1]. , , .
[0037] Step IX: Update the saliency score by formulas (10) and (11); and update the learnable threshold by formula (2): (10) (11) In the formula, the subscript l Inverter-transformer model l Layer, subscript s indicates s stage.
[0038] Step X: When e>E, stop the loop and output the pruned model; otherwise return to step III.
[0039] S303: Establish a target optimization function, such as formula (12): (12) (13) In the formula (12), the forgetting constraint loss function can also be added to form , is the total loss function of stage s; is the cross entropy loss function; It is the inter-class distance differentiation loss function in stage s; is the forgetting constraint loss function in the knowledge extraction process of stage s; is the adjustment coefficient, ; A multi-objective training strategy based on three loss functions, including cross-entropy loss for all classes, forgetting constraint in knowledge extraction, and inter-class distance differentiation in recognition, is proposed to ensure the diagnostic accuracy of the proposed model while encouraging the model to learn the features of both old and new class samples simultaneously.
[0040] S304: Optimize and adjust, i.e. update , and .
[0041] S305: Optimize and adjust the Inver-transformer model, that is , , .
[0042] S306: Provide for the next stage (s+1) and .
[0043] S307: Loop to the set s.
[0044] S308: Outputting the fault diagnosis model Fs of the diagnosis.
[0045] S4: Use G The fault diagnosis model diagnoses the bearing fault.
[0046] The above bearing fault diagnosis method has the following advantages: (1) Realize sustainable intelligent fault diagnosis of low-speed bearings and overcome the shortcoming of “catastrophic forgetting of knowledge” in intelligent diagnosis models.
[0047] (2) The established sustainable intelligent diagnosis model has a good "memory" ability for the knowledge that has been learned, while ensuring that the model actively learns new sample data and can adapt to the complex operating conditions of various rotating machinery.
[0048] (3) The proposed method can perform intelligent model pruning according to the complexity of the diagnostic task to dynamically adjust the key parameters of the model and improve the generalization ability of the model.
[0049] Furthermore, this embodiment is verified by experiments, and the experimental results show the effectiveness and feasibility of the proposed algorithm. Figure 3 As shown, Figure 3 (a) is the F score value at different stages. Figure 3 (b) in the figure is the standard deviation std value at different stages. The model shows good model accuracy when facing each new fault.
[0050] The above is a bearing fault diagnosis method provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding bearing fault diagnosis device, such as Figure 4 As shown, including: Data acquisition module for G The multi-sensor time series data generated by the bearing operation are collected under different fault conditions to construct G datasets: {first dataset, ..., the G data sets}, each data set corresponds to a different bearing fault type.
[0051] The initial model building module is used to build a first deep learning network, train the first deep learning network using a first data set, and obtain a first fault diagnosis model that learns the bearing fault characteristics in the first data set.
[0052] The incremental model building module is used to select historical instances from the first data set and merge them with the second data set to obtain a first merged data set; freeze some parameters in the first fault diagnosis model to obtain a second deep learning network, prune the second deep learning network, and use the first merged data set to train the pruned second deep learning network to obtain a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set; repeat the operation of selecting historical instances, merging data sets, freezing parameters, pruning networks, and training networks until a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set is obtained. G The first G Fault diagnosis model.
[0053] Fault diagnosis module for using G The fault diagnosis model diagnoses the bearing fault.
[0054] The specific definition of the bearing fault diagnosis device can be found in the definition of the bearing fault diagnosis method above, which will not be repeated here. Each module in the above-mentioned bearing fault diagnosis device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0055] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provided bearing fault diagnosis method.
[0056] The present invention also provides a computer device structure. At the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Provided bearing fault diagnosis method.
[0057] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0058] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.
Claims
1. A bearing fault diagnosis method, characterized in that: including: exist G The multi-sensor time series data generated by the bearing operation are collected under different fault conditions to construct G datasets: {first dataset, ..., the G data sets}, each data set corresponds to a different bearing fault type; Construct a first deep learning network, train the first deep learning network using a first data set, and obtain a first fault diagnosis model that has learned the bearing fault characteristics in the first data set; Select historical instances from the first data set and merge them with the second data set to obtain a first merged data set; freeze some parameters in the first fault diagnosis model to obtain a second deep learning network, prune the second deep learning network, and use the first merged data set to train the pruned second deep learning network to obtain a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set; repeat the operation of selecting historical instances, merging data sets, freezing parameters, pruning networks, and training networks until a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set is obtained. G The first G Fault diagnosis model; Use G The fault diagnosis model diagnoses the bearing fault.
2. The bearing fault diagnosis method according to claim 1, characterized in that: The first deep learning network is constructed based on the Inver-transformer model, and learns the bearing fault characteristics in the data set through the learning and expression ability of the Inver-transformer model for sensor time series data; specifically including: Input the multi-sensor time series signal X, and embed the multi-sensor time series signal X into M tokens: ; in, InverEmb () is the token embedding operation, H 0 It is the embedding operation result of the 0th layer output of the Inver-transformer model; Perform L inverse attention parallel operations on the M tokens: ; Among them, H l-1 It is the Inver-transformer model l-1 The output of the layer, l =1,..., L ; InverAttn () is the reverse attention operation; Norm() is the normalization operation; Perform information transmission through the feed-forward network in the Inver-transformer model to obtain the output of the first deep learning network: ; ; Among them, H l It is the Inver-transformer model l The output of the layer; FeedForw () is the feed-forward network in the Inver-transformer model; It is the first deep learning network; It is the bearing fault prediction result output by the deep learning network.
3. The bearing fault diagnosis method according to claim 2, characterized in that: The operation of selecting historical instances is to select historical instances that satisfy the following objective function: ; in, are selected historical examples, d =1,..., t , t is the number of historical instances; Indicates selecting historical instances from stage 0 to s-1. s =1,..., G ; Ds Representatives in s The corresponding stage s Datasets; Nc is s The number of training samples of the cth category in the stage; f s ()express s The corresponding stage s Deep learning network.
4. The bearing fault diagnosis method according to claim 3, characterized in that: The freeze parameter operation is to freeze the historical instance The corresponding s-1th fault diagnosis model Parameters in .
5. The bearing fault diagnosis method according to claim 4, characterized in that: The network pruning operation specifically includes: Step I: Obtain the weights W, fault data X, and target pruning rate of the Inver-transformer model at stage s-1 R t and the number of cycles E; Step II: Initialize the current loop number e and the first Lagrange multiplier , the second Lagrange multiplier , significant score T and threshold parameters ; Step III: When e < E, construct a supervised learnable threshold based on the following formula: ; ; in, R is the current parameter pruning rate; sigmoid function () is used to pass the limit threshold parameter To generate the layered pruning rate , ; It is the Inver-transformer model The number of parameters of the layer; Num is the total parameter of the Inver-transformer model; Step IV: Get the binary mask : ; in, is corresponding to The significance score of Is used to return middle The meaning of this formula is: if the saliency score can be learned No more than , then the binary mask will transform the weight matrix of the multi-head reverse attention in the Inver-transformer model The corresponding row vectors in are set to zero; Step V: Calculate the mask weight matrix MMIA : ; in, InverAttn (H l-1 ) is the first l-1 The result obtained by performing the reverse attention operation on the layer; Step VI: Output the pruned Inver-transformer model : ; Among them, F s * It is the Inver-transformer model before pruning; cNum is s The number of training samples of the cth category in the stage; is the qth binary mask of the Inver-transformer model in stage s; is the weight matrix of the qth projection layer in the Inver-transformer model at stage s; is the first phase of the Inver-transformer model l layer; Step VII: Calculate the current pruning rate R according to the model gap before and after pruning; Step VIII: Calculate the loss function: ; ; ; in, is the first total loss function; is the cross entropy loss function; is the threshold loss function; represents the historical instance selected in the s-1 stage, s =1,..., G ; Ds Representatives in s The corresponding stage s Datasets; represents the frozen s-1th fault diagnosis model; The sth deep learning network; is the predicted fault label corresponding to the i-th instance in the fault data X output by the s-th fault diagnosis model; is the probability of the corresponding class of the i-th instance obtained by softmax in stage s; is the trimmed model; It is the class embedding code in the Inver-transformer model at stage s; is a learnable scaling parameter that controls the kurtosis of the softmax distribution; Step IX: Pass and Update the significance score; and pass Update the learnable threshold: ; ; In the formula, the subscript l Inverter-transformer model l Layer, subscript s indicates s stage; Step X: When e > E, stop the loop and output the pruned model; otherwise, return to Step III.
6. The bearing fault diagnosis method according to claim 3, characterized in that: The loss function used in the network training operation is: ; ; in, is the total loss function of stage s; is the cross entropy loss function; It is the inter-class distance differentiation loss function in stage s; is the adjustment coefficient; .
7. A bearing fault diagnosis device, characterized in that: including: Data acquisition module for G The multi-sensor time series data generated by the bearing operation are collected under different fault conditions to construct G datasets: {first dataset, ..., the G data sets}, each data set corresponds to a different bearing fault type; An initial model construction module for constructing a first deep learning network, training the first deep learning network using a first data set, and obtaining a first fault diagnosis model that has learned the bearing fault characteristics in the first data set; The incremental model building module is used to select historical instances from the first data set and merge them with the second data set to obtain a first merged data set; freeze some parameters in the first fault diagnosis model to obtain a second deep learning network, prune the second deep learning network, and use the first merged data set to train the pruned second deep learning network to obtain a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set; repeat the operation of selecting historical instances, merging data sets, freezing parameters, pruning networks, and training networks until a second fault diagnosis model that has learned the bearing fault characteristics from the first data set to the second data set is obtained. G The first G Fault diagnosis model; Fault diagnosis module for using G The fault diagnosis model diagnoses the bearing fault.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method described in any one of claims 1 to 6 above.
9. A computer device, characterized in that: Including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, it implements the method described in any one of claims 1 to 6 above.
Citation Information
Patent Citations
Cross-equipment incremental bearing fault diagnosis method based on continuous learning
CN115270956A
Method for avoiding forgetting of artificial neural network for sustainable learning
CN115392451A
Electric spindle thermal error prediction method based on digital twinning
CN118821525A
DETR target detection model compression method based on combination of pruning and knowledge distillation
CN119169365A