Rolling bearing fault diagnosis method and system, device, medium
By using fuzzy attention convolutional neural networks and fuzzy rule reasoning, the problems of class imbalance and noise interference in rolling bearing fault diagnosis are solved, thereby improving the accuracy and robustness of diagnosis.
Patent Information
- Application Number
- CN202611637998.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-24
AI Technical Summary
Existing rolling bearing fault diagnosis models tend to favor the majority class under conditions of class imbalance and noise interference, resulting in a decrease in the ability to identify a minority of fault classes. Consequently, the overall diagnostic accuracy and robustness are insufficient to meet practical needs.
A fuzzy attention convolutional neural network is used to process vibration signals. Fault diagnosis is achieved by using sliding segmentation and fuzzy rule reasoning, and by calculating the category prototype and normalized activation intensity.
Under conditions of class imbalance and noise interference, the accuracy and stability of fault diagnosis are improved, the diagnosis results are avoided to be biased towards the majority class samples, and the ability to identify a minority of fault classes is ensured.
Smart Images

Figure CN123158378A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of fault diagnosis technology, and more specifically, relates to methods, systems, equipment and media for diagnosing rolling bearing faults. Background Technology
[0002] As industrial equipment develops towards high-speed and continuous operation, the health status of rolling bearings, as core load-bearing components of rotating machinery, directly affects equipment operation safety and production efficiency. Vibration signal-based fault diagnosis is the primary means of assessing the condition of rolling bearings. In recent years, deep learning methods have been widely used for bearing fault identification due to their ability to automatically extract deep features. However, vibration data collected in real industrial settings is often in a non-ideal state: on the one hand, equipment operates in normal conditions most of the time, resulting in few fault samples and a severe imbalance in the number of samples for each bearing condition category; on the other hand, the signals collected by sensors are mixed with environmental noise, which propagates layer by layer along the network, distorting the distribution of fault features. Under these conditions of class imbalance and noise interference, existing diagnostic models tend to favor the majority class, significantly reducing the ability to identify a few fault categories, and the overall diagnostic accuracy and robustness fail to meet practical needs. Therefore, improving the accuracy of rolling bearing fault diagnosis under conditions of class imbalance and noise interference has become an urgent technical problem to be solved. Summary of the Invention
[0003] The purpose of this application is to provide a method, system, device, and medium for diagnosing rolling bearing faults, in order to solve the problem that existing diagnostic models tend to favor the majority class samples and significantly reduce the ability to identify a few fault classes under the conditions of class imbalance and noise interference, making it difficult for the overall diagnostic accuracy and robustness to meet practical needs, thereby improving the accuracy of rolling bearing fault diagnosis under the conditions of class imbalance and noise interference.
[0004] A first aspect of this application provides a method for diagnosing rolling bearing faults, including: The vibration signal of the rolling bearing to be diagnosed is acquired, and the vibration signal is divided into sliding segments according to the preset window length and preset sliding step size to obtain the vibration sample of the window to be diagnosed. The vibration sample of the window to be diagnosed is input into a pre-trained fuzzy attention convolutional neural network to obtain a low-dimensional hidden layer fault representation of the window to be diagnosed with a preset dimension. Obtain a pre-trained set of category prototypes. The set of category prototypes includes the same number of category prototypes as the total number of bearing state categories. Each category prototype is a vector of a preset dimension, and each category prototype serves as the antecedent center of the corresponding fuzzy rule in the pre-trained fuzzy inference network. The category prototypes correspond one-to-one with the fuzzy rules. Based on the distance between the low-dimensional hidden layer fault representation to be diagnosed and each antecedent center, and the diffusion parameters of the fuzzy rules corresponding to each antecedent center, the normalized activation intensity of each fuzzy rule is calculated. The low-dimensional hidden layer fault representation to be diagnosed is input into the consequent of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. According to the normalized activation intensity of each fuzzy rule, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregate score of each bearing state category. Normalized exponents are calculated for each aggregate score to obtain the predicted probability of each bearing condition category. The bearing condition category corresponding to the highest predicted probability is taken as the fault diagnosis result of the rolling bearing to be diagnosed.
[0005] A second aspect of this application provides a rolling bearing fault diagnosis system, comprising: The signal acquisition and segmentation module is used to acquire the vibration signal of the rolling bearing to be diagnosed, and to slide segment the vibration signal according to the preset window length and preset sliding step size to obtain the vibration sample of the window to be diagnosed. The feature extraction module is used to input the vibration sample of the window to be diagnosed into a pre-trained fuzzy attention convolutional neural network to obtain a low-dimensional hidden layer fault representation of the window to be diagnosed with a preset dimension. The prototype acquisition module is used to acquire a pre-trained set of category prototypes. The set of category prototypes includes the same number of category prototypes as the total number of bearing state categories. Each category prototype is a vector of a preset dimension, and each category prototype serves as the antecedent center of the corresponding fuzzy rule in the pre-trained fuzzy inference network. The category prototypes correspond one-to-one with the fuzzy rules. The activation intensity calculation module is used to calculate the normalized activation intensity of each fuzzy rule based on the distance between the low-dimensional hidden layer fault representation to be diagnosed and each antecedent center, as well as the diffusion parameters of the fuzzy rules corresponding to each antecedent center. The scoring aggregation module is used to input the low-dimensional hidden layer fault representation to be diagnosed into the consequent of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. According to the normalized activation intensity of each fuzzy rule, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregate score of each bearing state category. The diagnostic output module is used to perform normalized exponential calculations on each aggregate score to obtain the predicted probability of each bearing condition category. The bearing condition category corresponding to the highest predicted probability is taken as the fault diagnosis result of the rolling bearing to be diagnosed.
[0006] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the rolling bearing fault diagnosis method described above.
[0007] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the rolling bearing fault diagnosis method described above.
[0008] The beneficial effects of the rolling bearing fault diagnosis method, system, equipment, and medium provided in this application are as follows: This application's embodiments address the problem of insufficient diagnostic accuracy under conditions of class imbalance and noise interference. The vibration samples in the diagnostic window are processed by a pre-trained fuzzy attention convolutional neural network. This network suppresses noise interference, making the output low-dimensional hidden layer fault representation more stable and reliable, reducing the impact of noise on the diagnostic results from the feature source. Since each bearing state category has an independent category prototype, the diagnostic process does not depend on the number of samples in each bearing state category, but rather on the distance between the low-dimensional hidden layer fault representation and the centers of each antecedent. Therefore, even if the number of samples in each bearing state category in the training data is unbalanced, a minority of fault categories can still obtain a fair activation opportunity through their corresponding category prototypes, avoiding a bias in the diagnostic results towards the majority class. The normalized activation intensity of each fuzzy rule is determined based on distance and diffusion parameters, and the category scores of all fuzzy rules for the same bearing state category are weighted and summed according to this intensity, and then the predicted probability is obtained through normalized exponent calculation. This process assigns higher weight to rules corresponding to closer category prototypes, thus enabling accurate differentiation of bearing condition categories even when category imbalance and noise interference coexist, thereby improving the accuracy of fault diagnosis results. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A schematic flowchart of a rolling bearing fault diagnosis method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the overall architecture of a fuzzy attention convolutional neural network-adaptive prototype embedding model provided in an embodiment of this application; Figure 3This is a schematic diagram of the structure of a fuzzy attention convolutional neural network provided in an embodiment of this application; Figure 4 This is a structural block diagram of a rolling bearing fault diagnosis system provided in an embodiment of this application; Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0011] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.
[0013] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a rolling bearing fault diagnosis method according to an embodiment of this application. The method can be executed by an electronic device and may include: S101: Obtain the vibration signal of the rolling bearing to be diagnosed, and divide the vibration signal into sliding segments according to the preset window length and preset sliding step size to obtain the vibration sample of the window to be diagnosed.
[0014] In this embodiment, the rolling bearing to be diagnosed is a rolling bearing whose fault state needs to be determined, such as a rolling bearing that is in operation and whose state is unknown. An acceleration sensor is installed on the bearing housing of the rolling bearing to be diagnosed, and the sensor collects the vibration signal of the rolling bearing during operation. The vibration signal is a physical quantity that changes over time and is collected by the acceleration sensor during the operation of the rolling bearing, such as the vibration acceleration signal of the drive end collected at a sampling frequency of 12kHz.
[0015] This embodiment reads vibration signals, setting a preset window length of 1024 data points and a preset sliding step size of 512 data points. The preset window length is the number of data points contained in each window vibration sample, pre-set before segmentation; the preset sliding step size is the number of data points between the starting positions of two adjacent window vibration samples, pre-set before segmentation. Sliding segmentation is the process of extracting a segment of data with a preset window length, moving forward by a preset sliding step size, and extracting again to obtain multiple window vibration samples. Starting from the starting position of the vibration signal, the first to the 1024th data point is extracted as the first window vibration sample to be diagnosed; the window vibration sample to be diagnosed is a data segment with a preset window length obtained after sliding segmentation of the vibration signal of the rolling bearing to be diagnosed, for example, a one-dimensional vector with a length of 1024. Then, the starting position is moved forward by 512 data points, and the 513th to the 1536th data point is extracted as the second window vibration sample to be diagnosed; the movement and extraction continue until there are fewer than 1024 data points remaining in the vibration signal.
[0016] This embodiment transforms the continuous vibration signal of the rolling bearing to be diagnosed into vibration samples of the same length and the same format as the training phase, so that the pre-trained fuzzy attention convolutional neural network can process it directly without additional adjustment of the input format. At the same time, by sliding segmentation, the temporal continuity of the vibration signal is preserved and the number of samples is increased, which is beneficial for the subsequent extraction of the low-dimensional hidden layer fault characterization to be diagnosed, thereby improving the accuracy of the fault diagnosis results.
[0017] S102: Input the vibration sample of the window to be diagnosed into the pre-trained fuzzy attention convolutional neural network to obtain the low-dimensional hidden layer fault representation of the window to be diagnosed with a preset dimension.
[0018] In this embodiment, the pre-trained fuzzy attention convolutional neural network is a neural network that has been trained and determined before this diagnosis and will not be updated during the diagnosis process. It includes convolution operations and fuzzy attention weighting, such as a feedforward network composed of multiple cascaded fuzzy attention convolutional blocks.
[0019] In this embodiment, the vibration sample of the window to be diagnosed is input into a pre-trained fuzzy attention convolutional neural network. The pre-trained fuzzy attention convolutional neural network includes multiple cascaded fuzzy attention convolutional blocks, each of which includes a main convolutional branch and a fuzzy attention branch.
[0020] For the first fuzzy attention convolutional block, the vibration sample of the window to be diagnosed is used as the input feature map. The main convolutional branch performs convolution and activation operations on the input feature map to obtain a convolutional feature map. The fuzzy attention branch sets multiple Gaussian membership functions for each channel of the convolutional feature map, calculates the membership degree of the convolutional response at each spatial location in the convolutional feature map relative to each Gaussian membership function, and takes the minimum value of multiple membership degrees for the same channel and the same spatial location to obtain a conservative fuzzy response. Global average pooling and fully connected mapping are then performed on the conservative fuzzy response in sequence to obtain the channel attention vector. The channel attention vector is then multiplied element-wise with the convolutional feature map for each channel to obtain the output feature map of the fuzzy attention convolutional block. The output feature map of this fuzzy attention convolutional block is used as the input feature map of the next fuzzy attention convolutional block until the high-level feature map output by the last fuzzy attention convolutional block is obtained.
[0021] Vectorization is performed on the high-level feature map to obtain a one-dimensional feature vector. The one-dimensional feature vector is then mapped through a fully connected projection layer to obtain a low-dimensional hidden fault representation of the to be diagnosed with a preset dimension of 96. The preset dimension is the vector length of the low-dimensional hidden fault representation pre-set before training, such as 64, 96, or 128. The low-dimensional hidden fault representation of the to be diagnosed is a feature vector with a preset dimension, such as a one-dimensional vector of length 96, output by the vibration sample of the to be diagnosed window after processing by a pre-trained fuzzy attention convolutional neural network.
[0022] This embodiment uses a pre-trained fuzzy attention convolutional neural network to process vibration samples in the diagnostic window. This process can suppress noise interference and extract stable fault features, making the output low-dimensional hidden layer fault representation and the category prototype in the same feature space with the same dimension. This facilitates subsequent distance calculation and determination of the normalized activation intensity of each fuzzy rule, thereby improving the accuracy of fault diagnosis results.
[0023] S103: Obtain the pre-trained set of category prototypes. The set of category prototypes includes the same number of category prototypes as the total number of bearing state categories. Each category prototype is a vector of a preset dimension, and each category prototype serves as the antecedent center of the corresponding fuzzy rule in the pre-trained fuzzy inference network. The category prototypes correspond one-to-one with the fuzzy rules.
[0024] In this embodiment, the pre-trained set of category prototypes is a set of category prototypes that has been determined and fixed through joint training before this diagnosis and will not be updated during the diagnosis process. The total number of bearing state categories is the number of possible state categories of the rolling bearing, for example, normal, inner race fault, and outer race fault, a total of 3 categories. The category prototype is a preset dimension vector representing the position of a bearing state category in a low-dimensional feature space, for example, a one-dimensional vector of length 96. The fuzzy inference network is a network that performs inference based on fuzzy rules. The fuzzy rules are inference rules that include antecedents and consequents. The antecedent center is the center vector in the antecedent of the fuzzy rule used to compare the distance with the input features. The category prototypes and fuzzy rules are in a one-to-one correspondence, meaning that the elements in the two sets are uniquely matched according to the category index. The set of category prototypes is learned during the joint training phase. For example, if the total number of bearing state categories is 3 and the preset dimension is 96, then the set of category prototypes includes 3 one-dimensional vectors of length 96.
[0025] Each category prototype in the category prototype set is used as the antecedent center of the corresponding fuzzy rule in the pre-trained fuzzy inference network. There is a one-to-one correspondence between the category prototype and the fuzzy rule; for example, the first category prototype corresponds to the first fuzzy rule and serves as its antecedent center, the second category prototype corresponds to the second fuzzy rule and serves as its antecedent center, and the third category prototype corresponds to the third fuzzy rule and serves as its antecedent center. During the diagnosis phase, the pre-trained category prototype set is obtained, and the three one-dimensional vectors of length 96 are read for subsequent calculation of the distance between the low-dimensional hidden layer fault representation to be diagnosed and each antecedent center.
[0026] This embodiment obtains a pre-trained set of category prototypes, ensuring that each bearing state category has a corresponding category prototype, and the number of category prototypes is the same as the total number of bearing state categories, thus avoiding diagnostic bias towards the majority class. Each category prototype serves as the antecedent center for a corresponding fuzzy rule, with a one-to-one correspondence between the category prototype and the fuzzy rule. This allows the normalized activation intensity to be determined based on the distance between the low-dimensional hidden layer fault representation to be diagnosed and each antecedent center, improving the accuracy of fault diagnosis results under conditions of class imbalance and noise interference.
[0027] S104: Based on the distance between the low-dimensional hidden layer fault representation to be diagnosed and each antecedent center, and the diffusion parameters of the fuzzy rules corresponding to each antecedent center, calculate the normalized activation intensity of each fuzzy rule.
[0028] In this embodiment, for each low-dimensional hidden layer fault representation to be diagnosed, the squared Euclidean distance between the low-dimensional hidden layer fault representation to be diagnosed and each antecedent center is calculated, and the squared Euclidean distance is divided by a preset dimension to obtain the normalized squared Euclidean distance of the low-dimensional hidden layer fault representation to be diagnosed relative to the fuzzy rule corresponding to the antecedent center. For example, if the preset dimension is 96, and the squared Euclidean distance between an antecedent center and the low-dimensional hidden layer fault representation to be diagnosed is 192, then the normalized squared Euclidean distance is 2. The normalized squared Euclidean distance is input into a Gaussian function scaled by the learnable diffusion parameter of the fuzzy rule corresponding to the antecedent center to obtain the original activation intensity of the fuzzy rule corresponding to the antecedent center. For example, if the diffusion parameter is 1.5, the original activation intensity of the fuzzy rule calculated by the Gaussian function is 0.64. For each low-dimensional hidden layer fault representation to be diagnosed, the original activation intensity of each fuzzy rule corresponding to the low-dimensional hidden layer fault representation to be diagnosed is divided by the sum of the original activation intensities of all fuzzy rules and the sum of the numerical stability constant to obtain the normalized activation intensity of each fuzzy rule. For example, if the sum of the original activation intensities of all fuzzy rules is 2.0 and the numerical stability constant is 0.0001, and the original activation intensity of a certain fuzzy rule is 0.64, then the normalized activation intensity of that fuzzy rule is 0.64 divided by 2.0001, which is approximately equal to 0.32. The sum of the normalized activation intensities of all fuzzy rules is 1.
[0029] This embodiment calculates the normalized activation intensity of each fuzzy rule by using distance and diffusion parameters, so that the fuzzy rule corresponding to the closer antecedent center obtains a higher normalized activation intensity. This provides accurate weights for the subsequent weighted summation of the category scores of all fuzzy rules for the same bearing state category, thereby improving the accuracy of fault diagnosis results under the condition of coexistence of category imbalance and noise interference.
[0030] S105: Input the low-dimensional hidden layer fault representation to be diagnosed into the consequent of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. According to the normalized activation intensity of each fuzzy rule, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregate score of each bearing state category.
[0031] In this embodiment, the low-dimensional hidden layer fault to be diagnosed is represented as a one-dimensional vector of length 96. The fuzzy inference network includes three fuzzy rules, corresponding to three bearing state categories: normal, inner ring fault, and outer ring fault. The low-dimensional hidden layer fault representation to be diagnosed is input into the consequent of each fuzzy rule, where the consequent is the part of the fuzzy rule used to output a category score based on the input features. The category score is a numerical value given by a fuzzy rule for a bearing state category, indicating the degree to which the rule considers the input to belong to that bearing state category.
[0032] For the first fuzzy rule, its category score for the first bearing state category is the inner product of the rule's score weight coefficient vector for the first bearing state category and the low-dimensional hidden fault representation to be diagnosed, plus the rule's bias for the first bearing state category, for example, 0.8. Similarly, the category scores for the second and third bearing state categories are obtained, for example, 0.2 and 0.1 respectively. The second and third fuzzy rules also yield category scores for the three bearing state categories respectively.
[0033] Based on the normalized activation intensity of each fuzzy rule, the category scores of all fuzzy rules for the same bearing state category are weighted and summed. The weighted summation involves multiplying multiple values by their respective weights and then adding them together. The same bearing state category refers to the same bearing state category targeted by multiple fuzzy rules. The aggregate score is the weighted sum of the category scores of all fuzzy rules for the same bearing state category. For example, if the normalized activation intensities of fuzzy rules 1, 2, and 3 are 0.5, 0.3, and 0.2 respectively, and their category scores for the first bearing state category are 0.8, 0.6, and 0.4 respectively, then the aggregate score for the first bearing state category is 0.5 multiplied by 0.8 plus 0.3 multiplied by 0.6 plus 0.2 multiplied by 0.4, which equals 0.66. Similarly, the aggregate scores for the second and third bearing state categories are obtained, for example, 0.45 and 0.22 respectively.
[0034] This embodiment scores each bearing state category by assigning a score to each fuzzy rule consequent and sums the scores by normalization activation intensity. This results in a greater contribution from the fuzzy rule corresponding to the antecedent center that is closer to the low-dimensional hidden layer fault representation to be diagnosed. By integrating all fuzzy rule information, the aggregate score of each bearing state category is obtained, providing accurate input for subsequent normalization index calculation and improving the accuracy of fault diagnosis results under conditions of class imbalance and noise interference.
[0035] S106: Perform normalized exponent calculation on each aggregate score to obtain the predicted probability of each bearing condition category, and take the bearing condition category corresponding to the maximum predicted probability as the fault diagnosis result of the rolling bearing to be diagnosed.
[0036] In this embodiment, the aggregate scores for each bearing condition category are obtained in the previous step. For example, normal is 0.66, inner ring fault is 0.45, and outer ring fault is 0.22. A normalized exponent calculation is performed on each aggregate score. This normalized exponent calculation converts multiple values into values between 0 and 1, with a sum of 1. For example, the exponents of each aggregate score are calculated separately, and then divided by the sum of all exponents.
[0037] Specifically, this embodiment calculates the index value for each aggregate score. For example, the index value for a normal aggregate score of 0.66 is 1.934, the index value for an inner ring fault aggregate score of 0.45 is 1.568, and the index value for an outer ring fault aggregate score of 0.22 is 1.246. The three index values are added together to obtain 4.748. Each index value is divided by 4.748 to obtain the predicted probability for each bearing condition category. The predicted probability is a value representing the likelihood that the rolling bearing to be diagnosed belongs to a certain bearing condition category, obtained after normalized exponential calculation. For example, the predicted probability for normal bearings is approximately 0.407 (1.934 divided by 4.748), the predicted probability for inner ring faults is approximately 0.330 (1.568 divided by 4.748), and the predicted probability for outer ring faults is approximately 0.263 (1.246 divided by 4.748). The sum of the predicted probabilities for each bearing condition category is 1.
[0038] In this embodiment, the predicted probabilities of each bearing condition category are compared. The maximum predicted probability is the one with the largest value among the predicted probabilities of each bearing condition category, for example, 0.407. The bearing condition category corresponding to the maximum predicted probability is taken as the fault diagnosis result of the rolling bearing to be diagnosed, where the fault diagnosis result is the finally determined bearing condition category of the rolling bearing to be diagnosed, such as inner ring fault.
[0039] This embodiment converts each aggregated score into a predicted probability for each bearing condition category through normalized index calculation, making the probabilities of each bearing condition category comparable. The bearing condition category corresponding to the highest predicted probability is used as the fault diagnosis result of the rolling bearing to be diagnosed, avoiding misjudgment caused by directly using aggregated scores, and improving the accuracy and readability of fault diagnosis results under the conditions of class imbalance and noise interference.
[0040] As can be seen from the above, the embodiments of this application can solve the problem of insufficient diagnostic accuracy under the coexistence of class imbalance and noise interference. The vibration samples of the window to be diagnosed are processed by a pre-trained fuzzy attention convolutional neural network. This network can suppress noise interference, making the output low-dimensional hidden layer fault representation of the to be diagnosed more stable and reliable, reducing the impact of noise on the diagnostic results from the feature source. Since each bearing state category has an independent category prototype, the diagnostic process does not depend on the number of samples of each bearing state category, but uses the distance between the low-dimensional hidden layer fault representation of the to be diagnosed and the center of each antecedent as the judgment basis. Therefore, even if the number of samples of each bearing state category in the training data is unbalanced, a minority of fault categories can still obtain a fair activation opportunity through their corresponding category prototypes, avoiding the diagnostic results being biased towards the majority class samples. The normalized activation intensity of each fuzzy rule is determined according to the distance and diffusion parameters, and the category scores of all fuzzy rules for the same bearing state category are weighted and summed according to this intensity, and then the predicted probability is obtained by normalization exponent calculation. This process assigns higher weight to rules corresponding to closer category prototypes, thus enabling accurate differentiation of bearing condition categories even when category imbalance and noise interference coexist, thereby improving the accuracy of fault diagnosis results.
[0041] Figure 2 This is a schematic diagram of the overall architecture of a fuzzy attention convolutional neural network-adaptive prototype embedding model provided in an embodiment of this application, as shown below. Figure 2 As shown, the model includes a Fuzzy Attention Convolutional Neural Network (FACNN) unit, a Prototype Clustering (PC) unit, and a Takagi-Sugeno-Kang Fuzzy Neural Network (TSK-FNN) unit. Continuous raw vibration signals from the rolling bearing used for training are input into the FACNN unit. The FACNN unit comprises multiple cascaded FACNN processing blocks, shown as FACNN block 1, FACNN block 2 through FACNN block L in the figure. Each FACNN processing block sequentially includes a convolutional layer, ReLU activation, and microchannel attention. The output of each FACNN processing block is flattened and then passed through a fully connected layer to obtain a feature vector representation (i.e., training a low-dimensional hidden layer fault representation). The feature vector representation is input into the PC unit. The PC unit includes a latent space, where dots represent feature points and stars represent prototypes; the adaptive clustering loss of the PC unit includes intra-class compactness loss. Prototype separation loss And prototype consistency loss The output of the PC unit is input to the TSK-FNN unit. The TSK-FNN unit receives test samples, including rules 1 to N. Each rule includes an antecedent and a consequent. The output of the consequent of each rule is processed by Softmax to obtain the fault diagnosis result.
[0042] like Figure 2 The detailed diagram of the FACNN unit is shown below, showing the input samples. The data is processed sequentially through FACNN processing blocks 1 to FACNN processing block L, and then through flattened and fully connected layers to obtain the feature vector representation.
[0043] like Figure 2 FACNN processing block As shown in the main path, input Dimensions After passing through convolutional layers and ReLU, a convolutional feature map is obtained, with dimensions... Then it enters the microchannel attention and generates... Channel number characteristics, among which ,Include (The membership tensor obtained during the microchannel attention calculation represents the membership degree of the convolution response relative to each Gaussian membership function.) (The diffusion parameter or center parameter of the Gaussian membership function in microchannel attention is used to control the range of the fuzzy response.) (Conservative or Gaussian blur response obtained in microchannel attention) (Attention features or intermediate attention variables obtained from microchannel attention) (Learnable weight parameters of the fully connected mapping in microchannel attention) and other intermediate variables or learnable parameters in the microchannel attention calculation process, with dimensions of A conservative fuzzy response is obtained through channel splicing, with dimensions... Then, it is obtained through Global Average Pooling (GAP). Features; the weight matrix of the first fully connected layer in the microchannel attention mechanism. The weight matrix of the second fully connected layer in Sigmoid and microchannel attention. The Sigmoid function yields the channel attention vector, with dimensions... Finally, through channel scaling / attention operations, the channel attention vector is multiplied by the convolutional feature map channel by channel to obtain the ... Output feature map of each input sample after channel attention weighting Dimension .
[0044] In one embodiment of this application, the pre-trained fuzzy attention convolutional neural network, the pre-trained category prototype set, and the pre-trained fuzzy inference network are obtained through joint training via the following steps: The continuous raw vibration signals of the rolling bearing used for training under normal and various fault conditions are obtained. The continuous raw vibration signals are slid segmented according to the preset window length and preset sliding step size to obtain training window vibration samples with category labels, and the training set is extracted from the training window vibration samples. A category-aware batch sampling strategy is adopted to extract the same number of training window vibration samples from each bearing state category in the training set to form a training batch. The vibration samples of each training window in each training batch are input into the fuzzy attention convolutional neural network to be trained, so as to obtain the training low-dimensional hidden layer fault representation of each training window vibration sample with a preset dimension. Each training low-dimensional hidden layer fault representation and its corresponding category label are input into the prototype clustering unit to establish multiple learnable category prototypes, which are the same number as the total number of bearing state categories, forming a category prototype set; each category prototype in the category prototype set is used as the antecedent center of the corresponding fuzzy rule in the fuzzy inference network to be trained. Calculate the intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss, and then sum these losses using weighted averages to obtain the prototype clustering loss. The fault representations of each training low-dimensional hidden layer are input into the consequents of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. Based on the distance between each training low-dimensional hidden layer fault representation and each antecedent center, and the diffusion parameters of the fuzzy rules corresponding to each antecedent center, the normalized activation intensity of each fuzzy rule is calculated. Then, according to each normalized activation intensity, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregate score of each bearing state category. Finally, the predicted probability of each bearing state category is obtained by normalized exponent calculation. The cross-entropy classification loss is calculated based on the predicted probability of each bearing state category and the corresponding category label. The weighted sum of the cross-entropy classification loss and the prototype clustering loss is used as the total loss. The parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network are updated through backpropagation until a preset stopping condition is reached, resulting in a pre-trained fuzzy attention convolutional neural network, a pre-trained category prototype set, and a pre-trained fuzzy inference network. The preset stopping condition includes reaching a preset number of iterations.
[0045] In this embodiment, the training rolling bearing is a rolling bearing used in the joint training phase and whose state is known, such as a normal bearing, an inner ring fault bearing, or an outer ring fault bearing installed on a test bench; the normal state is the fault-free operating state of the rolling bearing; multiple fault states are the states where the rolling bearing has different types or locations of faults, such as inner ring fault, outer ring fault, or rolling element fault; the continuous raw vibration signal is the vibration signal continuously collected by sensors during the operation of the training rolling bearing, without segmentation processing, for example, using The vibration acceleration signal of the drive end is acquired at the sampling frequency. Let the first... The continuous original vibration signal is , length is The total number of bearing condition categories is ,For example These correspond to normal operation, inner ring fault, and outer ring fault, respectively; Let... , , Set the preset window length. Preset sliding step size The continuous raw vibration signal is segmented into sliding segments according to a preset window length and a preset sliding step size to obtain training window vibration samples with category labels. These training window vibration samples with category labels are data segments obtained after segmenting the continuous raw vibration signal into sliding segments, each with a preset window length and labeled with its respective bearing state category. Class 1 The training window contains vibration samples: ; No. The number of vibration samples in the training window is: ; For example Training and validation sets are extracted from the vibration samples within the training window. The training set is used to update the parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network. The validation set is used to monitor diagnostic performance and select the optimal model parameters. To simulate industrial class imbalance, the imbalance ratio is defined as the ratio of the number of vibration samples in the normal class training window to the number of vibration samples in each fault class training window within the training set. and construct for , , The training subset and validation set are not used for class prototype gradient updates. A class-aware batch sampling strategy is employed, sampling the same number of samples from each bearing state category in the training set. The training window vibration samples are used to form a training batch. The category-aware batch sampling strategy involves extracting the same number of training window vibration samples from each bearing state category in the training set to form the training batch. The bearing state categories are a general term for normal state and various fault states, with a total of [number missing]. The same number of vibration samples are extracted from the training window for each bearing state category; the training batch is a set of vibration samples from the training window input to the fuzzy attention convolutional neural network to be trained in one iteration. For example... The total number of training batch samples is: ; The number of vibration samples in the training window for classes 1, 2, and 3 within the training batch is set to 16 each. ; This training batch is used as input to the fuzzy attention convolutional neural network to be trained, so that each bearing state category participates in low-dimensional hidden layer fault representation extraction, batch feature center calculation, category prototype update and classification loss calculation.
[0046] This embodiment acquires continuous raw vibration signals of the rolling bearing used for training under normal and various fault conditions, and then slides and segments them to obtain training window vibration samples with category labels, providing a data foundation for joint training. A category-aware batch sampling strategy is adopted, extracting the same number of training window vibration samples from each bearing state category in the training set to form a training batch. This ensures that each bearing state category participates in training in each iteration, avoiding the neglect of a few fault categories due to class imbalance. This provides balanced training data for subsequent updates to the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network, improving the accuracy of fault diagnosis results under conditions of both class imbalance and noise interference.
[0047] In this embodiment, the fuzzy attention convolutional neural network to be trained includes multiple cascaded fuzzy attention convolutional blocks, each of which includes a main convolutional branch and a fuzzy attention branch. The vibration samples from each training window in the training batch are input into the fuzzy attention convolutional neural network to be trained, resulting in a low-dimensional hidden layer fault representation of a preset dimension corresponding to each training window vibration sample, including: For each fuzzy attention convolutional block, perform convolution processing to obtain the output feature map of that fuzzy attention convolutional block, and use the output feature map of the last fuzzy attention convolutional block as the high-level feature map; Vectorization is performed on each high-level feature map to obtain a one-dimensional feature vector corresponding to each training window vibration sample; each one-dimensional feature vector is mapped through a fully connected projection layer to obtain a training low-dimensional hidden layer fault representation of a preset dimension corresponding to each training window vibration sample. Convolution processing includes: The main convolutional branch performs convolution and activation operations on the input feature map to obtain a convolutional feature map. If the fuzzy attention convolutional block is the first fuzzy attention convolutional block, the input feature map is the vibration sample of each training window; if the fuzzy attention convolutional block is not the first fuzzy attention convolutional block, the input feature map is the output feature map of the previous fuzzy attention convolutional block. By setting multiple learnable Gaussian membership functions for each channel of the convolutional feature map through the fuzzy attention branch, the membership degree of the convolutional response at each spatial location in the convolutional feature map with respect to each Gaussian membership function is calculated. The minimum value of multiple membership degrees at the same spatial location in the same channel is taken to obtain the conservative fuzzy response. Global average pooling and fully connected mapping are performed on the conservative fuzzy response in sequence to obtain the channel attention vector. The channel attention vector is then multiplied element-wise with the convolutional feature map for each channel to obtain the output feature map of the fuzzy attention convolutional block.
[0048] In this embodiment, multiple cascaded fuzzy attention convolutional blocks are multiple fuzzy attention convolutional blocks connected in sequence; the main convolutional branch is the path in the fuzzy attention convolutional block that performs convolution and activation operations, and the fuzzy attention branch is the path in the fuzzy attention convolutional block that generates channel attention vectors.
[0049] In this embodiment, the main convolutional branch includes a two-dimensional convolutional layer and an activation layer. For the first fuzzy attention convolutional block, the input feature map is the vibration sample of the training window, with a size of 1024×1 and 1 channel. For subsequent fuzzy attention convolutional blocks, the input feature map is the output feature map of the previous fuzzy attention convolutional block. The two-dimensional convolutional layer uses a 3×3 kernel with a stride of 1 and padding of 1. The number of kernels is 16, and the weights and biases are initialized using the Xavier method. The convolutional kernel slides on the input feature map with the stride, and at each spatial location, the local region of the input feature map is multiplied element-wise with the kernel and summed. The bias is then added to obtain the convolutional response, resulting in a convolutional feature map with 16 channels and a spatial size of 1024×1. The activation layer uses the ReLU function to perform activation operations on each convolutional response in the convolutional feature map, setting negative values to zero and keeping positive values unchanged to introduce nonlinearity. The resulting convolutional feature maps are then fed into the fuzzy attention branch to calculate the membership degree, conservative fuzzy response, and channel attention vector for each channel.
[0050] Multiple learnable Gaussian membership functions are set for each channel of the convolutional feature map. These learnable Gaussian membership functions are parameter-trainable Gaussian functions used to calculate the membership degree of the convolutional response relative to that Gaussian function. Let the th... The convolutional feature maps output by each fuzzy attention convolutional block are Its number of channels is The space dimensions are For the first Each channel, set The learnable Gaussian membership function, where the th... The center of each Gaussian membership function is The diffusion parameter is Diffusion parameters The unconstrained parameters are transformed by the Softplus function and then a numerical stability constant is added. Obtain, to guarantee Greater than zero. Center and diffusion parameters All are learnable parameters, initialized using the Xavier method, and updated via backpropagation during joint training. For example, the number of channels in the convolutional feature map. The number of Gaussian membership functions set for each channel The spatial dimensions are 1024×1, and the numerical stability constant is... .
[0051] Calculate the membership degree of the convolution response at each spatial location in the convolution feature map relative to each Gaussian membership function. For the ... The training window vibration samples, at the th training window The first fuzzy attention convolution block individual channels, spatial locations Convolutional response Compared to the first The membership degree of each Gaussian membership function is: ; in, For sample index, For the index of fuzzy attention convolutional blocks, For Gaussian membership function index, For channel index, and For spatial location index, For convolutional response, Center of Gaussian membership function For diffusion parameters, This is the numerical stability constant. The membership value ranges from 0 to 1, indicating the degree to which the convolution response belongs to the Gaussian membership function.
[0052] A conservative fuzzy response is obtained by minimizing multiple membership degrees at the same spatial location within the same channel. Specifically, for the first... The training window vibration samples, at the th training window The first fuzzy attention convolution block individual channels, spatial locations At this point, the conservative fuzzy response is: ; The minimum value operator is used instead of the maximum or mean value to obtain a conservative estimate: when any one of the multiple Gaussian membership functions gives a low membership degree, the fuzzy response at that position is suppressed, thereby reducing the weight of noise or uncertain responses and avoiding overactivation of a single Gaussian membership function that could lead to unreliable channels being incorrectly amplified.
[0053] Global average pooling and fully connected mapping are performed sequentially on the conservative fuzzy response to obtain the channel attention vector. Global average pooling is applied to each channel. , will space dimension The scalar value of the channel is obtained by averaging the conservative fuzzy response. ; Then Input two fully connected layers, the weights of the first fully connected layer are... The weights of the second fully connected layer are The activation function used in all cases is the Sigmoid function, resulting in channel attention vectors: ; in, For dimension The channel attention vector, where each component corresponds to the attention weight of a channel. For example, the number of neurons in the first fully connected layer can be set to the number of channels. One-quarter of the number of neurons in the second fully connected layer is equal to the number of channels. .
[0054] The channel attention vector is multiplied element-wise with the convolutional feature map channel by channel to obtain the output feature map of the fuzzy attention convolutional block. Specifically, for the ... The training window vibration samples, the first The output feature map of the fuzzy attention convolutional block is: ; in, This indicates element-wise multiplication by channel, i.e., the first... Convolutional feature maps of each channel Multiply by the channel attention vector of that channel Therefore, the responses of channels with high noise pollution or uncertainty are suppressed, while the responses of channels with key fault characteristics are enhanced, resulting in the output feature map. The feature map is used as input to the next fuzzy attention convolutional block, or as output as a high-level feature map when the fuzzy attention convolutional block is the last fuzzy attention convolutional block.
[0055] Vectorization of the high-level feature map involves converting the multi-dimensional high-level feature map output from the last fuzzy attention convolutional block into a fixed-order one-dimensional feature vector. This vector is then mapped through a fully connected projection layer to a training low-dimensional hidden layer fault representation of a predetermined dimension. Let the high-level feature map output from the last fuzzy attention convolutional block be... Its number of channels is The space dimensions are Vectorization operations will be performed in a preset order. Flattening the channel dimension and spatial dimension, we obtain the one-dimensional feature vector corresponding to the vibration samples of this training window: ; in, To train the vibration sample index of the window, This indicates a vectorization operation. For example, when... , , At that time, one-dimensional eigenvector The dimension is .
[0056] Fully connected projection layers include weight matrices and bias vector The weight matrix Bias vector , For example, to preset the dimension. The mapping process is as follows: ; in, This represents the low-dimensional hidden layer fault representation corresponding to the vibration samples in this training window. Weight matrix. and bias vector All parameters are learnable, initialized using the Xavier method, and updated via backpropagation during joint training. This fully connected projection layer transforms the high-dimensional one-dimensional feature vector... Mapped to a preset dimension Training low-dimensional hidden layer fault representation This approach reduces the feature dimension while retaining key fault features. It also ensures that the dimension of the trained low-dimensional hidden layer fault representation is the same as the preset dimension of the class prototype, facilitating subsequent calculation of the distance between the trained low-dimensional hidden layer fault representation and the antecedent center.
[0057] The above operation is performed on each training window vibration sample in the training batch to obtain the training low-dimensional hidden layer fault representation of each training window vibration sample with a preset dimension. Let the total number of training window vibration samples in the training batch be... , for the A training window of vibration samples, after vectorization and mapping with a fully connected projection layer, yields a training low-dimensional hidden layer fault representation. Then the set of low-dimensional hidden layer fault representations corresponding to the training batch is: ; Each of them All are preset dimensions A one-dimensional vector. For example, the total number of vibration samples in the training window in a training batch. Preset dimension This yields 48 training low-dimensional hidden layer fault representations with a length of 96. If the vibration samples from each training window in the training batch are combined into a tensor input to the fuzzy attention convolutional neural network to be trained, then the fully connected projection layer can output a shape of... A tensor, where each row corresponds to a training window of vibration samples and represents the low-dimensional hidden layer fault representation. Preset dimension. It can be adjusted according to the data size and working conditions, for example, it can also be 64 or 128; the flattening order of vectorization operations can be set as needed, as long as the joint training phase and the diagnosis phase are consistent.
[0058] This embodiment uses multiple cascaded fuzzy attention convolutional blocks, main convolutional branches, and fuzzy attention branches to extract deep fault features from vibration samples in the training window step by step. It also utilizes learnable Gaussian membership functions, conservative fuzzy responses, and channel attention vectors to suppress noise channels and enhance key fault feature channels. This makes the obtained low-dimensional hidden layer fault representation stable, reliable, and dimensionally fixed, providing high-quality input for subsequent prototype clustering and fuzzy inference, and improving the accuracy of fault diagnosis results under conditions of class imbalance and noise interference.
[0059] Figure 3 This is a schematic diagram of the structure of a fuzzy attention convolutional neural network provided in an embodiment of this application, as shown below. Figure 3 As shown, a FACNN unit consists of multiple cascaded convolutional modules, i.e., FACNN blocks. The input sample is shown at the top of the figure. The system sequentially passes through multi-scale convolutional block 1, multi-scale convolutional block 2, and then multi-scale convolutional block L, followed by a flattened, fully connected (FC) layer to obtain the trained low-dimensional hidden layer fault representation. Where L is the total number of FACNN blocks.
[0060] The dashed box at the bottom of the diagram shows the internal structure of the FACNN block. The input to the FACNN block is... Its dimensions are ,in For the number of channels, For height, Width. Input After convolution and ReLU activation, the convolutional feature map is obtained. Its dimensions are . It is divided into two paths: one path is directly used for element-wise multiplication of subsequent channels; the other path enters the fuzzy attention branch and is used to estimate the importance of channels.
[0061] In the fuzzy attention branch, targeting the convolutional feature map set up Gaussian membership functions are used to obtain the dimension. The membership tensor is used. Minimum aggregation (by channel) is performed on this membership tensor to obtain a conservative fuzzy response. Then, global average pooling (GAP) is performed on the conservative fuzzy response to obtain a dimension of... The feature vectors. Then channel mapping / attention calculation is performed: sequentially through... Sigmoid Sigmoid, to obtain channel attention weights Its dimensions are Finally, the channel attention weights are... With convolutional feature maps Suppose we multiply each element by channel to obtain the weighted high-level feature map. Its dimensions are This high-level feature map It can be used as input to the next FACNN block, or when the FACNN block is the last one, it can be used for subsequent flattening and fully connected layer processing to obtain the training low-dimensional hidden layer fault representation.
[0062] In this embodiment, the prototype clustering unit does not have an independent feedforward network layer, and a learnable category prototype is set for each bearing state category. The number of learnable category prototypes is the same as the total number of bearing state categories. Each training low-dimensional hidden layer fault representation and its corresponding category label are input into the prototype clustering unit to establish multiple category prototypes equal to the total number of bearing state categories, forming a category prototype set, including: Input each training low-dimensional hidden layer fault representation and the corresponding category label into the prototype clustering unit, and associate each training low-dimensional hidden layer fault representation with the learnable category prototype of the corresponding bearing state category according to the category label. The set of category prototypes is composed of the learnable category prototypes after association.
[0063] In this embodiment, the prototype clustering unit does not have a separate feedforward network layer, i.e., it does not contain convolutional layers, fully connected layers, or other network layers used for feedforward feature transformation. Instead, it directly learns the category prototype using a loss-driven approach. Let the total number of bearing state categories be... ,For example These correspond to normal operation, inner ring fault, and outer ring fault, respectively; the preset dimension is... ,For example For the first Each bearing state category sets a learnable category prototype. ,For example This corresponds to the normal category prototype. This is the prototype of the category corresponding to the inner ring fault. This represents the category prototype corresponding to the outer ring fault. The training low-dimensional hidden layer fault representations and their corresponding category labels are input into the prototype clustering unit, where the training low-dimensional hidden layer fault representations are... Category label is The fault representations of each trained low-dimensional hidden layer are associated with the learnable class prototypes of the corresponding bearing state categories according to the category labels. For example, when... At that time, and Association. Construct a category prototype set from the prototypes of each category: ; Each category prototype in the category prototype set is used as a learnable parameter in the backpropagation update during joint training. During joint training, the total loss is used to update the prototypes. Calculate the gradient of the category prototype: ; And update according to gradient descent: ; in For example, the learning rate =0.0005. The updated category prototype continues to participate in the next iteration until the diagnostic performance on the validation set no longer improves or the preset number of iterations is reached. For example, the total number of low-dimensional hidden layer fault representations trained in the training batch is... Each training low-dimensional hidden layer fault representation is associated with a corresponding category prototype according to its category label, and the category prototype set... All three categories of prototypes participate in backpropagation updates in each iteration.
[0064] This embodiment reduces additional network parameters and computation by eliminating the need for a separate feedforward network layer in the prototype clustering unit. A learnable category prototype is assigned to each bearing state category, with the number of learnable category prototypes matching the total number of bearing state categories, ensuring that each bearing state category has a corresponding category prototype. Fault representations from each trained low-dimensional hidden layer are associated with the learnable category prototypes of their corresponding bearing state categories according to their category labels, causing similar features to cluster towards the same category prototype. These category prototypes form a category prototype set and are used as learnable parameters in the backpropagation update during joint training. This allows the category prototypes to simultaneously receive gradients from both the prototype clustering loss and the cross-entropy classification loss, mitigating the impact of class imbalance on training and improving the accuracy of fault diagnosis results.
[0065] In this embodiment, the normalized activation strength of each fuzzy rule is calculated based on the distance between the fault representation of each training low-dimensional hidden layer and each category prototype, and the diffusion parameter of the fuzzy rule corresponding to that category prototype, including: For each training low-dimensional hidden layer fault representation, calculate the normalized squared Euclidean distance between the training low-dimensional hidden layer fault representation and each class prototype. By inputting each normalized squared Euclidean distance into a Gaussian function scaled by the learnable diffusion parameter of the fuzzy rule corresponding to the prototype of that category, the original activation intensity of the fuzzy rule corresponding to the prototype of that category is obtained. For each training low-dimensional hidden layer fault representation, calculate the sum of the original activation intensities of all fuzzy rules obtained for that training low-dimensional hidden layer fault representation, add the sum of the original activation intensities to the numerical stability constant to obtain the normalized denominator; divide the original activation intensities of each fuzzy rule corresponding to that training low-dimensional hidden layer fault representation by the normalized denominator to obtain the normalized activation intensities of each fuzzy rule.
[0066] In this embodiment, let the set of category prototypes be... ,in This represents the total number of bearing condition categories. For the first Each category prototype The dimension is preset. The fuzzy inference network to be trained includes... A fuzzy rule, and , No. The fuzzy rule and the first Each category prototype One-to-one correspondence. The first Each category prototype Directly as the first The antecedent of a fuzzy rule is The center in the low-dimensional hidden layer feature space is called the antecedent center. The antecedent center is not an auxiliary reference outside the fuzzy inference network, but a core parameter that determines the activation region of the fuzzy rule in the low-dimensional hidden layer feature space.
[0067] Let the training batch be the first The training low-dimensional hidden layer fault representation corresponding to each training window vibration sample is as follows: ,in , This represents the total number of vibration samples in the training window within the training batch. For the ... fuzzy rules, calculation With the Pre-processing center Normalized squared Euclidean distance between them: ; in, Represents the Euclidean norm. The normalized squared Euclidean distance is divided by the preset dimension. This is to reduce the influence of the hidden layer dimension on the distance scale, so that distances under different dimensions are comparable.
[0068] No. The learnable diffusion parameter of the fuzzy rule is The unconstrained parameters are transformed by the Softplus function and then a numerical stability constant is added. Obtain, to guarantee ,Right now: ; in, For unconstrained learnable parameters, For example, a numerical stability constant greater than 0. The normalized squared Euclidean distance is input as the diffusion parameter. The Gaussian function of scale is obtained as follows: The original activation strength of the fuzzy rule: ; diffusion parameters Control the sensitivity range of this fuzzy rule to proximity: The larger the value, the wider the activation range; The smaller the value, the narrower the activation range.
[0069] The first The original activation strength of the fuzzy rule divided by all The sum of the original activation intensities of the fuzzy rules and the numerical stability constant The sum of these yields the first... Normalized activation strength of the fuzzy rule: ; Normalized activation intensity satisfy , indicating the first The weight of this fuzzy rule among all fuzzy rules. Distance The closer the front center Its corresponding normalized activation intensity The larger.
[0070] The consequent of each fuzzy rule receives the same low-dimensional hidden layer fault representation from the training. and output Dimensional category score vector. The fuzzy rule is for the first The category scores for each bearing condition category are as follows: ; in, For the first The fuzzy rule is for the first A learnable score weight coefficient vector for each bearing state category. For the corresponding learnable bias scalar. All The fuzzy rule is for the first The category scores of each bearing state category are summed by weighting the normalized activation strengths to obtain the first... Aggregate scores for each bearing condition category: ; in, For the first The vibration sample in the training window belongs to the first... Aggregated scores for each bearing condition category.
[0071] The predicted probability for each bearing condition category is then obtained through normalized exponent calculation. Individual aggregate score Perform the Softmax operation to obtain the first... The vibration sample in the training window belongs to the first... Predicted probabilities for each bearing condition category: ; in, satisfy The bearing state category with the highest predicted probability is the predicted category of the vibration sample in that training window. This predicted probability is then used to calculate the cross-entropy classification loss, which, together with the prototype clustering loss, constitutes the total loss. This loss is then used to update the parameters of the fuzzy attention convolutional neural network, the set of category prototypes, and the parameters of the fuzzy inference network through backpropagation. Since the category prototype is both the antecedent center and participates in the backpropagation of the cross-entropy classification loss through normalized activation intensity, the update of the category prototype synchronously changes the antecedent center position and the rule activation region of the corresponding fuzzy rule, achieving end-to-end coupling between prototype learning and fuzzy inference.
[0072] In this embodiment, each category prototype in the category prototype set corresponds to a bearing state category; the calculation of intra-class tightness loss, inter-prototype separation loss, and prototype consistency loss includes: Based on the distance between the fault representations of each low-dimensional hidden layer under the same bearing state category in the training batch and the corresponding category prototype, the intra-class compactness loss is determined. For each pair of category prototypes corresponding to different bearing state categories, when the distance between the two category prototypes in the category prototype pair is less than the preset prototype separation margin, the penalty term for the category prototype pair is determined based on the difference between the preset prototype separation margin and the distance, and the penalty terms of all category prototype pairs are combined to obtain the prototype separation loss. For each bearing state category, the mean value of each training low-dimensional hidden layer fault representation in the training batch for that bearing state category is determined as the batch feature center corresponding to that bearing state category. Based on the distance between the category prototype corresponding to that bearing state category and the batch feature center, the prototype consistency distance corresponding to that bearing state category is determined. The prototype consistency distances corresponding to all bearing state categories are combined to obtain the prototype consistency loss.
[0073] In this embodiment, each category prototype in the category prototype set corresponds to one bearing state category. Let the total number of bearing state categories be... The preset dimension is The first training batch The training set of low-dimensional hidden layer fault representations for each bearing state category is as follows: ,in For the first Number of low-dimensional hidden layer fault representations trained under each bearing state category , No. The category prototype corresponding to each bearing condition category is: The preset prototype separation margin is The intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss are calculated. The intra-class compactness loss is the loss that constrains the convergence of each trained low-dimensional hidden-layer fault representation to its corresponding prototype within the same bearing state category. It is calculated as follows: For each bearing state category, the squared Euclidean distance between each trained low-dimensional hidden-layer fault representation and its corresponding prototype is calculated. The average of these squared Euclidean distances for all trained low-dimensional hidden-layer fault representations within that category is then calculated, and finally averaged over all bearing state categories to obtain the intra-class compactness loss. ; in This represents the total number of vibration samples in the training window within the training batch.
[0074] The inter-prototype separation loss is the loss incurred in maintaining a distance between prototypes of different bearing state categories. It is calculated as follows: for pairwise prototype pairs corresponding to different bearing state categories, if the distance between the two prototypes in the pair is less than a preset prototype separation margin... At that time, the penalty term for the prototype pair of that category is determined based on the difference between the preset prototype separation margin and the distance, and the penalty terms of all prototype pairs of all categories are combined to obtain the prototype separation loss: ; in .
[0075] The prototype consistency loss is the loss that constrains the category prototype corresponding to each bearing state category to keep close to the batch feature center. It is calculated as follows: For each bearing state category, the mean of the low-dimensional hidden layer fault representations of that bearing state category in the training batch is determined as the batch feature center corresponding to that bearing state category. ; Based on the distance between the category prototype corresponding to the bearing state category and the batch feature center, the prototype consistency distance corresponding to the bearing state category is determined. The prototype consistency distances corresponding to all bearing state categories are then combined to obtain the prototype consistency loss. ; The prototype clustering loss is obtained by weighted summing of the intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss: ; in , , These are non-negative weighting coefficients. For example... , , The number of low-dimensional hidden layer fault representations trained for each bearing state category is 16. , , , The total loss is obtained by weighting and summing the prototype clustering loss and the cross-entropy classification loss. The parameters of the fuzzy attention convolutional neural network, the set of category prototypes, and the parameters of the fuzzy inference network are then updated through backpropagation.
[0076] This embodiment uses intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss to form a prototype clustering loss. This allows the low-dimensional hidden layer fault representation trained under the same bearing state category to cluster towards the corresponding category prototypes, maintains the interval between category prototypes corresponding to different bearing state categories, and makes the category prototypes close to the batch feature center. This alleviates the problem of feature space mixing and prototype drift under class imbalance conditions and improves the accuracy of fault diagnosis results.
[0077] The cross-entropy classification loss is calculated based on the predicted probability of each bearing condition category and its corresponding category label. Let the total number of vibration samples in the training window in the training batch be... The total number of bearing condition categories is . No. The category labels corresponding to the vibration samples in the training window are represented by one-hot encoding. ,in Indicates the first The vibration sample in the training window belongs to the first... Each bearing condition category Indicates that it does not belong to the first Bearing condition categories. The vibration sample in the training window belongs to the first... The predicted probability of each bearing condition category is: The result is obtained from the previous step of normalizing the exponent, which satisfies... The cross-entropy classification loss is: ; in, Represents the natural logarithm. When predicting probability The closer to the category label At that time, cross-entropy classification loss The smaller the value, the larger the value; conversely, the larger the value. The cross-entropy classification loss is averaged over all vibration samples in the training window and all bearing state categories, such that the loss value is proportional to the total number of vibration samples in the training window in the training batch. This is irrelevant and facilitates comparisons between different training batches.
[0078] The total loss is the weighted sum of the cross-entropy classification loss and the prototype clustering loss, i.e.: ; in, These are the non-negative weight coefficients of the cross-entropy classification loss. For example... Prototype clustering loss The values have been calculated using the steps described above. Each weighting coefficient can be adjusted based on the data size and operating conditions; its purpose is to strike a balance between classification accuracy and prototype structural constraints.
[0079] In this embodiment, the parameters of the fuzzy attention convolutional neural network, the set of category prototypes, and the parameters of the fuzzy inference network are updated through backpropagation, including: In each iteration, based on the total loss, the gradients of the parameters of the fuzzy attention convolutional neural network, the gradients of each category prototype in the category prototype set, and the gradients of the parameters of the fuzzy inference network are calculated through backpropagation. The parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network are then updated according to the gradient descent method.
[0080] In this embodiment, the parameters of the fuzzy attention convolutional neural network, the set of category prototypes, and the parameters of the fuzzy inference network are updated through backpropagation. Let the parameters of the fuzzy attention convolutional neural network be... The category prototype set is ,in This represents the total number of bearing condition categories. For the first Each category prototype The parameters of the fuzzy inference network are set to the preset dimension. .Will , and Initialization using the Xavier method, where the initial parameter values are determined based on the number of input and output neurons, such as the weights. From uniform distribution Mid-sampling, of which and These represent the number of input and output neurons, respectively. In each iteration, vibration samples from each training window in the training batch are input into the fuzzy attention convolutional neural network to be trained. The intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss are calculated sequentially, and the prototype clustering loss is obtained by weighted summation. The cross-entropy classification loss is calculated based on the predicted probability of each bearing state category and the corresponding category label. ,by As part of the total loss, The non-negative weight coefficients of the cross-entropy classification loss, for example Based on total losses Calculate separately through backpropagation gradient , Gradients of prototypes of each category and gradient Backpropagation involves calculating the gradients of each parameter layer by layer from the output layer to the input layer based on the total loss. Then, the parameters are updated according to the gradient descent method. , and ,Right now: ; ; ; in For example, the learning rate =0.0005. Repeat each iteration as described above until the diagnostic performance on the validation set no longer improves or the preset number of iterations is reached, and save the model parameters with the best diagnostic performance. In this way, the fuzzy attention convolutional neural network focuses on extracting discriminative fault features, the category prototype set focuses on forming a compact intra-class and separate inter-class prototype structure, and the fuzzy inference network focuses on optimizing rule activation and consequent scores, with the three working together for optimization.
[0081] This embodiment initializes the network using the Xavier method, ensuring a reasonable distribution of parameters for the fuzzy attention convolutional neural network, the class prototype set, and the fuzzy inference network at the start of training. This avoids gradient vanishing or exploding and accelerates joint training convergence. In each iteration, the three sets of parameters are calculated and updated separately using backpropagation based on the total loss. This enables collaborative optimization of feature extraction, prototype learning, and fuzzy inference, improving the accuracy of fault diagnosis results under conditions of class imbalance and noise interference.
[0082] After updating the parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network in each iteration, the diagnostic performance of the current model is evaluated using a validation set. The validation set is derived from vibration samples within the training window with class labels. It does not participate in parameter updates but is only used to monitor the model's diagnostic performance on unseen data, using metrics such as accuracy, macro-average F1 score, or macro-average recall as diagnostic performance indicators. Joint training stops when the diagnostic performance on the validation set no longer improves or when the preset number of iterations is reached. After training stops, the model parameters corresponding to the iteration with the best diagnostic performance on the validation set are selected and saved. These saved model parameters include the parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network. The saved fuzzy attention convolutional neural network is the pre-trained fuzzy attention convolutional neural network, the saved category prototype set is the pre-trained category prototype set, and the saved fuzzy inference network is the pre-trained fuzzy inference network. These three are used in the diagnostic phase to diagnose the rolling bearing under test. By setting stopping conditions and saving the model parameters with the best diagnostic performance on the validation set, overfitting can be avoided, and the model parameters with the best generalization performance during joint training can be used in the diagnostic phase.
[0083] Corresponding to the rolling bearing fault diagnosis method in the above embodiment, Figure 4 This is a structural block diagram of a rolling bearing fault diagnosis system provided in one embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 4 The rolling bearing fault diagnosis system 20 includes: a signal acquisition and segmentation module 21, a feature extraction module 22, a prototype acquisition module 23, an activation intensity calculation module 24, a score aggregation module 25, and a diagnostic output module 26.
[0084] Among them, the signal acquisition and segmentation module 21 is used to acquire the vibration signal of the rolling bearing to be diagnosed, and to slide segment the vibration signal according to the preset window length and preset sliding step size to obtain the vibration sample of the window to be diagnosed. Feature extraction module 22 is used to input the vibration sample of the window to be diagnosed into a pre-trained fuzzy attention convolutional neural network to obtain a low-dimensional hidden layer fault representation of the window to be diagnosed with a preset dimension. The prototype acquisition module 23 is used to acquire a pre-trained set of category prototypes. The set of category prototypes includes the same number of category prototypes as the total number of bearing state categories. Each category prototype is a vector of a preset dimension, and each category prototype serves as the antecedent center of the corresponding fuzzy rule in the pre-trained fuzzy inference network. The category prototypes correspond one-to-one with the fuzzy rules. The activation intensity calculation module 24 is used to calculate the normalized activation intensity of each fuzzy rule based on the distance between the low-dimensional hidden layer fault representation to be diagnosed and each antecedent center, and the diffusion parameters of the fuzzy rules corresponding to each antecedent center. The scoring aggregation module 25 is used to input the low-dimensional hidden layer fault representation to be diagnosed into the consequent of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. According to the normalized activation intensity of each fuzzy rule, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregate score of each bearing state category. The diagnostic output module 26 is used to perform normalized index calculation on each aggregate score to obtain the predicted probability of each bearing state category, and the bearing state category corresponding to the maximum predicted probability is used as the fault diagnosis result of the rolling bearing to be diagnosed.
[0085] In one embodiment of this application, the rolling bearing fault diagnosis system 20 further includes: The joint training module is used to acquire continuous raw vibration signals of the rolling bearing under normal and various fault conditions. The continuous raw vibration signals are slid segmented according to the preset window length and preset sliding step size to obtain training window vibration samples with category labels, and the training set is extracted from the training window vibration samples. A category-aware batch sampling strategy is adopted to extract the same number of training window vibration samples from each bearing state category in the training set to form a training batch. The vibration samples of each training window in each training batch are input into the fuzzy attention convolutional neural network to be trained, so as to obtain the training low-dimensional hidden layer fault representation of each training window vibration sample with a preset dimension. Each training low-dimensional hidden layer fault representation and its corresponding category label are input into the prototype clustering unit to establish multiple learnable category prototypes, which are the same number as the total number of bearing state categories, forming a category prototype set; each category prototype in the category prototype set is used as the antecedent center of the corresponding fuzzy rule in the fuzzy inference network to be trained. Calculate the intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss, and then sum these losses using weighted averages to obtain the prototype clustering loss. The fault representations of each training low-dimensional hidden layer are input into the consequents of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. Based on the distance between each training low-dimensional hidden layer fault representation and each antecedent center, and the diffusion parameters of the fuzzy rules corresponding to each antecedent center, the normalized activation intensity of each fuzzy rule is calculated. Then, according to each normalized activation intensity, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregated scores of each category. Finally, the predicted probability of each bearing state category is obtained by normalized exponent calculation. The cross-entropy classification loss is calculated based on the predicted probability of each bearing state category and the corresponding category label. The weighted sum of the cross-entropy classification loss and the prototype clustering loss is used as the total loss. The parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network are updated through backpropagation until a preset stopping condition is reached, resulting in a pre-trained fuzzy attention convolutional neural network, a pre-trained category prototype set, and a pre-trained fuzzy inference network. The preset stopping condition includes reaching a preset number of iterations.
[0086] In one embodiment of this application, the fuzzy attention convolutional neural network to be trained includes multiple cascaded fuzzy attention convolutional blocks, each fuzzy attention convolutional block including a main convolutional branch and a fuzzy attention branch; the joint training module is specifically used for: For each fuzzy attention convolutional block, perform convolution processing to obtain the output feature map of that fuzzy attention convolutional block, and use the output feature map of the last fuzzy attention convolutional block as the high-level feature map; Vectorization is performed on each high-level feature map to obtain a one-dimensional feature vector corresponding to each training window vibration sample; each one-dimensional feature vector is mapped through a fully connected projection layer to obtain a training low-dimensional hidden layer fault representation of a preset dimension corresponding to each training window vibration sample. Convolution processing includes: The main convolutional branch performs convolution and activation operations on the input feature map to obtain a convolutional feature map. If the fuzzy attention convolutional block is the first fuzzy attention convolutional block, the input feature map is the vibration sample of each training window; if the fuzzy attention convolutional block is not the first fuzzy attention convolutional block, the input feature map is the output feature map of the previous fuzzy attention convolutional block. By setting multiple learnable Gaussian membership functions for each channel of the convolutional feature map through the fuzzy attention branch, the membership degree of the convolutional response at each spatial location in the convolutional feature map with respect to each Gaussian membership function is calculated. The minimum value of multiple membership degrees at the same spatial location in the same channel is taken to obtain the conservative fuzzy response. Global average pooling and fully connected mapping are performed on the conservative fuzzy response in sequence to obtain the channel attention vector. The channel attention vector is then multiplied element-wise with the convolutional feature map for each channel to obtain the output feature map of the fuzzy attention convolutional block.
[0087] In one embodiment of this application, the prototype clustering unit does not have an independent feedforward network layer, and a learnable category prototype is set for each bearing state category, the number of learnable category prototypes being the same as the total number of bearing state categories; the joint training module is specifically used for: Input each training low-dimensional hidden layer fault representation and the corresponding category label into the prototype clustering unit, and associate each training low-dimensional hidden layer fault representation with the learnable category prototype of the corresponding bearing state category according to the category label. The set of category prototypes is composed of the learnable category prototypes after association.
[0088] In one embodiment of this application, the joint training module is specifically used for: For each training low-dimensional hidden layer fault representation, calculate the normalized squared Euclidean distance between the training low-dimensional hidden layer fault representation and each class prototype. By inputting each normalized squared Euclidean distance into a Gaussian function scaled by the learnable diffusion parameter of the fuzzy rule corresponding to the prototype of that category, the original activation intensity of the fuzzy rule corresponding to the prototype of that category is obtained. For each training low-dimensional hidden layer fault representation, calculate the sum of the original activation intensities of all fuzzy rules obtained for that training low-dimensional hidden layer fault representation, add the sum of the original activation intensities to the numerical stability constant to obtain the normalized denominator; divide the original activation intensities of each fuzzy rule corresponding to that training low-dimensional hidden layer fault representation by the normalized denominator to obtain the normalized activation intensities of each fuzzy rule.
[0089] In one embodiment of this application, each category prototype in the category prototype set corresponds to a bearing state category; the joint training module is specifically used for: Based on the distance between the fault representations of each low-dimensional hidden layer under the same bearing state category in the training batch and the corresponding category prototype, the intra-class compactness loss is determined. For each pair of category prototypes corresponding to different bearing state categories, when the distance between the two category prototypes in the category prototype pair is less than the preset prototype separation margin, the penalty term for the category prototype pair is determined based on the difference between the preset prototype separation margin and the distance, and the penalty terms of all category prototype pairs are combined to obtain the prototype separation loss. For each bearing state category, the mean value of each training low-dimensional hidden layer fault representation in the training batch for that bearing state category is determined as the batch feature center corresponding to that bearing state category. Based on the distance between the category prototype corresponding to that bearing state category and the batch feature center, the prototype consistency distance corresponding to that bearing state category is determined. The prototype consistency distances corresponding to all bearing state categories are combined to obtain the prototype consistency loss.
[0090] In one embodiment of this application, the joint training module is specifically used for: In each iteration, based on the total loss, the gradients of the parameters of the fuzzy attention convolutional neural network, the gradients of each category prototype in the category prototype set, and the gradients of the parameters of the fuzzy inference network are calculated through backpropagation. The parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network are then updated according to the gradient descent method.
[0091] See Figure 5 , Figure 5 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 5 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of each module / unit in the above-described device embodiments, for example... Figure 4 The functions of the signal acquisition and segmentation module 21, feature extraction module 22, prototype acquisition module 23, activation intensity calculation module 24, score aggregation module 25, and diagnostic output module 26 are shown.
[0092] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0093] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.
[0094] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory.
[0095] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation method described in the rolling bearing fault diagnosis method provided in the embodiments of this application, or they can execute the implementation method of the electronic device described in the embodiments of this application, which will not be repeated here.
[0096] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0097] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0098] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. 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 this application.
[0099] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces or units, or they may be electrical, mechanical, or other forms of connection.
[0101] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0102] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0103] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for diagnosing rolling bearing faults, characterized in that, include: The vibration signal of the rolling bearing to be diagnosed is acquired, and the vibration signal is divided into sliding segments according to a preset window length and a preset sliding step size to obtain the vibration sample of the window to be diagnosed. The vibration sample of the window to be diagnosed is input into a pre-trained fuzzy attention convolutional neural network to obtain a low-dimensional hidden layer fault representation of the window to be diagnosed with a preset dimension. Obtain a pre-trained set of category prototypes, which includes the same number of category prototypes as the total number of bearing state categories. Each category prototype is a vector of a preset dimension, and each category prototype serves as the antecedent center of the corresponding fuzzy rule in the pre-trained fuzzy inference network. The category prototypes correspond one-to-one with the fuzzy rules. Based on the distance between the low-dimensional hidden layer fault representation to be diagnosed and each of the antecedent centers, and the diffusion parameters of the fuzzy rules corresponding to each antecedent center, the normalized activation intensity of each fuzzy rule is calculated. The low-dimensional hidden layer fault characterization to be diagnosed is input into the consequent of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. According to the normalized activation intensity of each fuzzy rule, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregate score of each bearing state category. The normalized exponent is calculated on each aggregate score to obtain the predicted probability of each bearing condition category. The bearing condition category corresponding to the highest predicted probability is taken as the fault diagnosis result of the rolling bearing to be diagnosed.
2. The rolling bearing fault diagnosis method as described in claim 1, characterized in that, The pre-trained fuzzy attention convolutional neural network, the pre-trained category prototype set, and the pre-trained fuzzy inference network are obtained through joint training using the following steps: The continuous raw vibration signals of the rolling bearing used for training under normal and various fault conditions are obtained. The continuous raw vibration signals are then segmented by sliding according to the preset window length and the preset sliding step size to obtain training window vibration samples with category labels. The training set is then extracted from the training window vibration samples. A category-aware batch sampling strategy is adopted to extract the same number of training window vibration samples from each bearing state category in the training set to form a training batch. The vibration samples of each training window in each training batch are input into the fuzzy attention convolutional neural network to be trained, so as to obtain the training low-dimensional hidden layer fault representation of each training window vibration sample with a preset dimension. Each of the trained low-dimensional hidden layer fault representations and the corresponding category labels are input into the prototype clustering unit to establish multiple learnable category prototypes that are the same number as the total number of bearing state categories, thus forming a category prototype set. Each category prototype in the category prototype set is used as the antecedent center of the corresponding fuzzy rule in the fuzzy inference network to be trained; Calculate the intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss, and then sum the intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss by weight to obtain the prototype clustering loss; The training low-dimensional hidden layer fault representations are input into the consequents of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. Based on the distance between each training low-dimensional hidden layer fault representation and each of the antecedent centers, and the diffusion parameters of the fuzzy rules corresponding to each of the antecedent centers, the normalized activation intensity of each fuzzy rule is calculated. Then, according to the normalized activation intensity, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregate score of each bearing state category. Finally, the predicted probability of each bearing state category is obtained by normalized exponent calculation. The cross-entropy classification loss is calculated based on the predicted probability of each bearing state category and the corresponding category label. The weighted sum of the cross-entropy classification loss and the prototype clustering loss is used as the total loss. The parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network are updated through backpropagation until a preset stopping condition is reached, thus obtaining the pre-trained fuzzy attention convolutional neural network, the pre-trained category prototype set, and the pre-trained fuzzy inference network. The preset stopping condition includes reaching a preset number of iterations.
3. The rolling bearing fault diagnosis method as described in claim 2, characterized in that, The fuzzy attention convolutional neural network to be trained includes multiple cascaded fuzzy attention convolutional blocks, each of which includes a main convolutional branch and a fuzzy attention branch. The step of inputting vibration samples from each training window in the training batch into the fuzzy attention convolutional neural network to be trained, and obtaining a low-dimensional hidden layer fault representation of a preset dimension corresponding to each training window vibration sample, includes: For each fuzzy attention convolutional block, perform convolution processing to obtain the output feature map of that fuzzy attention convolutional block, and use the output feature map of the last fuzzy attention convolutional block as the high-level feature map; Vectorization is performed on each of the high-level feature maps to obtain a one-dimensional feature vector corresponding to the vibration sample of each training window; the one-dimensional feature vector is mapped through a fully connected projection layer to obtain a training low-dimensional hidden layer fault representation of a preset dimension corresponding to the vibration sample of each training window. The convolution process includes: The main convolutional branch performs convolution and activation operations on the input feature map to obtain a convolutional feature map; wherein, if the fuzzy attention convolutional block is the first fuzzy attention convolutional block, the input feature map is the vibration sample of each training window; if the fuzzy attention convolutional block is not the first fuzzy attention convolutional block, the input feature map is the output feature map of the previous fuzzy attention convolutional block. The fuzzy attention branch sets multiple learnable Gaussian membership functions for each channel of the convolutional feature map. The membership degree of the convolutional response at each spatial location in the convolutional feature map with respect to each Gaussian membership function is calculated. The minimum value of multiple membership degrees at the same spatial location in the same channel is taken to obtain a conservative fuzzy response. Global average pooling and fully connected mapping are sequentially performed on the conservative fuzzy response to obtain the channel attention vector. The channel attention vector is then multiplied element-wise by the convolutional feature map for each channel to obtain the output feature map of the fuzzy attention convolutional block.
4. The rolling bearing fault diagnosis method as described in claim 2, characterized in that, The prototype clustering unit does not have an independent feedforward network layer, and sets a learnable category prototype for each bearing state category. The number of learnable category prototypes is the same as the total number of bearing state categories. The step involves inputting each of the trained low-dimensional hidden layer fault representations and the corresponding category labels into a prototype clustering unit to establish multiple category prototypes equal to the total number of bearing state categories, forming a category prototype set, including: Each of the trained low-dimensional hidden layer fault representations and the corresponding category labels are input into the prototype clustering unit, and each of the trained low-dimensional hidden layer fault representations is associated with the learnable category prototype of the corresponding bearing state category according to the category labels. The set of class prototypes is composed of the learned class prototypes after association.
5. The rolling bearing fault diagnosis method as described in claim 2, characterized in that, The step of calculating the normalized activation strength of each fuzzy rule based on the distance between each trained low-dimensional hidden layer fault representation and each category prototype, and the diffusion parameter of the fuzzy rule corresponding to that category prototype, includes: For each training low-dimensional hidden layer fault representation, calculate the normalized squared Euclidean distance between the training low-dimensional hidden layer fault representation and each class prototype. By inputting each normalized squared Euclidean distance into a Gaussian function scaled by the learnable diffusion parameter of the fuzzy rule corresponding to the prototype of that category, the original activation intensity of the fuzzy rule corresponding to the prototype of that category is obtained. For each training low-dimensional hidden layer fault representation, calculate the sum of the original activation intensities of all fuzzy rules obtained for that training low-dimensional hidden layer fault representation, add the sum of the original activation intensities to the numerical stability constant to obtain the normalized denominator; divide the original activation intensities of each fuzzy rule corresponding to the training low-dimensional hidden layer fault representation by the normalized denominator to obtain the normalized activation intensities of each fuzzy rule.
6. The rolling bearing fault diagnosis method as described in claim 2, characterized in that, Each category prototype in the category prototype set corresponds to a bearing state category; The calculation of intra-class compactness loss, inter-prototype separation loss, and prototype consistency loss includes: Based on the distance between each training low-dimensional hidden layer fault representation and the corresponding category prototype under the same bearing state category in the training batch, the intra-class compactness loss is determined. For each pair of category prototypes corresponding to different bearing state categories, when the distance between the two category prototypes in the category prototype pair is less than the preset prototype separation margin, the penalty term for the category prototype pair is determined based on the difference between the preset prototype separation margin and the distance, and the penalty terms of all category prototype pairs are combined to obtain the prototype separation loss. For each bearing state category, the mean value of each training low-dimensional hidden layer fault representation in the training batch for that bearing state category is determined as the batch feature center corresponding to that bearing state category. Based on the distance between the category prototype corresponding to that bearing state category and the batch feature center, the prototype consistency distance corresponding to that bearing state category is determined. The prototype consistency distances corresponding to all bearing state categories are combined to obtain the prototype consistency loss.
7. The rolling bearing fault diagnosis method as described in claim 2, characterized in that, The step of updating the parameters of the fuzzy attention convolutional neural network, the set of category prototypes, and the parameters of the fuzzy inference network through backpropagation includes: In each iteration, based on the total loss, the gradients of the parameters of the fuzzy attention convolutional neural network, the gradients of each category prototype in the category prototype set, and the gradients of the parameters of the fuzzy inference network are calculated through backpropagation, and the parameters of the fuzzy attention convolutional neural network, the category prototype set, and the fuzzy inference network are updated respectively according to the gradient descent method.
8. A rolling bearing fault diagnosis system, characterized in that, include: The signal acquisition and segmentation module is used to acquire the vibration signal of the rolling bearing to be diagnosed, and to perform sliding segmentation of the vibration signal according to a preset window length and a preset sliding step size to obtain the vibration sample of the window to be diagnosed. The feature extraction module is used to input the vibration sample of the window to be diagnosed into a pre-trained fuzzy attention convolutional neural network to obtain a low-dimensional hidden layer fault representation of the window to be diagnosed with a preset dimension. The prototype acquisition module is used to acquire a pre-trained set of category prototypes. The set of category prototypes includes the same number of category prototypes as the total number of bearing state categories. Each category prototype is a vector of a preset dimension, and each category prototype serves as the antecedent center of the corresponding fuzzy rule in the pre-trained fuzzy inference network. The category prototypes correspond one-to-one with the fuzzy rules. The activation intensity calculation module is used to calculate the normalized activation intensity of each fuzzy rule based on the distance between the low-dimensional hidden layer fault representation to be diagnosed and each of the antecedent centers, and the diffusion parameters of the fuzzy rules corresponding to each of the antecedent centers. The scoring aggregation module is used to input the low-dimensional hidden layer fault representation to be diagnosed into the consequent of each fuzzy rule to obtain the category score of each fuzzy rule for each bearing state category. According to the normalized activation intensity of each fuzzy rule, the category scores of all fuzzy rules for the same bearing state category are weighted and summed to obtain the aggregate score of each bearing state category. The diagnostic output module is used to perform normalized exponential calculation on each aggregate score to obtain the predicted probability of each bearing state category, and the bearing state category corresponding to the maximum predicted probability is used as the fault diagnosis result of the rolling bearing to be diagnosed.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
