Small sample domain generalization fault detection method and system based on wavelet scattering forest
The wavelet scattering forest method generates multi-scale sample sets and performs weighted fusion, which solves the problem of insufficient generalization ability in rotary machinery fault diagnosis, and achieves high accuracy and stability fault detection under small sample conditions.
Patent Information
- Application Number
- CN202510284648.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-03-11
AI Technical Summary
The prior art has insufficient generalization capabilities in rotary machinery fault diagnosis, especially in small sample conditions, which is difficult to adapt to complex working conditions and equipment diversity, resulting in unsatisfactory diagnostic results.
Using a wavelet scattering forest-based method, a multi-scale sample set is generated through the wavelet scattering transform data enhancement module, and a deep stacked forest classification module and a similarity metric weighting module are combined to perform fault detection.
In a small sample environment, it improves the accuracy and stability of fault diagnosis, can adapt to different working conditions and equipment diversification, and improves the accuracy and reliability of rotary machinery fault detection.
Smart Images

Figure CN120296591A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mechanical fault detection, and particularly relates to a small-sample domain generalization fault detection method and system based on wavelet scattering forest. Background Art
[0002] Rotating mechanical equipment plays a crucial role in key industries such as aerospace, robotics, and wind power. Rotating mechanical equipment often operates under extremely complex and variable working conditions. During long-term operation, due to the harsh working environment, the performance of the equipment is easily damaged, resulting in shortened service life and even safety accidents. Therefore, carrying out research on fault diagnosis and predictive maintenance of rotating machinery can not only effectively extend the service life of the equipment, improve the operation efficiency, but also reduce the maintenance cost, providing technical support for the sustainable development of related industries. As a data-based learning method, deep learning has been widely applied in the field of fault diagnosis. However, in many practical applications, it is difficult to obtain fault data, especially under small-sample conditions, and the effectiveness of deep learning is greatly limited. By adopting strategies such as transfer learning, meta-learning, and data augmentation, and through means such as transferring existing knowledge, expanding the training data set, and optimizing feature representation, the accuracy of fault diagnosis has been effectively improved, providing new ideas for solving the problem of data scarcity.
[0003] At present, although methods such as transfer learning and meta-learning have achieved certain results in the field of fault diagnosis, there are still deficiencies. First, in industrial fields, it is difficult to obtain source domain data that is highly similar to the target domain. Especially in real working conditions, there are significant differences between artificially simulated data and actual fault data, which limits the generalization ability of these methods. Second, existing small-sample learning methods mainly focus on improving the diagnostic accuracy and rarely consider the constraint conditions in practical applications, such as factors like equipment diversity and working condition changes in industrial environments. This makes the fault diagnosis effect of existing methods often unsatisfactory under complex working conditions, and there is still much room for improvement, unable to fully meet the needs of industrial production. Summary of the Invention
[0004] To overcome the above-mentioned defect of insufficient generalization ability in the prior art, the present invention proposes a small-sample domain generalization fault detection method and system based on wavelet scattering forest.
[0005] To achieve the above technical effects, the technical solution of the present invention is as follows:
[0006] A small-sample domain generalization fault detection method based on wavelet scattering forest, comprising the following steps:
[0007] Collect the operation data of mechanical equipment and perform preprocessing;
[0008] Construct a detection model based on a wavelet scattering forest; wherein, the detection model includes a wavelet scattering transform data augmentation module, a deep stacked forest classification module, and a similarity metric weighting module;
[0009] Input the mechanical equipment data into the detection model, and perform data augmentation on the mechanical equipment operation data through the wavelet scattering transform data augmentation module to obtain several sample sets of different scales;
[0010] Input the sample sets into the deep stacked forest classification module for prediction to obtain several prediction vectors;
[0011] Through the similarity metric weighting module, calculate the weight vectors at different scales based on the sample sets, and perform weighted summation on the prediction vectors based on the weight vectors to obtain the detection result.
[0012] The present invention also proposes a small-sample domain generalization fault detection system based on a wavelet scattering forest, and the system includes:
[0013] Data acquisition module: used to collect mechanical equipment operation data and perform preprocessing;
[0014] Wavelet scattering transform data augmentation module: used to input the mechanical equipment data into the detection model, and perform data augmentation on the mechanical equipment operation data through the wavelet scattering transform data augmentation module to obtain several sample sets of different scales;
[0015] Deep stacked forest classification module: used to input the sample sets into the deep stacked forest classification module for prediction to obtain several prediction vectors;
[0016] Similarity metric weighting module: used to calculate the weight vectors at different scales based on the sample sets through the similarity metric weighting module, and perform weighted summation on the prediction vectors based on the weight vectors to obtain the detection result.
[0017] The present invention also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements a small-sample domain generalization fault detection method based on a wavelet scattering forest as described in the present invention.
[0018] The present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a small-sample domain generalization fault detection method based on a wavelet scattering forest as described in the present invention.
[0019] Compared with the prior art, the beneficial effects of the present invention:
[0020] The data augmentation of the present invention is based on multi-scale wavelet scattering transform. The scattering coefficients extracted by wavelet scattering transform have the characteristics of translational invariance and deformation stability, effectively obtaining strong generalization features of samples. Secondly, the stability and generalization performance of the model are further enhanced through deep stacked forests, ensuring accurate classification and diagnosis of rotating machinery faults under different working conditions. By similarity measurement and quantification of the class centers of each original sample, weights are reasonably allocated to further optimize the diagnostic results. The present invention can be widely applied to the small-sample fault diagnosis scenarios of various rotating machinery, capable of learning diagnostic knowledge without relying on auxiliary data sets, diagnosing faults of different operating conditions and equipment with a small number of samples, and providing an efficient and practical solution for solving the actual equipment fault diagnosis problems in industrial production. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flowchart of a small-sample domain generalization fault detection method based on wavelet scattering forest for Embodiment 1.
[0022] Figure 2 It is an architecture diagram of a small-sample domain generalization fault detection system based on wavelet scattering forest for Embodiment 2.
[0023] Figure 3 It is a detection flowchart within the detection model based on wavelet scattering forest.
[0024] Figure 4 It is an architecture diagram of the detection model based on wavelet scattering forest.
[0025] Figure 5 It is an architecture diagram of the similarity measurement weighting module.
[0026] Figure 6 It is a comparison chart of the accuracy between the method of this application and other fault diagnosis methods.
[0027] Figure 7 It is a comparison chart of the accuracy of the ablation experiment of the method of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] The drawings are only for illustrative purposes and should not be construed as limitations on the present invention;
[0029] For those skilled in the art, it is understandable that some well-known descriptions in the drawings may be omitted.
[0030] The technical solutions of the present invention will be further described below with reference to the drawings and embodiments.
[0031] Embodiment 1
[0032] This embodiment proposes a small-sample domain generalization fault detection method based on wavelet scattering forest, as Figure 1As shown, it is a sub - flow chart of a small - sample domain generalization fault detection method based on wavelet scattering forest in this embodiment.
[0033] A small - sample domain generalization fault detection method based on wavelet scattering forest proposed in this embodiment includes the following steps:
[0034] Collect the operation data of mechanical equipment and pre - process it;
[0035] Construct a detection model based on wavelet scattering forest; wherein, the detection model includes a wavelet scattering transform data enhancement module, a deep stacked forest classification module, and a similarity metric weighting module;
[0036] Input the mechanical equipment data into the detection model, and perform data enhancement on the operation data of the mechanical equipment through the wavelet scattering transform data enhancement module to obtain several sample sets at different scales;
[0037] Input the sample sets into the deep stacked forest classification module for prediction to obtain several prediction vectors;
[0038] Calculate the weight vectors at different scales based on the sample sets through the similarity metric weighting module, and perform weighted summation on the prediction vectors based on the weight vectors to obtain the detection result.
[0039] As Figure 3 shown, it is a detection flow chart within the detection model based on wavelet scattering forest.
[0040] As Figure 4 shown, it is an architecture diagram of the detection model based on wavelet scattering forest.
[0041] In this embodiment, wavelet scattering transform is used to enhance the operation data of mechanical equipment, generating sample sets at multiple scales; subsequently, multiple deep stacked forest models are used to train each scale of sample sets, outputting multiple prediction vectors, and through a weighting mechanism for fusion, the final detection result is obtained. The weighting mechanism ensures that the sample similarity at different scales is fully reflected through cosine similarity, thereby optimizing the diagnostic effect. Wavelet scattering transform can extract the frequency characteristics of signals and retain the time - domain information, which makes this method have a high tolerance for noise and data loss. Through multi - scale data enhancement, the model can extract data features at different scales, thus better processing diverse input data and improving the accuracy and reliability of fault diagnosis. In a small - sample environment, traditional machine - learning algorithms are easily affected by the scarcity of samples, while in this embodiment, by constructing a multi - dimensional sample set, high detection accuracy can still be maintained in the case of insufficient data volume. In addition, in this embodiment, fine - grained features are extracted through sample sets at different scales, and through the integration of multi - level forest models, the fault diagnosis accuracy and cross - operating - condition adaptability in small - sample scenarios are significantly improved.
[0042] In an alternative embodiment, the preprocessing steps include: removing a preset abnormal signal from the operation data of the mechanical equipment; performing normalization processing on segmented operation data of the mechanical equipment.
[0043] Specifically, according to an actual mechanical equipment fault diagnosis task, diagnostic fault data of the corresponding mechanical equipment is obtained by using sensors, and then a fault data set {X s , Y s} is obtained through three processes of removing static signals, sample segmentation, and removing abnormal samples, where X S is a vibration signal, and Y s is composed of corresponding labels, and the label is the fault type corresponding to the sample. The data of this data set is divided into fault training samples for training and fault test data for testing, and then Z-Score normalization processing is performed on the training samples and test data.
[0044] In this embodiment, through abnormal signal elimination and segmented normalization processing, noise interference and data dimension differences are reduced, providing an input with a high signal-to-noise ratio for the subsequent model and improving the reliability of feature extraction.
[0045] In an alternative embodiment, the step of performing data augmentation on the operation data of the mechanical equipment by the wavelet scattering transform data augmentation module to obtain a plurality of sample sets of different scales includes:
[0046] Performing wavelet scattering transform on the operation data of the mechanical equipment through a plurality of wavelet functions in sequence, taking the result of each wavelet scattering transform as a single-layer sample set, and performing low-pass filtering on any sample set based on a scaling function to obtain sample sets of different scales.
[0047] Specifically, for the l-layer wavelet scattering transform, when performing the transform on the operation data of the mechanical equipment, a scaling function φ and multiple groups of wavelet functions are required where ψ λ represents a set of wavelet functions obtained by performing a series of stretching and shrinking transforms on the original mother wavelet, and the mother wavelet function ψ(t) in the wavelet scattering transform is:
[0048]
[0049] When performing wavelet scattering transform, the wavelet function is first used in the zero layer (it is stipulated that the input layer is the zero layer) to perform wavelet transform on the sample x, and then, the obtained wavelet coefficients are taken modulo to obtain the first layer L1 of the wavelet scattering transform, and its expression is:
[0050]
[0051] Among them, x is the input data.
[0052] Next, continue to use the wavelet function on the first-layer wavelet coefficients Perform a convolution operation and take the modulus of the newly obtained wavelet coefficients to obtain the second layer L2 of the wavelet scattering transform, which is expressed as:
[0053]
[0054] And so on, perform low-pass filtering on each layer including the zero-th layer using the scaling function φ, and the final output of the wavelet scattering transform can be obtained. This output is called the scattering coefficient, and its expression is as follows:
[0055]
[0056] Among them, the zero-th layer L0 represents the original sample, and the scattering coefficient S is the deep feature extracted after performing the wavelet scattering transform on the input data x. The scale used is an adjustable scale parameter. By setting multiple scale parameters to perform the wavelet scattering transform on the input samples respectively, multi-scale data augmentation can be achieved.
[0057] In this embodiment, by using different wavelet functions for scattering transform, data features can be extracted in different frequency ranges, thereby increasing the adaptability of the model to complex data patterns. The feature extraction at each scale helps to capture the operating rules of the device under different working conditions, enabling the model to diagnose mechanical faults more comprehensively and accurately. Secondly, through low-pass filtering, high-frequency noise can be effectively removed and important low-frequency features can be retained.
[0058] As an exemplary illustration, perform three transformations on the operation data of the mechanical equipment, and only retain the second-layer scattering coefficient as the result after data augmentation of the sample. Concatenate the scattering coefficients to obtain the scattered sample after data augmentation.
[0059] In an optional embodiment, the deep stacked forest classification module includes a number of deep stacked forest models; the step of inputting the sample set into the deep stacked forest classification module for prediction to obtain a number of prediction vectors includes:
[0060] Train the sample sets of different scales through a number of deep stacked forest models respectively, and each deep stacked forest model outputs a prediction vector, and its expression is as follows:
[0061]
[0062] Among them, represents the scattered sample with the J-th scale information, represents the T-th layer random forest model inside the J-th deep stacked forest, p (1)(X) to p (J) (X) is used to represent J prediction vectors.
[0063] More specifically, first train the first-layer random forest in the deep stacked forest through the sample set, and use the out-of-bag data for evaluation. The random forest will output a prediction vector for each scattering sample, indicating the probability that the sample belongs to each category. When constructing a deep stacked forest for a scattering sample set D of a certain scale information, it can be expressed as:
[0064] D t = f t (D, D1, D2L, D t-1 )
[0065] where f t is the t-th layer random forest; D1 represents the set of prediction vectors output by the first-layer random forest for the scattering sample set D through the out-of-bag data evaluation method; D2 represents the set of prediction vectors output by the second layer for the scattering sample sets D and D1, and is the set of prediction vectors output by the t-th layer random forest. For the scattering sample X S , there are a total of N categories in the target task. The prediction result F(X) of the deep stacked forest composed of T layers of random forests for the scattering sample X S is:
[0066] F(X) = f T (X S , f1(X S ), f2(X S , f1(X S )), L, f T-1 (X S , L))
[0067] In this embodiment, each deep stacked forest model independently processes data of different scales. Through the method of ensemble learning, it can effectively improve the stability of classification and effectively capture complex high-order features in the data. Even when facing noisy and complex input data, it can effectively discriminate by integrating multiple decision trees, reducing the impact of noise on the final result.
[0068] Further optionally, the step of the deep stacked forest model outputting a prediction vector includes: within the deep stacked forest model, using the decision tree of the random forest, evaluating the performance of each tree through out-of-bag data, and generating a prediction vector based on the evaluation result.
[0069] In this embodiment, the method of evaluating through out-of-bag data can effectively detect the performance of each tree on unseen data and avoid overfitting of a single tree on the training set. By comprehensively evaluating the performance of different trees, the generalization ability of the final classifier can be improved, making it more stable and accurate in practical applications.
[0070] In an optional embodiment, the step of calculating the weight vectors at different scales based on the sample set by the similarity metric weighting module includes:
[0071] Calculating the sample set average at different scales for the sample set to obtain the class center of each class at different scales;
[0072] Using the cosine similarity as the metric function, calculating the similarity values between the sample set and each class center at different scales respectively, and splicing the similarity values of the same scale to obtain a metric vector;
[0073] Normalizing the metric vector to obtain multi-scale weight vectors, and its expression is as follows:
[0074]
[0075] where S represents the cosine similarity function, X S (J) represents the scattering sample with the J-th scale information. At the same time, Y i (J) represents the class center of the i-th class at the J-th scale, and w (1) (X) to w (J) (X) represents J weight vectors.
[0076] As Figure 5 shown, it is the architecture diagram of the similarity metric weighting module.
[0077] In this embodiment, the reasonable allocation of weights helps the model to pay more attention to the samples closer to the classification boundary, thereby improving the accuracy of fault detection. By splicing and normalizing the similarity values at different scales, the multi-scale information can be effectively fused, further enhancing the model's comprehensive judgment ability for various features, making the final prediction result more accurate and robust.
[0078] Further optionally, the step of weighted summing the prediction vectors based on the weight vectors to obtain the detection result includes:
[0079] Using the multi-scale weight vectors to weight the corresponding prediction vectors, and taking the average of the weighted prediction vectors for integration to obtain the prediction result.
[0080] Specifically, using multiple weight vectors to weight multiple prediction vectors, and its expression is:
[0081]
[0082] where P W(X) is the multiple predicted vectors after weighting. Further, since the proposed method adopts the strategies of multi-scale data augmentation and ensemble learning, it is necessary to integrate the multiple predicted vectors after weighting. The integration process is achieved by calculating the average value of the multiple predicted vectors, which is expressed as:
[0083]
[0084] where is the output predicted vector.
[0085] In this embodiment, by performing weighted summation on the prediction results of each scale, the weight of the final result can be adjusted according to the prediction information of different scales, integrating the advantages of each scale, further improving the accuracy and stability of fault detection, and balancing the prediction deviation at different scales, reducing the over-influence of a single scale, so that the final detection result is more stable and reliable, and can adapt to more complex and variable actual application scenarios.
[0086] Embodiment 2
[0087] This embodiment proposes a small-sample domain generalization fault detection system based on wavelet scattering forest, applying a small-sample domain generalization fault detection method proposed in Embodiment 1. As Figure 2 shown, it is the architecture diagram of a small-sample domain generalization fault detection system based on wavelet scattering forest in this embodiment.
[0088] This embodiment proposes a small-sample domain generalization fault detection system based on wavelet scattering forest, including:
[0089] Data acquisition module: used to acquire mechanical equipment operation data and perform preprocessing;
[0090] Wavelet scattering transform data augmentation module: used to input the mechanical equipment data into the detection model, and perform data augmentation on the mechanical equipment operation data through the wavelet scattering transform data augmentation module to obtain several sample sets of different scales;
[0091] Deep stacked forest classification module: used to input the sample sets into the deep stacked forest classification module for prediction to obtain several predicted vectors;
[0092] Similarity metric weighting module: used to calculate the weight vectors at different scales based on the sample sets through the similarity metric weighting module, and perform weighted summation on the predicted vectors based on the weight vectors to obtain the detection result.
[0093] It can be understood that the system in this embodiment corresponds to the method in Embodiment 1 above, and the optional items in Embodiment 1 above also apply to this embodiment, so they will not be repeated here.
[0094] Example 3
[0095] In this example, a small-sample domain generalization fault detection method based on wavelet scattering forest proposed in Example 1 is applied to train and predict on a public dataset and a small dataset.
[0096] In this example, the CNC machine tool spindle bearing dataset is used to design relevant experiments. In this test platform, the faulty bearing is installed on the spindle. Secondly, in order to collect data, an accelerometer is installed on the machine tool spindle, and vibration signal data of the spindle bearing is collected at a sampling frequency of 25 kHz under the normal service state of the machine tool. These data cover three working conditions in which the machine tool cuts aluminum at working speeds of 6000, 7000, and 8000 rpm respectively. The spindle bearings used in the CNC dataset are all angular contact ball bearings, and their model is NSK 40BNR10. Bearing faults are artificially implanted by electrical discharge machining and laser marking, and there are differences in position between the faults, including inner ring faults, outer ring faults, and cage faults of the bearing.
[0097] To construct tasks in the working condition generalization scenario, four types of bearing data in the CNC dataset are selected to construct a small-sample fault diagnosis task. The bearing states covered include four types: healthy, inner ring (IR) fault, outer ring (OR) fault, and cage ring (CR) fault, which are represented by category 1 to category 4 respectively. In the experiment, non-overlapping sliding windows are used to collect samples on the bearing time-domain vibration signals provided by the dataset. For each bearing, 450 samples (150 for each working condition) with a data point length of 2048 are collected. Then, small-sample fault diagnosis tasks are constructed under two working condition generalization scenarios, simulating the working condition changes of the machine tool spindle speed from 7000 rpm to 8000 rpm (scenario 1) and from 8000 rpm to 7000 rpm (scenario 2) respectively. Among them, scenario 1 means that each method needs to use a small number of labeled samples under the 7000 rpm working condition in the dataset to train the model, and expand the diagnostic ability of the model to the target working condition of 8000 rpm to achieve effective fault diagnosis for the samples under this working condition. The parameters of the constructed wavelet scattering forest network are shown in Table 1:
[0098] Table 1 Hyperparameter settings of the detection model based on wavelet scattering forest
[0099]
[0100]
[0101] The hyperparameters of the random forest include 500 decision trees, the maximum number of features to be selected is set to sqrt, the minimum number of samples in a leaf node is 2, and the node splitting criterion uses the Gini coefficient (gini). In the ensemble model part, the number of scales is set to 5, the scale parameters are 3, 4, 5, 6, 7, the number of wavelets per octave is 12, and the stacking layer number of the random forest is 4. In addition, during the training phase, the model uses the cross-entropy loss function and is optimized using the Adam optimizer. The initial learning rate is set to 0.001, the batch size is 50, and a total of 300 iterations are performed. To improve convergence and prevent overfitting, a learning rate decay strategy is introduced, and the decay factor is set to 0.8.
[0102] The method of the present invention is compared with other fault diagnosis methods:
[0103] To verify the superiority of the proposed method, the following 5 fault diagnosis methods are used for comparison, including: Random Forest (RF), Deep Forest (DF), Wide Kernel Deep Convolutional Neural Network (WDCNN), Wide Kernel Deep Convolutional Neural Network + Fine Tuning (WDCNN-FT), and Prototype Network (PN). For the methods based on transfer learning and meta-learning, data under the working condition of 6000 rpm will be additionally provided as the source domain to assist model training. According to the above settings, the data used by each method can be divided into three domains: the source domain, the intermediate domain, and the target domain. Among them, the source domain has rich labeled samples, the intermediate domain has only a small number of labeled samples, and the target domain has no labeled samples, and accurate fault diagnosis of the target domain needs to be finally achieved. Finally, the number of samples used by each method in the 1-shot, 2-shot, and 5-shot tasks is shown in Table 2. As Figure 6 shown, it is the accuracy comparison chart of the method of this application and other fault diagnosis methods.
[0104] To reduce the contingency of the experiment, each task is repeated 10 times, and the average value is taken as the final experimental result. According to the above settings, a few-shot fault diagnosis experiment of 4-way K-shot is carried out using the CNC dataset under the scenario of generalization in two working conditions. The test accuracies obtained by each method are shown in Table 3 and Figure 6. The experimental results show that in the small sample fault diagnosis task of generalized working conditions, the method of this application has achieved a maximum test accuracy of more than 98%, which is much better than other comparative methods, showing that it can not only guarantee high diagnostic accuracy but also have excellent generalization ability with very little training data. Although WDCNN-FT based on transfer learning and PN based on meta-learning also achieved high accuracy in some tasks (97.10% and 94.23% respectively for the 1-shot task of scenario 2), they rely on additional source domain data and are less convenient for practical application than the method of this application. On the contrary, traditional methods such as RF and WDCNN have low test accuracy due to the lack of source domain data and data enhancement strategies. In the 1-shot tasks of scenarios 1 and 2, the accuracy of RF is only 26.32% and 27.03%; WDCNN only achieved an accuracy of 41.02% in the 1-shot task of scenario 1, which is significantly lower than the WDCNN-FT improved by transfer learning. In addition, although the DF method also uses multi-scale data enhancement and random forest deep stacking model, its test accuracy has never exceeded 70%. This is mainly because as the number of layers increases, the shallow information is gradually "diluted", making it difficult for the deep model to obtain sufficient data information. However, the method in this application integrates the output of all previous layers in the deep random forest, realizes the comprehensive transmission of information, and thus better utilizes the advantages of the deep model, showing excellent diagnosis and generalization performance under small sample conditions.
[0105] Table 2 Number of samples used by each method
[0106]
[0107] Table 3 Quantitative comparison of average diagnostic accuracy (%) of different models
[0108]
[0109]
[0110] In the above experiments, the effectiveness and advancement of the proposed model have been preliminarily verified. Furthermore, considering the fact that rotating machinery in real industrial environments is also affected by different degrees of environmental noise during operation, a small sample fault diagnosis experiment under generalized working conditions and strong noise scenarios was designed to explore whether the proposed model has sufficiently superior generalization performance. This experiment is based on a 5-shot diagnosis task under two generalized working condition scenarios. Gaussian white noise is added to the training and test samples used by each method in this task, so that the signal-to-noise ratio is 0dB, 2dB and 4dB respectively. In addition, the other settings in this experiment are consistent with the above experimental settings. In the scenarios of generalized working conditions and strong noise, the test accuracy achieved by each method is shown in Table 4.
[0111] As can be seen from the experimental results in Table 4 and Figure 6 under noise interference, the accuracies of RF and WDCNN are both at the lowest level, making it difficult to meet the requirements of small-sample variable working condition fault diagnosis; while the decrease of PN is the most significant. For example, in Scenario 1, the accuracy at 0 dB is 33.74% lower than that without noise, probably because the noise changes the sample feature distribution, resulting in deviation of the measurement results. In contrast, WDCNN-FT with pre-training fine-tuning and DF with multi-scale integrated learning both show strong anti-noise capabilities. The method of the present application proposed still maintains the highest accuracy in most tasks, only slightly inferior to WDCNN-FT at 4 dB in Scenario 2, and does not rely on source domain data, making it more convenient to use, and has obvious advantages and competitiveness.
[0112] Quantitative comparison of the average diagnostic accuracies (%) of different models after adding noise in Table 4
[0113]
[0114]
[0115] Example 4
[0116] In this example, a small-sample domain generalization fault detection method based on wavelet scattering forest proposed in Example 1 is applied to an open dataset and a small dataset for ablation experiments.
[0117] In this example, ablation experiments are designed using the CNC dataset. A total of 5 ablation models are designed based on the detection model of wavelet scattering forest, which are represented by AM1 to AM5 respectively. Among them, AM1 only contains the classification module of the detection model based on wavelet scattering forest, while AM2 contains both the classification module and the weighting module. AM3 consists of a single-scale data augmentation module and a classification module, and AM4 further combines the weighting module on the basis of AM3. AM5 consists of a multi-scale data augmentation module (5 scales are set in the experiment) and a classification module, but does not contain the weighting module.
[0118] As Figure 7 shown, it is the ablation experiment accuracy comparison diagram of the method of the present application.
[0119] Figure 7Shows the test accuracy achieved by each ablation model and the complete wavelet scattering forest-based detection model in the 1-shot task under scenario 1. The experimental results show that the accuracy rate is only 27.69% at AM1, indicating that the single classification ability is difficult to meet the needs of small-sample fault diagnosis. After introducing the weighted module (AM2) and the data augmentation module (AM3), the accuracy rates are increased by 42.16% and 67.44% respectively compared with AM1, verifying the significant effect of the two modules in improving the diagnostic accuracy. Further, using multi-scale data augmentation (AM5) improves the accuracy rate by 3.18% compared with single-scale (AM3), which benefits from the wavelet scattering transform's ability to extract more multi-scale features, thus training multiple diverse deep stacked random forests. In addition, AM4 and the final wavelet scattering forest-based detection model improve by 2.82% and 0.65% respectively compared with AM3 and AM5, proving that the synergistic effect of the data augmentation and weighted modules is more effective. In summary, the integration of the classification, weighted, and multi-scale data augmentation modules significantly improves the performance and accuracy rate of the model in this application for small-sample variable working condition fault diagnosis.
[0120] Example 5
[0121] This example proposes a computer device, including a memory and a processor, where computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor executes the steps of a small-sample domain generalization fault detection method based on wavelet scattering forest proposed in Example 1.
[0122] Example 6
[0123] This example proposes a storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps of a small-sample domain generalization fault detection method based on wavelet scattering forest proposed in Example 1 are implemented.
[0124] Exemplarily, the storage medium includes but is not limited to various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0125] Exemplarily, the instructions, programs, code sets, or instruction sets can be implemented using conventional programming languages.
[0126] Exemplarily, the processor includes but is not limited to smartphones, personal computers, servers, network devices, etc., and is used to execute all or part of the steps of a small-sample domain generalization fault detection method based on wavelet scattering forest described in Example 1.
Claims
1. A small-sample domain generalization fault detection method based on wavelet scattering forest, characterized in that, Including the following steps: Collect the operation data of mechanical equipment and perform preprocessing; Construct a detection model based on wavelet scattering forest; wherein, the detection model includes a wavelet scattering transform data enhancement module, a deep stacked forest classification module, and a similarity metric weighting module; Input the mechanical equipment data into the detection model, and perform data enhancement on the operation data of the mechanical equipment through the wavelet scattering transform data enhancement module to obtain several sample sets of different scales; Input the sample sets into the deep stacked forest classification module for prediction to obtain several prediction vectors; Calculate the weight vectors at different scales based on the sample sets through the similarity metric weighting module, and perform weighted summation on the prediction vectors based on the weight vectors to obtain the detection result.
2. The small-sample domain generalization fault detection method based on a wavelet scattering forest according to claim 1, wherein The steps of the preprocessing include: removing the preset abnormal signals in the operation data of the mechanical equipment; segmenting the operation data of the mechanical equipment and then performing normalization processing.
3. A small-sample domain generalization fault detection method based on wavelet scattering forest according to claim 1, characterized in that, The step of performing data enhancement on the operation data of the mechanical equipment through the wavelet scattering transform data enhancement module to obtain several sample sets of different scales includes: Perform wavelet scattering transform on the operation data of the mechanical equipment successively through several wavelet functions, take the result of each wavelet scattering transform as a single-layer sample set, and perform low-pass filtering on any sample set based on the scale function to obtain sample sets of different scales.
4. A small-sample domain generalization fault detection method based on wavelet scattering forest according to claim 1, characterized in that, The deep stacked forest classification module includes several deep stacked forest models; the step of inputting the sample sets into the deep stacked forest classification module for prediction to obtain several prediction vectors includes: Perform prediction on the sample sets of different scales respectively through several deep stacked forest models, and each deep stacked forest model outputs a prediction vector, and its expression is as follows: Among them, represents a scattering sample with the Jth scale information, represents the Tth random forest model inside the Jth deep stacked forest, p (1) (X) to p (J) (X) are used to represent J prediction vectors.
5. A small-sample domain generalization fault detection method based on wavelet scattering forest according to claim 4, characterized in that The step of the deep stacked forest model outputting a prediction vector includes: within the deep stacked forest model, use the decision tree of the random forest, evaluate the performance of each tree through the out-of-bag data, and generate a prediction vector based on the evaluation result.
6. A small-sample domain generalization fault detection method based on wavelet scattering forest according to any one of claims 1 to 5, characterized in that, The step of calculating the weight vectors at different scales based on the sample sets through the similarity metric weighting module includes: Calculate the sample set average values at different scales for the sample sets to obtain the class centers of each class at different scales; Use the cosine similarity as the metric function, calculate the similarity values between the sample sets and each class center at different scales respectively, and splice the similarity values of the same scale to obtain a metric vector; Normalize the metric vector to obtain the weight vector of multiple scales, and its expression is as follows: Among them, S represents the cosine similarity function, represents the scattering sample with the J-th scale information. At the same time, Y i (J) represents the class center of the i-th category at the J-th scale, and w (1) (X) to w (J) (X) represents J weight vectors.
7. A small-sample domain generalization fault detection method based on a wavelet scattering forest according to claim 6, characterized in that, The step of performing weighted summation on the prediction vectors based on the weight vectors to obtain the detection result includes: Use the weight vector of multiple scales to perform weighting on the corresponding prediction vectors, take the average value of the weighted prediction vectors for integration to obtain the prediction result.
8. A small-sample domain generalization fault detection system based on a wavelet scattering forest, which applies the method described in any one of claims 1 to 7, characterized in that, Including: Data acquisition module: used to collect the operation data of mechanical equipment and perform preprocessing; Wavelet scattering transform data enhancement module: used to input the mechanical equipment data into the detection model, and perform data enhancement on the operation data of the mechanical equipment through the wavelet scattering transform data enhancement module to obtain several sample sets of different scales; Deep stacked forest classification module: used to input the sample set into the deep stacked forest classification module for prediction to obtain a number of prediction vectors; Similarity metric weighting module: used to calculate weight vectors at different scales based on the sample set through the similarity metric weighting module, and perform weighted summation on the prediction vectors based on the weight vectors to obtain the detection result.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a small sample domain generalization fault detection method based on wavelet scattering forest as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a small sample domain generalization fault detection method based on wavelet scattering forest as described in any one of claims 1-7.
Citation Information
Patent Citations
Random forest intrusion detection method based on multilayer classification strategy
CN114547601A
Brain wave feature recognition method based on multi-channel electroencephalogram and wavelet scattering network
CN118452946A
Remote conveyor belt bearing fault diagnosis method and system based on improved random forest
WO2024183424A1