A mechanical and electrical equipment fault cross-domain diagnosis method and system based on minimum category confusion
The fault diagnosis model, which incorporates multi-scale feature extraction and a minimum class confusion module, addresses the issues of single feature extraction scale, coarse cross-domain alignment, and unclear decision boundaries in electromechanical equipment fault diagnosis, achieving high-precision and interpretable fault diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN INSTITUTE OF ENGINEERING
- Filing Date
- 2026-03-02
- Publication Date
- 2026-05-01
AI Technical Summary
Existing industrial equipment fault diagnosis technologies suffer from limited feature extraction scales under complex operating conditions, incomplete information capture, coarse cross-domain alignment, susceptibility to negative transfer, unclear target domain decision boundaries, and lack of interpretability, making it difficult to meet the accuracy and reliability requirements of diagnostic results in industrial settings.
A fault diagnosis model employing a multi-scale feature extractor, fault classifier, conditional domain discriminator, and minimum class confusion module is developed. Through joint adversarial training and lightweight processing, multi-scale feature fusion and cross-domain alignment are achieved, enhancing the interpretability of the model.
It improves the accuracy and interpretability of fault diagnosis for electromechanical equipment, avoids feature omission and negative transfer phenomena, and enhances the visualization and verification capabilities of the model.
Smart Images

