Equipment abnormity intelligent detection method based on periodic data
By combining the state machine and sliding window technology to extract periodic data, and using the unsupervised TadGAN model to make exception judgments, the shortcomings of the existing technology in processing periodic data are solved, and equipment abnormality detection with high accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510511440.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-23
AI Technical Summary
The existing equipment abnormality detection methods are insufficient when processing periodic data, which are difficult to adapt to different equipment and process conditions, and are of low accuracy and reliability.
The intelligent detection method of equipment abnormality based on periodic data is adopted, and periodic data is accurately extracted through state machine and sliding window technology, and anomaly judgment is performed using the unsupervised TadGAN model. This method includes data preprocessing, time standardization, statistical model initial screening and unsupervised TadGAN model training and application.
This method can effectively distinguish complex noise from real abnormalities, improve the accuracy and reliability of abnormal detection, adapt to different equipment and process conditions, and reduce misjudgment.
Smart Images

Figure CN120045942A_ABST
Abstract
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 processed in a timely manner, they may lead to equipment damage, production interruption, and even safety accidents. Traditional equipment anomaly detection methods 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 equipment anomaly detection methods have gradually received attention. However, existing data-driven detection methods have some deficiencies in processing periodic data.
[0003] Currently, equipment anomaly detection methods 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 judge whether the equipment is abnormal. However, when faced with a complex equipment operation environment and diverse failure modes, this method often seems powerless, 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. To a certain extent, such methods can adapt to changes in the equipment operation state, but there are still limitations in the processing of periodic data. When the equipment operation has obvious periodic characteristics, such as the periodic operation of a numerically controlled machine tool when processing 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 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 to achieve 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: S1. Obtain the three-phase power signals during the operation of the device, and its data format includes timestamps; S2. Preprocess the three-phase power signals, and then weighted-fuse them according to timestamps into a single comprehensive time series signal; 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; 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 value 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.
[0009] 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 is adaptable to different equipment and process conditions, with high accuracy and strong reliability.
[0010] Preferably, the specific process of step S2 includes the following steps: 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; S2.2. Weight and fuse the low-frequency three-phase power signals according to timestamps into a single comprehensive 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.
[0011] In the above steps, 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 effective signals; the obtained low-frequency three-phase power signals are weighted and fused according to timestamps to synthesize multi-phase features and enhance the representation ability.
[0012] Preferably, the specific process of step S3 includes the following steps: 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; S3.2. Use the sliding window technology to divide the single comprehensive time series signal into windows to generate L window sequences ; S3.3. Calculate the root mean square value of each window sequence , which is specifically expressed as: ; where ; represents the number of sampling points within the window sequence ; S3.4. Set the first threshold, and the specific expression of the first threshold is: ; 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; 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 starting point of processing ; 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 ending point of processing ; where , ; S3.6. Define the time interval formed by the starting point of processing and the corresponding ending point of processing as the working interval of the device. 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 set of periodic data is obtained , where represents the nth periodic data.
[0013] In the above steps, by the collaborative work of the state machine and the sliding window technique, the processing period 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.
[0014] Preferably, the specific process of step S4 includes the following steps: S4.1. Set the standard time axis, and map the time stamps of the signal values in each of the periodic data to the closest time points on the standard time axis to obtain the aligned time axis for each of the periodic data; S4.2. Discretize the aligned time axis of each 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 kth equally spaced interval, , k represents the index of the standardized time label, ; , Indicates the duration of periodic data, Indicates the starting point of processing; S4.3. For each of the above-mentioned 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 Indicates the number of all signal values in an equally-spaced interval; ; then the discretized time series corresponding to each of the above-mentioned periodic data is obtained .
[0015] In the above steps, by aligning the time axes of 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.
[0016] Preferably, the specific process of step S5 includes the following steps: S5.1. For each periodic data, a high-risk period is preset, and this period corresponds to high-load cutting operations of the device; S5.2. Define the normal range value F: ; where Indicates the mean value of the three-phase power signals collected when the device is in normal operation, Indicates the standard deviation of the three-phase power signals collected when the device is in normal operation, Indicates an adjustable multiple factor; S5.3. Compare the discretized time series of each of the above-mentioned 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. According to the abnormal points marked in step S5.3, 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: ; where Indicates 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 of, and a represents the index of the standardized time label of the end time point of the high-risk period of; 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 period; 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 period. The specific expression for calculating the abnormality rate of the periodic data corresponding to the high-risk period is: ; where represents the number of abnormal 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 .
[0017] In the above steps, by focusing on the high-risk period, the accuracy of subsequent anomaly detection is improved.
[0018] 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 normal period 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 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 input and the reconstructed new time series; the discriminator scoring module is used to evaluate the verisimilitude of the reconstructed new time series.
[0019] Preferably, 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 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 period and the reconstructed new time series into the discriminator, 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: ; where represents the time series of the normal period; represents the reconstructed new time series; represents the determination result of the discriminator on the time series of the normal period; Indicates 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 weights of the generator 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; input the reconstructed time series output by the trained generator and the time series of the normal period 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 period into the latent space representation; S6.6. Calculate the anomaly score based on the score output by the discriminator scoring module and the reconstruction error output by the reconstruction error module to obtain the fused anomaly score.
[0020] Preferably, in step S7, the set of periodic data to be detected is input into the trained unsupervised TadGAN model for calculation to obtain the 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.
[0021] Preferably, in step S7, the specific process of outputting a normal label or an abnormal 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 device; when the fused anomaly score is greater than or equal to the dynamic threshold, the output label is an abnormal label; when the fused anomaly score is less than the dynamic threshold, the output label is a normal label.
[0022] 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: S7.1. Calculate the global anomaly rate H of the periodic data set to be detected based on the labels output by the trained unsupervised TadGAN model. The global anomaly rate H is expressed as: ; where represents the number of abnormal periods 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 anomaly determination range . If the global anomaly rate is less than , then determine that the status of the device is normal; if the global anomaly rate is within the anomaly determination range, then determine that the status of the device is in a warning state; if the global anomaly rate is greater than , then determine that the status of the device is in an abnormal state. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] 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; 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; Figure 3 is a schematic diagram of the training of an unsupervised TadGAN model in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] The following further describes the invention with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can implement it according to the description in the specification. The protection scope of the present invention is not limited to this specific embodiment.
[0025] The present invention provides a method for intelligent detection of device anomalies based on periodic data. As Figure 1 shown, the method includes the following steps: Step 1. Data collection and preprocessing; (1.1). Obtain the three-phase power signals during the operation of the device. The data format of the three-phase power signals includes timestamps; Use a numerically controlled machine tool (spindle motor power 5.5 kW, maximum speed 8000 rpm), and use a high-precision three-phase current sensor (model: HIOKI CT6904, sampling frequency 1 kHz) 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; (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 the timestamps ; (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 timing 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 phase; (1.22), Filtering process: High-frequency electromagnetic interference (such as inverter noise) and mechanical vibration noise are generated during the operation of the machine tool. Design a Butterworth low-pass filter. The Butterworth low-pass filter is a 4th-order design, and the cut-off frequency is (the main frequency of the equipment is 50Hz, satisfying , where represents the main frequency of the equipment), which can filter out high-frequency noise above 100Hz and retain the low-frequency effective signals reflecting the load changes; (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 by timestamp and fuse them into a single comprehensive timing signal , specifically expressed as: .
[0026] Step two, periodic data recognition; (2.1), Construct a state machine. The state machine 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 (such as tool change, workpiece clamping); the state "working" specifically refers to the state where the equipment is in a high-load processing state; (2.2), Use the sliding window technique to divide the single comprehensive timing signal by window 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; (2.3), Calculate the root mean square value of each of the window sequences , specifically expressed as: ; (2.4), Set a first threshold, and the first threshold is specifically expressed as: ; where 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; Select the current data of the machine tool running normally for 3 consecutive days (a total of 86400 windows), and calculate its mean , standard deviation ; Then the first threshold is specifically: ; (2.5) As Figure 2 shown, if the root mean square values of three consecutive window sequences are all greater than or equal to 40A, and the current state of the state machine is "idle", the state machine will be switched to the "working" state and marked as the starting point of processing. ; if the root mean square values of five consecutive window sequences are all less than 40A, and the current state of the state machine is "working", the state machine will be switched to the "idle" state and marked as the ending point of processing. ; In the specific implementation process, when the root mean square values of three consecutive window sequences are detected to be 42A, 45A, and 47A, and the current state of the state machine is "idle", then the state machine will be switched to the "working" state and the starting point of processing will be recorded. ; The root mean square values of subsequent window sequences drop to 38A, 35A, 33A, 32A, and 31A, and the current state of the state machine is "working", then the state machine will be switched to the "idle" state and the ending point of processing will be recorded. ; Then the working interval of the device is [09:00:30, 09:02:15], and the data segment of the working interval [09:00:30, 09:02:15] is intercepted as a periodic data Pe (with a duration of 105 seconds); (2.6) Eliminate some invalid periodic data. For example, the standard processing cycle is 100 ± 10 seconds, and the segments with a duration less than 90 seconds or greater than 110 seconds are eliminated, or the low-energy cycles triggered by noise are eliminated; in the specific implementation process, 10 valid cycles are extracted from the original data and 2 invalid cycles are eliminated. In step two, by combining the state machine with the sliding window technology, the working cycle of the device can be accurately divided to avoid misjudgment caused by instantaneous noise or load fluctuations.
[0027] Step three: Time standardization and discretization; (3.1) Set a standard time axis, map the time stamps of the signal values in each of the periodic data to the time point on the standard time axis that is closest, and obtain the aligned time axis of each of the periodic data. (3.2) Discretize the aligned time axis of each 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 kth equally spaced interval, , ; , represents the duration of the periodic data; in the specific implementation process, the period duration of the periodic data Pe Divided into N = 100 equally spaced intervals, each interval duration , and the corresponding normalized time tags are , , ,..., ; (3.3) For each of the above-mentioned periodic data, the signal values within 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 within an equally spaced interval; ; then the discretized time series corresponding to each of the above-mentioned periodic data is obtained ; In the specific implementation process, the working interval corresponding to the k = 50th interval of the periodic data Pe is , which contains 100 original data points (sampling rate 1kHz), then the corresponding signal mean value is: , ; Output the discretized time series corresponding to the periodic data Pe .
[0028] Step Four: Conduct preliminary screening using a statistical model; (4.1) For each periodic data, a high-risk period is preset, and this period corresponds to high-load cutting operations of the equipment; (4.2) Based on historical normal data, define the normal range value F: ; where 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; (4.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; (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: ; where The number of abnormal points representing the high-risk period; b represents the normalized time tag of the end time point of the high-risk period index; a represents the normalized time tag of the end time point of the high-risk period index; 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 , which corresponds to the cutting stage in actual processing. The number of abnormal points detected during this period is 12, so the abnormality rate of this high-risk period is . Since the abnormality rate of the high-risk period, 29.3%, 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; (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 of the periodic data; d represents the normalized time tag of the processing end point of the periodic data corresponding to the high-risk period index; c represents the normalized time tag of the processing start point 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%. The total number of abnormal points detected for the periodic data Pe is 18, so the abnormality rate of the periodic data Pe is . Since the abnormality rate of the periodic data, 18%, is less than the third threshold of 20%, it is determined as a normal cycle.
[0029] Step Five: Use the unsupervised TadGAN model for fine screening; (5.1) Construct an unsupervised TadGAN model, such as Figure 3As 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 normal cycles 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 input time series of normal cycles and 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 normal cycles 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 (with the number of channels being 64, 128, and 256 respectively), the activation function is ReLU, and the output latent space dimension is 10. The decoder includes three layers of transposed convolution (with the number of channels being 256, 128, and 64 respectively), the activation function is Sigmoid, and the output is the reconstructed sequence. The discriminator includes four layers of fully connected (with the number of neurons being 100, 50, 20, and 1 respectively), the activation function is the LeakyReLU function, and the output is the realism score. (5.2) Select the time series of 8 normal cycles to perform Z-score standardization to eliminate the influence of dimension. Obtain the standardized normal cycles, and all the standardized normal cycles form the input sample set. (5.3) Input the input sample set into the unsupervised TadGAN model for training. The encoder maps the input time series of normal cycles 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: Among them, represents that the decoder reconstructs a new time series from the latent space. represents that the encoder maps the time series of normal cycles into a latent space representation. (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: Among them, represents the time series of normal cycles. represents the reconstructed new time series. represents the determination result of the discriminator for the time series of normal cycles. represents the determination result of the discriminator for the reconstructed new time series. (5.5) Based on the obtained trained discriminator, train the generator according to the second loss function, set 200 epochs, update the generator weights through backpropagation, and obtain the trained generator; the second loss function is expressed as: ; where ; (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 period in the input sample set into the reconstruction error module, and the reconstruction error module outputs the reconstruction error; (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; (5.8) Select 2 normal periods as the validation set to validate the trained unsupervised TadGAN model. Through validation, the reconstruction error corresponding to the validation set is 0.12, and the discriminator accuracy stabilizes at 52%, indicating that the generated data is indistinguishable from the real data.
[0030] Step Six: Anomaly Detection; (6.1) Collect the three-phase power signals to be detected in real time, obtain the corresponding set of periodic data to be detected in the manner of steps S2~S3, input the set of periodic data to be detected into the trained unsupervised TadGAN model for anomaly detection, and the trained unsupervised TadGAN model calculates the fused anomaly score and outputs a normal label or an abnormal label according to the fused anomaly score; according to the label output by the trained unsupervised TadGAN model, use the anomaly state judgment strategy to judge the processing state of the device. In the specific implementation process, the set of periodic data 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 respectively , , and the corresponding fused anomaly scores are respectively: , ; (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 fused anomaly score of the periodic data numbered 9 satisfies 0.21 < 0.40, it is judged as a normal label, and the fused anomaly score of the periodic data numbered 10 satisfies 0.45 > 0.40, it is judged as an abnormal label; (6.3) 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; in the specific implementation process, among ten periodic data to be detected, the number of anomaly labels obtained is 2, so the global anomaly rate is 20%. (6.4) Set the anomaly determination range , if the global anomaly rate is less than , then determine that the state of the device is the normal state; if the global anomaly rate is within the anomaly determination range, then determine that the state of the device is the warning state; if the global anomaly rate is greater than , then determine that the state of the device is the abnormal state; in the specific implementation process, the anomaly determination range is set to [10%, 20%], and since the global anomaly rate is 20%, the warning state is triggered.
[0031] 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, three-phase power signals on the processing axis are extracted according to the method of the present invention to obtain corresponding periodic data, and the processing state of the device is judged according to the method of the present invention. As long as it is determined that the processing state of the device is abnormal according to the three-phase power signals on any one processing axis, then it means that the processing state of the device is an abnormal processing state.
Claims
1. A method for intelligent detection of equipment anomalies based on periodic data, characterized in that: The following steps are involved: S1. Acquire the three-phase power signal during the operation of the device, whose data format includes a timestamp; S2, preprocessing the three-phase power signal, and then weighting and fusing it into a single comprehensive time series signal according to the timestamp; S3, constructing a state machine, and combining 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 a corresponding processing end point is a working interval of the device; intercepting the data segment corresponding to each working interval from the single comprehensive time series signal to obtain a periodic data set; S4, time-aligning the time axis of each periodic data, discretizing the aligned time axis of each periodic data into N equally spaced intervals, and performing mean resampling on the signal values in each equally spaced interval to obtain a 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, inputting the normal cycle obtained in step S5 into the unsupervised TadGAN model for training to obtain a trained unsupervised TadGAN model; S7. Collect the three-phase power signal to be detected in real time, obtain the periodic data set to be detected according to 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, use the abnormal state judgment strategy to judge the processing state of the equipment.
2. The method for intelligently detecting equipment anomalies based on periodic data according to claim 1, characterized in that: The specific process of step S2 includes the following steps: S2.
1. Preprocessing the three-phase power signal: S2.
11. Using a phase correction algorithm to perform phase correction on the three-phase power signal to obtain a corrected three-phase power signal; S2.
12. Using a Butterworth low-pass filter to filter the corrected three-phase power signal to obtain a low-frequency three-phase power signal; S2.2, the low-frequency three-phase power signal is weighted and fused into a single comprehensive time series signal according to the timestamp , specifically expressed as: ;in, , as well as represents the weight coefficient; Represents the power signal of phase A, Represents the power signal of phase B, Represents the power signal of phase C.
3. The method for intelligently detecting equipment anomalies 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, wherein the state machine includes two states: "idle" and "working"; S3.
2. Use sliding window technology to divide the single integrated time series signal into windows to generate L window sequences , ,..., ; S3.
3. Calculate each of the window sequences The root mean square value of is expressed as: ;in, ; Represents a window sequence The number of sampling points within S3.
4. Set a first threshold value, wherein the first threshold value is specifically expressed as: ;in, It indicates the average value of the three-phase power signal collected by the equipment under normal operation. Indicates the standard deviation of the three-phase power signal collected by the device under normal operating conditions; S3.
5. If the RMS values of the M consecutive window sequences are all greater than or equal to the first threshold value, and the current state machine is in the "idle" state, switch the state machine to the "working" state and mark it as the processing start point. If the RMS values of the K consecutive window sequences are all less than the first threshold value, and the current state machine state is "working", the state machine is switched to the "idle" state and marked as the processing end point. ;in, , ; S3.
6. Define the time interval formed by the processing start point and the corresponding processing end point as the working interval of the equipment. According to each of the working intervals, extract the data segment corresponding to each working interval from the single comprehensive timing signal. The data segment corresponding to each working interval is a periodic data, and obtain a periodic data set. ,in, Indicates the nth periodic data.
4. The method for intelligently detecting 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 timestamp of the signal value in each periodic data to the closest time point on the standard time axis, and obtain the aligned time axis of each periodic data; S4.2, discretize the time axis after alignment of each periodic data into N equally spaced intervals, and the standardized time label corresponding to each equally spaced interval is ,in, represents the starting time point of the kth equally spaced interval, , k represents the index of the standardized time label, ; , Indicates the duration of periodic data. Indicates the processing starting point; S4.
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 in an equally spaced interval; ; Then the discretized time series corresponding to each periodic data is obtained .
5. The method for intelligently detecting equipment anomalies based on periodic data according to claim 4 is characterized in that: The specific process of step S5 includes the following steps: S5.
1. For each periodic data, a high-risk period is preset, which corresponds to the high-load cutting operation of the equipment; S5.
2. Define the normal range value F: ;in, It indicates the average value of the three-phase power signal collected by the equipment under normal operation. It indicates the standard deviation of the three-phase power signal collected by the equipment under normal operation. Indicates an adjustable multiplication 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. According to the abnormal points marked in step S5.3, the abnormal rate of the high-risk period corresponding to each periodic data is calculated. 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 period. If the abnormal rate of the high-risk period is less than the set second threshold, the abnormal rate of the periodic data corresponding to the high-risk period is further calculated; the specific expression for calculating the abnormal rate of the high-risk period corresponding to each periodic data is: ;in, represents the number of abnormal points in the high-risk period; b represents the standardized time label of the end time point of the high-risk period The index of a represents the standardized time label of the end time point of the high-risk period. The index of 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 to be an abnormal period; if the abnormality rate of the periodic data corresponding to the high-risk period is less than the third threshold, it is determined to be a normal period; The specific expression for calculating the abnormal rate of periodic data corresponding to the high-risk period is: ;in, represents the number of abnormal points in the periodic data; d represents the standardized time label of the processing end point of the periodic data corresponding to the high-risk period The index of; c represents the standardized time label of the processing starting point of the periodic data corresponding to the high-risk period The index of .
6. The method for intelligently detecting equipment anomalies based on periodic data according to claim 1 or claim 5, 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 input normal period time series to 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 input normal period time series and the reconstructed new time series; the reconstruction error module is used to quantify the difference between the input normal period time series and the reconstructed new time series; the discriminator scoring module is used to evaluate the realism of the reconstructed new time series.
7. The method for intelligently detecting equipment anomalies based on periodic data according to claim 6, characterized in that: The specific process of step S6 includes the following steps: S6.
1. Perform Z-score normalization on the time series of the normal period obtained in step S5 to obtain a normal period after normalization, and all the normal periods after normalization constitute an input sample set; S6.2, inputting the input sample set into the unsupervised TadGAN model, the encoder maps the input normal periodic time series 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 weight by back propagation, and obtain the trained discriminator; the first loss function is expressed as: ;in, A time series representing a normal cycle; Represents the reconstructed new time series; Represents the judgment result of the discriminator on the time series of normal period; Represents the judgment result of the discriminator on the reconstructed new time series; S6.
4. Based on the obtained trained discriminator, the generator is trained according to the second loss function, and the generator weight is updated by back propagation to obtain the trained generator; the second loss function is expressed as: ;in, represents the weight that minimizes 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, the minimization of the reconstruction error is expressed as: ;in, It means that the decoder reconstructs a new time series from the latent space; The representation encoder maps a normally periodic time series into a latent space representation; S6.
6. Calculate the anomaly score based on the score output by the discriminator scoring module and the reconstruction error output by the reconstruction error module to obtain a fused anomaly score.
8. The method for intelligently detecting equipment anomalies based on periodic data according to claim 7, characterized in that: In step S7, the periodic data set 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: ; Wherein, E represents the reconstruction error for the periodic data set to be detected; ; ; A time series representing a set of periodic data to be detected; Represents the judgment result output by the trained discriminator.
9. The method for intelligently detecting equipment anomalies based on periodic data according to claim 8, characterized in that: In step S7, the specific process of outputting a normal label or an abnormal label according to the fused anomaly score is as follows: setting a dynamic threshold, wherein the dynamic threshold is set based on the 95th percentile of the three-phase power signal collected by the device during fault-free operation; when the fused anomaly score is greater than or equal to the dynamic threshold, the output label is an abnormal label; when the fused anomaly score is less than the dynamic threshold, the output label is a normal label.
10. The method for intelligently detecting equipment anomalies based on periodic data according to claim 9, characterized in that: In step S7, the specific process of using the abnormal state judgment strategy to judge the processing state of the equipment includes the following steps: S7.
1. According to the labels 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: ;in, represents the number of abnormal labels in the periodic data set to be detected, Indicates the total number of periodic data in the periodic data set to be detected; S7.2, set the abnormality judgment range , if the global anomaly rate is less than , the device is judged to be in a normal state; if the global abnormality rate is within the abnormality determination range, the device is judged to be in a warning state; if the global abnormality rate is greater than , then the device status is judged to be abnormal.
Citation Information
Patent Citations
Equipment monitoring method and system based on scada
CN113903099A
Self-adaptive data abnormal value detection method and terminal
CN119004320A
Pediatric abnormal breathing detection method and system based on physiological signals
CN119538119A
Apparatus and Method for Anomaly Detection Using Multivariate Heterogeneous Time-Series Data
KR102321440B1
Periodic electrical signal frequency monitoring systems and methods
US20060132190A1