An intelligent detection method for device anomalies based on periodic data

Through the combination of state machine and sliding window technology, the unsupervised TadGAN model is solved, and the problem of insufficient accuracy of existing equipment abnormality detection methods when processing periodic data is achieved, and efficient and reliable detection of equipment abnormalities is achieved.

CN120045942BActive Publication Date: 2025-08-01ZHEJIANG WINGO SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510511440.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-01
Estimated Expiration
2045-04-23

AI Technical Summary

Technical Problem

The existing equipment abnormality detection methods have insufficient accuracy when processing periodic data, which is difficult to adapt to different equipment and process conditions, and are easily affected by noise and load fluctuations.

Method used

The state machine and sliding window technology are used to accurately extract periodic data, combined with the unsupervised TadGAN model for training and detection, and noise is filtered through phase correction and Butterworth low-pass filter, and abnormal judgment is made using the generator and discriminator of the unsupervised TadGAN model.

Benefits of technology

It improves the accuracy and reliability of equipment abnormality detection, can effectively distinguish complex noise from real abnormalities, adapt to different equipment and process conditions, and reduces misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045942B_ABST
    Figure CN120045942B_ABST
Patent Text Reader

Abstract

The present invention relates to an intelligent detection method for device anomalies based on periodic data, comprising: obtaining three-phase power signals during the operation of a device; processing the three-phase power signals to obtain a single comprehensive time series signal; constructing a state machine and obtaining a periodic data set in combination with a sliding window technique; performing time alignment on the time axis of each periodic data and obtaining its corresponding discretized time series; inputting the discretized time series of each periodic data into a statistical model for preliminary screening to determine whether the periodic data is a normal period or an abnormal period, and inputting the obtained normal periods into an unsupervised TadGAN model for training; collecting in real time the three-phase power signals to be detected and inputting them into the trained unsupervised TadGAN model for anomaly detection; this method can accurately extract periodic data, avoid misjudgment caused by instantaneous noise or load fluctuations, and improve the accuracy rate of the unsupervised TadGAN model for anomaly judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent manufacturing, and particularly to an intelligent detection method for equipment anomalies based on periodic data. Background Art

[0002] In modern industrial production, the stable operation of equipment is crucial for ensuring production efficiency and product quality. During the operation of equipment, various anomalies may occur, such as mechanical failures, electrical failures, operation errors, etc. If these anomalies are not discovered and handled in a timely manner, they may lead to equipment damage, production interruption, and even safety accidents. Traditional methods for detecting equipment anomalies mainly rely on manual experience and regular inspections. This method is not only inefficient but also difficult to detect sudden anomalies in a timely manner. With the development of industrial automation and informatization, data-driven methods for detecting equipment anomalies have gradually received attention. However, existing data-driven detection methods have some deficiencies in dealing with periodic data.

[0003] Currently, methods for detecting equipment anomalies can be mainly divided into three categories: rule-based, statistic-based, and machine learning-based. Rule-based methods rely on the experience and knowledge of domain experts to formulate a series of rules to determine whether the equipment is abnormal. However, when faced with a complex equipment operation environment and diverse fault modes, this method often seems inadequate, and the cost of maintaining and updating the rules is relatively high.

[0004] Statistic-based methods detect anomalies by analyzing the statistical characteristics of equipment operation data, such as mean, standard deviation, etc. For example, traditional methods use statistical characteristics such as the mean, standard deviation, and maximum value of sensor data such as current and voltage, combined with set thresholds for anomaly judgment. Such methods can, to a certain extent, adapt to changes in the equipment operation state, but there are still limitations in dealing with periodic data. When the equipment operation has obvious periodic characteristics, such as the periodic operation of a numerically controlled machine tool when machining different parts, traditional statistical methods are difficult to accurately identify the periodic characteristics and are easily affected by normal fluctuations within the period, resulting in misjudgments.

[0005] Machine learning-based methods learn the normal operation mode of the equipment by training models and then detect anomalies. For example, some studies have proposed using a machine learning model that combines a convolutional neural network (CNN) and a support vector machine (SVM) to extract features and classify sensor data for anomaly detection. However, such methods usually require a large amount of labeled data for training, and the generalization ability of the model is limited by the diversity and representativeness of the training data. In practical applications, equipment operation data often has a high degree of complexity and variability. A single machine learning model is difficult to comprehensively capture the operation characteristics of the equipment, especially when dealing with periodic data, the performance of the model may be affected.

[0006] In summary, there are many deficiencies in the existing device anomaly detection methods when performing anomaly detection. Therefore, it is crucial to propose a device anomaly detection method that can effectively process periodic data, adapt to different device and process conditions, and has high accuracy and strong reliability. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to provide an intelligent device anomaly detection method based on periodic data that can effectively process periodic data, adapt to different device and process conditions, and has high accuracy and strong reliability.

[0008] The technical solution adopted by the present invention is an intelligent device anomaly detection method based on periodic data, and this method includes the following steps:

[0009] S1. Obtain three-phase power signals during the operation of the device, and its data format includes timestamps;

[0010] S2. Preprocess the three-phase power signals, and then weighted fusion them according to timestamps into a single comprehensive time series signal;

