Disturbance-based interpretable waveform signal fault detection method
By using the disturbance method of intermediate region eliminating splicing and truncation compensation for both end regions in waveform signal fault detection, the problem of disturbance-based interpretability method destroying signal continuity is solved, and high-accurate interpretability analysis and accurate calculation of the impact weight of the fault signal are achieved.
Patent Information
- Application Number
- CN202510602917.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-05-12
AI Technical Summary
The perturbability-based interpretability method will destroy the integrity and continuity of the fault signal in the detection of waveform signal image in the object detection model, resulting in erroneous interpretation.
A perturbation-based interpretable waveform signal fault detection method is proposed. The disturbance method of eliminating splicing and truncation compensation of both end regions is ensured, and the influence weight of different regions on model prediction is calculated.
It effectively solves the problem of error interpretation caused by traditional methods due to destroying the continuity of waveform signals, significantly improves the accuracy of interpretability analysis, can accurately quantify the impact of different regions of the fault signal on model prediction, and visualize it through visual thermal maps.
Smart Images

Figure CN120124759A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision and signal processing, and particularly relates to a method for detecting faults in interpretable waveform signals based on perturbation. Background Art
[0002] Currently, in the fields of industrial equipment, communication, etc., it is very important to monitor and analyze relevant waveform signals, such as current, voltage, electromagnetic waveforms, etc., to timely detect equipment faults and anomalies. With the rapid development of deep learning, the use of deep learning methods for fault early warning and diagnosis has been gradually popularized. Although good results can be achieved by using deep learning methods, it also brings the problem of the deep learning black box, while the interpretable method based on perturbation can better explain the decision basis and behavior of the model. Fault signals in the signal field are different from general object detection tasks. Using traditional interpretable methods based on perturbation will damage the integrity and continuity of fault signals, that is, the perturbed signal is no longer complete and continuous, thus generating incorrect interpretations.
[0003] In summary, the present application proposes a method for detecting faults in interpretable waveform signals based on perturbation. Summary of the Invention
[0004] The purpose of the present invention is to address the problem that using traditional interpretable methods based on perturbation will damage the integrity and continuity of fault signals in the background art, and propose a method for detecting faults in interpretable waveform signals based on perturbation.
[0005] The technical solution of the present invention: A method for detecting faults in interpretable waveform signals based on perturbation, including the following steps: Convert the collected waveform signal data into image data, and label the fault signals in the image to construct a training set, a validation set, and a test set; Use the training set and the validation set to train the YOLOv8 object detection model so that it can identify the fault signals in the waveform signal images; Perform perturbation processing on the fault signal images in the test set; Input the perturbed images into the trained YOLOv8 model for prediction, and calculate the perturbation weights of the middle region and the two end regions respectively; Generate a visualization heat map according to the calculated weights and superimpose it on the original image, with the color depth representing the influence weights of different regions on the model prediction.
[0006] Optionally, performing perturbation processing on the fault signal images in the test set specifically includes: a. Middle region splicing perturbation removal: In the central region in the vertical direction of the fault signal detection frame, after dividing according to a preset ratio, successively remove multiple heights of Sub-regions, and splice the regions after rejection to maintain the continuity of the waveform signal; b. Truncation compensation perturbation at both ends: At both ends of the vertical direction of the fault signal detection frame, gradually truncate and expand the truncation height to the center boundary, and connect the compensation truncation points with a straight line to ensure the integrity of the signal.
[0007] Optionally, calculating the perturbation weights of the middle region and both ends respectively specifically includes: a. The weight calculation formula for the middle region is: Wherein, is the original confidence score, is the th confidence score after rejection and splicing, is the weight of the middle region corresponding to the th perturbation; b. The weight calculation formula for both ends is: Wherein, is the confidence score after the th truncation compensation.
[0008] Optionally, the specific implementation of the middle region rejection and splicing perturbation includes: The height of the center region of the detection frame is: Wherein, is the total height of the fault signal detection frame in the vertical direction, is the height of the center region, the height of the rejection block satisfies , and perform perturbations within the vertical movement range , wherein, is the segmentation times of the rejection block, is the height of the vertical sub-region removed each time, , is the original diagonal ordinate of the fault signal detection frame, is the vertical movement position of the rejection block, restricted within the center region.
[0009] Optionally, the specific implementation of the truncation compensation perturbation at both ends includes: The initial truncation height is , and the truncation height expands to after each perturbation until reaching the center region boundary and satisfying , wherein, is the initial segmentation times of the truncation block, is the height of the initial truncation block, is the height of the truncation block after the th perturbation.
[0010] Optionally, the generation of the visualized heat map includes: Weight normalization: The weights of different regions of each fault signal are independently normalized to map them to the interval of 0 and 1, where the maximum weight value corresponds to 1 and the minimum weight value corresponds to 0; Color mapping rules: The normalized weight values are converted to RGB color values through linear interpolation. A weight value of 1 corresponds to red (RGB: 255,0,0), and a weight value of 0 corresponds to blue (RGB: 0,0,255). The intermediate weight values are gradually transitioned in proportion. Transparency adjustment: adjust the transparency of the heat map and the original image to 50%, and then overlay the two; Dynamic range adaptation: For different fault signals, their normalized maximum and minimum weight values are calculated independently to ensure that the thermal color mapping of each fault signal is based only on its own weight distribution and is not interfered by other signals.
[0011] Optionally, when the waveform signal is converted into image data, wavelet transform or Fourier transform is used for noise reduction processing.
[0012] Optionally, the diagonal coordinates of the fault signal detection box output by the YOLOv8 model are and , whose confidence score is .
[0013] Compared with the prior art, the present invention has at least one of the following beneficial technical effects: The problem of perturbation-based interpretability methods providing incorrect explanations in target detection models for waveform signal image detection is solved.
[0014] This interpretability method can be used to calculate the influence weights of different areas in the fault signal on the target detection model.
[0015] The present invention effectively solves the problem of incorrect interpretation caused by the destruction of the continuity of waveform signals in traditional methods through the innovative disturbance methods of removing and splicing the middle area and truncating and compensating the two end areas, significantly improves the accuracy of interpretability analysis, and can accurately quantify the influence weights of different areas of fault signals on the prediction of the YOLOv8 model, and intuitively display them through visual heat maps to help users understand the basis of model decision-making. In addition, based on the results of weight analysis, the model training strategy can be optimized in a targeted manner to improve the accuracy and reliability of fault detection. This method is suitable for signal detection in various industrial and communication fields such as current, voltage, and electromagnetic waveforms, and has wide practicality and promotion value. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1Flowchart of an interpretability waveform signal fault detection method based on perturbation. Detailed implementation
[0017] The technical solution of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0018] Embodiment See Figure 1 , this method consists of three parts: making and annotating the waveform signal image dataset and training the YOLOv8 model, perturbing the test set using the proposed perturbation method, and visualizing the weights of the fault signals.
[0019] The first part is the production annotation of the waveform signal image and the training of the YOLOv8 model. After collecting the waveform signal data on the sensor, the data is processed, such as wavelet transform, Fourier transform, etc., to denoise the signal. Subsequently, the processed signal data is converted into an image, and the fault signals or signals of a specific type are annotated to form a dataset. Among them, the training set and the validation set are used for training the YOLOv8 model, and the test set is used for perturbation and prediction.
[0020] The second part is to perturb the test set using the proposed perturbation method, which is also the core part of the entire patent. For the fault signal, it is divided into two parts of perturbation. One is the perturbation of the central region of the fault signal, that is, splicing removal, and the other is the perturbation of the two end regions of the fault signal, that is, truncation compensation. The two are perturbed separately and will not be carried out simultaneously. The following will describe the two parts in detail.
[0021] First, the position information and confidence score of the detection box of the fault signal are obtained by predicting the image through the model. Let the diagonal coordinates of the detection box be and , and its corresponding confidence score is P. Let the ratio of the range of the central region of the detection box in the vertical direction to the two end regions be 6:4.
[0022] That is, the height of the fault signal is , the width is , and the height of the central region is: Among them, is the height of the central region, is the total height of the fault signal detection box in the vertical direction. For the perturbation method of splicing removal, it is set that the width of the removed block is the same as that of the detection box, and the height of the central region of the fault signal is an integer multiple of the height of the removed block. Since too large a height of the removed block will cause a fault phenomenon at the splicing, resulting in the inability to connect the signals at both ends of the splicing, it is necessary to limit the height of the removed block. The basic information of the removed block is as follows:
[0023] Among them, is the number of divisions of the elimination block, is the height of the vertical sub-region eliminated each time, and its moving range is: , assuming that the diagonal coordinates of the fault signal detection frame after splicing perturbation are eliminated each time are ([[]] , ), ([[]] , ), then there is:
[0024] Among them, , is the original diagonal coordinate of the fault signal detection frame, is the vertical movement position of the elimination block, restricted within the central region, and are the new diagonal coordinates of the detection frame after perturbation, and the horizontal coordinates remain unchanged.
[0025] Because the height of the central region of the original detection frame is times that of the elimination block , so this elimination and splicing perturbation method will be executed n times. Assuming that the confidence score predicted by the model after each elimination and splicing perturbation is , then the weight of this region after each elimination is: Among them, is the original confidence score, is the confidence score after the th elimination and splicing, is the weight of the intermediate region corresponding to the th perturbation. For the perturbation method of truncation compensation, the truncation block moves in the vertical direction, and the height of the truncation block doubles after each perturbation until the boundary of the central region. The role of compensation is to keep the truncated signal continuous. Specifically, find paired truncation points at the truncation, and then connect them with a straight line. Assume the initial information of the truncation block is as follows:
[0026]
[0027] After each truncation compensation perturbation, the height change of the truncation block is as follows. The variable is the number of perturbations: Among them, is the initial truncation height, is the initial number of divisions of the truncation block, is the height of the initial truncation block, is the truncated block height after the -th perturbation. After truncation compensation, the diagonal coordinate position of the fault signal is indicating after -th perturbation:
[0028] Let the confidence score predicted by the model after each truncation compensation perturbation be , is the total number of perturbations at both ends of the fault signal, then the corresponding weight after each perturbation is: where is the confidence score after the -th truncation compensation, and the perturbation weight composed of and is the weight of the influence of each different region of the fault signal in the final image on the model. Even if there are multiple fault signals in the image, the weights of different regions of all fault signals on the influence of the model can be calculated by this method.
[0029] The third part reflects the weights obtained in the second part in a visual way. Specifically, the weights of each region of the fault signal can be superimposed on the original image through a heat map. The greater the weight, the darker and redder the color of the region, and vice versa, it is represented by blue. In this way, the influence of different regions of the fault signal on the model can be intuitively reflected. The generation of the visual heat map specifically includes: Weight normalization processing: Independently normalize the weights of different regions of each fault signal so that they are mapped to the interval [0, 1], where the maximum weight value corresponds to 1 and the minimum weight value corresponds to 0; Color mapping rule: The normalized weight value is converted into an RGB color value through linear interpolation. When the weight value is 1, it corresponds to red (RGB: 255, 0, 0), and when the weight value is 0, it corresponds to blue (RGB: 0, 0, 255), and the intermediate weight values are gradually changed proportionally; Transparency adjustment: Adjust the transparency of the heat map and the original image to 50% respectively, and then superimpose the two; Dynamic range adaptation: For different fault signals, their normalized maximum weight values and minimum weight values are calculated independently to ensure that the heat color mapping of each fault signal is only based on its own weight distribution and is not interfered by other signals.
[0030] The present invention avoids disrupting the continuity of waveform signals by means of splicing elimination and truncation compensation in the middle region and both ends, ensuring that the perturbed signal can still maintain its original characteristics and reducing misinterpretation. Based on the difference in confidence scores before and after perturbation, the influence weights of different regions of the fault signal on the model prediction are accurately calculated to clarify the role of key regions. By superimposing the heat map on the original image, the importance of different regions is visually displayed in terms of color depth (from red to blue), helping users quickly understand the model decision-making logic.
[0031] It should be noted that, according to the results of weight analysis, the model training strategy or signal processing method can be adjusted accordingly to improve the accuracy of fault detection and the reliability of the model. It is applicable to signal detection scenarios of various industrial equipment and communication fields such as current, voltage, and electromagnetic waveforms, and can meet the fault diagnosis requirements of diverse waveform signals. The splicing elimination method does not introduce new features such as occlusion blocks, reduces the possibility of model misjudgment caused by perturbation, and enhances the objectivity of interpretability analysis.
[0032] The above specific embodiments are merely several alternative embodiments of the present invention. Based on the technical solution of the present invention and the relevant revelations of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.
Claims
1. A disturbance-based interpretable waveform signal fault detection method, characterized in that: The following steps are involved: Convert the collected waveform signal data into image data, annotate the fault signals in the image, and construct training sets, validation sets, and test sets; Use the training set and validation set to train the YOLOv8 target detection model so that it can identify fault signals in waveform signal images; Perform disturbance processing on the fault signal images in the test set; The perturbed image is input into the trained YOLOv8 model for prediction, and the perturbation weights of the middle area and the two end areas are calculated respectively; A visual heat map is generated based on the calculated weights and superimposed on the original image, with color depth indicating the influence weight of different regions on the model prediction.
2. The method for detecting faults in a disturbance-based interpretable waveform signal according to claim 1, characterized in that: The fault signal images in the test set are disturbed, including: Eliminate splicing disturbances in the middle area: In the vertical center area of the fault signal detection frame, divide it according to the preset ratio, and then remove multiple , and splice the removed areas to maintain the continuity of the waveform signal; Truncation compensation disturbance at both end areas: In the vertical direction of the fault signal detection frame, the two end areas are gradually truncated and the truncation height is extended to the center boundary. At the same time, the truncation points are compensated by connecting straight lines to ensure signal integrity.
3. The disturbance-based interpretable waveform signal fault detection method according to claim 1, characterized in that: The specific calculation of the disturbance weights of the middle area and the two end areas includes: The calculation formula of the middle area weight is: in, is the original confidence score, For the The confidence score after removing the splicing, For the The weight of the middle area corresponding to the secondary disturbance; The weight calculation formula of the two end areas is: in, For the Confidence score after truncation compensation.
4. The method for detecting faults in a disturbance-based interpretable waveform signal according to claim 2, characterized in that: The specific implementation of removing the splicing disturbance in the middle area includes: The height of the center area of the detection frame is: in, is the total vertical height of the fault signal detection frame, is the height of the center area, and the height of the culled block meets , and move the range vertically Internal execution perturbations, where is the number of splits to remove the block, is the height of the vertical sub-area to be removed each time, , is the original diagonal ordinate of the fault signal detection frame, The vertical movement position of the culling block is limited to the central area.
5. The disturbance-based interpretable waveform signal fault detection method according to claim 2, characterized in that: The specific implementation of the truncation compensation disturbance at both end regions includes: The initial cut-off height is , after each disturbance, the cutoff height is expanded to , until it reaches the boundary of the central area and satisfies ,in, is the initial split times of the truncation block, is the height of the initial cutoff block, For the The height of the truncated block after the perturbation.
6. The disturbance-based interpretable waveform signal fault detection method according to claim 1, characterized in that: The generation of the visualized heat map includes: Weight normalization: The weights of different regions of each fault signal are independently normalized to map them to the interval of 0 and 1, where the maximum weight value corresponds to 1 and the minimum weight value corresponds to 0; Color mapping rules: The normalized weight values are converted to RGB color values through linear interpolation. A weight value of 1 corresponds to red (RGB: 255,0,0), and a weight value of 0 corresponds to blue (RGB: 0,0,255). The intermediate weight values are gradually transitioned in proportion. Transparency adjustment: adjust the transparency of the heat map and the original image to 50%, and then overlay the two; Dynamic range adaptation: For different fault signals, their normalized maximum and minimum weight values are calculated independently to ensure that the thermal color mapping of each fault signal is based only on its own weight distribution and is not interfered by other signals.
7. The disturbance-based interpretable waveform signal fault detection method according to claim 1, characterized in that: When the waveform signal is converted into image data, wavelet transform or Fourier transform is used for noise reduction.
8. The disturbance-based interpretable waveform signal fault detection method according to claim 1, characterized in that: The diagonal coordinates of the fault signal detection box output by the YOLOv8 model are and , whose confidence score is .
Citation Information
Patent Citations
Image training set generation method and model training method based on image data enhancement
CN113361588A
Fault detection method and system for blade root bolt of wind power blade
CN119179967A
Rotating target detection method and system for chip internal component fault
CN119229089A
Culling data selection system and method
US7995056B1