Variable working condition bearing fault diagnosis method based on indirect distribution alignment mechanism
Through the indirect distribution alignment mechanism, combined with Gaussian-Laplace filtering, multi-stage residual network and Wasserstein divergence adversarial network, the feature extraction and domain adaptation problems in bearing fault diagnosis under variable working conditions are solved, and the accuracy and adaptability of fault diagnosis is improved. It is suitable for wind power equipment and intelligent manufacturing.
Patent Information
- Application Number
- CN202510468046.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-29
AI Technical Summary
In the diagnosis of bearing faults under variable working conditions, the problems of difficulty in extracting depth features, poor sample correlation between domains, and imbalance of sample distribution, affecting the generalization ability and diagnostic accuracy of the model.
Using a method based on the indirect distribution alignment mechanism, a feature extractor and a fault classifier are constructed through Gaussian-Laplace filtering, multi-stage residual network, Wasserstein divergence adversarial network and adaptive factor to achieve deep matching and dynamic adaptive optimization of the features of the source domain and the target domain.
It improves the accuracy and adaptability of the model in variable operating conditions, especially in the case of no labels in the target domain or complex data distribution, maintains good fault identification performance, and is suitable for application scenarios such as wind power equipment and intelligent manufacturing.
Smart Images

Figure CN120387090A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of variable-condition bearing fault diagnosis, and particularly to a variable-condition bearing fault diagnosis method based on an indirect distribution alignment mechanism. Background Technique
[0002] Mechanical equipment plays a core role in fields such as intelligent manufacturing and rail transit, and directly affects people's production and life. However, the complex and changeable working environment and working conditions pose severe challenges to equipment maintenance. In particular, once key components such as bearings and gearboxes fail, safety accidents are extremely likely to occur. Therefore, fault diagnosis technology is crucial for ensuring the safe and reliable operation of equipment systems. As a key component of rotating machinery, rolling bearings not only support the rotating shaft and reduce friction, but also play a decisive role in the smooth operation of equipment. Currently, most variable-condition bearing fault diagnosis methods directly align the data feature distributions of the source domain and the target domain. However, in actual industrial applications, bearing fault diagnosis often faces severe challenges due to factors such as complex actual working conditions, load and speed fluctuations. Problems such as difficult extraction of deep features, poor correlation between samples in different domains, and unbalanced sample distributions all affect the generalization ability and diagnostic accuracy of the model. Summary of the Invention
[0003] In view of the problems existing in the existing variable-condition bearing fault diagnosis based on the indirect distribution alignment mechanism, the present invention is proposed.
[0004] To solve the above technical problems, the present invention provides the following technical solutions:
[0005] In a first aspect, an embodiment of the present invention provides a variable-condition bearing fault diagnosis method based on an indirect distribution alignment mechanism, which includes the following steps.
[0006] Collect bearing vibration data under different working conditions to establish a source domain data and a target domain data set; the source domain data has labels, and the labels represent fault types, the target domain data does not have label information, and the data of various health states under each working condition form a data domain.
[0007] Filter and denoise the data in the data set by the Gaussian-Laplace filtering method.
[0008] Improve the multi-level residual network to construct a feature extractor to extract shallow and deep features; the input signal first passes through convolution and pooling to extract preliminary features, and then enters the backbone network composed of multi-level residual blocks to gradually enhance the feature expression ability; hierarchical feature extraction is achieved through downsampling and channel alignment at each stage, and finally deep features are output through local average pooling for classification tasks.
[0009] Construct a fault classifier, a domain classifier, and a domain distribution alignment term, and calculate the corresponding losses. The core objectives of these three are to maximize the inter-class distance, minimize the inter-domain difference, and minimize the two-domain distribution distance respectively, so as to better adapt to variable working condition domain adaptation fault diagnosis.
[0010] Use the Wasserstein divergence adversarial network and the mean square error to jointly constrain the feature distribution, and construct an indirect distribution alignment mechanism. This strategy not only helps to minimize the intra-class distance, improve the feature consistency, but also enhances the separability between different classes, and improves the discriminative ability and generalization performance of the model in the domain adaptation task.
[0011] Construct the total objective function, and introduce an adaptive factor for dynamic adaptive measurement and optimization. According to the distribution change, adaptively adjust the optimization objective to avoid the adverse impact of an overly large single loss value on the overall performance of domain adaptation, and improve the adaptability of the model in the variable working condition migration process.
[0012] Train the constructed deep neural network model, and use the gradient descent algorithm and the dynamic loss measurement to optimize the objective function to obtain the fault diagnosis result.
[0013] As a preferred solution of the variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism of the present invention, wherein: Gaussian filtering, as a linear smoothing filter, suppresses high-frequency noise components by convolving a Gaussian kernel with the input signal, while maintaining the overall structure of the signal. The mathematical expression for filtering the data in the data set is:
[0014]
[0015] In the formula, x and y are the distances between the pixels in the filter kernel and the central pixel in the horizontal and vertical directions, σ represents the standard deviation of the Gaussian kernel, which controls the smoothing degree. The larger the value, the stronger the filtering, but it may cause edge blurring and detail loss.
[0016] As a preferred solution of the variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism of the present invention, wherein: after Gaussian smoothing processing, in order to restore or enhance the edge features weakened due to smoothing, a Laplace filter is introduced for edge enhancement. The Laplace filter is essentially a second-order differential operator, which can enhance the regions where the signal changes violently (such as edges, mutation points). The Laplace operator is:
[0017]
[0018] In the one-dimensional signal processing scenario, the Laplace operation is simplified to:
[0019] L(x) = f(x + 1) - 2f(x) + f(x - 1);
[0020] Where f(x) represents the value of the input one-dimensional signal at position x, f(x+1) represents the value of the signal at the adjacent point to the right of position x, and f(x-1) represents the value of the signal at the adjacent point to the left of position x.
[0021] As a preferred solution of the variable operating condition bearing fault diagnosis method based on the indirect distribution alignment mechanism described in the present invention, the following is an example: a feature extractor is constructed by improving a multi-level residual network. The input signal first undergoes convolution and pooling to extract preliminary features, and then enters a backbone network composed of multi-level residual blocks to gradually enhance the feature expression capability.
[0022] Each stage achieves hierarchical feature extraction through downsampling and channel alignment, and finally outputs deep features through local average pooling for subsequent classification and discrimination tasks;
[0023] The extracted abstract features are expressed as:
[0024]
[0025] In the formula, is the mth sample in the entire dataset D, G f represents the output of the feature extractor, F(·) represents the mapping function of the lth residual block, ω l is the optimization parameter.
[0026] As a preferred solution of the variable operating condition bearing fault diagnosis method based on the indirect distribution alignment mechanism described in the present invention, the fault classifier for classifying fault types aims to accurately distinguish fault signals of different categories. Its core goal is to maximize the inter-class distance. Specifically, it is a softmax classifier, and the classification loss is expressed as:
[0027]
[0028] in, Indicates the actual label y i The expectation of all possible values, C is the total number of fault categories, is the label of the actual fault category, is the probability that the model predicts that the th sample belongs to a certain category c.
[0029] As a preferred solution of the variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism described in the present invention, the domain classifier that distinguishes whether the extracted bearing fault feature is the source working condition or the target working condition has the core goal of minimizing the difference between domains; therefore, binary cross entropy loss is selected as the loss measurement function of this module, and the loss of the i-th sample can be expressed as:
[0030] L(w i ,D(x i ))=wi log(D(x i ))+(1 - w i )log(1 - D(x i ));
[0031] Among them, w i is the actual label, which can be 0 or 1, indicating the true source (source domain or target domain) of the sample; D(x i ) is the probability output by the model, representing the possibility that the sample comes from the target domain, and the total loss of the sample is;
[0032]
[0033] Among them, L D represents the loss of the domain classifier, P i S and P i T are the feature distributions under the working conditions of the source domain and the target domain respectively, n S and n T represent the total amounts of input data in the two domains.
[0034] As a preferred scheme of the variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism described in the present invention, wherein: the domain distribution alignment term for measuring the difference in data distributions between two working conditions, its core objective is to minimize the distribution distance between the two domains, and its formula is defined as:
[0035]
[0036] Among them, is the i-th sample of the c-th type of fault in the source domain, is the j-th sample of the c-th type in the target domain, φ(·) is a mapping function that maps the input data to a high-dimensional separable space H, and are the numbers of samples of the c-th type in the source domain and the target domain respectively; ‖·‖ H represents the norm in the feature space, which is used to measure the geometric distance of the distribution embedding vector, C is the total number of categories, and guides the alignment process to focus on the class-level conditional distribution rather than the global distribution, and are the weights of the samples belonging to the c-th type in the source domain and the target domain data respectively.
[0037] As a preferred scheme of the variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism described in the present invention, wherein: the core objective of the indirect distribution alignment mechanism is to minimize the within-class distance, which is used to process the Gaussian distribution of the variability of bearing vibration signals, and the formula is:
[0038]
[0039] where z is a random variable, σ is the standard deviation, and μ is the mean;
[0040] Introducing Gaussian noise z as a prior distribution in the generation network can improve the diversity of generated samples and promote the matching of feature distributions between the two domains;
[0041] Traditional adversarial networks suffer from problems such as unstable training and mode collapse, which are particularly prominent in generation tasks. To address these issues, an adversarial network based on the Wasserstein divergence is introduced. The Wasserstein divergence can better measure the distance between generated data and real data and has a more stable gradient. By minimizing the Wasserstein distance between the generator and the discriminator, the target distribution can be approximated more accurately. The training of the generative model is formulated as a min-max problem under the Wasserstein distance, expressed as:
[0042]
[0043] where argmax represents the input value when the function reaches its maximum, and argmin represents the input value when the function reaches its minimum; T(x) is a real-valued function used to measure the distribution difference between source domain and target domain samples, E represents the expectation, p(x) is the distribution of real samples, and q(z) is the distribution of generated samples; T needs to satisfy ||T|| L≤1 , which is called the Lipschitz constraint, and the constraint ||T|| L≤1 means that the Lipschitz constant L of T is restricted to not exceed 1;
[0044] The best way to add the Lipschitz constraint to the model is to use gradient penalty, but this method relies on empirical settings; the Wasserstein distance uses single sampling instead of the overall distribution, so it cannot directly solve problems at the overall distribution level; the Wasserstein divergence, to some extent, eliminates the Lipschitz constraint and retains the excellent performance of the Wasserstein distance. The training mode of the generative adversarial network based on the Wasserstein divergence is expressed as:
[0045]
[0046] Among them, G represents generator optimization, q(x) is the distribution of generated samples, and r(x) represents the sample space where the two domains are the same; the former obtains the optimal T in the Wasserstein distance through the Wasserstein divergence, and the latter minimizes the Wasserstein distance; in this way, it is not necessary to rely on traditional sample-level sampling operations, but can perform operations at the level of the entire data distribution; in the scenario of adversarial neural networks, the loss for measuring similarity is expressed as:
[0047]
[0048] Among them, H(·) represents the entropy function, represents the distance between two distributions, k is the weight coefficient, and p is the norm of the gradient; the gradient of the source sample extracted by the feature extractor is denoted by w S and the gradient of the fake sample generated by the generator is denoted by w T ; the L2 regularization of the gradients of these two samples is described as:
[0049]
[0050] Among them, represents the summation along the first dimension of the gradient;
[0051] The mean square error used to evaluate the similarity between the features of the generated fake data and the target Gaussian distribution is expressed by the formula:
[0052]
[0053] Among them, F i S is the distribution of fake samples in the source domain, is the distribution of real samples in the source domain; therefore, the total loss function for optimizing the source domain and the target domain is:
[0054]
[0055] Among them, D(·) represents the value of the discriminator in the adversarial network, p s (x) represents the real sample in the source domain, q s (x) represents the source domain sample generated by the generator, P T (x) represents the real sample in the target domain, q T (x) represents the target domain sample generated by the generator; represents the gradient constraint term of the source domain discriminator, which is used to balance the relative importance of the gradient constraint and other loss terms; is the gradient of the source domain discriminator T S , represents the mean square error term, which is used to measure the difference between the generated sample and the real sample.
[0056] As a preferred solution of the variable-condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to the present invention, where: a total objective function is constructed, expressed as,
[0057] L = αL MMD + βL C + γL D + λL GD ;
[0058] where α, β, γ, and λ are trade-off parameters.
[0059] As a preferred solution of the variable-condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to the present invention, where: an adaptive factor is set to timely adjust the relative accuracy between the shared features and the discrimination result, expressed as,
[0060] L = βL C +(1 - η)(γL D + αL MMD ) + η·λL GD ;
[0061] where η is a parameter with a value range of (0, 1), dynamically adjusted by the task effect, and the calculation formula is:
[0062]
[0063] The beneficial effects of the present invention are as follows:
[0064] The present invention uses a multi-level residual network to construct a feature extractor, which can extract shallow and deep features simultaneously, thereby effectively improving the model's expression ability for complex working conditions; compared with the traditional single-layer structure, the multi-level residual network fuses features of different depths by introducing multiple residual modules, not only retaining the detailed information in the shallow features but also extracting the semantic information in the deep features; this method not only improves the classification accuracy of the model in the variable-condition bearing fault diagnosis task but also demonstrates stronger feature migration ability.
[0065] The indirect distribution alignment mechanism of the present invention realizes the deep matching of source domain and target domain features in the latent space through the Gaussian prior distribution and the Wasserstein divergence adversarial network, alleviating the problems of "alignment errors" and insufficient generalization ability existing in traditional direct alignment methods, and improving the bearing fault diagnosis accuracy; especially in the case where the target domain has no labels or the data distribution is complex, it can still maintain good fault recognition performance and is applicable to variable-condition fault diagnosis tasks in application scenarios such as wind power equipment and intelligent manufacturing.
[0066] The present invention combines multiple module losses to construct a total objective function, introduces an adaptive factor for dynamic adaptive measurement and optimization, adaptively adjusts the optimization objective according to the distribution change, avoids the adverse impact of an overly large single loss value on the overall performance of domain adaptation, and improves the adaptability of the model during the variable working condition migration process. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them:
[0068] Figure 1 is a flowchart of the steps of a variable working condition domain adaptation bearing fault diagnosis method based on an indirect distribution alignment mechanism of the present invention;
[0069] Figure 2 is a structural diagram of a multi-level residual network of the present invention
[0070] Figure 3 is a comparison schematic diagram of the indirect alignment method and the direct alignment method of the feature distribution of the present invention;
[0071] Figure 4 is a schematic diagram of an optimization method for unsupervised domain adaptation problems of the present invention;
[0072] Figure 5 is a structural diagram of an indirect distribution alignment mechanism of the present invention;
[0073] Figure 6 is a structural diagram of the corresponding variable working condition domain adaptation bearing fault diagnosis of the present invention;
[0074] Figure 7 is a schematic diagram of the t-SNE visualization result of the model of the specific embodiment of the present invention under working conditions. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0075] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be made in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0076] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, the present invention may be practiced in other ways than those specifically described herein, and those skilled in the art may make similar extensions without departing from the spirit of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0077] Secondly, as used herein, an "embodiment" or "embodiments" refer to specific features, structures, or characteristics that may be included in at least one implementation of the present invention. The phrase "in an embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that excludes other embodiments.
[0078] Embodiment 1
[0079] Referring to Figures 1 to 7 , which is the first embodiment of the present invention, this embodiment provides a variable-condition bearing fault diagnosis method based on an indirect distribution alignment mechanism, including the following steps:
[0080] S1. Establish a rolling bearing fault diagnosis data set.
[0081] Select the bearing data collected by Case Western Reserve University (public data), and select the drive-end motor bearing data with a sampling frequency of 12 kHz, which includes four bearing health states: inner race, outer race, rolling element fault, and normal; during the data collection process, the test data covers the operating states of the motor under four different loads, namely 0HP, 1HP, 2HP, and 3HP, and the motor speed range is set between 1730 rpm and 1797 rpm; in the experiment, 2000 samples are extracted for each health state, and each sample contains 1024 data points.
[0082] S2. Data preprocessing.
[0083] Gaussian-Laplacian filtering is a composite method that combines Gaussian filtering and Laplacian filtering, aiming to enhance the edges and detail features of the signal while achieving effective noise reduction; in mechanical fault diagnosis tasks, this method can improve the distinguishability of data features, thereby enhancing the discrimination ability of subsequent models;
[0084] First, as a linear smoothing filter, Gaussian filtering suppresses high-frequency noise components by convolving a Gaussian kernel with the input signal while maintaining the overall structure of the signal. Its mathematical expression is:
[0085]
[0086] where x and y are the distances between the pixels in the filter kernel and the central pixel in the horizontal and vertical directions, and σ represents the standard deviation of the Gaussian kernel, which controls the smoothing degree. The larger the value, the stronger the filtering, but it may lead to edge blurring and detail loss;
[0087] After Gaussian smoothing, in order to restore or enhance the edge features weakened by smoothing, a Laplace filter is further introduced for edge enhancement; the Laplace filter is essentially a second-order differential operator that can enhance regions where the signal changes drastically (such as edges and mutation points). A common Laplace operator is as follows:
[0088]
[0089] In the one-dimensional signal processing scenario, the Laplace operation can be simplified as:
[0090] L(x) = f(x + 1) - 2f(x) + f(x - 1);
[0091] where f(x) represents the value of the input one-dimensional signal at position x, f(x + 1) represents the value of the signal at the adjacent point on the right side of position x, and f(x - 1) represents the value of the signal at the adjacent point on the left side of position x.
[0092] S3. The constructed feature extractor adopts a multi-level residual structure (Multi-level Residual Network), and its overall architecture is as Figure 2 shown; first, the input signal passes through a convolutional layer with a convolutional kernel size of 7×7 to initially extract local features and expand the receptive field; subsequently, it undergoes a max-pooling layer with a kernel size of 3×3 for downsampling to further compress the feature map size; on this basis, the input data sequentially enters the backbone network composed of six residual blocks, and this network is divided into three stages hierarchically; the first stage contains two residual blocks with a convolutional kernel size of 3×3 and an output channel number of 64; the second stage also contains two residual blocks with a convolutional kernel size of 3×3, and the output channel number increases to 128; the two residual blocks in the third stage expand the channel number to 256; spatial downsampling is achieved by convolutional operations with a stride of 2 between each stage, and identity mapping is used for channel alignment; finally, the network performs feature integration on the feature map through local average pooling (Local Average Pooling) for subsequent classification or discrimination tasks; the extracted abstract features can be expressed as:
[0093]
[0094] where, is the m-th sample in the entire dataset D, G f represents the output of the feature extractor, F(·) represents the mapping function of the l-th residual block, and ω l is the optimization parameter.
[0095] S4. Construct a variable working condition domain adaptation bearing fault diagnosis model based on an indirect distribution alignment mechanism; asFigure 3 As shown, by introducing an intermediate feature space, compared with direct distribution alignment, indirect distribution alignment can, to a certain extent, alleviate the feature distribution differences and instability problems caused by variable working conditions; for example Figure 4 As shown, the optimization method for the unsupervised domain adaptation fault diagnosis problem under variable working conditions includes four steps, which will be introduced one by one below.
[0096] 401. The fault classifier used to classify fault types aims to accurately distinguish different types of fault signals. Its core goal is to maximize the inter-class distance. Specifically, it is a softmax classifier, and the classification loss L C is expressed as:
[0097]
[0098] where represents the expectation of all possible values of the actual label y i , C is the total number of fault categories, is the label of the actual fault category. is the probability that the i-th sample predicted by the model belongs to a certain category c.
[0099] 402. The domain classifier used to distinguish whether the extracted bearing fault features are from the source working condition or the target working condition. Its core goal is to minimize the domain difference; therefore, binary cross-entropy loss is selected as the loss measurement function for this module. The loss of the i-th sample can be expressed as:
[0100] L(w i , D(x i )) = w i log(D(x i )) + (1 - w i ) log(1 - D(x i ));
[0101] where w i is the actual label, which can be 0 or 1, indicating the true source (source domain or target domain) of the sample; D(x i ) is the probability output by the model, indicating the possibility that the sample comes from the target domain. The total loss of the sample is:
[0102]
[0103] where L D represents the loss of the domain classifier, P i S and P i T are the feature distributions under two working conditions respectively, and n S and n T represent the total amount of input data.
[0104] 403. The domain distribution alignment term for measuring the difference in data distributions between two working conditions, whose core objective is to minimize the distribution distance between the two domains, is defined by the formula:
[0105]
[0106] where is the i-th sample of the c-th type of fault in the source domain, is the j-th sample of the c-th type in the target domain, φ(·) is a mapping function that maps the input data to a high-dimensional separable space H, and are the numbers of samples of the c-th type in the source domain and the target domain respectively; ‖·‖ H represents the norm in the feature space, which is used to measure the geometric distance of the distribution embedding vectors. C is the total number of categories, guiding the alignment process to focus on the class-level conditional distribution rather than the global distribution; and are the weights of the input data in the two domains belonging to the samples of the c-th type respectively.
[0107] 404. As Figure 5 shown, the indirect distribution alignment mechanism of the present invention, whose core objective is to minimize the intra-class distance, is used to process the Gaussian distribution of the variability of bearing vibration signals. The formula is:
[0108]
[0109] where z is a random variable, σ is the standard deviation, and μ is the mean.
[0110] Introducing Gaussian noise z as the prior distribution in the generation network can improve the diversity of the generated samples and promote the matching of the feature distributions between the two domains; traditional adversarial networks have problems of unstable training and mode collapse, which are particularly prominent in generation tasks. To address these problems, an adversarial network based on the Wasserstein divergence is introduced. The Wasserstein divergence can better measure the distance between the generated data and the real data and has a more stable gradient; this method can more accurately approximate the target distribution by minimizing the Wasserstein distance between the generator and the discriminator. The training of the generation model can be regarded as a min-max problem under the Wasserstein distance:
[0111]
[0112] Among them, argmax represents the input value when the function reaches its maximum value, and argmin represents the input value when the function reaches its minimum value; T(x) is a real-valued function used to measure the distribution difference between source domain and target domain samples, E represents expectation, p(x) is the distribution of real samples, and q(z) is the distribution of generated samples; T needs to satisfy T L≤1 , which is called the Lipschitz constraint, and constrains T L≤1 to indicate that the Lipschitz constant L of T is restricted to not exceed 1; currently, the best method to add the Lipschitz constraint in the model is to use gradient penalty, but this method depends on empirical settings; the Wasserstein distance uses single sampling instead of the overall distribution, so it cannot directly solve problems at the overall distribution level; the Wasserstein divergence, to some extent, eliminates the Lipschitz constraint and retains the excellent performance of the Wasserstein distance. The training mode of the generative adversarial network based on the Wasserstein divergence can be expressed as follows:
[0113]
[0114] Among them, G represents generator optimization, and r(x) represents the sample space where the two domains are the same; the former obtains the optimal T in the Wasserstein distance through the Wasserstein divergence, and the latter minimizes the Wasserstein distance; in this way, it is not necessary to rely on traditional sample-level sampling operations, but can perform operations at the entire data distribution level; in the scenario of the adversarial neural network, the loss measuring similarity is expressed as:
[0115]
[0116] Among them, H(·) represents the entropy function, represents the distance between two distributions, and p is the norm of the gradient; taking the source domain feature distribution as an example, the gradient of the source sample extracted by the feature extractor is represented by w S , and the gradient of the fake sample generated by the generator is represented by w T ; then, L2 regularization is performed on the gradients of these two samples, which can be more simply described as:
[0117]
[0118] Among them, sum(·,1) represents summing along the first dimension of the gradient;
[0119] The mean square error used to evaluate the similarity between the features of the generated fake data and the target Gaussian distribution is expressed by the formula:
[0120]
[0121] Among them, F i S is the source domain fake sample distribution, is the source domain real sample distribution; therefore, the total loss function for optimizing the source domain and the target domain is:
[0122]
[0123] Among them, D(·) represents the value of the discriminator in the adversarial network, p s (x) represents the real sample in the source domain, q s (x) represents the source domain sample generated by the generator, P T (x) represents the real sample in the target domain, q T (x) represents the target domain sample generated by the generator; represents the gradient constraint term of the source domain discriminator, which is used to balance the relative importance of the gradient constraint and other loss terms; is the gradient of the source domain discriminator T S , represents the mean square error term, which is used to measure the difference between the generated sample and the real sample.
[0124] S5. As Figure 6 shown, the variable working condition domain adaptation bearing fault diagnosis framework corresponding to the present invention combines the losses in step S4 to obtain the objective function, which is expressed as:
[0125] L = αL MMD + βL C + γL D + λL GD ;
[0126] Among them, α, β, γ and λ are trade-off parameters;
[0127] Set an adaptive factor to adjust the relative accuracy between the shared features and the discrimination result in a timely manner, which is expressed as:
[0128] L = βL C +(1 - η)(γL D + αL MMD ) + η·λL GD ;
[0129] Among them, α, β, γ and λ are trade-off parameters, η is a parameter, and its value range is (0, 1), and its value can be dynamically adjusted by the task effect. The calculation formula is:
[0130]
[0131] Set hyperparameters: the initial learning rate is 0.001, the batch size is 64, the number of iterations is 100, and the Adam optimizer is selected to optimize the network parameters.
[0132] S6. Collect bearing data to be fault diagnosed, input the bearing data into the model, and perform fault diagnosis. In a specific embodiment, the t-SNE visualization results of each 25 iterations in the A01 (source domain is 0HP, target domain is 1HP) transfer task are as Figure 7 shown.
[0133] Embodiment 2
[0134] Based on the first embodiment;
[0135] This embodiment also provides a computer device, which is applicable to the case of the variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to implement the variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism proposed in the above embodiment.
[0136] This computer device can be a terminal. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of this computer device is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of this computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a carrier network, NFC (near field communication), or other technologies. The display screen of this computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of this computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0137] This embodiment also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism proposed in the above embodiment.
[0138] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0139] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A variable working condition bearing fault diagnosis method based on an indirect distribution alignment mechanism, characterized in that: It includes the following steps: Collect bearing vibration data under different working conditions to establish a source domain dataset and a target domain dataset; Filter and denoise the data in the dataset through the Gaussian-Laplace filtering method; Improve the multi-level residual network to construct a feature extractor to extract shallow and deep features; Construct a fault classifier, a domain classifier, and a domain distribution alignment term, and calculate the corresponding losses; Use the Wasserstein divergence adversarial network and the mean square error to jointly constrain the feature distribution to construct an indirect distribution alignment mechanism; Construct a total objective function, introduce an adaptive factor for dynamic adaptive measurement and optimization, and adaptively adjust the optimization objective according to the distribution change; Train the constructed deep neural network model, use the gradient descent algorithm and the dynamic loss measurement to optimize the objective function, and obtain the fault diagnosis result.
2. The variable operating condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 1, characterized in that: The mathematical expression for filtering the data in the dataset is: In the formula, x and y are the distances between the pixels in the filter kernel and the central pixel in the horizontal and vertical directions, σ represents the standard deviation of the Gaussian kernel, which controls the smoothness. The larger the value, the stronger the filtering, but it may cause edge blurring and detail loss.
3. The variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 2, characterized in that: After Gaussian smoothing, a Laplace filter is introduced for edge enhancement. The Laplace operator is: In the one-dimensional signal processing scenario, the Laplace operation is simplified to: L(x) = f(x + 1) - 2f(x) + f(x - 1); In the formula, f(x) represents the value of the input one-dimensional signal at position x, f(x + 1) represents the value of the signal at the adjacent point on the right side of position x, and f(x - 1) represents the value of the signal at the adjacent point on the left side of the position.
4. The variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 3, wherein: Improve the multi-level residual network to construct a feature extractor. The input signal first undergoes convolution and pooling to extract preliminary features, and then enters the backbone network composed of multi-level residual blocks to gradually enhance the feature expression ability; Hierarchical feature extraction is achieved through downsampling and channel alignment at each stage, and finally deep features are output through local average pooling for subsequent classification and discrimination tasks; The extracted abstract features are represented as: In the formula, is the m-th sample in the entire data set D, and G f represents the output of the feature extractor, F(·) represents the mapping function of the l-th residual block, and ω l are the optimization parameters.
5. The variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 4, wherein: The fault classifier for classifying fault types aims to accurately distinguish different types of fault signals. Its core goal is to maximize the inter-class distance. Specifically, it is a softmax classifier, and the classification loss is expressed as: Among them, represents the actual label y i the expectation of all possible values, where C is the total number of fault categories, is the label of the actual fault category, and P i c is the probability that the i-th sample predicted by the model belongs to a certain category c.
6. The variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 5, wherein: The domain classifier for distinguishing whether the extracted bearing fault features are from the source working condition or the target working condition. Its core goal is to minimize the domain difference; therefore, the binary cross-entropy loss is selected as the loss measurement function for this module, and the loss of the i-th sample can be expressed as: L(w i , D(x i )) = w i log(D(x i )) + (1 - w i )log(1 - D(x i )); Among them, w i is the actual label, which can be 0 or 1, indicating the true source (source domain or target domain) of the sample; D(x i ) is the probability output by the model, representing the possibility that the sample comes from the target domain, and the total loss of the sample is; Among them, L D represents the loss of the domain classifier, P i S and P i T are the feature distributions under the working conditions of the source domain and the target domain respectively, n S and n T represent the total amounts of the input data of the two domains.
7. The variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 6, characterized in that: The domain distribution alignment term for measuring the data distribution difference between the two working conditions. Its formula is defined as: Among them, is the i-th sample of the c-th type of fault in the source domain, is the j-th sample of the c-th type in the target domain, and φ(·) is a mapping function that maps the input data to a high-dimensional separable space H. and are the numbers of samples of the c-th type in the source domain and the target domain respectively; ‖·‖ H represents the norm in the feature space, which is used to measure the geometric distance of the distribution embedding vectors. C is the total number of categories, guiding the alignment process to focus on the class-level conditional distribution rather than the global distribution. and are the weights of the source domain and target domain data belonging to the samples of the c-th type respectively.
8. The variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 7, wherein: The core goal of the indirect distribution alignment mechanism is to minimize the intra-class distance. The formula is: Among them, z is a random variable, σ is the standard deviation, and μ is the mean; Introduce Gaussian noise z as the prior distribution in the generation network; Introduce an adversarial network based on the Wasserstein divergence. By minimizing the Wasserstein distance between the generator and the discriminator, the training of the generation model is regarded as a min-max problem under the Wasserstein distance, and the formula is expressed as: Among them, arg max represents the input value when the function achieves the maximum value, and arg min represents the input value when the function achieves the minimum value; T(x) is a real-valued function used to measure the distribution difference between the source domain and the target domain samples, E represents the expectation, p(x) is the distribution of the real samples, and q(z) is the distribution of the generated samples; T needs to satisfy ||T|| L≤1 , which is called the Lipschitz constraint, and the constraint ||T|| L≤1 means that the Lipschitz constant L of T is restricted to not exceed 1; The training mode of the generative adversarial network based on the Wasserstein divergence is expressed as: Among them, G represents generator optimization, q(x) is the distribution of generated samples, and r(x) represents the sample space where the two domains are the same; the former obtains the optimal T in the Wasserstein distance through the Wasserstein divergence, and the latter minimizes the Wasserstein distance; in the scenario of adversarial neural networks, the loss for measuring similarity is expressed as: L = H(p(x)) - H(q(x)) + k||▽T|| p ; Among them, H(·) represents the entropy function, ▽T represents the distance between two distributions, k is the weight coefficient, and p is the norm of the gradient; the gradient of the source sample extracted by the feature extractor is denoted by w S and the gradient of the fake sample generated by the generator is denoted by w T ; the L2 regularization of the gradients of these two samples is described as: Among them, it represents summing along the first dimension of the gradient; The mean square error used to evaluate the similarity between the features of the generated fake data and the target Gaussian distribution is expressed by the formula: Among them, F i S is the source domain fake sample distribution, is the source domain real sample distribution; Therefore, the total loss function optimized for the source domain and the target domain is: Among them, D(·) represents the value of the discriminator in the adversarial network, and p s (x) represents the real sample in the source domain, and q s (x) represents the source domain sample generated by the generator, and P T (x) represents the real sample in the target domain, and q T (x) represents the target domain sample generated by the generator; k||▽T S || p represents the gradient constraint term of the source domain discriminator, which is used to balance the relative importance of the gradient constraint and other loss terms; ▽T S is the gradient of the source domain discriminator T S , and represents the mean square error term, which is used to measure the difference between the generated sample and the real sample.
9. The variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 8, characterized in that: Construct the total objective function, expressed as, L = αL MMD + βL C + γL D + λL GD ; Among them, α, β, γ, and λ are trade-off parameters.
10. The variable working condition bearing fault diagnosis method based on the indirect distribution alignment mechanism according to claim 9, characterized in that: Set an adaptive factor to adjust the relative accuracy between the shared features and the discrimination result in a timely manner, expressed as, L = βL C +(1 - η)(γL D +αL MMD ) + η·λL GD ; Among them, η is a parameter with a value range of (0, 1), dynamically adjusted by the task effect, and the calculation formula is:
Citation Information
Cited By
Wind driven generator variable working condition fault diagnosis method and system based on domain self-adaption
CN121111619A