[0011] S3. Construct a state machine, and combine the sliding window technology to determine the processing start point and processing end point in the single comprehensive time series signal; wherein, the time interval formed by a processing start point and the corresponding processing end point is a working interval of the device; intercept the data segment corresponding to each working interval from the single comprehensive time series signal to obtain a periodic data set;

[0012] S4. Align the time axes of each periodic data, discretize the aligned time axes of each periodic data into N equally spaced intervals, and resample the signal values within each equally spaced interval by taking the mean to obtain the discretized time series corresponding to each periodic data;

[0013] S5. Input each discretized time series into a statistical model for preliminary screening to determine whether the periodic data is a normal period or an abnormal period;

[0014] S6. Input the normal periods obtained in step S5 into an unsupervised TadGAN model for training to obtain a trained unsupervised TadGAN model;

[0015] S7. Real-time collect the three-phase power signals to be detected, obtain the periodic data set to be detected in the manner of steps S2~S3, and input it into the trained unsupervised TadGAN model for calculation and then output a normal label or an abnormal label; according to the label, adopt an abnormal state judgment strategy to judge the processing state of the device.

[0016] The beneficial effects of the present invention are as follows: By adopting the above-mentioned intelligent detection method for equipment anomalies based on periodic data, periodic data is accurately extracted through the state machine and sliding window technology, avoiding misjudgment caused by instantaneous noise or load fluctuations; before training the unsupervised TadGAN model, local anomaly points are marked through statistical model pre-screening, and then the unsupervised TadGAN model is trained, greatly improving the inference speed of the unsupervised TadGAN model and the accuracy rate of anomaly judgment by the unsupervised TadGAN model, and effectively distinguishing complex noise from real anomalies; this method adapts to different equipment and process conditions, has high accuracy and strong reliability.

[0017] Preferably, the specific process of step S2 includes the following steps:

[0018] S2.1. Preprocess the three-phase power signal: S2.11. Use the phase correction algorithm to correct the phase of the three-phase power signal to obtain the corrected three-phase power signal; S2.12. Use the Butterworth low-pass filter to filter the corrected three-phase power signal to obtain the low-frequency three-phase power signal;

[0019] S2.2. Weight and fuse the low-frequency three-phase power signals according to the time stamp into a single comprehensive time series signal , which is specifically expressed as: ; where , and represent the weight coefficients; represents the power signal of phase A, represents the power signal of phase B, represents the power signal of phase C.

[0020] In the above steps, the sensor deviation is eliminated through phase correction to improve signal synchronization; noise interference is suppressed by filtering with the Butterworth low-pass filter to retain the effective signal; the obtained low-frequency three-phase power signals are weighted and fused according to the time stamp to synthesize multi-phase features and enhance the characterization ability.

[0021] Preferably, the specific process of step S3 includes the following steps:

[0022] S3.1. Construct a state machine, which includes two states: "idle" and "working". The state "idle" specifically refers to the state where the equipment is not running or in a low-load processing state; the state "working" specifically refers to the state where the equipment is in a high-load processing state;

[0023] S3.2. Use the sliding window technology to divide the single comprehensive time series signal into windows to generate L window sequences ;

[0024] S3.3. Calculate the root mean square value of each of the said window sequences, specifically expressed as: ; where, ; ; represents the number of sampling points within the window sequence ;

[0025] S3.4. Set a first threshold, which is specifically expressed as: ; where, represents the mean value of the three-phase power signals collected when the device is in normal operation,<> represents the standard deviation of the three-phase power signals collected when the device is in normal operation;

[0026] S3.5. If the root mean square values of M consecutive window sequences are all greater than or equal to the first threshold, and the current state of the state machine is "idle", switch the state machine to the "working" state and mark it as the processing start point ; if the root mean square values of K consecutive window sequences are all less than the first threshold, and the current state of the state machine is "working", switch the state machine to the "idle" state and mark it as the processing end point ; where, , ;

[0027] S3.6. Define the time interval formed by the processing start point and the corresponding processing end point as the working interval of the device. According to each of the said working intervals, intercept the data segment corresponding to each working interval from the said single comprehensive timing signal. The data segment corresponding to each working interval is a periodic data, and a periodic data set is obtained , where, represents the nth periodic data.

[0028] In the above steps, by the collaborative work of the state machine and the sliding window technology, the processing cycle is accurately identified from the real-time signal, providing high-quality input for subsequent anomaly detection, which is the core method for periodic data identification.

[0029] Preferably, the specific process of step S4 includes the following steps:

[0030] S4.1. Set a standard time axis, map the time stamps of the signal values in each of the said periodic data to the closest time points on the standard time axis, and obtain the time axis after alignment of each of the said periodic data;

[0031] S4.2. Discretize the time axis of each aligned periodic data into N equally spaced intervals, and the standardized time tag corresponding to each equally spaced interval is , where represents the starting time point of the k-th equally spaced interval, , k represents the index of the standardized time tag, ; , represents the duration of the periodic data, represents the starting point of processing;

[0032] S4.3. For each of the periodic data, calculate the average of the signal values within the N equally spaced intervals respectively to obtain the signal mean value corresponding to each equally spaced interval, and the signal mean value is used as the signal representative value of the equally spaced interval , specifically expressed as: ; where represents the number of all signal values within an equally spaced interval; ; then the discretized time series corresponding to each of the periodic data is obtained .

