Industrial equipment anomaly detection method based on mahalanobis distance measurement auto-encoder
By adopting the autoencoder method based on the Marbanian distance measurement in the abnormality detection of industrial equipment, the problems of low detection efficiency and poor accuracy in the prior art are solved, and high-precision and efficient abnormal detection and problem positioning are achieved.
Patent Information
- Application Number
- CN202411919931.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-23
AI Technical Summary
The prior art has problems with low detection efficiency and poor accuracy in industrial equipment abnormality detection, and the detection effect is unstable when using the autoencoder alone.
The autoencoder method based on the Marbanian distance metric is adopted to preprocess the historical running data and construct the autoencoder model, and the Mabanian distance of the reconstruction error is calculated, and real-time anomaly detection and problem positioning are performed in combination with the confidence threshold.
It significantly improves the accuracy and timeliness of abnormal detection of industrial equipment, can effectively detect equipment abnormalities, and has broad industrial application potential.
Smart Images

Figure CN120027845A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of industrial equipment anomaly detection, and in particular relates to an industrial equipment anomaly detection method based on a Mahalanobis distance metric autoencoder. Background Art
[0002] With the increasing complexity and automation of industrial equipment, the timely detection and diagnosis of equipment failures and abnormal conditions have become particularly important. Traditional anomaly detection methods often rely on complex physical models or a large amount of manual experience, and have problems such as low detection efficiency and poor accuracy. In recent years, autoencoders, as an important tool in deep learning, have been widely used in the field of anomaly detection due to their powerful feature extraction capabilities and abnormal feature location capabilities. However, when using autoencoders alone for anomaly detection, there is still the problem of unstable detection results. Therefore, how to achieve accurate and efficient anomaly detection and problem location is a technical problem that urgently needs to be solved in this field. Summary of the invention
[0003] The purpose of the present invention is to provide an industrial equipment anomaly detection method based on Mahalanobis distance metric autoencoder to solve the above technical problems.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] The present invention discloses an industrial equipment anomaly detection method based on a Mahalanobis distance metric autoencoder, the method comprising the following steps:
[0006] Step 1, collecting historical operation data and preprocessing: collecting historical operation data of industrial equipment under normal working conditions, wherein the historical operation data includes a plurality of feature data, and then preprocessing the collected historical operation data;
[0007] Step 2: Build an autoencoder model: Use the preprocessed historical running data to build an autoencoder model, that is, add Gaussian noise to the original data and then add noise through the Dropout layer, use the noisy data as the input of the autoencoder model, and use the original data as the label for supervised training, so that it can restore the original data;
[0008] Step 3, calculating the Mahalanobis distance of the reconstruction error of the historical operation data: for the preprocessed historical operation data, using the autoencoder model to calculate the reconstruction error between the input and the output, calculating the statistical parameters of the reconstruction error based on the reconstruction error, and using the statistical parameters to calculate the Mahalanobis distance of the reconstruction error of the historical operation data;
[0009] Step 4, real-time data point anomaly detection: Analyze the Mahalanobis distance distribution characteristics of historical operation data, and select the confidence threshold according to the Mahalanobis distance distribution characteristics and the needs of anomaly detection; for new data points collected in real time, first obtain their reconstruction value and reconstruction error through the autoencoder model, and then use the statistical parameters calculated in step 3 to calculate the Mahalanobis distance of the reconstruction error of the new data point, and compare the Mahalanobis distance of the reconstruction error of the new data point with the confidence threshold to determine whether the new data point is abnormal;
[0010] Step 5. Attribution analysis of industrial equipment anomalies: Analyze the contribution of the reconstruction error of abnormal real-time data on each feature data, that is, by analyzing the reconstruction error of each feature data, calculate the contribution of each feature data to the abnormal state of the industrial equipment, and then determine the feature data that causes the industrial equipment anomaly based on the contribution of each feature data to the abnormal state of the industrial equipment to locate the problem.
[0011] Furthermore, the historical operating data collected under normal working conditions of the industrial equipment in step 1 is required to cover no less than 80% of normal operating conditions; the multiple characteristic data are: lifting speed, excitation current, armature current, upper pulley temperature, spindle temperature, hall temperature, main motor vibration, drum vibration, and reducer vibration.
[0012] Furthermore, the preprocessing in step 1 includes data cleaning and normalization processing; the data cleaning is to clean the data and remove missing values and outliers; the normalization processing is to perform Min-Max normalization operation on the data, and the calculation formula is:
[0013]
[0014] In the formula, X is the original data; X min is the minimum value of the data; X max is the maximum value of the data; X norm is the normalized data.
[0015] Furthermore, the formula for adding Gaussian noise to the original data in step 2 is:
[0016]
[0017] In the formula, x is the original data vector [x 1 ,x 2 ,…,x m ]; n is a noise vector with the same dimension as x, and each element n i It follows a Gaussian distribution with a mean of 0 and a variance of 0.04, that is is the data vector after adding Gaussian noise;
[0018] The formula for adding noise through the Dropout layer is:
[0019]
[0020] In the formula, is the data vector after noise is added by the Dropout layer; ⊙ represents element-by-element multiplication; M represents the mask matrix.
[0021] Furthermore, the reconstruction error between input and output calculated by using the autoencoder model in step 3 is specifically: for each historical running data point x i , the reconstruction value is calculated through the autoencoder model Then the reconstruction error e is obtained i for:
[0022]
[0023] The statistical parameters of the reconstruction error are calculated based on the reconstruction error. Specifically, the reconstruction error of all historical operation data is statistically analyzed to obtain the statistical parameters of the reconstruction error, including the mean vector μ e and the covariance matrix Σ e ;
[0024] Mean vector μ e That is, the average value of the reconstruction error of all historical running data, and the calculation formula is:
[0025]
[0026] Covariance matrix Σ e The calculation formula is:
[0027]
[0028] Where n is the number of historical operation data points;
[0029] The calculation formula of the Mahalanobis distance of the historical operation data reconstruction error calculated by using statistical parameters is:
[0030]
[0031] Where D M The Mahalanobis distance of the reconstruction error for historical operation data; is the inverse of the covariance matrix.
[0032] Furthermore, the confidence threshold selected in step 4 is specifically: selecting a confidence threshold τ of 99%;
[0033] The reconstruction value and reconstruction error obtained by the autoencoder model are specifically as follows: for a new data point x collected in real time new, first through normalization processing, and then through the autoencoder model to obtain its reconstruction value Then the reconstruction error e is obtained according to the calculation formula new for:
[0034]
[0035] The Mahalanobis distance for calculating the reconstruction error of the new data point is specifically: using the calculated mean vector μ e and the covariance matrix Σ e , calculate the Mahalanobis distance D of the reconstruction error of the new data point M,new for:
[0036]
[0037] The method of determining whether a new data point is abnormal is specifically as follows: the Mahalanobis distance D of the reconstruction error of the calculated new data point is calculated. M,new Compared with the threshold τ, if D M,new >τ, then the data point is considered abnormal; if D M,new ≤τ, then the data point is considered normal.
[0038] Furthermore, the formula for calculating the contribution of each characteristic data to the abnormal state of the industrial equipment in step 5 is:
[0039]
[0040] In the formula, e new,i is the reconstruction error of the i-th feature data; is the reconstruction error of all feature data, d is the number of feature data; C i is the contribution of the i-th feature data.
[0041] The beneficial effects of the present invention are as follows: the industrial equipment anomaly detection method based on Mahalanobis distance metric autoencoder described in the present invention can significantly improve the accuracy of industrial equipment anomaly detection and adapt to changing working conditions. Compared with the general autoencoder anomaly detection method, the method of the present invention enhances the ability of the autoencoder to restore the corresponding normal data from the abnormal input data by adding Gaussian noise to the input data and adding noise through the Dropout layer during the autoencoder model construction and training stage; at the same time, the Mahalanobis distance is used to measure the reconstruction error of the autoencoder, making anomaly detection more accurate. The method of the present invention improves the accuracy and timeliness of the anomaly detection effect of industrial equipment, can effectively detect equipment anomalies, and has broad industrial application potential.
[0042] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flow chart of the method of the present invention;
[0044] Figure 2 The Mahalanobis distance distribution histogram of the historical operation data reconstruction error of Example 1;
[0045] Figure 3 This is a histogram of the contribution of each feature reconstruction error in Example 1. DETAILED DESCRIPTION
[0046] The present invention discloses an industrial equipment anomaly detection method based on Mahalanobis distance metric autoencoder, such as Figure 1 As shown, the method comprises the following steps:
[0047] Step 1. Collect historical operating data and perform preprocessing: Collect historical operating data of industrial equipment under normal working conditions, including lifting speed, excitation current, armature current, upper wheel temperature, spindle temperature, hall temperature, main motor vibration, drum vibration, reducer vibration and other characteristic data. The collected historical operating data is required to cover most (not less than 80%) normal operating conditions. In principle, it is best to cover all normal operating conditions, but it is difficult to achieve in actual industrial scenarios. Then preprocess the collected historical operating data, including data cleaning, normalization, etc., to ensure data quality. Among them, data cleaning is to clean the data and remove missing values, outliers, etc.; normalization is to perform Min-Max normalization operations on the data, and the calculation formula is:
[0048]
[0049] In the formula, X is the original data; X min is the minimum value of the data; X max is the maximum value of the data; X norm is the normalized data.
[0050] Step 2: Construct an autoencoder model: Use the preprocessed historical running data to construct an autoencoder model, that is, add Gaussian noise to the original data (preprocessed historical running data) and then add noise through the Dropout layer, use the noisy data as the input of the autoencoder, and use the original data as the label for supervised training, so that it can restore the original data as much as possible.
[0051] Specifically, the formula for adding Gaussian noise to the original data vector x is:
[0052]
[0053] In the formula, x is the original data vector [x 1 ,x 2 ,…,xm ]; n is a noise vector with the same dimension as x, and each element n i It follows a Gaussian distribution with a mean of 0 and a variance of 0.04, that is is the data vector after adding Gaussian noise.
[0054] The formula for adding Gaussian noise and then adding noise by the Dropout layer is:
[0055]
[0056] In the formula, is the data vector after noise is added by the Dropout layer; ⊙ represents element-by-element multiplication; M represents the mask matrix.
[0057] Step 3. Calculate the Mahalanobis distance of the reconstruction error of the historical operation data: For the preprocessed historical operation data, use the constructed autoencoder model to calculate the reconstruction error between the input and the output, and then calculate the statistical parameters of the reconstruction error (including the mean vector and the covariance matrix) based on the reconstruction error, and use the statistical parameters to calculate the Mahalanobis distance of the reconstruction error of the historical operation data.
[0058] The specific steps include:
[0059] Step 31: For each historical running data point x i , the reconstruction value is calculated through the autoencoder model Then the reconstruction error e is obtained i for:
[0060]
[0061] Step 32: Perform statistical analysis on the reconstruction errors of all historical operation data to obtain statistical parameters of the reconstruction errors, including the mean vector μ e and the covariance matrix Σ e , the mean vector μ e and the covariance matrix Σ e The calculation formula is as follows:
[0062] Mean vector μ e That is, the average value of the reconstruction error of all historical running data, and the calculation formula is:
[0063]
[0064] Covariance matrix Σ e The calculation formula is:
[0065]
[0066] Where n is the number of historical operation data points;
[0067] Step 33: After calculating the statistical parameters of the reconstruction error of the historical operation data (including the mean vector μ e and the covariance matrix Σ e ) Then, the Mahalanobis distance D of the historical operation data reconstruction error is calculated using statistical parameters M , the calculation formula is:
[0068]
[0069] In the formula, is the inverse of the covariance matrix.
[0070] Step 4: Real-time data point anomaly detection: Analyze the Mahalanobis distance distribution characteristics of the historical operation data reconstruction error, and select a 99% confidence threshold τ based on the Mahalanobis distance distribution characteristics and the needs of anomaly detection.
[0071] For a new data point x collected in real time, it is first normalized and then input into the trained new
[0072] The autoencoder model obtains its reconstruction value Then, according to the calculation formula, the reconstruction error e of the new data point is obtained as:
[0073] new
[0074]
[0075] Using the previously calculated mean vector μ e and the covariance matrix Σ e , calculate the Mahalanobis distance D of the reconstruction error of the new data point M,new for:
[0076]
[0077] Then the Mahalanobis distance D of the reconstruction error of the calculated new data point is M,new Compared with the threshold τ, if D M,new If the threshold is exceeded, the data point is considered abnormal; otherwise, the data point is considered normal. M,new >τ, then the data point is considered abnormal; if D M,new ≤τ, then the data point is considered normal.
[0078] Step 5: Analysis of the cause of industrial equipment anomaly: Analyze the contribution of the reconstruction error of abnormal real-time data on each feature data, that is, by analyzing the reconstruction error of each feature data, calculate the contribution of each feature data to the abnormal state of the industrial equipment. The contribution calculation formula is:
[0079]
[0080] In the formula, e new,i is the reconstruction error of the i-th feature data; is the reconstruction error of all feature data, d is the number of feature data; C i is the contribution of the i-th feature data, expressed as the ratio of the absolute value of the reconstruction error of the feature data to the absolute value of the total reconstruction error. The greater the contribution, the greater the impact of the feature data on the abnormal state of the industrial equipment.
[0081] By analyzing the contribution of the reconstruction error of abnormal real-time data to each feature data, a feature contribution graph is generated. The feature contribution graph can intuitively show which feature data contributes most to the abnormal state of industrial equipment. According to the feature contribution graph, the main feature data that causes the abnormality of industrial equipment can be located, thereby helping maintenance personnel to quickly locate the problem.
[0082] Embodiment 1
[0083] This embodiment takes a hoist as an example, which is a specific application example of the above method.
[0084] This embodiment collects historical operating data of the elevator under normal working conditions, including lifting speed_1, excitation current, armature current, upper sheave temperature, main shaft temperature, hall temperature, lifting speed_2, drum east side vibration, drum west side vibration, reducer east side vibration, reducer west side vibration, main motor east side vibration, main motor west side vibration, and pre-processes the collected data.
[0085] The autoencoder model is constructed using the preprocessed historical running data. For the preprocessed historical running data, the constructed autoencoder model is used to calculate the reconstruction error between the input and output, and the statistical parameters of the reconstruction error (including the mean vector and the covariance matrix) are calculated based on the reconstruction error, and the Mahalanobis distance of the reconstruction error of the historical running data is calculated using the statistical parameters.
[0086] like Figure 2 As shown, the Mahalanobis distance distribution characteristics of historical operation data are analyzed, and according to the Mahalanobis distance distribution characteristics and the needs of anomaly detection, the 99% confidence threshold is selected as 6.63. For new data points collected in real time, the Mahalanobis distance of the reconstruction error of the new data point is calculated to determine whether the Mahalanobis distance of the reconstruction error of the new data point exceeds the 99% confidence threshold. If it is greater than the threshold, the new data point is determined to be abnormal, otherwise, the new data point is determined to be normal.
[0087] By analyzing the contribution of the reconstruction error of abnormal real-time data to each feature data, a feature contribution graph is generated. This embodiment uses a histogram to display the size of the contribution, such as Figure 3As shown in the figure, f1~f13 represent lifting speed_1, excitation current, armature current, upper pulley temperature, spindle temperature, hall temperature, lifting speed_2, drum east side vibration, drum west side vibration, reducer east side vibration, reducer west side vibration, main motor east side vibration, main motor west side vibration. The greater the feature contribution, the more obvious the impact of the feature on the abnormality. As can be seen from the figure, f9 "drum west side vibration" is the feature with the greatest impact on the abnormality, which can realize the problem location.
[0088] Finally, it should be noted that the above is only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred arrangement scheme, a person skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for detecting anomalies of industrial equipment based on Mahalanobis distance metric autoencoder, characterized in that: The method comprises the following steps: Step 1, collecting historical operation data and preprocessing: collecting historical operation data of industrial equipment under normal working conditions, wherein the historical operation data includes a plurality of feature data, and then preprocessing the collected historical operation data; Step 2: Build an autoencoder model: Use the preprocessed historical running data to build an autoencoder model, that is, add Gaussian noise to the original data and then add noise through the Dropout layer, use the noisy data as the input of the autoencoder model, and use the original data as the label for supervised training, so that it can restore the original data; Step 3, calculating the Mahalanobis distance of the reconstruction error of the historical operation data: for the preprocessed historical operation data, using the autoencoder model to calculate the reconstruction error between the input and the output, calculating the statistical parameters of the reconstruction error based on the reconstruction error, and using the statistical parameters to calculate the Mahalanobis distance of the reconstruction error of the historical operation data; Step 4, real-time data point anomaly detection: Analyze the Mahalanobis distance distribution characteristics of historical operation data, and select the confidence threshold according to the Mahalanobis distance distribution characteristics and the needs of anomaly detection; for new data points collected in real time, first obtain their reconstruction value and reconstruction error through the autoencoder model, and then use the statistical parameters calculated in step 3 to calculate the Mahalanobis distance of the reconstruction error of the new data point, and compare the Mahalanobis distance of the reconstruction error of the new data point with the confidence threshold to determine whether the new data point is abnormal; Step 5. Attribution analysis of industrial equipment anomalies: Analyze the contribution of the reconstruction error of abnormal real-time data on each feature data, that is, by analyzing the reconstruction error of each feature data, calculate the contribution of each feature data to the abnormal state of the industrial equipment, and then determine the feature data that causes the industrial equipment anomaly based on the contribution of each feature data to the abnormal state of the industrial equipment to locate the problem.
2. The method for detecting anomalies of industrial equipment based on Mahalanobis distance metric autoencoder according to claim 1, characterized in that: The historical operating data collected under normal working conditions of the industrial equipment in step 1 is required to cover no less than 80% of normal operating conditions; the multiple characteristic data are: lifting speed, excitation current, armature current, upper pulley temperature, spindle temperature, hall temperature, main motor vibration, drum vibration, and reducer vibration.
3. The method for detecting anomalies of industrial equipment based on Mahalanobis distance metric autoencoder according to claim 2, characterized in that: The preprocessing in step 1 includes data cleaning and normalization processing; the data cleaning is to clean the data and remove missing values and outliers; the normalization processing is to perform Min-Max normalization operation on the data, and the calculation formula is: In the formula, X is the original data; X min is the minimum value of the data; X max is the maximum value of the data; X norm is the normalized data.
4. The method for detecting anomalies of industrial equipment based on Mahalanobis distance metric autoencoder according to claim 3, characterized in that: The formula for adding Gaussian noise to the original data in step 2 is: Where x is the original data vector [x1,x2,…,x m ]; n is a noise vector with the same dimension as x, and each element n i It follows a Gaussian distribution with a mean of 0 and a variance of 0.04, that is is the data vector after adding Gaussian noise; The formula for adding noise through the Dropout layer is: In the formula, is the data vector after noise is added by the Dropout layer; ⊙ represents element-by-element multiplication; M represents the mask matrix.
5. The method for detecting anomalies of industrial equipment based on Mahalanobis distance metric autoencoder according to claim 4, characterized in that: The reconstruction error between input and output calculated using the autoencoder model in step 3 is as follows: for each historical running data point x i , the reconstruction value is calculated through the autoencoder model Then the reconstruction error e is obtained i for: The statistical parameters of the reconstruction error are calculated based on the reconstruction error. Specifically, the reconstruction error of all historical operation data is statistically analyzed to obtain the statistical parameters of the reconstruction error, including the mean vector μ e and the covariance matrix Σ e ; Mean vector μ e That is, the average value of the reconstruction error of all historical running data, and the calculation formula is: Covariance matrix Σ e The calculation formula is: Where n is the number of historical operation data points; The calculation formula of the Mahalanobis distance of the historical operation data reconstruction error calculated by using statistical parameters is: Where D M The Mahalanobis distance of the reconstruction error for historical operation data; is the inverse of the covariance matrix.
6. The method for detecting anomalies of industrial equipment based on Mahalanobis distance metric autoencoder according to claim 5, characterized in that: The step 4 of selecting the confidence threshold is as follows: selecting a confidence threshold τ of 99%; The reconstruction value and reconstruction error obtained by the autoencoder model are specifically as follows: for a new data point x collected in real time new , first through normalization processing, and then through the autoencoder model to obtain its reconstruction value Then the reconstruction error e is obtained according to the calculation formula new for: The Mahalanobis distance for calculating the reconstruction error of the new data point is specifically: using the calculated mean vector μ e and the covariance matrix Σ e , calculate the Mahalanobis distance D of the reconstruction error of the new data point M,new for: The method of determining whether a new data point is abnormal is specifically as follows: the Mahalanobis distance D of the reconstruction error of the calculated new data point is calculated. M,new Compared with the threshold τ, if D M,new >τ, then the data point is considered abnormal; if D M,new ≤τ, then the data point is considered normal.
7. The method for detecting anomalies of industrial equipment based on Mahalanobis distance metric autoencoder according to claim 6, characterized in that: The formula for calculating the contribution of each characteristic data to the abnormal state of the industrial equipment in step 5 is: In the formula, e new,i is the reconstruction error of the i-th feature data; is the reconstruction error of all feature data, d is the number of feature data; C i is the contribution of the i-th feature data.
Citation Information
Cited By
Method, device and equipment for detecting abnormity of equipment along mining railway, and medium
CN121167565A