Motor current anomaly judgment method constructed based on multiple anomaly detection algorithms
The motor current abnormality determination method constructed through multiple abnormality detection algorithms solves the problem that traditional motor fault diagnosis is difficult to achieve real-time monitoring, real-time monitoring and abnormal detection of motor current in wire making and re-baking production, ensuring production safety and efficiency.
Patent Information
- Application Number
- CN202411333654.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional motor fault diagnosis methods are difficult to achieve real-time monitoring and early warning, which affects the safety and efficiency of equipment in wire making and re-baking production.
The motor current abnormality determination method is constructed using a variety of abnormality detection algorithms. Through data preprocessing, feature extraction and multi-model fusion, the motor current data is monitored in real time, the motor status is judged and the motor status is alarmed.
Real-time monitoring and abnormal detection of motor current are realized, the safety of equipment and personnel in wire making and re-baking production is ensured, and the accuracy and timeliness of fault detection are improved.
Smart Images

Figure CN119128767A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of motor current anomaly detection control in the production process of a silk making and re-baking workshop, in particular to a motor current anomaly determination method based on multiple anomaly detection algorithms. Background Art
[0002] In the process of silk making and re-baking, motors are an important source of power for many equipment. The stable operation of motors plays a vital role in production safety, production efficiency, and product quality. In actual operation, motors are prone to failure due to factors such as long-term continuous operation, load changes, and improper maintenance. Some common motor failures include bearing damage, insulation aging, and current imbalance. If these failures are not discovered and handled in time, they will not only cause equipment downtime, but may also cause production accidents, resulting in significant economic losses and safety hazards. Therefore, it is crucial to achieve real-time monitoring and abnormality detection of motors for the production safety and efficiency of silk making and re-baking. Traditional motor fault diagnosis methods mainly rely on regular inspection and maintenance of equipment, as well as the operator's experience and judgment. These methods are not only time-consuming and labor-intensive, but also difficult to achieve real-time monitoring of motor status, and have limited early warning and accurate diagnosis capabilities for faults. Summary of the invention
[0003] The technical problem to be solved by the present invention is to address the shortcomings of the existing technology and propose a motor current anomaly judgment method based on multiple anomaly detection algorithms. The motor current data is judged abnormally and an alarm is issued through multiple models to achieve real-time monitoring and anomaly detection, thereby ensuring the safety of personnel and equipment in silk making and re-roasting production.
[0004] In order to solve the above technical problems, the present invention proposes a motor current abnormality determination method based on multiple abnormality detection algorithms. The method uses the preprocessed data to perform abnormality determination and alarm through trained abnormality detection. The specific method is as follows:
[0005] Step 1, data preprocessing: preprocessing through data acquisition, filtering, dividing time windows and feature extraction;
[0006] 1) Data acquisition: According to the current range that may appear in the silk-making and re-baking workshops, it is necessary to set a reasonable sampling frequency and value range. Taking the current value of the silk-making and re-baking workshops every 1 second can better reflect the change trend of the motor current. The original current signal data set is generated by manually exporting or collecting the motor current time series data through an automated program.
[0007] 2) Filtering: Through filtering algorithms, Kalman filtering, moving average filtering, weighted moving filtering, exponential moving filtering and other algorithms can be used to process the original current signal data set acquired from the data, remove noise, retain the basic trend and fluctuation characteristics of the current, and provide a data basis for subsequent model analysis. For example, with Kalman filtering, the noise variance is set to 1 and the measurement noise error is 10, which is suitable for current data filtering processing during the stable operation period of motors in silk making and re-baking workshops.
[0008] 3) Divide the time window: Divide the filtered data set into time windows m and steps p according to actual specific needs, where p satisfies 1<p<<m;
[0009] The division rules are:
[0010] Assume that the motor current data is a data set X=[x1,x2,L,x i ,L,x n ], where i = 1, 2, 3, ..., n, the data set is divided by time window m and step p (generally, 1 < p < < m is required), and the divided data set is X'.
[0011] Wherein k = 1, 2, 3, ..., represents the kth time window.
[0012] 4) Feature extraction: Extract the peak current, average current, current fluctuation rate, minimum current, current median, current peak-to-peak value (extreme difference), and the most recent current value in each time window. These features can reflect the motor's operating status and health. The specific calculation formula is:
[0013] Peak current = max(abs(X k ));
[0014] Average current = mean(X k );
[0015] Current fluctuation rate = std(X k ) / mean(X k ), where mean(X k ) is not 0;
[0016] Minimum current = min(X k );
[0017] Current median = median(X k );
[0018] Current peak value = max(X k )-min(X k );
[0019] The most recent current value = X k [-1];
[0020] Among them, X k represents each time window sequence, k = 1, 2, 3..., max represents the maximum value, abs represents the absolute value, mean represents the mean value, std represents the sample standard deviation, min represents the minimum value, meidan represents the median, X k [-1] indicates the last value of the sequence;
[0021] Step 2, single model training: The preprocessed data in step 1 are trained on isolation forest, single-class support vector machine, local anomaly factor, and elliptical envelope respectively to obtain four independent anomaly detection models: isolation forest model, single-class support vector machine model, local anomaly factor model, and elliptical envelope model. Each model judges the anomaly of the data based on the current value and the confidence calculation formula.
[0022] The current value and confidence calculation formula of the isolation forest model are determined as follows:
[0023] (1) Current value judgment: When the current value exceeds ±n1% of the normal range and the isolated path length depth is less than the threshold ε depth , judged as abnormal; according to the common knowledge of statistical confidence value, the value range of n1 is 1-10. The current value is the most recent current value.
[0024] (2) Confidence calculation formula judgment: The confidence Confidence1 of the isolation forest model is calculated based on the ratio of the isolated path length of the point to the average isolated path length of the entire data set. Among them, depth is the average path length of data point x in the isolation forest, and S is the size of the data set; when the confidence of the isolation forest model is closer to 1, it indicates that the data point is more likely to be considered anomaly. ; When the confidence When ce1≥confidence threshold ε1, it is judged as abnormal; when confidence Confidence1<confidence threshold ε1, it is judged as normal. According to the common knowledge of statistical confidence values, the value of ε1 should be in the range of 0.9-0.99, which can be flexibly adjusted according to actual conditions.
[0025] The current value and confidence calculation formula of the single-class support vector machine model are judged as follows:
[0026] (1) Current value judgment: When the current value exceeds ±n2% of the normal range, it is judged as abnormal. According to the common knowledge of statistical confidence value, the value range of n2 is 1 to 10. The current value is the most recent current value.
[0027] (2) Confidence calculation formula judgment: The confidence of the single-class support vector machine model Confidence2 is calculated based on the value of the decision function and the standardized formula is: Among them, dis w is the distance sequence from each point in the training data to the decision boundary, wx is the decision function value, the distance between the data point and the support vector boundary w; confidence close to 0 indicates an abnormal point, and close to 1 indicates a normal point.
[0028] When the confidence Confidence2 ≥ confidence threshold ε2, it is judged as abnormal. When the confidence Confidence2 < confidence threshold ε2, it is judged as normal. According to the common knowledge of statistical confidence values, the value of ε2 should be in the range of 0.9-0.99, which can be flexibly adjusted according to actual conditions.
[0029] The current value and confidence calculation formula of the local abnormal factor model are determined as follows:
[0030] (1) Current value judgment: When the current value exceeds ±n3% of the normal range, it is judged as abnormal; according to the common knowledge of statistical confidence value, the value range of n3 is 1 to 10. The current value is the most recent current value.
[0031] (2) Confidence calculation formula judgment: Confidence 3 of the local anomaly factor model: obtained by inverting the local anomaly factor score LOF_Score: Among them, LOF_Score is the local anomaly factor score; the larger the LOF_Score, the lower the confidence. The closer the confidence is to 1, the more likely the data point is normal.
[0032] When the confidence Confidence3 ≥ confidence threshold ε3, it is judged as abnormal. When the confidence Confidence1 < confidence threshold ε3, it is judged as normal. According to the common knowledge of statistical confidence values, the value of ε3 should be in the range of 0.9-0.99, which can be flexibly adjusted according to actual conditions.
[0033] The current value and confidence calculation formula of the elliptical envelope model are determined as follows:
[0034] (1) Current value judgment: When the current value exceeds ±n4% of the normal range, it is judged as abnormal; according to the common knowledge of statistical confidence value, the value range of n4 is 1 to 10. The current value is the most recent current value.
[0035] (2) Confidence Calculation formula judgment: elliptical envelope Model confidence Confidence4: Based on Mahalanobis distance and chi-square distribution χ2 The value of the confidence level critical value α is compared,
[0036] The closer the Mahalanobis-Distance is to α, the lower the confidence is. A confidence close to 1 indicates that the data point is within the normal range. Confidence threshold ε4>0: If the confidence is within the threshold (1-ε4, 1+ε4), the judgment is considered credible, otherwise it is unreliable.
[0037] When the confidence level is 1+ε4<Confidence4<1-ε4, it is judged as abnormal; when the confidence level is 1-ε4≤Confidence4≤1+ε4, it is judged as normal. According to the common knowledge of statistical confidence values, the value of ε4 should be in the range of 1 to 10, which can be flexibly adjusted according to actual conditions.
[0038] Step 3: Model fusion: fuse the multiple anomaly detection models trained in step 2 and perform multi-model comprehensive judgment.
[0039] (1) When the number of models is equal to 2, the current value and confidence of each model are calculated and judged. When the current value judgment results of the two models are consistent and both are abnormal and the confidence judgment results are consistent and both are abnormal, it is abnormal; when the current value judgment results of the two models are consistent and both are normal and the confidence judgment results are consistent and both are normal, it is normal; when the current value judgment results of the two models are inconsistent and the confidence judgment results are inconsistent, the weight judgment of each model is performed, and the judgment result of the model with the higher weight is taken before the two models are judged;
[0040] (2) When the number of models is greater than 2, a majority voting mechanism is used. When the number of models that judge the current to be abnormal is greater than P% of the number of models, the final result is abnormal; when the number of models that judge the abnormal is less than P% of the number of models, the final result is abnormal. The value of P is 60-90.
[0041] After training each model, the following Figure 1-4 Schematic diagram of judgment:
[0042] Attached Figure 1 To Attachment Figure 4 This is a schematic diagram of the model anomaly detection judgment. Figure 1 To Attachment Figure 4 The blue curve in the figure represents the current data after filtering in the same section. The horizontal axis represents the current sequence number and the vertical axis represents the current value. The curve shows the current change trend of the motor in a certain period of time. The current values in the range of sequence numbers 0-10 and 110-140 are abnormal current values, which are manifested as a sudden increase in the current trend change rate and a peak value greater than the normal current. The current values in other ranges are normal range values.
[0043] The red points (possible anomalies) in each figure mark the potential anomalies detected by the model. These points are current data points that are determined to be abnormal by each anomaly detection model.
[0044] The green dashed line in each figure represents the model's anomaly coefficient, which is the threshold used to distinguish normal and abnormal data points. The lower the anomaly coefficient, the more likely it is to be judged as an anomaly.
[0045] Attached Figure 1 This is a schematic diagram of the judgment of the isolation forest anomaly detection model. The model can identify some abnormal current values in the range of 0-10 and 110-140, and at the same time give a lower abnormal coefficient, and does not judge the normal current as an abnormal value.
[0046] Attached Figure 2 This is a schematic diagram of the judgment of the single-class support vector machine anomaly detection model. The model can identify almost all abnormal current values in the range of 0-10 and 110-140, and at the same time give a lower abnormal coefficient, and judge a very small number of normal currents as abnormal values.
[0047] Attached Figure 3 This is a schematic diagram of the judgment of the local abnormal factor anomaly detection model. The model can identify most abnormal current values in the range of 0-10 and 110-140, and at the same time give a lower abnormal coefficient to judge some normal currents as abnormal values.
[0048] Attached Figure 4 This is a schematic diagram of the elliptical envelope anomaly detection model. The model can identify most abnormal current values in the range of 0-10 and 110-140, and at the same time give a lower abnormal coefficient, and judge a very small number of normal currents as abnormal values.
[0049] After the model training of the present invention is completed, the joblib package can be used to save each model as a pkl format file. When the program starts, the joblib method is used to load the pkl format model file, initialize the filter and the data collection queue M, and perform real-time monitoring and data collection on the motor current data. Every time a current data is collected, the data is filtered and then inserted into the queue M. When the amount of data collected is less than the time window (set to 5 here), the collected data is used to extract features according to the rules. When the amount of data is greater than the time window, the current value at the front end of the queue M is removed so that the length of the queue M is consistent with the time window, and then feature extraction is performed according to the rules. The data after feature extraction is input into each model respectively, and each model can output an abnormal judgment on the current value of the current window in the current time window. According to the model fusion judgment rule, the comprehensive judgment result of the current in the current window in the current time window can be obtained: the current in the time window has a p% probability of being an abnormal current.
[0050] The present invention uses multiple models to perform abnormality determination and alarm on motor current data, thereby achieving real-time monitoring and abnormality detection, and ensuring the safety of personnel and equipment in silk making and re-baking production. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Attached Figure 1 This is a schematic diagram of the judgment of the isolation forest anomaly detection model of the present invention;
[0052] Attached Figure 2 This is a schematic diagram of the judgment of the single-class support vector machine anomaly detection model of the present invention;
[0053] Attached Figure 3 This is a schematic diagram of the judgment of the local abnormal factor abnormal detection model of the present invention;
[0054] Attached Figure 4 It is a schematic diagram of judging the elliptical envelope anomaly detection model of the present invention;
[0055] Attached Figure 5 This is a schematic diagram of data processed by Kalman filtering in the present invention;
[0056] Attached Figure 6 This is a schematic diagram of data processed by moving average filtering in the present invention;
[0057] Attached Figure 7 This is a schematic diagram of data processed by weighted moving filter in the present invention;
[0058] Attached Figure 8 This is a schematic diagram of data processed by exponential moving filter in the present invention. DETAILED DESCRIPTION
[0059] The specific embodiments of the present invention are further described in detail below. The technologies or products not specified in the examples are all existing technologies or conventional products that can be purchased.
[0060] Embodiment 1: This motor current abnormality determination method based on multiple abnormality detection algorithms uses the preprocessed data to perform abnormality determination and alarm through trained abnormality detection. The specific method is as follows:
[0061] Step 1, data preprocessing:
[0062] 1) Data acquisition: The current value of the silk-making and re-baking workshops is taken every 1 second, and the motor current time series data is collected by manual export or automatic program to generate the original current signal data set.
[0063] 2) Filtering: The original current signal data set obtained by the data acquisition is processed by the Kalman filter algorithm through the filtering algorithm. The noise variance is set to 1 and the measurement noise error is 10. It is suitable for the current data filtering processing of the motor operation stable period in the silk making and re-baking workshops.
[0064] 3) Divide the time window: Divide the filtered data set into time windows m and steps p according to actual specific needs, where p satisfies 1<p<<m;
[0065] The division rules are:
[0066] Assume that the motor current data is a data set X=[x1,x2,L,x i ,L,x n ], where i = 1, 2, 3, ..., n, the data set is divided by time window m and step p (generally, 1 < p < < m is required), and the divided data set is X'.
[0067] Wherein k = 1, 2, 3, ..., represents the kth time window.
[0068] 4) Feature extraction: Extract the peak current, average current, current fluctuation rate, minimum current, current median, current peak-to-peak value (extreme difference), and the most recent current value in each time window. These features can reflect the motor's operating status and health. The specific calculation formula is:
[0069] Peak current = max(abs(X k ))=0.58;
[0070] Average current = mean(X k )=0.578;
[0071] Current fluctuation rate = std(X k ) / mean(X k )=0.008, where mean(X k ) is not 0;
[0072] Minimum current = min(X k )=0.55;
[0073] Current median = median(X k )=0.56;
[0074] Current peak value = max(X k )-min(X k )=0.03;
[0075] The most recent current value = X k [-1] = 0.55;
[0076] Among them, X krepresents each time window sequence, k = 1, 2, 3..., max represents the maximum value, abs represents the absolute value, mean represents the mean value, std represents the sample standard deviation, min represents the minimum value, meidan represents the median, X k [-1] indicates the last value of the sequence;
[0077] Step 2, single model training: The preprocessed data in step 1 are trained on isolation forest, single-class support vector machine, local anomaly factor, and elliptical envelope respectively to obtain four independent anomaly detection models: isolation forest model, single-class support vector machine model, local anomaly factor model, and elliptical envelope model. Each model judges the anomaly of the data based on the current value and the confidence calculation formula.
[0078] In Example 1, the historical current mean is 0.59, the standard deviation is 0.01, the upper limit of the normal range is 0.596, and the lower limit of the normal range is 0.584.
[0079] The current value and confidence calculation formula of the isolation forest model are determined as follows:
[0080] (1) Current value judgment: The most recent current value is 0.55, which is 1% lower than the normal range, that is, less than 0.5643, and the isolated path length depth is less than the threshold ε depth =3, judged as abnormal;
[0081] (2) Confidence calculation formula judgment: The confidence Confidence1 of the isolation forest model is calculated based on the ratio of the isolated path length of the point to the average isolated path length of the entire data set.
[0082] Wherein, depth is the average path length of data point x in the isolation forest, and S is the size of the data set. By comparing the confidence Confidence1 in the isolation forest model with the confidence threshold ε1=0.9, if Confidence1≥ε1, it is judged to be abnormal, and if Confidence1<ε1, it is judged to be normal. In Example 1, the current is judged to be abnormal.
[0083] The current value and confidence calculation formula of the single-class support vector machine model are judged as follows:
[0084] (1) Current value judgment: The most recent current value is 0.55, Below normal range of 1%, that is Less than 0.5643, it is considered abnormal;
[0085] (2) Confidence calculation formula judgment: The confidence of the single-class support vector machine model Confidence2 is calculated based on the value of the decision function and the standardized formula is:
[0086] Among them, dis w is the distance sequence from each point in the training data to the decision boundary, wx is the decision function value, the distance between the data point and the support vector boundary w.
[0087] By comparing the confidence Confidence2 of the single-class support vector machine model with the confidence threshold ε2=0.9, if Confidence2≥ε2, it is judged as abnormal, and if Confidence2<ε2, it is judged as normal. In Example 1, the current is judged to be normal.
[0088] Local abnormal factors Current values and confidence in the model Spend Calculation formula Break:
[0089] (1) Current value judgment: The most recent current value is 0.55, which is lower than 1% of the normal range, that is, less than 0.5643, and is judged to be abnormal;
[0090] (2) Confidence calculation formula judgment: Confidence 3 of the local anomaly factor model: obtained by inverting the local anomaly factor score LOF_Score: Among them, LOF_Score is the local outlier factor score.
[0091] By comparing the confidence Confidence3 of the local abnormal factor model with the confidence threshold ε3=0.9, if Confidence3≥ε3, it is judged as abnormal and normal, and if Confidence3<ε3, it is judged as abnormal. In Example 1, the current is judged as abnormal.
[0092] The current value and confidence calculation formula of the elliptical envelope model are determined as follows:
[0093] (1) Current value judgment: The most recent current value is 0.55, which is lower than 1% of the normal range, that is, less than 0.5643, and is judged to be abnormal;
[0094] (2) Confidence calculation formula judgment: Elliptical envelope model confidence Confidence4: Based on Mahalanobis distance Mahalanobis-Distance = 293.73 and chi-square distribution χ 2 The value x at the confidence level critical value α = 0.95 2 (7) = 14.07, where 7 refers to the feature dimension constructed based on the current filtering data,
[0095] Compared with the confidence interval [0.9, 1.1] calculated by the confidence threshold ε4 = 0.1, Confidence4 < 0.9, so the model is judged to be abnormal.
[0096] Step 3, model fusion: The isolation forest model trained in step 2 and the single-class support vector machine model are fused to judge the current value and confidence of each model, and a comprehensive judgment of multiple models is performed.
[0097] According to the judgment result of step 2, the current value of the isolation forest model is judged to be abnormal, and the current value of the single-class support vector machine model is judged to be abnormal.
[0098] The confidence level of the isolation forest model is judged as abnormal, and the confidence level of the one-class support vector machine model is judged as normal.
[0099] Combining the judgment results of the two models, the judgment results of the two models are inconsistent. Since the confidence of the isolation forest model (0.92) is greater than the confidence of the single-class support vector machine model (0.74), the final result of the comprehensive judgment is abnormal, and an alarm is issued.
[0100] Embodiment 2: This motor current abnormality determination method based on multiple abnormality detection algorithms uses the preprocessed data to perform abnormality determination and alarm through trained abnormality detection. The specific method is as follows:
[0101] Step 1, data preprocessing:
[0102] 1) Data acquisition: The current value of the silk-making and re-baking workshops is taken every 1 second, and the motor current time series data is collected by manual export or automatic program to generate the original current signal data set.
[0103] 2) Filtering: The original current signal data set obtained by the data acquisition is processed by the Kalman filter algorithm through the filtering algorithm. The noise variance is set to 1 and the measurement noise error is 10. It is suitable for the current data filtering processing of the motor operation stable period in the silk making and re-baking workshops.
[0104] 3) Divide the time window: Divide the filtered data set into time windows m and steps p according to actual specific needs, where p satisfies 1<p<<m;
[0105] The division rules are:
[0106] Assume that the motor current data is a data set X=[x1,x2,L,x i ,L,x n ], where i = 1, 2, 3, ..., n, the data set is divided by time window m and step p (generally, 1 < p < < m is required), and the divided data set is X'.
[0107] Wherein k = 1, 2, 3, ..., represents the kth time window.
[0108] 4) Feature extraction: Extract the peak current, average current, current fluctuation rate, minimum current, current median, current peak-to-peak value (extreme difference), and the most recent current value in each time window. These features can reflect the motor's operating status and health. The specific calculation formula is:
[0109] Peak current = max(abs(X k ))=0.58;
[0110] Average current = mean(X k )=0.578;
[0111] Current fluctuation rate = std(X k ) / mean(X k )=0.008, where mean(X k ) is not 0;
[0112] Minimum current = min(X k )=0.55;
[0113] Current median = median(X k )=0.56;
[0114] Current peak value = max(X k )-min(X k )=0.03;
[0115] The most recent current value = X k [-1] = 0.55;
[0116] Among them, X k represents each time window sequence, k = 1, 2, 3..., max represents the maximum value, abs represents the absolute value, mean represents the mean value, std represents the sample standard deviation, min represents the minimum value, meidan represents the median, X k [-1] indicates the last value of the sequence;
[0117] Step 2, single model training: The preprocessed data in step 1 are trained on isolation forest, single-class support vector machine, local anomaly factor, and elliptical envelope respectively to obtain four independent anomaly detection models: isolation forest model, single-class support vector machine model, local anomaly factor model, and elliptical envelope model. Each model judges the anomaly of the data based on the current value and the confidence calculation formula.
[0118] In Example 2, the historical current mean is 0.59, the standard deviation is 0.01, the upper limit of the normal range is 0.596, and the lower limit of the normal range is 0.584.
[0119] The current value and confidence calculation formula of the isolation forest model are determined as follows:
[0120] (1) Current value judgment: The most recent current value is 0.55, which is 1% lower than the normal range, that is, less than 0.5643, and the isolated path length depth is less than the threshold ε depth =3, judged as abnormal;
[0121] (2) Confidence calculation formula judgment: The confidence Confidence1 of the isolation forest model is calculated based on the ratio of the isolated path length of the point to the average isolated path length of the entire data set.
[0122] Wherein, depth is the average path length of data point x in the isolation forest, and S is the size of the data set. By comparing the confidence Confidence1 in the isolation forest model with the confidence threshold ε1=0.9, if Confidence1≥ε1, it is judged to be abnormal, and if Confidence1<ε1, it is judged to be normal. In Example 2, the current is judged to be abnormal.
[0123] The current value and confidence calculation formula of the single-class support vector machine model are judged as follows:
[0124] (1) Current value judgment: The most recent current value is 0.55, which is lower than 1% of the normal range, that is, less than 0.5643, and is judged to be abnormal;
[0125] (2) Confidence calculation formula judgment: The confidence of the single-class support vector machine model Confidence2 is calculated based on the value of the decision function and the standardized formula is:
[0126] Among them, dis w is the distance sequence from each point in the training data to the decision boundary, wx is the decision function value, the distance between the data point and the support vector boundary w.
[0127] By comparing the confidence Confidence2 of the single-class support vector machine model with the confidence threshold ε2 = 0.9, Confidence2 ≥ ε2, Judged as abnormal, Confid en ce2<ε2, In Example 2, the current is judged to be normal.
[0128] The current value and confidence calculation formula of the local abnormal factor model are determined as follows:
[0129] (1) Current value judgment: The most recent current value is 0.55, which is lower than 1% of the normal range, that is, less than 0.5643, and is judged to be abnormal;
[0130] (2) Confidence calculation formula judgment: Confidence 3 of the local anomaly factor model: obtained by inverting the local anomaly factor score LOF_Score: Among them, LOF_Score is the local outlier factor score.
[0131] By comparing the confidence Confidence3 of the local abnormal factor model with the confidence threshold ε3=0.9, if Confidence3≥ε3, it is judged as abnormal and normal, and if Confidence3<ε3, it is judged as abnormal. In Example 2, the current is judged as abnormal.
[0132] The current value and confidence calculation formula of the elliptical envelope model are determined as follows:
[0133] (1) Current value judgment: The most recent current value is 0.55, which is lower than 1% of the normal range, that is, less than 0.5643, and is judged to be abnormal;
[0134] (2) Confidence calculation formula judgment: Elliptical envelope model confidence Confidence4: Based on Mahalanobis distance Mahalanobis-Distance = 293.73 and chi-square distribution χ 2 The value x at the confidence level critical value α = 0.95 2 (7) = 14.07, where 7 refers to the feature dimension constructed based on the current filtering data,
[0135] Compared with the confidence interval [0.9, 1.1] calculated by the confidence threshold ε4 = 0.1, Confidence4 < 0.9, so the model is judged to be abnormal.
[0136] Step 3, model fusion: The single-class support vector machine model, local anomaly factor model and elliptical envelope model trained in step 2 are fused to judge the current value and confidence of each model, and a comprehensive judgment of multiple models is performed.
[0137] According to the judgment result of step 2, the current value of the single-class support vector machine model is judged to be abnormal, the current value of the local abnormal factor model is judged to be abnormal, and the current value of the elliptical envelope model is judged to be abnormal.
[0138] The confidence level of the single-class support vector machine model is judged as normal, the confidence level of the single-class support vector machine model is judged as abnormal, and the confidence level of the elliptical envelope model is judged as abnormal.
[0139] Combining the judgment results of the three models, since the total number of models is 3, the number of abnormal models is 2, and the model judgment percentage threshold is P%=60%, the final judgment threshold is 3*60%=1.8. Since the number of abnormal models is 2>1.8, the final result of the comprehensive judgment is abnormal, and an alarm is triggered.
[0140] Embodiment 3: This motor current abnormality determination method based on multiple abnormality detection algorithms uses the preprocessed data to perform abnormality determination and alarm through trained abnormality detection. The specific method is as follows:
[0141] Step 1: Data preprocessing
[0142] 1) Data acquisition: The current value of the silk-making and re-baking workshops is taken every 1 second, and the motor current time series data is collected by manual export or automatic program to generate the original current signal data set.
[0143] 2) Filtering: The original current signal data set obtained by the data acquisition is processed by the Kalman filter algorithm through the filtering algorithm. The noise variance is set to 1 and the measurement noise error is 10. It is suitable for the current data filtering processing of the motor operation stable period in the silk making and re-baking workshops.
[0144] 3) Divide the time window: Divide the filtered data set into time windows m and steps p according to actual specific needs, where p satisfies 1<p<<m;
[0145] The division rules are:
[0146] Assume that the motor current data is a data set X=[x1,x2,L,x i ,L,x n ], where i = 1, 2, 3, ..., n, the data set is divided by time window m and step p (generally, 1 < p < < m is required), and the divided data set is X'.
[0147] Wherein k = 1, 2, 3, ..., represents the kth time window.
[0148] 4) Feature extraction: Extract the peak current, average current, current fluctuation rate, minimum current, current median, current peak-to-peak value (extreme difference), and the most recent current value in each time window. These features can reflect the motor's operating status and health. The specific calculation formula is:
[0149] Peak current = max(abs(X k ))=0.58;
[0150] Average current = mean(X k )=0.578;
[0151] Current fluctuation rate = std(X k ) / mean(X k )=0.008, where mean(X k ) is not 0;
[0152] Minimum current = min(X k )=0.55;
[0153] Current median = median(X k )=0.56;
[0154] Current peak value = max(X k )-min(X k )=0.03;
[0155] The most recent current value = X k [-1] = 0.55;
[0156] Among them, X k represents each time window sequence, k = 1, 2, 3..., max represents the maximum value, abs represents the absolute value, mean represents the mean value, std represents the sample standard deviation, min represents the minimum value, meidan represents the median, X k [-1] indicates the last value of the sequence;
[0157] Step 2, single model training: The preprocessed data in step 1 are trained on isolation forest, single-class support vector machine, local anomaly factor, and elliptical envelope respectively to obtain four independent anomaly detection models: isolation forest model, single-class support vector machine model, local anomaly factor model, and elliptical envelope model. Each model judges the anomaly of the data based on the current value and the confidence calculation formula.
[0158] In Example 3, the historical current mean is 0.59, the standard deviation is 0.01, the upper limit of the normal range is 0.596, and the lower limit of the normal range is 0.584.
[0159] The current value and confidence calculation formula of the isolation forest model are determined as follows:
[0160] (1) Current value judgment: The most recent current value is 0.55, which is 1% lower than the normal range, that is, less than 0.5643, and the isolated path length depth is less than the threshold ε depth =3, judged as abnormal;
[0161] (2) Confidence calculation formula judgment: The confidence Confidence1 of the isolation forest model is calculated based on the ratio of the isolated path length of the point to the average isolated path length of the entire data set.
[0162] Wherein, depth is the average path length of data point x in the isolation forest, and S is the size of the data set. By comparing the confidence Confidence1 in the isolation forest model with the confidence threshold ε1=0.9, if Confidence1≥ε1, it is judged as abnormal, and if Confidence1<ε1, it is judged as normal. In Example 3, the current is judged as abnormal.
[0163] The current value and confidence calculation formula of the single-class support vector machine model are judged as follows:
[0164] (1) Current value judgment: The most recent current value is 0.55, which is lower than 1% of the normal range, that is, less than 0.5643, and is judged to be abnormal;
[0165] (2) Confidence calculation formula judgment: The confidence of the single-class support vector machine model Confidence2 is calculated based on the value of the decision function and the standardized formula is:
[0166] Among them, dis w is the distance sequence from each point in the training data to the decision boundary, wx is the decision function value, the distance between the data point and the support vector boundary w.
[0167] By comparing the confidence Confidence2 of the single-class support vector machine model with the confidence threshold ε2=0.9, if Confidence2≥ε2, it is judged as abnormal, and if Confidence2<ε2, it is judged as normal. In Example 3, the current is judged to be normal.
[0168] The current value and confidence calculation formula of the local abnormal factor model are determined as follows:
[0169] (1) Current value judgment: The most recent current value is 0.55, which is lower than 1% of the normal range, that is, less than 0.5643, and is judged to be abnormal;
[0170] (2) Confidence calculation formula judgment: Confidence 3 of the local anomaly factor model: obtained by inverting the local anomaly factor score LOF_Score: Among them, LOF_Score is the local outlier factor score.
[0171] By comparing the confidence Confidence3 of the local abnormal factor model with the confidence threshold ε3=0.9, if Confidence3≥ε3, it is judged as abnormal and normal, and if Confidence3<ε3, it is judged as abnormal. In Example 3, the current is judged as abnormal.
[0172] The current value and confidence calculation formula of the elliptical envelope model are determined as follows:
[0173] (1) Current value judgment: The most recent current value is 0.55, which is lower than 1% of the normal range, that is, less than 0.5643, and is judged to be abnormal;
[0174] (2) Confidence calculation formula judgment: Elliptical envelope model confidence Confidence4: Based on Mahalanobis distance Mahalanobis-Distance = 293.73 and chi-square distribution χ 2 The value x at the confidence level critical value α = 0.95 2 (7) = 14.07, where 7 refers to the feature dimension constructed based on the current filtering data,
[0175] Compared with the confidence interval [0.9, 1.1] calculated by the confidence threshold ε4 = 0.1, Confidence4 < 0.9, so the model is judged to be abnormal.
[0176] Step 3, model fusion: The isolation forest model, single-class support vector machine model, local anomaly factor model and elliptical envelope model trained in step 2 are fused to judge the current value and confidence of each model, and a comprehensive judgment of multiple models is performed.
[0177] According to the judgment result of step 2, the current value of the isolation forest model is judged to be abnormal, and the current value of the single-class support vector machine model is judged to be abnormal. Current value of the local anomaly factor model Judgement It is abnormal, ellipse The current value of the circular envelope model is judged to be abnormal.
[0178] The confidence level of the isolation forest model is judged as abnormal, the confidence level of the one-class support vector machine model is judged as normal, the confidence level of the local anomaly factor model is judged as abnormal, and the confidence level of the elliptical envelope model is judged as abnormal.
[0179] Combining the judgment results of the four models, since the total number of models is 4, the number of models that judge abnormalities is 3, and the model judgment percentage threshold is P%=70%, the final judgment threshold is 4*70%=2.8. Since the number of models that judge abnormalities is 3>2.8, the final result of the comprehensive judgment is abnormal.
[0180] Example 4: This motor current anomaly judgment method constructed based on multiple anomaly detection algorithms uses trained anomaly detection to perform anomaly judgment alarm on the preprocessed data, integrates the trained isolation forest model, single-class support vector machine model, and local anomaly factor model, judges the current value and confidence of each model, and performs multi-model comprehensive judgment.
[0181] According to the judgment result of step 2, the current value of the isolation forest model is judged to be abnormal, the current value of the single-class support vector machine model is judged to be abnormal, and the current value of the local abnormal factor model is judged to be abnormal.
[0182] The confidence level of the isolation forest model is judged as abnormal, the confidence level of the one-class support vector machine model is judged as normal, and the confidence level of the local anomaly factor model is judged as abnormal.
[0183] Combining the judgment results of the three models, since the total number of models is 3, the number of models that judge abnormality is 2, and the model judgment percentage threshold is P% = 60%, the final judgment threshold is 3*60% = 1.8. Since the number of models that judge abnormality is 2>1.8, the final result of the comprehensive judgment is abnormal. The other implementation steps are the same as implementation 2.
[0184] Example 5: A motor current abnormality judgment method constructed based on multiple abnormality detection algorithms, which uses the preprocessed data through trained abnormality detection to perform abnormality judgment alarm, fuses the trained elliptical envelope and local abnormality factor models, judges the current value and confidence of each model, and performs multi-model comprehensive judgment.
[0185] According to the judgment result of step 2, the current value of the elliptical envelope model is judged to be abnormal, and the current value of the local abnormal factor model is judged to be abnormal. The confidence of the elliptical envelope model is judged to be abnormal, and the confidence of the local abnormal factor model is judged to be abnormal. Combining the judgment results of the two models, the final result of the comprehensive judgment is abnormal. The other implementation steps are the same as implementation 1.
[0186] Example 6: This motor current abnormality judgment method constructed based on multiple abnormality detection algorithms uses trained abnormality detection to perform abnormality judgment alarm on the preprocessed data, integrates the trained isolation forest model, single-class support vector machine model, and elliptical envelope model, judges the current value and confidence of each model, and performs multi-model comprehensive judgment.
[0187] According to the judgment result of step 2, the current value of the isolation forest model is judged to be abnormal, the current value of the single-class support vector machine model is judged to be abnormal, and the current value of the elliptical envelope model is judged to be abnormal.
[0188] The confidence level of the isolation forest model is judged as abnormal, the confidence level of the one-class support vector machine model is judged as normal, and the confidence level of the elliptical envelope model is judged as abnormal.
[0189] Combining the judgment results of the three models, since the total number of models is 3, the number of models that judge abnormality is 2, and the model judgment percentage threshold is P% = 90%, the final judgment threshold is 3*90% = 2.7. Since the number of models that judge abnormality is 2<2.7, the final result of the comprehensive judgment is normal. The other implementation steps are the same as implementation 2.
[0190] The technical contents of the present invention are explained above, but the protection scope of the present invention is not limited to the said contents. Within the knowledge scope of ordinary technicians in this field, various changes can be made to the technical contents of the present invention without departing from the purpose of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A motor current abnormality determination method based on multiple abnormality detection algorithms, Features: The method uses the trained anomaly detection model to detect anomalies in the preprocessed data and issue an alarm. The specific method is as follows: Step 1, data preprocessing: preprocessing through data acquisition, filtering, dividing time windows and feature extraction; 1) Data acquisition: The current value of the silk-making and re-baking workshops is taken every 1 second, and the motor current time series data is collected by manual export or automatic program to generate the original current signal data set; 2) Filtering: The original current signal data set acquired by the data is processed by the filtering algorithm to remove noise and retain the basic trend and fluctuation characteristics of the current; 3) Divide the time window: divide the filtered data set by time window m and step, p satisfies 1<p<<m; 4) Feature extraction: extract the peak current, average current, current fluctuation rate, minimum current, current median, current peak-to-peak value, and the most recent current value in each time window; Step 2, single model training: the pre-processed data in step 1 are trained on the isolation forest model, the single-class support vector machine model, the local anomaly factor model, and the elliptical envelope model respectively, and four independent anomaly detection models are obtained, namely, the isolation forest model, the single-class support vector machine model, the local anomaly factor model, and the elliptical envelope model. Each model judges the anomaly of the data from the current value and the confidence calculation formula respectively; Step 3: Model fusion: fuse the multiple anomaly detection models trained in step 2 and perform multi-model comprehensive judgment.
2. The motor current abnormality determination method based on multiple abnormality detection algorithms according to claim 1, Features: The confidence calculation formula judgment method of each anomaly detection model in step 2 is: The confidence of the isolation forest model Confidence1 is calculated based on the ratio of the isolated path length of the point to the average isolated path length of the entire data set. Where depth is the average path length of data point x in the isolation forest, S is the size of the data set; when confidence Confidence1 ≥ confidence threshold ε 1 When Confidence1 < confidence threshold ε 1 When , it is judged as normal; ε 1 The value range of is 0.9-0.99; Confidence 2 of the single-class support vector machine model: calculated based on the value of the decision function, and the standardized formula is Among them, dis w is the distance sequence from each point in the training data to the decision boundary, wx is the decision function value, the distance between the data point and the support vector boundary w; when confidence Confidence2 ≥ confidence threshold ε 2 When Confidence2 < confidence threshold ε 2 When , it is judged as normal; ε 2 The value range of is 0.9-0.99; Confidence 3 of the local anomaly factor model: obtained by inverting the local anomaly factor score LOF_Score: Among them, LOF_Score is the local outlier factor score; When confidence Confidence3 ≥ confidence threshold ε 3 When Confidence1 < confidence threshold ε 3 When , it is judged as normal; ε 3 The value range of is 0.9-0.99; Elliptical envelope model confidence Confidence4: Based on Mahalanobis distance and chi-square distribution χ 2 The confidence level critical value α is compared with the value of the confidence level critical value α, which is the threshold of the statistic used to decide whether to reject the null hypothesis in the hypothesis test (for a 95% confidence level, the significance level α is 0.05; for a 99% confidence level, α is 0.01). When the confidence level is 1+ε 4 <Confidence4<1-ε 4 When , it is judged as abnormal; when the confidence level is 1-ε 4 ≤Confidence4≤1+ε 4 When , it is judged as normal; ε 4 The value range is 1-10.
3. The motor current abnormality determination method based on multiple abnormality detection algorithms according to claim 1, Features: The method for determining the current value in step 2 is: Isolation forest model: When the current value exceeds the normal range of ±n 1 %, and the isolated path length depth is less than the threshold ε depth , judged as abnormal; n 1 The value range is 1-10; Single-class support vector machine model: When the current value exceeds the normal range of ±n 2 %, judged as abnormal; n 2 The value range is 1-10; Local abnormal factor model: When the current value exceeds the normal range of ±n 3 %, judged as abnormal; n 3 The value range is 1-10; Elliptical envelope model: When the current value exceeds the normal range of ±n 4 %, judged as abnormal; n 4 The value range is 1-10.
4. The motor current abnormality determination method based on multiple abnormality detection algorithms according to claim 1, Features: The multi-model comprehensive judgment method in step 3 is: 1) When the number of models is equal to 2, the current value and confidence calculation of each model are used for judgment. If the current value judgment results of the two models are consistent and both are abnormal and the confidence judgment results are consistent and both are abnormal, then it is abnormal; When the current value judgment results of the two models are consistent and both are normal and the confidence judgment results are consistent and both are normal, then it is normal; when the current value judgment results of the two models are inconsistent and the confidence judgment results are inconsistent, the weight judgment of each model is performed, and the judgment result of the model with the higher weight is taken before the two models are judged; 2) When the number of models is greater than 2, a majority voting mechanism is used. When the number of models that judge anomalies is greater than P% of the number of models, the result of the majority model judgment shall prevail. That is, if the majority model judges it to be normal, then the final judgment is normal; if the majority model judges it to be abnormal, then the final judgment is abnormal; When the model determines that the number of abnormalities is less than P% of the model number, it is finally judged to be normal, and the value of P is 60-90.
Citation Information
Patent Citations
Method for detecting abnormal vibration of motor of tobacco shred making equipment based on small sample data set
CN117235631A