[0033] In the above steps, by aligning the time axis of the periodic data, the periodic fluctuation deviation can be eliminated, and the data comparability can be improved; by discretizing each periodic data and resampling the mean value, the dimensions of the data can be unified to adapt to the input of the unsupervised TadGAN model.

[0034] Preferably, the specific process of step S5 includes the following steps:

[0035] S5.1. For each periodic data, preset a high-risk period, which corresponds to the high-load cutting operation of the equipment;

[0036] S5.2. Define the normal range value F: ; where represents the mean value of the three-phase power signals collected when the equipment is in normal operation, represents the standard deviation of the three-phase power signals collected when the equipment is in normal operation, represents an adjustable multiple factor;

[0037] S5.3. Compare the discretized time series of each periodic data with the normal range value F in turn. If it is greater than or equal to the normal range value F, it is marked as an abnormal point; if it is less than the normal range value F, it is marked as a normal point;

[0038] S5.4. Calculate the abnormality rate of the high-risk period corresponding to each periodic data based on the abnormal points marked in step S5.3. If the abnormality rate of the high-risk period is greater than or equal to the set second threshold, it is directly determined as an abnormal cycle. If the abnormality rate of the high-risk period is less than the set second threshold, further calculate the abnormality rate of the periodic data corresponding to the high-risk period. The specific expression for calculating the abnormality rate of the high-risk period corresponding to each periodic data is as follows: ; where represents the number of abnormal points in the high-risk period; b represents the index of the standardized time label of the end time point of the high-risk period and a represents the index of the standardized time label of the end time point of the high-risk period .

[0039] S5.5. If the abnormality rate of the periodic data corresponding to the high-risk period is greater than or equal to the third threshold, it is determined as an abnormal cycle. If the abnormality rate of the periodic data corresponding to the high-risk period is less than the third threshold, it is determined as a normal cycle.

[0040] The specific expression for calculating the abnormality rate of the periodic data corresponding to the high-risk period is as follows: ; where represents the number of abnormal points of the periodic data; d represents the index of the standardized time label of the processing end point of the periodic data corresponding to the high-risk period and c represents the index of the standardized time label of the processing start point of the periodic data corresponding to the high-risk period .

[0041] In the above steps, by focusing on the high-risk period, the accuracy of subsequent anomaly detection is improved.

[0042] Preferably, in step S6, the unsupervised TadGAN model includes a generator, a discriminator, a reconstruction error module, and a discriminator scoring module. The generator includes an encoder and a decoder. The encoder is used to map the time series of the input normal cycle into a latent space representation. The decoder is used to reconstruct a new time series from the latent space. The discriminator is used to distinguish between the time series of the input normal cycle and the reconstructed new time series. The reconstruction error module is used to quantify the difference between the time series of the input normal cycle and the reconstructed new time series. The discriminator scoring module is used to evaluate the authenticity of the reconstructed new time series.

[0043] Preferably, the specific process of step S6 includes the following steps:

[0044] S6.1. Perform Z-score normalization on the time series of the normal cycle obtained in step S5 to obtain the normalized normal cycle, and form an input sample set from all the normalized normal cycles;

[0045] S6.2. Input the above-mentioned input sample set into an unsupervised TadGAN model. The encoder maps the input time series of the normal cycle into a latent space representation, and the decoder reconstructs a new time series from the latent space;

[0046] S6.3. Input the time series of each normal cycle and the reconstructed new time series into the discriminator, and train the discriminator according to the first loss function. Update the discriminator weights through backpropagation to obtain the trained discriminator; The first loss function is expressed as: ; where represents the time series of the normal cycle; represents the reconstructed new time series; represents the determination result of the discriminator for the time series of the normal cycle; represents the determination result of the discriminator for the reconstructed new time series;

[0047] S6.4. Based on the obtained trained discriminator, train the generator according to the second loss function. Update the generator weights through backpropagation to obtain the trained generator; The second loss function is expressed as: ; where represents the weight for minimizing the reconstruction error, ;

[0048] S6.5. The discriminator scoring module scores the fidelity of the reconstructed time series output by the trained discriminator; Input the reconstructed time series output by the trained generator and the time series of the normal cycle in the input sample set into the reconstruction error module, and the reconstruction error module outputs the reconstruction error; Among them, minimizing the reconstruction error is expressed as: ; where represents that the decoder reconstructs a new time series from the latent space; represents that the encoder maps the time series of the normal cycle into a latent space representation;

[0049] S6.6. Calculate the anomaly score according to the score output by the discriminator scoring module and the reconstruction error output by the reconstruction error module to obtain the fused anomaly score.

[0050] Preferably, in step S7, the set of periodic data to be detected is input into the trained unsupervised TadGAN model for calculation to obtain a fusion anomaly score, and a normal label or an abnormal label is output according to the fusion anomaly score. The fusion anomaly score is specifically expressed as: ; where E represents the reconstruction error for the set of periodic data to be detected; ; ; represents the time series of the set of periodic data to be detected; represents the determination result output by the trained discriminator.

[0051] Preferably, in step S7, the specific process of outputting a normal label or an abnormal label according to the fusion anomaly score is as follows: a dynamic threshold is set, and the dynamic threshold is set based on the 95th percentile of the three-phase power signals collected during the fault-free operation of the device; when the fusion anomaly score is greater than or equal to the dynamic threshold, the output label is an abnormal label; when the fusion anomaly score is less than the dynamic threshold, the output label is a normal label.

[0052] Preferably, in step S7, the specific process of using the abnormal state judgment strategy to judge the processing state of the device includes the following steps:

[0053] S7.1. Calculate the global anomaly rate H of the set of periodic data to be detected according to the label output by the trained unsupervised TadGAN model; the global anomaly rate H is expressed as: ; where represents the number of abnormal periods in the set of periodic data to be detected, represents the total number of periodic data in the set of periodic data to be detected;

[0054] S7.2. Set the anomaly determination range , if the global anomaly rate is less than , then it is judged that the state of the device is a normal state; if the global anomaly rate is within the anomaly determination range, then it is judged that the state of the device is a warning state; if the global anomaly rate is greater than , then it is judged that the state of the device is an abnormal state. Description of the Drawings

[0055] Figure 1 is a schematic flow chart of a method for intelligent detection of device anomalies based on periodic data according to the present invention;

[0056] Figure 2 is a schematic diagram of the combination of a state machine and a sliding window technique for periodic data recognition in the present invention;

[0057] Figure 3 Schematic diagram for training the unsupervised TadGAN model in the present invention. Specific implementation manner

[0058] The present invention will be further described below with reference to the accompanying drawings and in combination with specific implementation manners, so that those skilled in the art can implement it according to the text of the specification. The protection scope of the present invention is not limited to this specific implementation manner.

[0059] The present invention provides an intelligent device anomaly detection method based on periodic data, as Figure 1 shown, the method includes the following steps:

[0060] Step 1: Data acquisition and preprocessing;

[0061] (1.1) Obtain three-phase power signals during the operation of the device, and the data format of the three-phase power signals includes timestamps;

[0062] Use a numerically controlled machine tool (spindle motor power 5.5kW, maximum speed 8000rpm), and use a high-precision three-phase current sensor (model: HIOKI CT6904, sampling frequency 1kHz) to collect the current signals of phases A, B, and C in real time; the data format includes timestamps, the timestamps are accurate to milliseconds, the current value unit is amperes (A), and the data is stored in CSV format;

[0063] (1.2) Preprocess the three-phase power signals, and fuse the preprocessed three-phase power signals into a single comprehensive time series signal according to timestamps ;

[0064] (1.21) Phase correction: Due to differences in sensor installation positions or signal transmission delays, there are phase deviations in the three-phase current signals. Then calculate the time alignment path of the three-phase current signals, and align the time series data of phases B and C to phase A; after alignment, the waveform peaks of the three-phase signals are completely synchronized during the cutting stage;

[0065] (1.22) Filtering processing: High-frequency electromagnetic interference (such as inverter noise) and mechanical vibration noise will be generated during the operation of the machine tool. Design a Butterworth low-pass filter, and the Butterworth low-pass filter is designed with 4 orders, and the cut-off frequency is (the device main frequency is 50Hz, satisfying , where, represents the device main frequency), which can filter out high-frequency noise above 100Hz and retain low-frequency effective signals reflecting load changes;

[0066] (1.23) Data fusion: According to the load characteristics of the machine tool, set the weights of phases A, B, and C to be, , , ; Weight the low-frequency three-phase power signals according to the time stamps and fuse them into a single integrated time series signal , specifically expressed as: .

[0067] Step 2: Identify periodic data;

[0068] (2.1) Construct a state machine, which includes two states: "idle" and "working". The state "idle" specifically refers to the state where the device is not running or in a low-load processing state (such as tool change, workpiece clamping change); the state "working" specifically refers to the state where the device is in a high-load processing state;

[0069] (2.2) Use the sliding window technique to divide the single integrated time series signal into windows to generate L window sequences ; The window length is 1 second (1000 sampling points), and the step size is 0.5 second (50% overlap) to prevent missed detection;

[0070] (2.3) Calculate the root mean square value of each of the window sequences , specifically expressed as: ;<opposite

[0071] (2.4) Set a first threshold, which is specifically expressed as: ; where<opposite represents the mean value of the three-phase power signals collected when the device is in normal operation,<opposite represents the standard deviation of the three-phase power signals collected when the device is in normal operation; Select the current data of the machine tool running normally for 3 consecutive days (a total of 86400 windows), and calculate its mean value<opposite , standard deviation<opposite ; Then the first threshold is specifically:<opposite ;<opposite <opposite

[0072] (2.5) As shown in<opposite Figure 2 , if the root mean square values of 3 consecutive window sequences are all greater than or equal to 40 A, and the current state of the state machine is "idle", switch the state machine to the "working" state and mark it as the starting point of processing<opposite ; If the root mean square values of 5 consecutive window sequences are all less than 40 A, and the current state of the state machine is "working", switch the state machine to the "idle" state and mark it as the end point of processing<opposite ; In the specific implementation process, when it is detected that the root mean square values of three consecutive window sequences are 42 A, 45 A, and 47 A, and the current state of the state machine is "idle", then switch the state machine to the "working" state and record the starting point of processing<opposite ; The RMS value of the subsequent window sequence drops to 38A, 35A, 33A, 32A, 31A, and the current state machine is in the "working" state, then switch the state machine to the "idle" state and record the processing end point ; Then the working interval of the device is [09:00:30,09:02:15]. The data segment of the working interval [09:00:30,09:02:15] is intercepted as a periodic data Pe (duration 105 seconds);

[0073] (2.6) Eliminate some invalid periodic data. For example, if the standard processing cycle is 100±10 seconds, eliminate segments with a duration of less than 90 seconds or greater than 110 seconds, or eliminate low-energy cycles falsely triggered by noise. In the specific implementation process, 10 valid cycles were extracted from the original data and 2 invalid cycles were eliminated.

[0074] In step 2, the state machine combined with sliding window technology can accurately divide the device's working cycle to avoid misjudgment due to transient noise or load fluctuations.

[0075] Step 3: Time standardization and discretization;

[0076] (3.1) Setting a standard time axis, mapping the timestamp of the signal value in each periodic data to the closest time point on the standard time axis, and obtaining the aligned time axis of each periodic data;

[0077] (3.2) Discretize the time axis after alignment of each periodic data into N equally spaced intervals. The standardized time label corresponding to each equally spaced interval is ,in, represents the starting time point of the kth equally spaced interval, , ; , Indicates the duration of periodic data; in the specific implementation process, the periodic duration of periodic data Pe Divide into N=100 equally spaced intervals, each interval duration , the corresponding standardized time label is , , ,..., ;

[0078] (3.3) For each of the periodic data, the signal values in N equally spaced intervals are averaged to obtain the signal mean corresponding to each equally spaced interval, and the signal mean is used as the signal representative value of the equally spaced interval. , specifically expressed as: ;in, Represents the number of all signal values within an equally spaced interval; ; Then the discretized time series corresponding to each of the periodic data is obtained ; In the specific implementation process, the working interval corresponding to the 50th interval of the periodic data Pe is , which contains 100 original data points (sampling rate 1 kHz), then the corresponding signal mean value is: , ; Output the discretized time series corresponding to the periodic data Pe .

[0079] Step Four: Conduct a preliminary screening using a statistical model;

[0080] (4.1) For each periodic data, a high-risk period is preset, and this period corresponds to high-load cutting operations of the equipment;

[0081] (4.2) Based on historical normal data, define the normal range value F: ; Wherein, Represents the mean value of the three-phase power signals collected when the equipment is in a normal operating state, Represents the standard deviation of the three-phase power signals collected when the equipment is in a normal operating state, Represents an adjustable multiple factor;

[0082] (4.3) Compare the discretized time series of each of the periodic data with the normal range value F in sequence. If it is greater than or equal to the normal range value F, it is marked as an abnormal point. If it is less than the normal range value F, it is marked as a normal point;

[0083] (4.4) According to the abnormal points marked in step S5.2, calculate the abnormal rate of the high-risk period corresponding to each periodic data. If the abnormal rate of the high-risk period is greater than or equal to the set second threshold, it is directly determined as an abnormal cycle. If the abnormal rate of the high-risk period is less than the set second threshold, further calculate the abnormal rate of the periodic data corresponding to the high-risk period; The specific expression for calculating the abnormal rate of the high-risk period corresponding to each periodic data is: ; Wherein, Represents the number of abnormal points in the high-risk period; b represents the index of the standardized time label of the end time point of the high-risk period ; a represents the index of the standardized time label of the end time point of the high-risk period ; In the specific implementation process, according to industrial standards, the second threshold is set to 30%, and the high-risk period of the periodic data Pe is set as , corresponding to the cutting stage in actual processing, the number of abnormal points detected during this period is 12, then the abnormality rate of this high-risk period is , since the abnormality rate of 29.3% in the high-risk period is less than the set second threshold of 30%, the abnormality rate of the periodic data corresponding to the high-risk period is further calculated;

[0084] (4.5) If the abnormality rate of the periodic data corresponding to the high-risk period is greater than or equal to the third threshold, it is determined as an abnormal cycle. If the abnormality rate of the periodic data corresponding to the high-risk period is less than the third threshold, it is determined as a normal cycle; the specific expression for calculating the abnormality rate of each periodic data is: ; where represents the number of abnormal points in the periodic data; d represents the normalized time label of the end point of the processing of the periodic data corresponding to the high-risk period index; c represents the normalized time label of the start point of the processing of the periodic data corresponding to the high-risk period index; In the specific implementation process, according to industrial standards, the third threshold is set to 20%. For the periodic data Pe, the total number of abnormal points detected is 18, then the abnormality rate of the periodic data Pe is , since the abnormality rate of the periodic data of 18% is less than the third threshold of 20%, it is determined as a normal cycle.

[0085] Step Five: Use the unsupervised TadGAN model for fine screening;

[0086] (5.1) Construct an unsupervised TadGAN model. As Figure 3 shown, the unsupervised TadGAN model includes a generator and a discriminator. The generator includes an encoder and a decoder. The encoder is used to map the input time series of the normal cycle into a latent space representation; the decoder is used to reconstruct a new time series from the latent space; the discriminator is used to distinguish the input time series of the normal cycle from the reconstructed new time series; the unsupervised TadGAN model also includes a reconstruction error module and a discriminator scoring module. The reconstruction error module is used to quantify the difference between the input time series of the normal cycle and the reconstructed new time series; the discriminator scoring module is used to evaluate the realism of the reconstructed new time series; the encoder includes three layers of one-dimensional convolution (the number of channels is 64, 128, 256 respectively), the activation function uses ReLU, and the output latent space dimension is 10; the decoder includes three layers of transposed convolution (the number of channels is 256, 128, 64 respectively), the activation function uses Sigmoid, and the output reconstruction sequence; the discriminator includes four layers of fully connected (the number of neurons is 100, 50, 20, 1 respectively), the activation function uses the LeakyReLU function, and the output realism score;

[0087] (5.2) Select the time series of 8 normal cycles to perform Z-score standardization to eliminate the influence of dimensions; obtain the standardized normal cycles, and all the standardized normal cycles form the input sample set;

[0088] (5.3) Input the input sample set into the unsupervised TadGAN model for training; the encoder maps the time series of the input normal cycle into a latent space representation, and the decoder reconstructs a new time series from the latent space; among them, minimizing the reconstruction error is expressed as: ; where represents the new time series reconstructed by the decoder from the latent space; represents the encoder mapping the time series of the normal cycle into a latent space representation;

[0089] (5.4) Input the time series of 8 normal cycles and the reconstructed new time series into the discriminator, set 50 epochs, batch size 64, learning rate 0.001, and the reconstruction error drops to 0.08. Train the discriminator according to the first loss function, and update the discriminator weights through backpropagation to obtain the trained discriminator; the first loss function is expressed as:

[0090] ; where represents the time series of the normal cycle; represents the reconstructed new time series; represents the determination result of the discriminator for the time series of the normal cycle; represents the determination result of the discriminator for the reconstructed new time series;

[0091] (5.5) Based on the obtained trained discriminator, train the generator according to the second loss function, set 200 epochs, and update the generator weights through backpropagation to obtain the trained generator; the second loss function is expressed as: ; where ;

[0092] (5.6) The discriminator scoring module scores the fidelity of the reconstructed time series output by the trained discriminator; input the reconstructed time series output by the trained generator and the time series of the normal cycle in the input sample set into the reconstruction error module, and the reconstruction error module outputs the reconstruction error;

[0093] (5.7) Calculate the anomaly score according to the score output by the discriminator scoring module and the reconstruction error output by the reconstruction error module to obtain the fused anomaly score;

[0094] (5.8) Select two normal cycles as the validation set to validate the trained unsupervised TadGAN model. Through validation, the reconstruction error corresponding to the validation set is obtained as 0.12, and the discriminator accuracy is stable at 52%, indicating that the generated data is difficult to distinguish from the real data.

[0095] Step Six: Anomaly Detection;

[0096] (6.1) Collect the three-phase power signals to be detected in real time, obtain the corresponding periodic data set to be detected in the manner of steps S2~S3, input the periodic data set to be detected into the trained unsupervised TadGAN model for anomaly detection, calculate the fusion anomaly score by the trained unsupervised TadGAN model, and output a normal label or an abnormal label according to the fusion anomaly score; according to the label output by the trained unsupervised TadGAN model, adopt an abnormal state judgment strategy to judge the processing state of the device. In the specific implementation process, the periodic data set to be detected contains ten periodic data to be detected. Taking the periodic data numbered 9 and 10 as examples, calculate their corresponding reconstruction errors respectively: E9 = 0.25, E10 = 0.38, and the discriminator scores are , , and the corresponding fusion anomaly scores are respectively: , ;

[0097] (6.2) Set a dynamic threshold, and the dynamic threshold is set based on the 95th percentile of the three-phase power signals collected during the fault-free operation of the device; in the specific implementation process, the dynamic threshold is 0.40; taking the periodic data numbered 9 and 10 as examples, since the fusion anomaly score of the periodic data numbered 9 satisfies 0.21 < 0.40, it is judged as a normal label, and the fusion anomaly score of the periodic data numbered 10 satisfies 0.45 > 0.40, and it is judged as an abnormal label;

[0098] (6.3) According to the label output by the trained unsupervised TadGAN model, calculate the global anomaly rate H of the periodic data set to be detected; the global anomaly rate H is expressed as: ; where, represents the number of abnormal labels in the periodic data set to be detected, represents the total number of periodic data in the periodic data set to be detected; in the specific implementation process, among the ten periodic data to be detected, the number of abnormal labels obtained is 2, so the global anomaly rate is 20%;

[0099] (6.4) Set the anomaly determination range , if the global anomaly rate is less than , the status of the device is determined to be the normal status; if the global abnormal rate is within the abnormal determination range, the status of the device is determined to be the warning status; if the global abnormal rate is greater than , the status of the device is determined to be the abnormal status; in the specific implementation process, the abnormal determination range is set to [10%, 20%]. Since the global abnormal rate is 20%, the warning status is triggered.

[0100] In the present invention, the processing device targeted can be a single processing axis device or a multi-processing axis device. For a multi-processing axis device, for each processing axis, the three-phase power signals on the processing axis are extracted according to the method of the present invention to obtain the corresponding periodic data, and the processing status of the device is judged according to the method of the present invention. As long as the processing status of the device is judged to be abnormal according to the three-phase power signals on any one processing axis, it means that the processing status of the device is the abnormal processing status.

Claims

