A multi-sensor system fault diagnosis method for few-shot learning
By optimizing the sampling frequency and constructing a lightweight cross-domain multi-scale attention network, combined with time-frequency features and feature space distribution optimization, the problem of fault diagnosis accuracy in multi-sensor systems lacking training samples was solved, and efficient fault mode recognition was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENYANG INST OF AUTOMATION - CHINESE ACAD OF SCI
- Filing Date
- 2024-12-11
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies struggle to effectively learn fault modes in multi-sensor systems when training samples are lacking, resulting in insufficient accuracy in fault diagnosis.
By optimizing the sampling frequency in parallel, a lightweight cross-domain multi-scale attention network is constructed. Combining time domain, frequency domain, and statistical features, a loss function is designed to optimize the feature space distribution and achieve fault diagnosis.
It improves the accuracy of fault diagnosis in the absence of training samples, reduces the dependence on the number of training samples, and realizes real-time fault diagnosis of multi-sensor systems.
Smart Images

Figure CN122196611A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fault diagnosis algorithms, specifically a fault diagnosis method for multi-sensor systems oriented towards few-sample learning. Background Technology
[0002] Equipment inevitably experiences malfunctions during operation. By installing sensors to collect vibration signals, the operating status can be analyzed, allowing for the prediction and diagnosis of potential fault modes, thus preventing personal injury and property damage. As the number of sensors increases, the amount of information available for fault diagnosis expands significantly, effectively improving the accuracy of fault diagnosis. However, learning the signal characteristic relationships between different sensors often requires collecting a large number of data samples for algorithm training; otherwise, ideal diagnostic accuracy cannot be achieved. In practical engineering, fault sample data is extremely scarce, making existing diagnostic methods often difficult to apply to real-world scenarios. Summary of the Invention
[0003] To address the difficulty of learning fault modes in multi-sensor systems with limited training samples using existing technologies, this invention provides a fault diagnosis method for multi-sensor systems based on limited sample learning. This method considers the characteristics of signal samples from multiple domains and can effectively provide a reliable reference for equipment fault diagnosis.
[0004] The technical solution adopted by the present invention to achieve the above objectives is as follows:
[0005] A fault diagnosis method for multi-sensor systems based on few-shot learning includes the following steps:
[0006] 1) Parallel optimization of sampling frequency: The original signal is sampled using the optimized sampling frequency to obtain signal samples;
[0007] 2) Construct a fault diagnosis model based on a lightweight cross-domain multi-scale attention network, and use the model to diagnose faults in signal samples to obtain fault categories;
[0008] 3) Determine whether step 2) is the model training phase. If so, optimize the model by calculating the total loss function; otherwise, output the fault diagnosis result.
[0009] Step 1) includes the following steps:
[0010] 1.1) Multiple vibration acceleration signals from multiple channels are collected using multiple sensors installed on the equipment, which are used as the raw signal X(c,+∞), where c is the number of sensors or channels;
[0011] 1.2) The original signal is sampled at multiple intervals to obtain signal samples x(n,c,l), where l is the sampling length and n is the number of samplings;
[0012] 1.3) Process the signal samples in different dimensions to obtain an extended matrix E and a repeating matrix R with the same dimensions and size;
[0013] 1.4) Calculate the similarity sim of samples at sampling interval v using the broadening matrix and the repetition matrix. v ;
[0014] 1.5) Calculate the optimal sampling frequency using similarity. The original signal is sampled, and the resulting signal samples are used as input to the fault diagnosis model.
[0015] The processing of the signal samples in different dimensions specifically involves: copying the i-th signal sample n times in the first and second dimensions, respectively, where:
[0016] The broadening matrix is obtained by extending the signal samples in the second dimension, that is:
[0017] E(n,i,c,l)=x(i,c,l)
[0018] The repetition matrix is obtained by repeatedly filling the first dimension with signal samples, i.e.
[0019] R(i,n,c,l)=x(i,c,l).
[0020] Calculate sample similarity sim v Specifically:
[0021] The broadening matrix E and the repetition matrix R are calculated in parallel by element-wise subtraction to obtain the pairwise dissimilarity between all samples. Then, the similarity of the sampling interval is calculated by the reciprocal of the dissimilarity, i.e.:
[0022]
[0023] The optimal sampling frequency for:
[0024]
[0025] Step 2) includes the following steps:
[0026] 2.1) Preprocess the signal samples and calculate the mean value of each channel of the sample. The preprocessed sample is obtained by summing the standard deviation σ.
[0027] 2.2) Calculate the time-domain sample, frequency-domain sample, and statistical features of the signal sample respectively, wherein the time-domain sample is the preprocessed sample, the frequency-domain sample is the time-domain sample processed by Fourier transform, and the statistical features are index data obtained by statistically analyzing the time-domain sample and frequency-domain sample using multiple statistical indicators.
[0028] 2.3) Convolve time-domain and frequency-domain samples using kernels of different sizes to extract multi-scale features;
[0029] 2.4) Update weights by combining information from different channels using an improved channel attention mechanism;
[0030] 2.5) Integrate depth information and statistical indicators of each channel in the time domain, each channel in the frequency domain, and each scale to map the signal into fault features, and map the fault features to the probability of different fault categories through the decoder.
[0031] Step 2.4) specifically refers to:
[0032] Let z be the average and maximum values of the input x. avg and z max Let σ be the ReLU activation function and δ be the Sigmoid activation function. Then the mean weight w of the input signal is... avg and maximum weight w max They are respectively:
[0033] w avg =σ(Conv2(δ(Conv1(z)) avg ))))
[0034] w max =σ(Conv2(δ(Conv1(z)) max ))))
[0035] In this design, both convolutional layers Conv1 and Conv2 have a kernel size of 1, used to compress the attention exponent z(c,1) to size (r,1) and restore it to size (c,1), respectively. The scaling factor r is a configurable parameter. The improved channel attention mechanism is denoted as A, and its weighted output... for:
[0036]
[0037] Step 2.5) specifically refers to:
[0038] y t =M2(M1(x) t ))
[0039] y f =M2(M1(x) f ))
[0040] y = A(Conv1(A(f) t ,f f ))),Conv1(x s )
[0041] Among them, y t For time-domain features, y f Let y represent the frequency domain features, y represent the fault features, M1 and M2 represent the first and subsequent convolutional layers, respectively, and x represent the frequency domain features. t x f and x s These are time-domain samples, frequency-domain samples, and statistical indicators, respectively.
[0042] In step 3), backpropagation and the Adam optimization algorithm are used to optimize the model, even if the total loss function... Minimize the total loss function for:
[0043]
[0044] in, For classifying losses, For intra-class distribution loss, For inter-class distribution loss, λ represents the loss due to uneven distribution among classes, and λ is the regularization strength.
[0045] The intra-class distribution loss for:
[0046]
[0047] in, Let n be the center coordinates of the i-th sample in the feature space. i Let be the number of samples of the i-th type of fault, and j be the number of feature dimensions of y. Let m be the intra-class loss term for the i-th class of samples, and m be the number of sample classes;
[0048] The inter-class distribution loss for:
[0049]
[0050] Where c is the center coordinate in the feature space, β i Let be the distance from the center of the i-th type of sample to the center of the sample space;
[0051] The inter-class distribution imbalance loss for:
[0052]
[0053] The present invention has the following beneficial effects and advantages:
[0054] 1. By optimizing the signal sampling rate through calculation, the difference between training samples and actual test samples is reduced, enabling good diagnostic accuracy even in scenarios lacking training samples;
[0055] 2. A fault diagnosis method based on the combination of time domain, frequency domain and statistical features was designed. Fault mode features were mined based on an improved channel attention mechanism and multi-kernel convolutional layers, reducing the dependence on the number of training samples.
[0056] 3. A loss function regularization term based on the location of signal samples in the feature space was designed. By optimizing the distribution of different types of samples in the feature space, the accuracy of fault diagnosis is enhanced, especially under the condition of lack of training samples.
[0057] 4. The signal sampling rate optimization method and loss function calculation method in this invention are easy to implement and computationally fast. The fault diagnosis algorithm design does not rely on two-dimensional time-frequency diagram calculation, and the lightweight multi-domain computation design makes real-time fault diagnosis of multi-sensor systems possible. Attached Figure Description
[0058] Figure 1 Structure diagram of a fault diagnosis method for multi-sensor systems based on few-shot learning;
[0059] Figure 2 This is a schematic diagram illustrating the calculation method for the optimal sampling interval based on sample similarity. Detailed Implementation
[0060] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0061] A fault diagnosis method for multi-sensor systems based on few-shot learning includes the following steps:
[0062] The sampling frequency is optimized in parallel. By sampling the original signal at different frequencies, signal samples are obtained. A repetition matrix and a broadening matrix are constructed, and the difference matrix is obtained by subtracting the elements. The reciprocal of the magnitude of the difference matrix is used as the evaluation of the sampling frequency to obtain the similarity of the samples. Finally, the frequency with the highest similarity is selected as the sampling frequency.
[0063] A lightweight, cross-domain, multi-scale attention network is used to acquire signal features and fault categories. Normalized signal samples are used as time-domain samples, and then Fourier transform and statistics are used to obtain frequency-domain samples and statistical features. Convolutional kernels of different scales are used to mine features from time-domain and frequency-domain samples, and an improved channel attention mechanism is used to fuse information between different channels, while making the network more focused on fault-related patterns.
[0064] To optimize the feature space distribution, during network training, not only is the loss for fault classification calculated, but also the intra-class and inter-class losses are calculated based on the position of training samples in the feature space. Iterative optimization brings samples of the same class closer together in the feature space, while making the positions of samples from different classes more balanced and isolated.
[0065] like Figure 1 As shown, the present invention specifically includes the following steps:
[0066] Step 1: Acquire raw signals. Multiple sensors are installed on the device to obtain multi-channel vibration acceleration signals. If the optimal sampling interval has been calculated, proceed to Step 5; otherwise, proceed to Step 2.
[0067] Step 2: Sample the original signal X(c,+∞) at various intervals v, where c is the number of sensors or channels, and the length is +∞ due to continuous monitoring. When sampling X n times with a length l, the resulting signal sample is x(n,c,l).
[0068] Step 3: As Figure 2 As shown, a broadening matrix E(n,n,c,l) and a repetition matrix R(n,n,c,l) are constructed. These two matrices have the same dimension and size, both obtained by transforming the sample signal from three dimensions to four dimensions. The broadening matrix is obtained by extending the signal samples in the second dimension, and the repetition matrix is obtained by repeatedly filling the signal samples in the first dimension. The specific calculation formulas are as follows:
[0069] E(n,i,c,l)=x(i,c,l)
[0070] R(i,n,c,l)=x(i,c,l)
[0071] Step 4: Calculate the similarity sim of samples at sampling interval v using the broadened matrix and the repetition matrix. v First, calculate the difference matrix D(n,n,c,l) = ER. Then, calculate the difference between each pair of samples by subtracting the elements of these two matrices in parallel. Finally, calculate the similarity of the sampling interval using the reciprocal of the difference. The specific calculation formula is as follows:
[0072]
[0073] Step 5: Using the optimal sampling frequency The signal is sampled, and the resulting signal samples are used as input to the diagnostic model. The optimal sampling interval is determined through... The calculation shows that the sampling frequency with the highest sample similarity is the optimal frequency. At this point, the similarity between the training and test samples is highest, preventing the model from failing to learn key fault features due to a scarcity of training samples.
[0074] Step 6: Preprocess the signal samples. Let the signal sample be x(n,c,l), and the mean of each channel of the sample be... If the standard deviation is σ(n,c), then the preprocessed sample is At this point, the mean of the sample sequence is 0 and the standard deviation is 1, which is suitable for recognition by deep learning algorithms.
[0075] Step 7: Calculate the time-domain and frequency-domain samples and their statistical characteristics. The time-domain samples directly use the preprocessing results obtained in Step 6. The frequency-domain samples are processed using Fourier transform on the time-domain samples, with the same sample size as the time-domain samples, denoted as x. f (n,c,l). Multiple statistical indicators are selected to perform statistical analysis on the time-domain and frequency-domain samples to obtain statistical characteristics. Preferably, 18 statistical indicators are used in this embodiment, denoted as x. s (n,c,18) represents: mean, root mean square, variance, square root amplitude, absolute mean amplitude, peak value, kurtosis, maximum value, minimum value, peak-to-peak, skewness, shape factor, peak factor, impulse factor, gap factor, frequency center, root mean square variance frequency, and root variance frequency.
[0076] Step 8: Convolve time-domain and frequency-domain samples using kernels of different sizes to extract multi-scale features. Preferably, in this embodiment, the first layer of the network uses a relatively wide convolutional layer and the Leaky ReLU activation function to extract main features and reduce information waste, while subsequent convolutional layers use smaller convolutional kernels and the ReLU activation function to extract detailed features and avoid overfitting. Let conv n Let be a convolutional layer with kernel size n, and let the ReLU activation function and the LeakyReLU activation function be σ and σ, respectively. Let B be the normalization method of BatchNorm. Then the first convolutional layer M1 and the subsequent convolutional layer M2 can be represented as follows:
[0077]
[0078] M2(x)=conv1(x)+σ(B(conv3(x)),B(conv5(x)),B(conv7(x)))
[0079] Step 9: Utilize an improved channel attention mechanism to combine information from different channels and assign higher weights to channels more relevant to the fault mode. Let z denote the average and maximum values of the input x. avg and z max Let σ be the ReLU activation function and δ be the Sigmoid activation function. Then the mean weight w of the input signal... avg and maximum weight w max It can be calculated using the following formula:
[0080] w avg =σ(Conv2(δ(Conv1(z)) avg ))))
[0081] w max =σ(Conv2(δ(Conv1(z)) max ))))
[0082] In this model, both Conv1 and Conv2 convolutional layers have a kernel size of 1, used to compress z(c,1) to size (r,1) and restore it to size (c,1), respectively. The scaling factor r is a configurable parameter. The improved channel attention mechanism is denoted as A, and its weighted output... It can be calculated in the following ways:
[0083]
[0084] Step 10: Integrate the depth information and statistical indicators of each channel and scale in the time and frequency domains using the above method to map the signal into fault characteristics. Time domain characteristics y t Frequency domain characteristics y f The fault characteristic y can be calculated in the following ways:
[0085] y t =M2(M1(x) t ))
[0086] y f =M2(M1(x) f ))
[0087] y = A(conv1(A(f) t ,f f ))),conv1(x s )
[0088] Step 11: Map the fault features to the probabilities of different fault categories using a decoder. Preferably, in this embodiment, a ReLU activation function is used to connect two linear layers as a decoder, and finally a sigmoid function is used to output the probabilities of different faults.
[0089] Step 12: Determine if it is in the training phase. If it is not in the training phase, output the fault probability as the diagnostic result. If it is in the training phase, calculate the loss to optimize the model.
[0090] Step 13: Calculate the classification loss. Calculate the cross-entropy between the predicted fault category and the actual fault category to obtain the classification loss, denoted as .
[0091] Step 14: Calculate the intra-class distribution loss to make the distribution of each class of fault samples in the feature space as similar as possible. First, calculate the center coordinates of each class of samples in the feature space.
[0092]
[0093] Where, n i Let be the number of samples of the i-th type of fault, and j be the number of feature dimensions of y. Then, the intra-class loss term for the i-th type of sample... It can be represented as:
[0094]
[0095] Let m be the number of sample classes, then the within-class distribution loss is... It can be represented as:
[0096]
[0097] Step 15: Calculate the inter-class distribution loss to make the distribution of fault samples of different classes as discrete as possible in the feature space. First, calculate the center coordinate c in the feature space and the distance β from the center of the i-th class sample to the center of the sample space. i Where m is the number of sample categories:
[0098]
[0099] Then the inter-class distribution loss It can be represented as:
[0100]
[0101] Step 16: Calculate the loss due to imbalance in the distribution of samples between classes. To ensure that the distribution of different types of fault samples in the feature space is as balanced as possible, the specific calculation formula is as follows:
[0102]
[0103] Step 17: Optimize the model using backpropagation and the Adam optimization algorithm, even if the total loss function... Minimize. Let λ be the regularization strength, then the total loss... It can be represented as:
[0104]
[0105] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, extensions, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A fault diagnosis method for multi-sensor systems based on few-shot learning, characterized in that, Includes the following steps: 1) Parallel optimization of sampling frequency: The original signal is sampled using the optimized sampling frequency to obtain signal samples; 2) Construct a fault diagnosis model based on a lightweight cross-domain multi-scale attention network, and use the model to diagnose faults in signal samples to obtain fault categories; 3) Determine whether step 2) is the model training phase. If so, optimize the model by calculating the total loss function; otherwise, output the fault diagnosis result.
2. The fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 1, characterized in that, Step 1) Includes the following steps: 1.1) Multiple vibration acceleration signals from multiple channels are collected using multiple sensors installed on the equipment, which are used as the raw signal X(c,+∞), where c is the number of sensors or channels; 1.2) The original signal is sampled at multiple intervals to obtain signal samples x(n,c,l), where l is the sampling length and n is the number of samplings; 1.3) Process the signal samples in different dimensions to obtain an extended matrix E and a repeating matrix R with the same dimensions and size; 1.4) Calculate the similarity sim of samples at sampling interval v using the broadening matrix and the repetition matrix. v ; 1.5) Calculate the optimal sampling frequency using similarity. The original signal is sampled, and the resulting signal samples are used as input to the fault diagnosis model.
3. The fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 2, characterized in that, The processing of the signal samples in different dimensions specifically involves: copying the i-th signal sample n times in the first and second dimensions, respectively, where: The broadening matrix is obtained by extending the signal samples in the second dimension, that is: E(n,i,c,l)=x(i,c,l) The repetition matrix is obtained by repeatedly filling the first dimension with signal samples, i.e. R(i,n,c,l)=x(i,c,l).
4. The fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 2, characterized in that, Calculate sample similarity sim v Specifically: The broadening matrix E and the repetition matrix R are calculated in parallel by element-wise subtraction to obtain the pairwise dissimilarity between all samples. Then, the similarity of the sampling interval is calculated by the reciprocal of the dissimilarity, i.e.:
5. The fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 2, characterized in that, The optimal sampling frequency for:
6. The fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 1, characterized in that, Step 2) includes the following steps: 2.1) Preprocess the signal samples and calculate the mean value of each channel of the sample. The preprocessed sample is obtained by summing the standard deviation σ. 2.2) Calculate the time-domain sample, frequency-domain sample, and statistical features of the signal sample respectively, wherein the time-domain sample is the preprocessed sample, the frequency-domain sample is the time-domain sample processed by Fourier transform, and the statistical features are index data obtained by statistically analyzing the time-domain sample and frequency-domain sample using multiple statistical indicators. 2.3) Convolve time-domain and frequency-domain samples using kernels of different sizes to extract multi-scale features; 2.4) Update weights by combining information from different channels using an improved channel attention mechanism; 2.5) Integrate depth information and statistical indicators of each channel in the time domain, each channel in the frequency domain, and each scale to map the signal into fault features, and map the fault features to the probability of different fault categories through the decoder.
7. The fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 6, characterized in that, Step 2.4) specifically refers to: Let z be the average and maximum values of the input x. avg and z max Let σ be the ReLU activation function and δ be the Sigmoid activation function. Then the mean weight w of the input signal is... avg and maximum weight w max They are respectively: w avg =σ(Conv2(δ(Conv1(z avg )))) w max =σ(Conv2(δ(Conv1(z max )))) In this design, both convolutional layers Conv1 and Conv2 have a kernel size of 1, used to compress the attention exponent z(c,1) to size (r,1) and restore it to size (c,1), respectively. The scaling factor r is a configurable parameter. The improved channel attention mechanism is denoted as A, and its weighted output... for:
8. The fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 6, characterized in that, Step 2.5) specifically refers to: y t =M2(M1(x t )) y f =M2(M1(x f )) y=A(Conv1(A(f t ,f f ))),Conv1(x s ) Among them, y t For time-domain features, y f Let y represent the frequency domain features, y represent the fault features, M1 and M2 represent the first and subsequent convolutional layers, respectively, and x represent the frequency domain features. t x f and x s These are time-domain samples, frequency-domain samples, and statistical indicators, respectively.
9. The fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 1, characterized in that, In step 3), backpropagation and the Adam optimization algorithm are used to optimize the model, even if the total loss function... To minimize, the total loss function L is: in, For classifying losses, For intra-class distribution loss, For inter-class distribution loss, λ represents the loss due to uneven distribution among classes, and λ is the regularization strength.
10. A fault diagnosis method for a multi-sensor system based on few-shot learning according to claim 9, characterized in that, The intra-class distribution loss for: in, Let n be the center coordinates of the i-th sample in the feature space. i Let be the number of samples of the i-th type of fault, and j be the number of feature dimensions of y. Let m be the intra-class loss term for the i-th class of samples, and m be the number of sample classes; The inter-class distribution loss for: Where c is the center coordinate in the feature space, β i Let be the distance from the center of the i-th type of sample to the center of the sample space; The inter-class distribution imbalance loss for: