Motor data anomaly detection method based on Internet of Things
By calculating the degree of abnormality of motor data and the data set of the adaptive HOBS algorithm, the problem of low motor data detection accuracy within a fixed time period is solved, more accurate abnormality detection is achieved, and the adaptability to changes in time series data is enhanced.
Patent Information
- Application Number
- CN202411036193.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-31
AI Technical Summary
When the existing technology uses motor data within a fixed period of time for abnormality detection, it is unable to capture changes in motor data distribution, resulting in a decrease in the accuracy of abnormality detection.
The motor data anomaly detection method based on the Internet of Things is used to calculate the abnormality degree of the motor data, adapt the data set in the HOBS anomaly detection algorithm, adjust the data set during detection according to the real-time distribution of the motor data, and use the data in each dimension The anomalies are corrected and summed to improve the accuracy of anomaly detection.
It improves the accuracy of anomaly detection results, avoids the influence of noise, enhances the adaptability to changes in time series data, and reduces false negatives and false positives.
Smart Images

Figure CN118585753B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and more specifically, to a method for detecting abnormal motor data based on the Internet of Things. Background Art
[0002] The development of permanent magnet and electromagnetic hybrid excitation drive motors for new energy vehicles is an important part of the technological progress of electric vehicles. It combines the high efficiency of permanent magnet motors and the adjustability of electromagnetic motors, bringing significant performance improvements and economy to the power system of electric vehicles. In order to improve its safety, abnormal detection of its motor data is particularly important.
[0003] The patent document with the current authorization announcement number CN117170995B discloses an interference anomaly detection method, device, equipment and medium based on performance indicators, by obtaining the current performance indicators and historical histogram data; generating target histogram data according to the HBOS algorithm and the performance indicators; determining target evaluation data according to the target histogram data and the historical histogram data; and determining whether the performance indicators are abnormal based on the target evaluation data. Since the historical histogram data is the histogram data generated by the normal performance indicators in the past, it can well reflect whether the target histogram data is abnormal. Therefore, the target evaluation data that can correctly reflect the state of the target histogram data is obtained through the historical histogram data and the target histogram data, so as to efficiently and accurately determine whether the performance indicators are abnormal according to the target evaluation data.
[0004] Since the motor data is time series data, its data distribution will change with time. Therefore, when the HOBS anomaly detection algorithm in the above method is used and the motor data within a fixed time period is used as a data set for anomaly detection, the changes in the motor data distribution may not be captured, resulting in a decrease in the accuracy of anomaly detection. Summary of the invention
[0005] In order to solve the problem that when the motor data in a fixed time period is used as a data set for anomaly detection, the change of the motor data distribution may not be captured, thereby causing the accuracy of anomaly detection to decrease, the present invention proposes a motor data anomaly detection method based on the Internet of Things, which includes the following steps:
[0006] Collecting data of each motor, wherein the data of each motor includes data of several dimensions;
[0007] Obtain the abnormality of each dimension of each motor data, where the abnormality represents a sudden change in the dimension data; the formula for calculating the degree of abnormal performance of each motor data is:
[0008] , where represents the degree of abnormal performance of the i-th motor data; represents the abnormality of the j-th dimension data of the i-th motor data; represents the abnormal mean of all local dimension data of the j-th dimension data of the i-th motor data; J represents the number of dimension data types of the motor data; norm() represents the linear normalization function;
[0009] An initial time period is preset, and suspected abnormal data is obtained according to the abnormal performance degree of each motor data in the initial time period. The initial time period is iterated based on the ratio of the number of suspected abnormal data to the number of motor data in the initial time period to obtain an optimal time period; and abnormality detection is performed on each motor data in the optimal time period.
[0010] The innovation of the present invention lies in that according to the abnormal performance degree of the motor data, the data set in the HOBS abnormal detection algorithm is effectively adaptive, and the data set during abnormal detection can be adjusted according to the real-time distribution of the motor data, which can better adapt to the changes in the time series data and improve the abnormal detection results. Furthermore, the abnormal performance degree of each motor data is based on the characteristics of each dimension of the motor data, whether it is noise or abnormal data, and the abnormality of each dimension of the data is corrected and summed, so that the abnormal performance degree of each motor data is more accurate and the influence of noise is avoided. Furthermore, the abnormality of each dimension of the data of each motor data is obtained based on the mutation of each dimension of the data, which is used to measure the abnormality of the dimensional data more accurately.
[0011] Preferably, the step of obtaining the abnormality of each dimension of each motor data includes:
[0012] Obtaining data sequences of each dimension of all motor data and fitting curves of data of each dimension of all motor data; obtaining fitting curves of data of each dimension of each motor data;
[0013] ;
[0014] In the formula, represents the abnormality of the j-th dimension data of the i-th motor data; represents the sequence number of the j-th dimension data of the i-th motor data in the j-th dimension data sequence of all motor data; w represents the number of preset data; The fitting curve representing the j-th dimension data of the i-th motor data; Represents the fitting curve of the j-th dimension data of all motor data.
[0015] The more abnormal the dimension data is, the more likely it is to be abnormal data, so as to facilitate the subsequent weighted summation of the abnormalities of each dimension data of each motor data to obtain the degree of abnormal performance of each motor data.
[0016] Preferably, the step of obtaining the data sequences of each dimension of all motor data and the fitting curves of the data of each dimension of all motor data includes:
[0017] The j-th dimension data of all motor data are sorted in the order of motor data acquisition time to obtain the j-th dimension data sequence of all motor data, and the data in the j-th dimension data sequence of all motor data are curve fitted using the least squares method to obtain the fitting curve of the j-th dimension data of all motor data.
[0018] Preferably, the step of obtaining a fitting curve of each dimension of each motor data includes:
[0019] Preset the number of data w, obtain the first w data and the last w data of the j-dimensional data of the ith motor data in the j-dimensional data sequence of all motor data as the small range sequence of the j-dimensional data of the ith motor data, use the least squares method to perform curve fitting on the dimensional data in the small range sequence of the j-dimensional data of the ith motor data, and obtain the fitting curve of the j-dimensional data of the ith motor data.
[0020] Preferably, the acquisition of the local dimension data includes:
[0021] Preset the number of local data n, obtain the first n data and the last n data of the j-th dimension data of the ith motor data in the j-th dimension data sequence of all motor data, and record them as the local dimension data of the j-th dimension data of the ith motor data.
[0022] The abnormality of the local dimensional data of the noise point is small, and the abnormality of the local dimensional data of the abnormal dimensional data is large. Therefore, the noise point and the abnormal data can be distinguished according to the abnormality of the local dimensional data.
[0023] Preferably, the preset initial time period, obtaining suspected abnormal data according to the abnormal performance degree of each motor data in the initial time period, iterating the initial time period based on the ratio of the number of the suspected abnormal data to the number of motor data in the initial time period, and obtaining the optimal time period, comprises:
[0024] The initial time period is preset to r seconds. According to the order of the motor data sequence from back to front, the motor data in the initial time period is recorded as the initial motor data. The abnormal performance degree of all the initial motor data is segmented using the Otsu threshold segmentation method. The initial motor data corresponding to the category with a high abnormal performance degree is recorded as suspected abnormal data. If the number of suspected abnormal data accounts for one tenth of the number of initial motor data, the initial time period is taken as the optimal time period. Otherwise, the initial time period is increased by c seconds and then judged until the number of suspected abnormal data accounts for one tenth of the initial motor data.
[0025] According to the abnormal performance of the motor data, the data set in the HOBS anomaly detection algorithm is effectively adapted. The data set during anomaly detection can be adjusted according to the real-time distribution of the motor data, which can better adapt to the changes in time series data and improve the anomaly detection results.
[0026] Preferably, the abnormality detection of each motor data in the optimal time period includes:
[0027] According to the order of the motor data sequence from back to front, the HBOS algorithm is used to detect abnormalities in the motor data in the optimal time period. If the latest motor data in the optimal time period is abnormal, the motor is abnormal at this time.
[0028] Anomaly detection is performed on motor data in the optimal time period, which improves the anomaly detection results.
[0029] Preferably, the collecting of data of each motor includes:
[0030] Current sensors, voltage sensors, temperature sensors, vibration sensors, speed sensors and magnetic flux sensors are installed on the motor equipment. Every second is a sampling moment. Each time, data of six dimensions, namely, current data, voltage data, temperature data, vibration data, speed data and magnetic flux data, are collected simultaneously. The data is collected for a total of one hour. The data of six dimensions, namely, current data, voltage data, temperature data, vibration data, speed data and magnetic flux data, at each sampling moment are recorded as one motor data.
[0031] The present invention has the following beneficial effects: according to the abnormal performance degree of the motor data, the data set in the HOBS abnormality detection algorithm can be effectively adapted, the data set during abnormal detection can be adjusted according to the real-time distribution of the motor data, and the changes in the time series data can be better adapted, thereby improving the abnormality detection results. Furthermore, the abnormal performance degree of each motor data is calculated by summing up the abnormality of each dimensional data after correction according to the characteristics of each dimensional data of each motor data, whether it is noise or abnormal data, so that the abnormal performance degree of each motor data is more accurate and the influence of noise is avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0033] Figure 1 It is a flowchart of the steps of a motor data anomaly detection method based on the Internet of Things according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0035] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0036] See also Figure 1 , which shows a flowchart of a method for detecting abnormal motor data based on the Internet of Things provided by an embodiment of the present invention, the method comprising the following steps:
[0037] S001, collect motor data.
[0038] In an embodiment of the present invention, a current sensor, a voltage sensor, a temperature sensor, a vibration sensor, a speed sensor and a magnetic flux sensor are installed on the motor, and a sampling moment is taken every second. Each time, data of six dimensions, namely, current data, voltage data, temperature data, vibration data, speed data and magnetic flux data, are collected simultaneously, and the data is collected for a total of one hour. The six dimensions of data, namely, current data, voltage data, temperature data, vibration data, speed data and magnetic flux data at each sampling moment are recorded as one motor data. It should be noted that each motor data has six dimensions of data.
[0039] It should be noted that, since the quality inspection of different dimensional data of the motor data has the problem of inconsistent dimensions, it is necessary to normalize the different dimensional data of the motor data so that all dimensional data of the motor data are converted to the same scale to eliminate the influence of the dimension. Therefore, in an embodiment of the present invention, the maximum and minimum value normalization method is adopted to normalize each dimensional data of all motor data. It should be noted that all subsequent calculations use the normalized values of each dimensional data of each motor data.
[0040] S002, obtaining the abnormality of each dimension data of each motor data.
[0041] It should be noted that, because the motor data is time series data, its data distribution will change with time. Therefore, when the HOBS anomaly detection algorithm is used to perform anomaly detection on the motor data within a fixed time period as a data set, the change in the distribution of the motor data may not be captured, resulting in a decrease in the accuracy of anomaly detection. For example, if there are many abnormal data in the motor data within a fixed time period, the abnormal data may be detected as normal. Therefore, the present invention estimates the abnormal situation of the motor data within the time period, and then adaptively obtains the data set for anomaly detection by iterating the size of the time period, so that the proportion of abnormal data in the data set to the total motor data is small, thereby reducing the problem of underreporting and false alarms, and improving the flexibility and accuracy of anomaly detection. Therefore, it is first necessary to obtain the abnormal performance degree of each motor data, that is, the possibility of motor abnormality at a certain moment, and it is necessary to analyze the abnormality of each dimension of each motor data, and then obtain the abnormal performance degree of each motor data through the abnormality of each dimension of each motor data.
[0042] It should be further explained that, when analyzing the data of any dimension of all motor data, in a single dimension, the abnormal dimensional data is manifested as a local mutation, and the mutation will greatly affect the fitting process of the time series data for curve fitting. The appearance of the mutation will cause the fitting error in the local range where the extreme point appears to increase significantly; when fitting the data again, the range of the fitting data will also affect the size of the fitting error. For example, for a mutation point in a smaller fitting range and a larger fitting range, the fitting error in the smaller fitting range must be smaller than the fitting error in the larger fitting range. Because when the data in the smaller fitting range is curve fitted, the curve fitting can consider the value of each data more carefully, and its fitting error is relatively small, while when the data in the larger fitting range is fitted, it is necessary to integrate the values of many points, so the fitting error at the mutation point will be very large. In summary, a larger fitting range and a smaller fitting range are used to fit the curve for each dimension of each motor data. The area difference between the two fitting curves and the horizontal axis reflects the mutation of each dimension of each motor data. The larger the difference, the greater the mutation, indicating that the dimensional data is more abnormal.
[0043] In an embodiment of the present invention, the j-th dimension data of all motor data are sorted in the order of motor data acquisition time to obtain the j-th dimension data sequence of all motor data, and the least squares method is used to perform curve fitting on the data in the j-th dimension data sequence of all motor data to obtain the fitting curve of the j-th dimension data of all motor data.
[0044] Obtain the first w data and the last w data of the j-dimensional data of the ith motor data in the j-dimensional data sequence of all motor data as the small range sequence of the j-dimensional data of the ith motor data, and use the least squares method to perform curve fitting on the data in the small range sequence of the j-dimensional data of the ith motor data to obtain the fitting curve of the j-dimensional data of the ith motor data. In an embodiment of the present invention, the preset number of data w=5. In other embodiments, the implementer may preset the value of the number of data w according to the specific implementation method. It should be noted that for the data on the edge of the j-dimensional data sequence of all motor data, if the front or back data does not meet the data number w, it is padded with 0.
[0045] Get the abnormality of the j-th dimension data of the i-th motor data:
[0046] ;
[0047] In the formula, represents the abnormality of the j-th dimension data of the i-th motor data; represents the sequence number of the j-th dimension data of the i-th motor data in the j-th dimension data sequence of all motor data; w represents the number of preset data; || represents the absolute value symbol; The fitting curve representing the j-th dimension data of the i-th motor data; The fitting curve representing the j-th dimension data of all motor data; The larger the value of is, the more abnormal the j-th dimension data of the i-th motor data is.
[0048] Similarly, obtain the abnormality of each dimension of each motor data.
[0049] S003, after correcting the abnormality of each dimension data of each motor data according to the credibility of each dimension data of each motor data, the abnormal performance degree of each motor data is obtained.
[0050] It should be noted that after summing up the abnormality of each dimensional data of any motor data, it can represent the abnormal performance degree of the motor data. However, since the calculation of the abnormality of each dimensional data of each motor data is based on the mutation of the data, and during the data collection process, due to the problem of the accuracy of the sensor itself, there may be noise in the dimensional data, and the noise often manifests as a mutation of the data, it is necessary to weight the abnormality of each dimensional data of the motor data according to the credibility of each dimensional data of the motor data and then sum it as the abnormal performance degree of the motor data. Since when abnormal dimensional data appears, its local dimensional data will also be abnormal, the abnormality value of the local dimensional data of the abnormal dimensional data is relatively large, and the noise is isolated and random. Therefore, when the noise appears, its local dimensional data is not abnormal data. Therefore, the abnormality value of the local dimensional data of the noise data is relatively small. The credibility of each dimensional data of each motor data is obtained according to this feature to weight its abnormality.
[0051] In an embodiment of the present invention, the number of local data n is preset, and the first n data and the last n data of the j-th dimension data of the ith motor data in the j-th dimension data sequence of all motor data are obtained, which are recorded as the local dimension data of the j-th dimension data of the ith motor data. In an embodiment of the present invention, the number of local data n is preset to 3. In other embodiments, the implementer may preset the value of the number of local data n according to the specific implementation method.
[0052] Get the abnormal performance degree of the i-th motor data:
[0053] ;
[0054] In the formula, represents the degree of abnormal performance of the i-th motor data; represents the abnormality of the j-th dimension data of the i-th motor data; represents the abnormality mean of all local dimension data of the j-th dimension data of the i-th motor data; J represents the number of dimension data types of the motor data; Represents the credibility of the j-th dimension data of the i-th motor data. The larger the value, the more likely the j-th dimension data of the i-th motor data is to be abnormal data. Otherwise, it is a noise point. represents the value of the weighted sum of the abnormality of each dimension of the i-th motor data. The larger the value, the more abnormal the i-th motor data is; norm() represents the linear normalization function, which is used to Perform normalization.
[0055] S004, adaptively acquiring the motor data in the optimal time period to perform abnormality detection according to the abnormality degree of each motor data.
[0056] It should be noted that the HBOS algorithm reflects whether the current motor equipment has an abnormality by performing anomaly detection on the latest motor data. Therefore, it is necessary to obtain motor data in a fixed time period from the motor data before the latest motor data for anomaly detection. When the motor data within a fixed time period is used as the data set for anomaly detection, it may not be possible to capture changes in the distribution of motor data, resulting in a decrease in the accuracy of anomaly detection. For example, if there are many abnormal data in the motor data within a fixed time period, the abnormal data may be detected as normal. Therefore, the number of abnormal data in the data set participating in HBOS cannot be too large, so that the algorithm can accurately identify abnormal data. Therefore, it is necessary to set an initial time period, and judge the suspected abnormal data in the current initial time period according to the abnormal performance of the motor data in the initial time period, and adapt the initial time period according to the number of suspected abnormal data, obtain the data set in the optimal time period for anomaly detection, and judge whether the latest motor data is abnormal.
[0057] In an embodiment of the present invention, an initial time period is preset to r seconds, and the motor data in the initial time period is recorded as initial motor data in the order of the motor data sequence from back to front. The abnormal performance degree of all initial motor data is segmented using the Otsu threshold segmentation method, and the initial motor data corresponding to a class with a high degree of abnormal performance is recorded as suspected abnormal data. If the number of suspected abnormal data accounts for one tenth of the number of initial motor data, the initial time period is taken as the optimal time period. Otherwise, the initial time period is increased by c seconds for judgment, and the iteration is stopped until the number of suspected abnormal data accounts for one tenth of the initial motor data.
[0058] According to the order of the motor data sequence from back to front, the motor data in the optimal time period is obtained for abnormality detection. If the latest motor data in the optimal time period is abnormal, the motor is abnormal at this time.
[0059] The innovation of the present invention lies in that according to the abnormal performance degree of the motor data, the data set in the HOBS abnormal detection algorithm is effectively adaptive, and the data set during abnormal detection can be adjusted according to the real-time distribution of the motor data, which can better adapt to the changes in the time series data and improve the abnormal detection results. Furthermore, the abnormal performance degree of each motor data is based on the characteristics of each dimension of the motor data, whether it is noise or abnormal data, and the abnormality of each dimension of the data is corrected and summed, so that the abnormal performance degree of each motor data is more accurate and the influence of noise is avoided. Furthermore, the abnormality of each dimension of the data of each motor data is obtained based on the mutation of each dimension of the data, which is used to measure the abnormality of the dimensional data more accurately.
[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A motor data anomaly detection method based on the Internet of Things, characterized in that: include: Collecting data of each motor, wherein each motor data includes a plurality of data of each dimension; obtaining a data sequence of each dimension of all motor data and a fitting curve of the data of each dimension of all motor data; obtaining a fitting curve of the data of each dimension of each motor data; obtaining an abnormality of the data of each dimension of each motor data , Represents the sequence number of the j-th dimension data of the i-th motor data in the j-th dimension data sequence of all motor data; w represents the number of preset data; The fitting curve representing the j-th dimension data of the i-th motor data; The fitting curve of the j-th dimension data representing all motor data; the formula for calculating the abnormal performance degree of each motor data is: , The mean abnormality of all local dimension data of the j-th dimension data representing the i-th motor data; J represents the number of dimensional data types of motor data; norm() represents the linear normalization function; The initial time period is preset to r seconds. In the order of the motor data sequence from back to front, the motor data in the initial time period is recorded as the initial motor data. The abnormal performance degree of all the initial motor data is threshold-segmented, and the initial motor data corresponding to the category with a high abnormal performance degree is recorded as suspected abnormal data. If the number of suspected abnormal data accounts for one tenth of the number of initial motor data, the initial time period is the optimal time period. Otherwise, the initial time period is increased by c seconds and then judged until the number of suspected abnormal data accounts for one tenth of the initial motor data; abnormality detection is performed on each motor data in the optimal time period.
2. The method for detecting abnormal motor data based on the Internet of Things according to claim 1, characterized in that: The step of obtaining the data sequences of each dimension of all motor data and the fitting curves of the data of each dimension of all motor data includes: The j-th dimension data of all motor data are sorted in the order of motor data acquisition time to obtain the j-th dimension data sequence of all motor data, and the data in the j-th dimension data sequence of all motor data are curve fitted using the least squares method to obtain the fitting curve of the j-th dimension data of all motor data.
3. The method for detecting abnormal motor data based on the Internet of Things according to claim 1, characterized in that: The step of obtaining a fitting curve of each dimension of each motor data comprises: Preset the number of data w, obtain the first w data and the last w data of the j-dimensional data of the ith motor data in the j-dimensional data sequence of all motor data as the small range sequence of the j-dimensional data of the ith motor data, use the least squares method to perform curve fitting on the dimensional data in the small range sequence of the j-dimensional data of the ith motor data, and obtain the fitting curve of the j-dimensional data of the ith motor data.
4. The method for detecting abnormal motor data based on the Internet of Things according to claim 2, characterized in that: The acquisition of the local dimension data includes: Preset the number of local data n, obtain the first n data and the last n data of the j-th dimension data of the ith motor data in the j-th dimension data sequence of all motor data, and record them as the local dimension data of the j-th dimension data of the ith motor data.
5. The method for detecting abnormal motor data based on the Internet of Things according to claim 1, characterized in that: The abnormality detection of each motor data in the optimal time period includes: According to the order of the motor data sequence from back to front, the motor data in the optimal time period is obtained for abnormality detection. If the latest motor data in the optimal time period is abnormal, the motor is abnormal at this time.
6. The method for detecting abnormal motor data based on the Internet of Things according to claim 1, characterized in that: The collecting of data of each motor includes: Current sensors, voltage sensors, temperature sensors, vibration sensors, speed sensors and magnetic flux sensors are installed on the motor equipment. Every second is a sampling moment. Each time, data of six dimensions, namely, current data, voltage data, temperature data, vibration data, speed data and magnetic flux data, are collected simultaneously. The data is collected for a total of one hour. The data of six dimensions, namely, current data, voltage data, temperature data, vibration data, speed data and magnetic flux data, at each sampling moment are recorded as one motor data.
Citation Information
Patent Citations
Interference anomaly detection method, device, equipment and medium based on performance indicators
CN117170995B
Matching statistical wavelet-based photovoltaic power prediction method and device
CN115115137A
Rotor die-casting error detection system based on data analysis
CN117195137A