1. An intelligent detection method for device anomalies based on periodic data, characterized in that: Including the following steps: S1. Obtain three-phase power signals during the operation of the device, and the data format includes a timestamp; S2. Preprocess the three-phase power signals, and then weighted-fuse them according to the timestamp into a single comprehensive time-series signal; S3. Construct a state machine, and combine the sliding window technique to determine the processing start point and processing end point in the single comprehensive time-series signal; wherein, the time interval formed by a processing start point and the corresponding processing end point is a working interval of the device; intercept the data segment corresponding to each working interval from the single comprehensive time-series signal to obtain a periodic data set; S4. Align the time axes of each periodic data, discretize the aligned time axes of each periodic data into N equally spaced intervals, and resample the signal values within each equally spaced interval by taking the mean to obtain the discretized time series corresponding to each periodic data; S5. Input each discretized time series into a statistical model for preliminary screening to determine whether the periodic data is a normal period or an abnormal period; S6. Input the normal periods obtained in step S5 into an unsupervised TadGAN model for training to obtain a trained unsupervised TadGAN model; S7. Real-time collect the three-phase power signals to be detected, obtain the periodic data set to be detected in the manner of steps S2 - S3, and input it into the trained unsupervised TadGAN model for calculation and then output a normal label or an abnormal label; according to the label, adopt an abnormal state judgment strategy to judge the processing state of the device; Among them, the specific process of inputting each discretized time series into a statistical model for preliminary screening is as follows: S5.

1. For each periodic data, preset a high-risk period, which corresponds to high-load cutting operations of the device; S5.

2. Define the normal range value F: ; where represents the mean value of the three-phase power signals collected when the device is in normal operation, represents the standard deviation of the three-phase power signals collected when the device is in normal operation, represents an adjustable multiple factor; S5.

3. Compare the discretized time series of each periodic data with the normal range value F in turn. If it is greater than or equal to the normal range value F, it is marked as an abnormal point. If it is less than the normal range value F, it is marked as a normal point; S5.

4. Calculate the anomaly rate of the high-risk period corresponding to each periodic data based on the anomaly points marked in step S5.

3. If the anomaly rate of the high-risk period is greater than or equal to the set second threshold, it is directly determined as an abnormal cycle. If the anomaly rate of the high-risk period is less than the set second threshold, further calculate the anomaly rate of the periodic data corresponding to the high-risk period. The specific expression for calculating the anomaly rate of the high-risk period corresponding to each periodic data is: ; where represents the number of anomaly points in the high-risk period; b represents the index of the standardized time label of the end time point of the high-risk period and a represents the index of the standardized time label of the end time point of the high-risk period . S5.

5. If the abnormal rate of the periodic data corresponding to the high-risk period is greater than or equal to the third threshold, it is determined as an abnormal period. If the abnormal rate of the periodic data corresponding to the high-risk period is less than the third threshold, it is determined as a normal period; The specific expression for calculating the anomaly rate of the periodic data corresponding to the high-risk period is as follows: ; where represents the number of anomaly points in the periodic data; d represents the index of the standardized time tag of the processing end point of the periodic data corresponding to the high-risk period ; c represents the index of the standardized time tag of the processing start point of the periodic data corresponding to the high-risk period .

2. An intelligent device anomaly detection method based on periodic data according to claim 1, characterized in that: The specific process of step S2 includes the following steps: S2.

1. Preprocess the three-phase power signals: S2.

11. Use a phase correction algorithm to correct the phase of the three-phase power signals to obtain corrected three-phase power signals; S2.

12. Use a Butterworth low-pass filter to filter the corrected three-phase power signals to obtain low-frequency three-phase power signals; S2.

2. Weight the low-frequency three-phase power signals according to timestamps and fuse them into a single integrated time-series signal , which is specifically expressed as: ; where , and represent weight coefficients; represents the power signal of phase A, represents the power signal of phase B, represents the power signal of phase C.

3. An intelligent device anomaly detection method based on periodic data according to claim 2, characterized in that: The specific process of step S3 includes the following steps: S3.

1. Construct a state machine, and the state machine includes two states: "idle" and "working". S3.

2. Divide the single integrated timing signal into windows using the sliding window technique to generate L window sequences , ,..., ; S3.

3. Calculate the root mean square value of each of the said window sequences , specifically expressed as: ; where ; represents the number of sampling points within the window sequence . S3.

4. Set the first threshold value, which is specifically expressed as: ; where represents the mean value of the three-phase power signals collected when the device is in the normal operating state, represents the standard deviation of the three-phase power signals collected when the device is in the normal operating state; S3.

5. If the root mean square values of consecutive M window sequences are greater than or equal to the first threshold and the current state of the state machine is "idle", switch the state machine to the "working" state and mark it as the starting point of processing ; if the root mean square values of consecutive K window sequences are less than the first threshold and the current state of the state machine is "working", switch the state machine to the "idle" state and mark it as the ending point of processing ; where , ; S3.

6. Define the time interval formed by the machining start point and the corresponding machining end point as the working interval of the equipment. According to each of the working intervals, intercept the data segment corresponding to each working interval from the single integrated timing signal. The data segment corresponding to each working interval is a periodic data, and a periodic data set is obtained. , where represents the nth periodic data.