Figure CN121765356B_ABST
Abstract
Description
A method and system for cross-domain diagnosis of electromechanical equipment faults based on minimal category confusion Technical Field
[0001] This invention relates to the field of electromechanical equipment fault diagnosis technology, and in particular to a cross-domain fault diagnosis method and system for electromechanical equipment based on minimum category confusion. Background Technology
[0002] Existing industrial equipment fault diagnosis technologies typically include traditional signal processing methods and deep learning-based methods. Traditional methods, such as Fourier transform and wavelet analysis, rely on manual feature extraction, making it difficult to fully capture the implicit information of equipment operation. With the development of deep learning, automatic feature extraction models such as CNN and ResNet have been proposed and achieved some success. However, current research still has the following significant shortcomings in cross-domain diagnosis under complex operating conditions:
[0003] First, the single-scale feature extraction leads to incomplete information capture: Existing convolutional neural networks typically use convolutional kernels of a fixed single scale for feature extraction. However, the vibration signals from faults in electromechanical equipment often contain complex frequency components, including both short-term impact components (high frequency) and long-term periodic trends (low frequency). Single-scale convolutional kernels struggle to simultaneously capture both local details and long-range dependencies, resulting in insufficient feature representation and a tendency to miss crucial fault signs. Long-range dependencies refer to the close correlation or mutual influence between two elements that are geographically distant in a sequence or structure.
[0004] Second, coarse cross-domain alignment can easily lead to negative migration: When dealing with cross-domain problems with different loads or speeds, existing domain adaptation methods (such as DANN) mainly focus on aligning the global feature distributions of the source and target domains. This method ignores the structural differences between different fault categories, which can easily lead to the phenomenon of "negative migration" (e.g., incorrectly aligning the inner fault features of the source domain to the outer fault distribution of the target domain), resulting in blurred classification boundaries and limited diagnostic accuracy.
[0005] Third, the target domain decision boundary is unclear and lacks interpretability: Due to the lack of labels on the target domain data, traditional methods struggle to constrain the distribution of target domain samples in the feature space, easily leading to class confusion—that is, samples from different fault categories are too close together in the feature space. Furthermore, existing systems are often "black box" models, lacking intuitive visualization and verification methods for feature distribution and classification boundaries (such as t-SNE distribution plots or confusion matrices), making it difficult to meet the requirements of interpretability and reliability of diagnostic results in industrial settings. In summary, current industrial equipment fault diagnosis technologies still need further improvement in areas such as multi-scale feature fusion capabilities, refined cross-domain alignment capabilities based on categories, and the clarity of target domain classification boundaries. Summary of the Invention
[0006] This invention provides a cross-domain diagnosis method and system for electromechanical equipment faults based on minimal category confusion, in order to solve the technical problems mentioned in the background art.
[0007] To achieve the above objectives, the technical solution of the present invention is implemented as follows:
[0008] This invention provides a cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion, comprising the following steps:
[0009] S1. Select external public datasets or labeled historical data in the field of fault diagnosis of similar electromechanical equipment as the source domain dataset, collect real-time operation data of the electromechanical equipment to be diagnosed, and use the real-time operation data of the electromechanical equipment to be diagnosed as the target domain dataset. Then, preprocess the source domain dataset and the target domain dataset.
[0010] S2. Construct a fault diagnosis model, which includes a multi-scale feature extractor, a fault classifier, a conditional domain discriminator, and a minimum class confusion module. The multi-scale feature extractor, fault classifier, and conditional domain discriminator are interconnected, and the fault classifier is connected to the minimum class confusion module.
[0011] S3. Use the preprocessed source domain dataset and target domain dataset to perform joint adversarial training on the fault diagnosis model. After training, perform lightweight processing on the trained fault diagnosis model and solidify the parameters of the lightweight fault diagnosis model to obtain the final fault diagnosis model.
[0012] S4. Deploy the final fault diagnosis model to the edge computing device of the intelligent diagnosis system, and use the final fault diagnosis model to diagnose the pre-processed real-time fault data of electromechanical equipment to obtain the diagnosis results.
[0013] Furthermore, the preprocessing of the source domain dataset and the target domain dataset in S1 includes the following steps:
[0014] S11. First, the real-time operating data of the electromechanical equipment to be diagnosed in the target domain dataset is processed through anti-aliasing filtering and analog-to-digital conversion to obtain a digital sequence. Then, a sliding window slicing algorithm is used to slice the digital sequence according to a set sampling frequency. Convert to discrete time series data ;
[0015] S12. Employing an overlapping sliding window mechanism for discrete time series data. Perform segmentation, then extract the first segment. A time-domain sample fragment , No. A time-domain sample fragment The expression is:
[0016] ;
[0017] in, This is the sequence number of the sample segment. ; Representing discrete time series data The index is Data points; This represents the total number of samples obtained after segmentation. Indicates the sliding step size; Indicates the window length;
[0018] S13. The Fast Fourier Transform algorithm is used to process the first... A time-domain sample fragment Perform a Fast Fourier Transform to transform the time-domain sample fragments. Mapping from the time domain to the frequency domain;
[0019] Specifically, first calculate the first... A time-domain sample fragment complex spectrum The expression is as follows:
[0020] ;
[0021] in, Representing time-domain samples The first in One data point; It is a natural constant; The imaginary unit; For frequency domain index, the value range is 0 to... ;
[0022] Then according to the first A time-domain sample fragment complex spectrum Calculate the amplitude intensity of each frequency domain, and truncate the first half of the effective components according to the spectral conjugate symmetry to generate the frequency domain feature vector. The formulas for calculating the amplitude intensity in each frequency domain are as follows:
[0023] ;
[0024] in, Indicates the first Amplitude intensity in each frequency domain; Represents the function that takes the real part of a complex number; The function representing the imaginary part of a complex number;
[0025] S14, Regarding the frequency domain feature vector Perform Z-Score normalization to obtain the normalized frequency domain input samples. The expression is as follows:
[0026] ;
[0027] in, Represents frequency domain eigenvectors The arithmetic mean of the amplitude intensities across all frequency domains; Represents frequency domain eigenvectors The standard deviation of the amplitude intensity across all frequency domains; It is a very small positive number, used to avoid calculation errors when the denominator is zero;
[0028] S15. Input the standardized frequency domain samples. As the target domain after preprocessing;
[0029] S16. Then, the source domain dataset is preprocessed in the same way as S11 to S14 to obtain the preprocessed source domain dataset.
[0030] Furthermore, the multi-scale feature extractor comprises sequentially connected... The system consists of convolutional layers, multiple parallel convolutional processing branches, feature fusion, and channel attention mechanisms; each convolutional processing branch includes sequentially connected convolutional kernels of size [missing information]. The convolutional layers, normalized layer (BN), and activation functions; the feature fusion and channel attention mechanism includes sequentially connected channel splicing modules and channel attention mechanisms;
[0031] The fault classifier consists of two cascaded fully connected layers.
[0032] The conditional domain discriminator includes a fusion module, a gradient inversion layer, and a domain discriminator connected in sequence.
[0033] Furthermore, the convolution processing branch in the multi-scale feature extractor is used to extract feature maps at different scales. The specific expression is as follows:
[0034] ;
[0035] in, Indicates the kernel size as Convolutional layers; Indicates the activation function; express Convolutional layer; This represents the sample vector input to the multi-scale feature extractor after preprocessing of the source or target domain dataset.
[0036] The channel stitching module is used to stitch together the feature maps of each branch along the channel dimension to obtain the stitched feature. The expression is as follows:
[0037] ;
[0038] in, This indicates the channel splicing operation within the channel splicing module; These represent feature maps of different scales output by the three parallel convolutional processing branches, respectively.
[0039] The channel attention mechanism is used to calculate attention weights based on the importance of each channel, and then combine the attention weights with the input features of the identity mapping branch to calculate the deep feature vector. The relevant expressions are as follows:
[0040] ;
[0041] ;
[0042] in, Indicates attention weight; Indicates the activation function; , Indicates the weighting coefficient; Indicates the average pooling layer; This indicates element-wise multiplication; This represents the input features of the identity mapping branch in the channel attention mechanism, used to construct residual connections to prevent network degradation.
[0043] Furthermore, the fault classifier is used to classify deep feature vectors Mapping to the fault category space yields the predicted probability distribution of the fault categories. The relevant expressions are as follows:
[0044] ;
[0045] ;
[0046] in, and These represent the weight matrix and bias vector of the fault classifier, respectively; This is the unnormalized logical output vector; express function;
[0047] The conditional domain discriminator is used to achieve cross-domain alignment based on fault categories, thereby obtaining joint information variables. The expression is as follows:
[0048] ;
[0049] in, This indicates a tensor product operation or a dimension-reduced outer product operation based on a random mapping.
[0050] The minimum class confusion module is used to calculate the class correlation matrix of samples in the target domain dataset. Category correlation matrix The first in Line number Column elements Define as a category With category The cosine similarity is expressed as follows:
[0051] ;
[0052] in, Indicates the first The sample belongs to the first The predicted probability of a class; Indicates the first The sample belongs to the first The predicted probability of the class; B represents the number of target domain samples in the current training batch.
[0053] Furthermore, step S3 specifically includes the following steps:
[0054] S31. Input the labeled samples from the preprocessed source domain dataset and the unlabeled samples from the preprocessed target domain dataset into the fault diagnosis model.
[0055] S32. After preprocessing, the labeled samples in the source domain dataset are processed by a multi-scale feature extractor to output deep feature vectors. , to deep feature vector The input is fed into the fault classifier, and the output is the predicted probability distribution of the fault category. Then, based on the predicted probability distribution of the fault category Calculate source domain classification loss ;
[0056] S33. After preprocessing, the unlabeled samples of the target domain dataset are processed by a multi-scale feature extractor to output deep feature vectors. , to deep feature vector The input is fed into the fault classifier, and the output is the predicted probability distribution of the fault category. ;
[0057] S34. Transfer deep feature vectors Predicted probability distribution of fault categories The input is fed into the fusion module of the conditional domain discriminator to obtain the joint information variables. ; to deep feature vector Predicted probability distribution of fault categories The input is fed into the fusion module of the conditional domain discriminator to obtain the joint information variables. ;
[0058] S35, then the joint information variables Joint information variables The results are fed into the domain discriminator, and the adversarial loss is calculated based on the results. ;
[0059] S36. Calculate the minimum class confusion loss using the minimum class confusion module. ;
[0060] S37. Then, based on the source domain classification loss... Combating losses Minimal Class Confusion Loss Calculate the overall objective function ;
[0061] S38. Minimize the overall objective function using the standard backpropagation algorithm. The trained fault diagnosis model is obtained;
[0062] S39. The trained fault diagnosis model is lightweighted by removing the conditional domain discriminator and the minimum class confusion module through structural pruning, retaining only the multi-scale feature extractor and the fault classifier to obtain the lightweight fault diagnosis model. The parameters of the lightweight fault diagnosis model are then solidified to obtain the final fault diagnosis model.
[0063] Furthermore, the source domain classification loss in S32 The expression is as follows:
[0064] ;
[0065] in, This represents the number of labeled samples in the source domain in batches. Total number of fault categories; Let be the indicator function, when the true label of the sample is The value is 1 if the condition is met, otherwise it is 0. The fault diagnosis model predicts the i-th labeled sample in the preprocessed source domain dataset as the i-th labeled sample. The probability of a class; Indicates the first The true fault category label of each source domain sample;
[0066] The S35 countermeasures loss The expression is as follows:
[0067] ;
[0068] in, This indicates the number of unlabeled samples in the target domain in a batch. This indicates the probability that the conditional domain discriminator outputs the sample from the source domain; Indicates the first Joint information variables corresponding to each source domain sample; Indicates the first Joint information variables corresponding to each target domain sample;
[0069] Minimum class confusion loss in S36 The expression is:
[0070] ;
[0071] The overall objective function in S37 The expression is:
[0072] ;
[0073] in, , These represent the weighting coefficients for the corresponding losses.
[0074] Furthermore, step S4 specifically includes the following steps:
[0075] S41. Deploy the final fault diagnosis model to the edge computing device of the intelligent diagnosis system;
[0076] S42. Preprocess the real-time fault data of electromechanical equipment to obtain preprocessed real-time fault data of electromechanical equipment, and input it into the final fault diagnosis model in the edge computing device. After passing through the multi-scale feature extractor, the deep feature vector is output. ;
[0077] S43, then the deep feature vector The input is fed into the fault classifier, which outputs the predicted probability distribution of the fault category. ;
[0078] S44. Select the predicted probability distribution of the fault category The category index with the highest probability value is used as the prediction result. And this maximum probability value is defined as the prediction confidence level. ;
[0079] S45. Intelligent alarm is performed using a multi-verification mechanism of "category-confidence level-temperature";
[0080] S46. Use the t-SNE dimensionality reduction algorithm to reduce deep feature vectors Map the points to a two-dimensional plane coordinate system, and draw feature scatter plots on the visualization interface based on these points in the two-dimensional plane coordinate system to generate visualization charts;
[0081] S47. Collect online diagnostic historical data over a period of time, use the confusion matrix calculation module to calculate and draw the target domain confusion matrix. The target domain confusion matrix can intuitively reflect the most common misjudgment types of current electromechanical equipment, providing a basis for subsequent final fault diagnosis model adjustments.
[0082] Furthermore, the prediction result in S44 Prediction confidence The expressions are as follows:
[0083] ;
[0084] ;
[0085] in, This function returns the index corresponding to the maximum value. This indicates a function that returns the maximum value.
[0086] In another aspect, the present invention provides a cross-domain fault diagnosis system for electromechanical equipment, configured to execute the above-described cross-domain fault diagnosis method for electromechanical equipment, the cross-domain fault diagnosis system for electromechanical equipment comprising:
[0087] The multi-source sensing and data acquisition module includes a high-frequency vibration acceleration sensor and a temperature sensor installed on the electromechanical equipment, which are used to collect real-time operating data of the electromechanical equipment to be diagnosed and convert it into a digital sequence.
[0088] The edge computing and preprocessing module is used to preprocess the digital sequence using the built-in sliding window slicing algorithm and fast Fourier transform algorithm to obtain preprocessed real-time fault data of electromechanical equipment.
[0089] The intelligent diagnostic reasoning module is used to perform forward reasoning on the preprocessed real-time fault data of electromechanical equipment based on the built-in final fault diagnosis model, calculate the predicted probability distribution of fault categories, and then output the prediction confidence based on the predicted probability distribution of fault categories.
[0090] The interactive monitoring and alarm module includes a display terminal and an audible and visual alarm, which is used for intelligent alarms using a multi-verification mechanism of "category-confidence-temperature".
[0091] The data transmission and storage module is used to realize data transmission and data storage between the multi-source sensing and data acquisition module, the edge computing and preprocessing module, the intelligent diagnostic reasoning module, and the interactive monitoring and alarm module.
[0092] The beneficial effects of this invention are:
[0093] 1. This invention discloses a cross-domain fault diagnosis method for electromechanical equipment based on minimum class confusion. The fault diagnosis model disclosed internally uses a multi-scale feature extractor for multi-scale feature extraction and fusion. Compared with the existing convolutional neural network which uses a fixed single-scale convolutional kernel for feature extraction, the multi-scale feature extractor in this invention captures more comprehensive information. It can capture short-time high-frequency signals and long-term periodic low-frequency signals in the fault vibration signals of electromechanical equipment. At the same time, it can take into account both local details and long-range dependencies, effectively avoiding the omission of key fault features.
[0094] 2. The fault diagnosis model in this invention also includes a conditional domain discriminator and a minimum category confusion module. The conditional domain discriminator is used to achieve cross-domain alignment, and the minimum category confusion module considers the structural differences between different fault categories, avoids the "negative migration" phenomenon, and also avoids the blurring of classification boundaries, thereby improving the diagnostic accuracy.
[0095] 3. This invention uses the t-SNE algorithm to draw feature scatter plots on a visualization interface, thereby generating visual charts and enhancing the interpretability of the model. Attached Figure Description
[0096] Figure 1 is a flowchart of the cross-domain fault diagnosis method for electromechanical equipment in this invention;
[0097] Figure 2 is a schematic diagram of the network structure of the fault diagnosis model in this invention. Detailed Implementation
[0098] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many other different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.
[0099] Referring to Figures 1 and 2, this application provides a cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion, including the following steps:
[0100] S1. Select external public datasets (such as the Western Reserve University CWRU dataset) or labeled historical data in the field of fault diagnosis of similar electromechanical equipment as the source domain dataset. Use high-frequency vibration acceleration sensors and temperature sensors to collect real-time operating data of key parts of the electromechanical equipment to be diagnosed (such as drive end bearings, fan end bearings, etc.) and use the real-time operating data of the electromechanical equipment to be diagnosed as the target domain dataset. Then, preprocess the source domain dataset and the target domain dataset.
[0101] S2. Construct a fault diagnosis model (MS-CDAN). The fault diagnosis model includes a multi-scale convolutional neural network (MS-CNN), a fault classifier, a conditional discriminator, and a minimum class confusion (MCC) module. The multi-scale feature extractor, fault classifier, and conditional discriminator are interconnected, and the fault classifier is connected to the minimum class confusion module.
[0102] S3. Use the preprocessed source domain dataset and target domain dataset to perform joint adversarial training on the fault diagnosis model. After training, perform lightweight processing on the trained fault diagnosis model and solidify the parameters of the lightweight fault diagnosis model to obtain the final fault diagnosis model.
[0103] S4. Deploy the final fault diagnosis model to the edge computing device of the intelligent diagnosis system, and use the final fault diagnosis model to diagnose the pre-processed real-time fault data of electromechanical equipment to obtain the diagnosis results.
[0104] In some embodiments, the preprocessing of the source domain dataset and the target domain dataset in S1 includes the following steps:
[0105] S11. First, the real-time operating data of the electromechanical equipment to be diagnosed in the target domain dataset is processed through anti-aliasing filtering and analog-to-digital conversion to obtain a digital sequence. Then, a sliding window slicing algorithm is used to slice the digital sequence according to a set sampling frequency. Convert to discrete time series data ;
[0106] Specifically, discrete time series data The expression is as follows:
[0107] ;
[0108] in, This represents the vibration amplitude data collected at the Kth sampling point. The vibration amplitude data serves as the primary data and is used in the learning and training of the fault diagnosis model. This represents the temperature value collected at the Kth sampling point. The temperature value is used as auxiliary data and does not participate in the learning and training of the fault diagnosis model. It only participates in the dual verification mechanism in S45 later. K represents the total number of sampling points covered by a single acquisition task.
[0109] S12. To construct samples that meet the input dimensions of the fault diagnosis model and maintain the temporal continuity of fault features, an overlapping sliding window mechanism is used for discrete time series data. Perform segmentation, then extract the first segment. A time-domain sample fragment , No. A time-domain sample fragment The expression is:
[0110] ;
[0111] in, This is the sequence number of the sample segment. ; Representing discrete time series data The index is Data points; This represents the total number of samples obtained after segmentation. Indicates the sliding step size; Indicates the window length;
[0112] S13. To fully exploit the periodic fault characteristics in the vibration signals of electromechanical equipment, a Fast Fourier Transform algorithm is used to analyze the first... A time-domain sample fragment Perform a Fast Fourier Transform to transform the time-domain sample fragments. Mapping from the time domain to the frequency domain;
[0113] Specifically, first calculate the first... A time-domain sample fragment complex spectrum The expression is as follows:
[0114] ;
[0115] in, Representing time-domain samples The first in One data point; It is a natural constant; The imaginary unit; For frequency domain index, the value range is 0 to... ;
[0116] Then according to the first A time-domain sample fragment complex spectrum Calculate the amplitude intensity of each frequency domain, and truncate the first half of the effective components according to the spectral conjugate symmetry to generate the frequency domain feature vector. The formulas for calculating the amplitude intensity in each frequency domain are as follows:
[0117] ;
[0118] in, Indicates the first Amplitude intensity in each frequency domain; Represents the function that takes the real part of a complex number; The function representing the imaginary part of a complex number;
[0119] S14. To eliminate the impact of sensitivity differences between different sensors and signal energy fluctuations on model convergence, the frequency domain feature vectors are... Perform Z-Score normalization to obtain the normalized frequency domain input samples. The expression is as follows:
[0120] ;
[0121] in, Represents frequency domain eigenvectors The arithmetic mean of the amplitude intensities across all frequency domains; Represents frequency domain eigenvectors The standard deviation of the amplitude intensity across all frequency domains; It is a very small positive number, used to avoid calculation errors when the denominator is zero;
[0122] S15. Input the standardized frequency domain samples. As the target domain after preprocessing;
[0123] S16. Then, the source domain dataset is preprocessed in the same way as S11 to S14 to obtain the preprocessed source domain dataset.
[0124] In some embodiments, the multi-scale feature extractor comprises sequentially connected... Convolutional layers, multiple (e.g., three) parallel convolutional processing branches, feature fusion, and channel attention mechanisms; each convolutional processing branch includes sequentially connected convolutional kernels of size [missing information]. The convolutional layers, normalized layer (BN), and activation functions; the feature fusion and channel attention mechanism includes sequentially connected channel splicing modules and channel attention mechanisms;
[0125] The fault classifier consists of two cascaded fully connected layers; the fault classifier is used to map deep features to a fault category space.
[0126] The conditional domain discriminator comprises a fusion module, a gradient reversal layer (GRL), and a domain discriminator connected in sequence. The gradient reversal layer keeps the input unchanged during forward propagation and multiplies the gradient by a negative coefficient during backward propagation. , These are the domain-adaptive weights, used to control the intensity of adversarial training, and are typically adjusted dynamically as the training progresses.
[0127] The minimum category confusion module is used to solve the problem of ambiguous decision boundaries caused by unlabeled data in the target domain.
[0128] In some embodiments, the convolution processing branch in the multi-scale feature extractor is used to extract feature maps at different scales. The specific expression is as follows:
[0129] ;
[0130] in, Indicates the kernel size as ( =3, 5, 7) convolutional layers; Indicates the activation function; express Convolutional layer; This represents the sample vector input to the multi-scale feature extractor after preprocessing of the source or target domain dataset;
[0131] The channel stitching module is used to stitch together the feature maps of each branch along the channel dimension to obtain the stitched feature. The expression is as follows:
[0132] ;
[0133] in, This indicates the channel splicing operation of the channel splicing module; These represent feature maps of different scales output by the three parallel convolutional processing branches, respectively.
[0134] The channel attention mechanism is used to calculate attention weights based on the importance of each channel, and then combine the attention weights with the input features of the identity mapping branch to calculate the deep feature vector. The relevant expressions are as follows:
[0135] ;
[0136] ;
[0137] in, Indicates attention weight; Indicates the activation function; , Indicates the weighting coefficient; Indicates the average pooling layer; This indicates element-wise multiplication (Hadamard Product). This represents the input features of the identity mapping branch in the channel attention mechanism, used to construct residual connections to prevent network degradation.
[0138] In some embodiments, the fault classifier is used to classify deep feature vectors Mapping to the fault category space yields the predicted probability distribution of the fault categories. The relevant expressions are as follows:
[0139] ;
[0140] ;
[0141] in, and These represent the weight matrix and bias vector of the fault classifier, respectively; This is the unnormalized logical output vector; express function;
[0142] The conditional domain discriminator is used to achieve cross-domain alignment based on fault categories, thereby obtaining joint information variables. The expression is as follows:
[0143] ;
[0144] in, This indicates a tensor product operation or a dimension-reduced outer product operation based on a random mapping.
[0145] The minimum class confusion module is used to calculate the class correlation matrix of samples in the target domain dataset. Category correlation matrix The first in Line number Column elements Define as a category With category The cosine similarity is expressed as follows:
[0146] ;
[0147] in, Indicates the first The sample belongs to the first The predicted probability of a class; Indicates the first The sample belongs to the first The predicted probability of the class; B represents the number of target domain samples in the current training batch. The goal of the minimum class confusion module is to minimize the class correlation matrix. The sum of the absolute values of the off-diagonal elements.
[0148] In some embodiments, S3 specifically includes the following steps:
[0149] S31. Input the labeled samples from the preprocessed source domain dataset and the unlabeled samples from the preprocessed target domain dataset into the fault diagnosis model.
[0150] S32. After preprocessing, the labeled samples in the source domain dataset are processed by a multi-scale feature extractor to output deep feature vectors. , to deep feature vector The input is fed into the fault classifier, and the output is the predicted probability distribution of the fault category. Then, based on the predicted probability distribution of the fault category Calculate source domain classification loss Source domain classification loss The Cross Entropy Loss function is used.
[0151] S33. After preprocessing, the unlabeled samples of the target domain dataset are processed by a multi-scale feature extractor to output deep feature vectors. , to deep feature vector The input is fed into the fault classifier, and the output is the predicted probability distribution of the fault category. ;
[0152] S34. Transfer deep feature vectors Predicted probability distribution of fault categories The input is fed into the fusion module of the conditional domain discriminator to obtain the joint information variables. ; to deep feature vector Predicted probability distribution of fault categories The input is fed into the fusion module of the conditional domain discriminator to obtain the joint information variables. ;
[0153] S35, then the joint information variables Joint information variables The results are fed into the domain discriminator, and the adversarial loss is calculated based on the results. When optimizing the feature extractor, the gradient inversion layer uses the lost gradient... Pass it back, symbol This represents the gradient operator, used to calculate the derivative of the loss function with respect to the network parameters. This enables adversarial processing.
[0154] S36. To further optimize the classification boundary of the target domain, the minimum class confusion module is used to calculate the minimum class confusion loss. This loss function directly penalizes the ambiguity of samples in the target domain between different categories, prompting samples to cluster towards the category center with high confidence.
[0155] S37. Then, based on the source domain classification loss... Combating losses Minimal Class Confusion Loss Calculate the overall objective function ;
[0156] S38. Minimize the overall objective function using the standard back-propagation algorithm. The trained fault diagnosis model is obtained;
[0157] S39. The trained fault diagnosis model is lightweighted by removing the conditional domain discriminator and the minimum class confusion module through structural pruning, retaining only the multi-scale feature extractor and the fault classifier to obtain the lightweight fault diagnosis model. The parameters of the lightweight fault diagnosis model are then solidified to obtain the final fault diagnosis model.
[0158] In some embodiments, the source domain classification loss in S32 The expression is as follows:
[0159] ;
[0160] in, This represents the number of labeled samples in the source domain in batches. Total number of fault categories; Let be the indicator function, when the true label of the sample is The value is 1 if the condition is met, otherwise it is 0. The fault diagnosis model predicts the i-th labeled sample in the preprocessed source domain dataset as the i-th labeled sample. The probability of a class; Indicates the first The true fault category label of each source domain sample;
[0161] The S35 countermeasures loss The expression is as follows:
[0162] ;
[0163] in, This indicates the number of unlabeled samples in the target domain in a batch. This indicates the probability that the conditional domain discriminator outputs the sample from the source domain; Indicates the first Joint information variables corresponding to each source domain sample; Indicates the first Joint information variables corresponding to each target domain sample;
[0164] Minimum class confusion loss in S36 The expression is:
[0165] ;
[0166] The overall objective function in S37 The expression is:
[0167] ;
[0168] in, , These represent the weighting coefficients for the corresponding losses.
[0169] In some embodiments, S4 specifically includes the following steps:
[0170] S41. Deploy the final fault diagnosis model to the edge computing device of the intelligent diagnosis system;
[0171] S42. Preprocess the real-time fault data of electromechanical equipment to obtain preprocessed real-time fault data of electromechanical equipment, and input it into the final fault diagnosis model in the edge computing device. After passing through the multi-scale feature extractor, the deep feature vector is output. ;
[0172] S43, then the deep feature vector The input is fed into the fault classifier, which outputs the predicted probability distribution of the fault category. ;
[0173] S44. Select the predicted probability distribution of the fault category The category index with the highest probability value is used as the prediction result. And this maximum probability value is defined as the prediction confidence level. ;
[0174] S45. Intelligent alarm is performed using a multi-verification mechanism of "category-confidence level-temperature";
[0175] Specifically, to reduce false alarm rates and improve safety in industrial settings, the system employs a multi-factor verification mechanism of "category-confidence level-temperature" for alarm control.
[0176] Normal / Fault Binary Check: If the predicted category Corresponding to the "normal operation" state, the system remains silent; if If a certain type of fault is identified (such as inner ring fault or rolling element fault), then the confidence level check is performed.
[0177] Joint Confidence Validation with Temperature: Setting a Confidence Threshold for Model Predictions and equipment operating temperature warning threshold The system reads the confidence level at the current moment. and real-time temperature data collected in S11 (Calculate its mean) ), execute the following hierarchical logic:
[0178] Valid fault event (urgent): If and The system is identified as a "high-risk fault." At this point, the probability of failure is high, accompanied by a rise in physical temperature. The equipment control module immediately triggers an audible and visual alarm and sends a forced shutdown command to the central control room to prevent the equipment from burning out.
[0179] Early fault warning (general): If but The system is identified as an "early-stage fault." At this point, the fault characteristics have become apparent but have not yet caused overheating. The system triggers a yellow warning signal, prompting maintenance personnel to conduct an inspection during the next maintenance window, but does not trigger an immediate shutdown to ensure production continuity.
[0180] Suspected interference: If If the event is identified as a suspected fault or noise interference, the system will mark it as "to be observed" and will not trigger an alarm. Instead, it will automatically increase the sampling frequency of the data for that time period to capture subsequent changes.
[0181] S46. Use the t-SNE (t-Distributed Stochastic Neighbor Embedding) dimensionality reduction algorithm to reduce deep feature vectors Map the points to a two-dimensional plane coordinate system, and draw feature scatter plots on the visualization interface based on these points in the two-dimensional plane coordinate system to generate visualization charts;
[0182] In the process of drawing feature scatter plots, if the boundaries of different colored point clusters (representing different categories) are clear and the separation is high, it intuitively proves that the current diagnostic model's feature extraction is effective; if point clusters are mixed, it indicates to the operations and maintenance personnel that the model may experience performance degradation.
[0183] S47. Collect historical online diagnostic data over a period of time, and use the confusion matrix calculation module to calculate and plot the target domain confusion matrix. The target domain confusion matrix can intuitively reflect the most common misjudgment types of the current electromechanical equipment, providing a basis for subsequent final fault diagnosis model adjustments. The darker the color of the diagonal elements in the target domain confusion matrix, the higher the diagnostic accuracy of that category; if the off-diagonal elements are highlighted, it intuitively reveals the most common misjudgment types of the current equipment, providing a basis for subsequent model fine-tuning.
[0184] In some embodiments, the prediction results in S44 Prediction confidence The expressions are as follows:
[0185] ;
[0186] ;
[0187] in, This function returns the index corresponding to the maximum value. This indicates a function that returns the maximum value.
[0188] In another aspect, the present invention provides a cross-domain fault diagnosis system for electromechanical equipment, configured to execute the above-described cross-domain fault diagnosis method for electromechanical equipment, the cross-domain fault diagnosis system for electromechanical equipment comprising:
[0189] The multi-source sensing and data acquisition module includes a high-frequency vibration acceleration sensor and a temperature sensor installed on key parts of the electromechanical equipment, as well as a high-frequency data acquisition card, which are used to collect real-time operating data of the electromechanical equipment to be diagnosed and convert it into a digital sequence.
[0190] The edge computing and preprocessing module is used to preprocess the digital sequence using the built-in sliding window slicing algorithm and fast Fourier transform algorithm to obtain preprocessed real-time fault data of electromechanical equipment.
[0191] The intelligent diagnostic reasoning module is used to perform forward reasoning on the preprocessed real-time fault data of electromechanical equipment based on the built-in final fault diagnosis model, calculate the predicted probability distribution of fault categories, and then output the prediction confidence based on the predicted probability distribution of fault categories.
[0192] The interactive monitoring and alarm module includes a display terminal and an audible and visual alarm, which is used for intelligent alarms using a multi-verification mechanism of "category-confidence-temperature".
[0193] The data transmission and storage module is used to realize data transmission and data storage between the multi-source sensing and data acquisition module, the edge computing and preprocessing module, the intelligent diagnostic reasoning module, and the interactive monitoring and alarm module.
[0194] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion, characterized in that, The process includes the following steps: S1. Select external public datasets or labeled historical data in the field of fault diagnosis of similar electromechanical equipment as the source domain dataset, collect real-time operating data of the electromechanical equipment to be diagnosed, and use the real-time operating data of the electromechanical equipment to be diagnosed as the target domain dataset. Then, preprocess the source domain dataset and the target domain dataset. The target domain dataset includes vibration amplitude data collected by a high-frequency vibration acceleration sensor and temperature values collected by a temperature sensor. S2. Construct a fault diagnosis model, which includes a multi-scale feature extractor, a fault classifier, a conditional domain discriminator, and a minimum class confusion module. The multi-scale feature extractor, fault classifier, and conditional domain discriminator are interconnected, and the fault classifier is connected to the minimum class confusion module. S3. Perform joint adversarial training on the fault diagnosis model using the preprocessed source domain dataset and target domain dataset. After training, perform lightweight processing on the trained fault diagnosis model and solidify the parameters of the lightweight fault diagnosis model to obtain the final fault diagnosis model. S4. Deploy the final fault diagnosis model to the edge computing device of the intelligent diagnosis system. Use the final fault diagnosis model to diagnose the preprocessed real-time fault data of electromechanical equipment to obtain the diagnosis results. The multi-scale feature extractor includes sequentially connected... The system includes convolutional layers, multiple parallel convolutional processing branches, feature fusion, and channel attention mechanisms; each parallel convolutional processing branch has a different kernel size; the fault classifier consists of two cascaded fully connected layers; the conditional domain discriminator includes a fusion module, a gradient inversion layer, and a domain discriminator connected in sequence; step S3 specifically includes the following steps: S31, inputting preprocessed labeled samples from the source domain dataset and preprocessed unlabeled samples from the target domain dataset into the fault diagnosis model; S32, the preprocessed labeled samples from the source domain dataset are processed by a multi-scale feature extractor to output deep feature vectors. , to deep feature vector The input is fed into the fault classifier, and the output is the predicted probability distribution of the fault category. Then, based on the predicted probability distribution of the fault category Calculate source domain classification loss S33. After preprocessing, the unlabeled samples of the target domain dataset are processed by a multi-scale feature extractor to output deep feature vectors. , to deep feature vector The input is fed into the fault classifier, and the output is the predicted probability distribution of the fault category. S34. Transfer the deep feature vector Predicted probability distribution of fault categories The input is fed into the fusion module of the conditional domain discriminator to obtain the joint information variables. ; to deep feature vector Predicted probability distribution of fault categories The input is fed into the fusion module of the conditional domain discriminator to obtain the joint information variables. S35, then the joint information variables Joint information variables The results are fed into the domain discriminator, and the adversarial loss is calculated based on the results. S36. The minimum class confusion module calculates the class correlation matrix of samples in the target domain dataset, and calculates the minimum class confusion loss based on the class correlation matrix and the minimum class confusion module. S37. Then, based on the source domain classification loss... Combating losses Minimal Class Confusion Loss Calculate the overall objective function S38. Minimize the overall objective function using the standard backpropagation algorithm. S39. The trained fault diagnosis model is obtained; the trained fault diagnosis model is then subjected to lightweight processing. Lightweight processing is achieved by removing the conditional domain discriminator and the minimum class confusion module through structural pruning, retaining only the multi-scale feature extractor and the fault classifier, to obtain the lightweight fault diagnosis model. The parameters of the lightweight fault diagnosis model are then solidified to obtain the final fault diagnosis model.
2. The cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion according to claim 1, characterized in that, The preprocessing of the source domain dataset and the target domain dataset in S1 includes the following steps: S11, First, the real-time operating data of the electromechanical equipment to be diagnosed in the target domain dataset is processed through anti-aliasing filtering and analog-to-digital conversion to obtain a digital sequence. Then, a sliding window slicing algorithm is used to slice the digital sequence according to a set sampling frequency. Convert to discrete time series data S12. An overlapping sliding window mechanism is used for discrete time series data. Perform segmentation, then extract the first segment. A time-domain sample fragment , the A time-domain sample fragment The expression is: ;in, This is the sequence number of the sample segment. ; Representing discrete time series data The index is Data points; This represents the total number of samples obtained after segmentation. Indicates the sliding step size; Indicates the window length; S13, uses the Fast Fourier Transform algorithm to analyze the first... A time-domain sample fragment Perform a Fast Fourier Transform to transform the time-domain sample fragments. Mapping from the time domain to the frequency domain; specifically, first calculate the... A time-domain sample fragment complex spectrum The expression is as follows: ;in, Representing time-domain samples The first in One data point; It is a natural constant; The imaginary unit; For frequency domain index, the value range is 0 to Then, according to the first A time-domain sample fragment complex spectrum Calculate the amplitude intensity of each frequency domain, and truncate the first half of the effective components according to the spectral conjugate symmetry to generate the frequency domain feature vector. The formulas for calculating the amplitude intensity in each frequency domain are as follows: ;in, Indicates the first Amplitude intensity in each frequency domain; Represents the function that takes the real part of a complex number; S14 represents the function taking the imaginary part of a complex number; for frequency domain eigenvectors Perform Z-Score normalization to obtain the normalized frequency domain input samples. The expression is as follows: ;in, Represents frequency domain eigenvectors The arithmetic mean of the amplitude intensities across all frequency domains; Represents frequency domain eigenvectors The standard deviation of the amplitude intensity across all frequency domains; The value is a very small positive number to avoid calculation errors caused by a zero denominator; S15, input the standardized frequency domain data into the sample. As the target domain after preprocessing; S16, then the source domain dataset is preprocessed in the same way as S11 to S14 to obtain the preprocessed source domain dataset.
3. The cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion according to claim 1, characterized in that, Each convolutional processing branch includes a convolutional layer, a normalization layer (BN), and an activation function connected in sequence; the feature fusion and channel attention mechanism includes a channel splicing module and a channel attention mechanism connected in sequence.
4. The cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion according to claim 3, characterized in that, The convolutional processing branch in the multi-scale feature extractor is used to extract feature maps at different scales. The specific expression is as follows: ;in, Indicates the kernel size as Convolutional layers; Indicates the activation function; express Convolutional layer; This represents the sample vector input to the multi-scale feature extractor after preprocessing the source or target domain dataset; the channel concatenation module is used to concatenate the feature maps of each branch along the channel dimension to obtain the concatenated feature. The expression is as follows: ;in, This indicates the channel splicing operation within the channel splicing module; These represent feature maps at different scales output by the three parallel convolutional processing branches, respectively. The channel attention mechanism is used to calculate attention weights based on the importance of each channel, and then combine these attention weights with the input features from the identity mapping branch to calculate the deep feature vector. The relevant expressions are as follows: ; ;in, Indicates attention weight; Indicates the activation function; 、 Indicates the weighting coefficient; Indicates the average pooling layer; This indicates element-wise multiplication; This represents the input features of the identity mapping branch in the channel attention mechanism, used to construct residual connections to prevent network degradation.
5. The cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion according to claim 4, characterized in that, The fault classifier is used to classify deep feature vectors Mapping to the fault category space yields the predicted probability distribution of the fault categories. The relevant expressions are as follows: ; ;in, and These represent the weight matrix and bias vector of the fault classifier, respectively; This is the unnormalized logical output vector; express The function; the conditional domain discriminator is used to achieve cross-domain alignment based on fault categories, thereby obtaining joint information variables. The expression is as follows: ;in, This represents a tensor product operation or a dimension-reduced outer product operation based on a random mapping; the minimum class confusion module is used to calculate the class correlation matrix of samples in the target domain dataset. Category correlation matrix The first in Line number Column elements Define as a category With category The cosine similarity is expressed as follows: ;in, Indicates the first The sample belongs to the first The predicted probability of a class; Indicates the first The sample belongs to the first The predicted probability of the class; B represents the number of target domain samples in the current training batch.
6. The cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion according to claim 5, characterized in that, Source domain classification loss in S32 The expression is as follows: ;in, This represents the number of labeled samples in the source domain in batches. Total number of fault categories; Let be the indicator function, when the true label of the sample is The value is 1 if the condition is met, otherwise it is 0. The fault diagnosis model predicts the i-th labeled sample in the preprocessed source domain dataset as the i-th labeled sample. The probability of a class; Indicates the first The true fault category label of each source domain sample; the adversarial loss in S35 The expression is as follows: ;in, This indicates the number of unlabeled samples in the target domain in a batch. This indicates the probability that the conditional domain discriminator outputs the sample from the source domain; Indicates the first Joint information variables corresponding to each source domain sample; Indicates the first The joint information variables corresponding to each target domain sample; the minimum class confusion loss in S36 The expression is: The overall objective function in S37 The expression is: ;in, 、 These represent the weighting coefficients for the corresponding losses.
7. The cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion according to claim 6, characterized in that, S4 specifically includes the following steps: S41, deploying the final fault diagnosis model to the edge computing device of the intelligent diagnosis system; S42, preprocessing the real-time fault data of the electromechanical equipment to obtain preprocessed real-time fault data of the electromechanical equipment, and inputting it into the final fault diagnosis model in the edge computing device, and outputting a deep feature vector after passing through a multi-scale feature extractor. S43, then the deep feature vector The input is fed into the fault classifier, which outputs the predicted probability distribution of the fault category. S44. Select the predicted probability distribution of the fault category. The category index with the highest probability value is used as the prediction result. And this maximum probability value is defined as the prediction confidence level. S45. Employ a multi-verification mechanism of "category-confidence-temperature" for intelligent alarm; S46. Utilize the t-SNE dimensionality reduction algorithm to reduce deep feature vectors Mapping to a two-dimensional plane coordinate system, and drawing feature scatter plots on the visualization interface based on the points on these two-dimensional plane coordinate systems to generate visualization charts; S47, collecting online diagnostic historical data over a period of time, using the confusion matrix calculation module to calculate and draw the target domain confusion matrix. The target domain confusion matrix can intuitively reflect the most common misjudgment types of current electromechanical equipment, providing a basis for subsequent final fault diagnosis model adjustments.
8. The cross-domain fault diagnosis method for electromechanical equipment based on minimal category confusion according to claim 7, characterized in that, The prediction result in S44 Prediction confidence The expressions are as follows: ; ;in, This function returns the index corresponding to the maximum value. This indicates a function that returns the maximum value.
9. A cross-domain fault diagnosis system for electromechanical equipment, characterized in that, The cross-domain fault diagnosis method for electromechanical equipment as described in any one of claims 1 to 8 is configured to be executed. The cross-domain fault diagnosis system for electromechanical equipment includes: a multi-source sensing and data acquisition module, including a high-frequency vibration acceleration sensor and a temperature sensor installed on the electromechanical equipment, for real-time acquisition of real-time operating data of the electromechanical equipment to be diagnosed and converting it into a digital sequence; an edge computing and preprocessing module, for preprocessing the digital sequence using a built-in sliding window slicing algorithm and a fast Fourier transform algorithm to obtain preprocessed real-time fault data of the electromechanical equipment; an intelligent diagnostic reasoning module, for performing forward reasoning on the preprocessed real-time fault data of the electromechanical equipment based on a built-in final fault diagnosis model, calculating the predicted probability distribution of fault categories, and then outputting the predicted confidence level based on the predicted probability distribution of fault categories; an interactive monitoring and alarm module, including a display terminal and an audible and visual alarm, for intelligent alarming using a "category-confidence-temperature" multi-verification mechanism; and a data transmission and storage module, for realizing data transmission and data storage between the multi-source sensing and data acquisition module, the edge computing and preprocessing module, the intelligent diagnostic reasoning module, and the interactive monitoring and alarm module.
Citation Information
Patent Citations
Transfer learning bearing fault diagnosis method and device based on width multi-scale space-time attention, and storage medium
CN116337448A
Cross-device domain adaptation method based on domain decoupling and class confusion minimization feature alignment
CN118035783A