4. An intelligent detection method for equipment anomalies based on periodic data according to claim 1 or claim 3, characterized in that: The specific process of step S4 includes the following steps: S4.

1. Set a standard time axis, map the timestamps of the signal values in each of the periodic data to the closest time points on the standard time axis, and obtain the time axis after alignment of each of the periodic data. S4.

2. Discretize the time axis after aligning each piece of the periodic data into N equally spaced intervals, and the standardized time label corresponding to each equally spaced interval is , where represents the starting time point of the k-th equally spaced interval, , k represents the index of the standardized time label, ; , represents the duration of the periodic data, represents the starting point of processing; S4.

3. For each of the periodic data, the signal values in N equally spaced intervals are averaged respectively to obtain the signal mean value corresponding to each equally spaced interval, and the signal mean value is used as the signal representative value of the equally spaced interval , specifically expressed as: ; where represents the number of all signal values in an equally spaced interval; ; then the discretized time series corresponding to each of the periodic data is obtained .

5. An intelligent detection method for equipment anomalies based on periodic data according to claim 1 or claim 4, characterized in that: In step S6, the unsupervised TadGAN model includes a generator, a discriminator, a reconstruction error module, and a discriminator scoring module. The generator includes an encoder and a decoder. The encoder is used to map the time series of the normal period of the input into a latent space representation; the decoder is used to reconstruct a new time series from the latent space; the discriminator is used to distinguish the time series of the normal period of the input from the reconstructed new time series; the reconstruction error module is used to quantify the difference between the time series of the normal period of the input and the reconstructed new time series; the discriminator scoring module is used to evaluate the authenticity degree of the reconstructed new time series.

6. An intelligent detection method for equipment anomalies based on periodic data according to claim 5, characterized in that: The specific process of step S6 includes the following steps: S6.

1. Perform Z-score standardization on the time series of the normal period obtained in step S5 to obtain the standardized normal period, and form an input sample set from all the standardized normal periods. S6.

2. Input the input sample set into the unsupervised TadGAN model. The encoder maps the time series of the normal period of the input into a latent space representation, and the decoder reconstructs a new time series from the latent space. S6.

3. Input the time series of each normal cycle and the reconstructed new time series into the discriminator, train the discriminator according to the first loss function, update the discriminator weights through backpropagation, and obtain the trained discriminator. The first loss function is expressed as: ; where represents the time series of the normal cycle; represents the reconstructed new time series; represents the determination result of the discriminator for the time series of the normal cycle; represents the determination result of the discriminator for the reconstructed new time series; S6.

4. Based on the obtained trained discriminator, train the generator according to the second loss function, update the generator weights through backpropagation, and obtain the trained generator; the second loss function is expressed as: ; where represents the weight for minimizing the reconstruction error, ; S6.

5. The discriminator scoring module scores the fidelity of the reconstructed time series output by the trained discriminator; the reconstructed time series output by the trained generator and the time series of the normal period in the input sample set are input into the reconstruction error module, and the reconstruction error module outputs the reconstruction error; wherein, minimizing the reconstruction error is expressed as: ; wherein, represents that the decoder reconstructs a new time series from the latent space; represents that the encoder maps the time series of the normal period to the latent space representation; S6.

6. Calculate the anomaly score according to the score output by the discriminator scoring module and the reconstruction error output by the reconstruction error module to obtain the fused anomaly score.

7. The intelligent device anomaly detection method based on periodic data according to claim 6, wherein: In step S7, the set of periodic data to be detected is input into the trained unsupervised TadGAN model for calculation to obtain a fused anomaly score, and a normal label or an abnormal label is output according to the fused anomaly score. The fused anomaly score is specifically expressed as: ; where E represents the reconstruction error for the set of periodic data to be detected; ; ; represents the time series of the set of periodic data to be detected; represents the determination result output by the trained discriminator.

8. An intelligent detection method for equipment anomalies based on periodic data according to claim 7, characterized in that: In step S7, the specific process of outputting a normal label or an anomaly label according to the fused anomaly score is as follows: Set a dynamic threshold, and the dynamic threshold is set based on the 95th percentile of the three-phase power signals collected during the fault-free operation of the equipment; when the fused anomaly score is greater than or equal to the dynamic threshold, the output label is an anomaly label; when the fused anomaly score is less than the dynamic threshold, the output label is a normal label.

9. An intelligent detection method for equipment anomalies based on periodic data according to claim 8, characterized in that: In step S7, the specific process of using the anomaly state judgment strategy to judge the processing state of the equipment includes the following steps: S7.

1. Calculate the global anomaly rate H of the periodic data set to be detected according to the labels output by the trained unsupervised TadGAN model. The global anomaly rate H is expressed as: ; where represents the number of anomaly labels in the periodic data set to be detected, represents the total number of periodic data in the periodic data set to be detected; S7.

2. Set the abnormal judgment range , if the global abnormal rate is less than , then it is determined that the status of the device is normal; if the global abnormal rate is within the abnormal judgment range, then it is determined that the status of the device is a warning state; if the global abnormal rate is greater than , then it is determined that the status of the device is an abnormal state.

Citation Information

Patent Citations

  • Systems and methods for securing industrial networks

    US20210092132A1

  • Data anomaly detection method and apparatus, device, medium, and program product

    WO2024036727A1