Motor Defect Detection Method Based on High-Dimensional Candidate Feature Library and Piecewise Confidence Output
By using a high-dimensional candidate feature library and segmented confidence output, this method solves the problems of indivisible single thresholds and missed detection of a small number of empirical features in motor defect detection. It achieves stable detection and interpretable output of motor defects, supports production line re-inspection strategies, and improves the detection effect in small sample scenarios.
Patent Information
- Application Number
- CN202611590032.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-14
- Publication Date
- 2026-11-10
AI Technical Summary
Existing motor defect detection methods have several problems, including difficulty in consistently distinguishing between OK and NG using a single threshold, the tendency to miss useful information due to a limited number of empirical features, the strong dependence of deep models on samples and labels, the failure to model forward and reverse rotation as a whole, the unsuitability of ordinary binary classification for production line re-inspection strategies, and the inability to effectively detect suspected mislabeled samples.
By employing a high-dimensional candidate feature library and segmented confidence output, high-dimensional candidate features are extracted by collecting forward and reverse vibration signals of the same motor. A support vector machine classification model is then used for comprehensive judgment, and segmented confidence results are output to generate a list of samples to be reviewed.
It improves the coverage of motor defects, reduces the risk of missed detection, improves stability with small samples, and the output results directly correspond to a single motor. It supports release, sampling, and interception decisions, enhances model interpretability, and assists in label cleaning and dataset iteration.
Smart Images

Figure CN123069093A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor testing technology, and in particular to a method for detecting motor defects based on a high-dimensional candidate feature library and segmented confidence output. Background Technology
[0002] In motor factory testing, defects such as abnormal noise, scratches, resonance, and impact are usually judged by manual listening, spectrum observation, single-index thresholding, or deep learning models. Manual listening relies on experience and is highly subjective; single-index thresholding is simple to implement but can only cover a few obvious anomalies; deep learning methods usually require a large number of labeled samples and require that the abnormal features have relatively clear learnable patterns in the time-frequency plot or waveform.
[0003] In actual testing of small motors, defect signals often exhibit weak amplitude, short duration, dispersed frequency band, and inconsistent forward and reverse rotation. Customer-provided OK / NG labels may also contain boundary samples, disputed samples, or incorrect labels. In such cases, relying solely on a single threshold or end-to-end deep model can easily lead to missed detections, over-detection, difficulty in interpretation, and difficulty in verification.
[0004] Existing traditional machine learning solutions typically employ a "manual feature + classifier" approach. This involves extracting a limited number of features from vibration signals, such as RMS, peak value, kurtosis, and frequency band energy, and then using models like SVM, Random Forest, KNN, or Logistic Regression for classification. While this approach offers advantages such as interpretability, fast training speed, and good adaptability to small samples, existing solutions often suffer from drawbacks including insufficient candidate feature coverage, lack of binding modeling for forward and reverse orientations, outputting only OK / NG binary classification results, and inability to assist in label verification.
[0005] Existing methods for detecting defects in motors have the following problems:
[0006] (1) A single threshold is insufficient to reliably distinguish between OK and NG. Motor defects may occur in different frequency bands and with different statistical characteristics, such as the high-frequency region above 9000Hz (950-1000Hz, 1500-2500Hz, 2000-4000Hz, 9000Hz), or the bandpass envelope impulse characteristics of 2-5kHz. A single frequency band or a single statistic cannot cover all abnormal patterns.
[0007] (2) A small number of empirical features may miss useful information. If only traditional indicators such as RMS, kurtosis, and energy of a few frequency bands are extracted, time-frequency dynamics, envelope modulation, autocorrelation or frequency band ratio features that are more sensitive to certain defects may be missed.
[0008] (3) Deep models are highly dependent on samples and labels. The number of defect samples for small motors is usually limited, and OK / NG labels may contain noise. End-to-end models are prone to overfitting and it is difficult to explain the judgment criteria to the field.
[0009] (4) Forward and reverse rotation were not modeled as a whole at the motor level. Field testing usually requires simultaneous attention to the forward and reverse rotation performance of the same motor. If the two data segments are judged separately, the correlation between directions is easily lost, and it is not conducive to outputting test results on a "motor" basis.
[0010] (5) Ordinary binary classification is not suitable for production line re-inspection strategy. The production line not only needs OK / NG, but also needs to distinguish risk levels such as high confidence OK, weak tendency OK, weak tendency NG, and high confidence NG in order to decide on release, sampling, re-inspection or interception.
[0011] (6) It cannot effectively detect suspected mislabeled samples. When manual labels conflict with model predictions, existing solutions usually only count the errors and cannot generate a list of samples to be reviewed based on score distance and feature similarity, making them difficult to use for dataset cleaning. Summary of the Invention
[0012] This invention provides a method for detecting motor defects based on a high-dimensional candidate feature library and segmented confidence output, aiming to solve the problems existing in current motor defect detection methods.
[0013] This invention provides a method for detecting motor defects based on a high-dimensional candidate feature library and piecewise confidence output, comprising the following steps:
[0014] S1. Collect at least one vibration signal of the same motor under forward and reverse rotation conditions; bind the forward and reverse vibration signals of the same motor into a motor-level sample according to the sample number, file name, collection order or metadata;
[0015] S2. Read the forward and reverse segments of the basic vibration signal from the collected data; if sound, current, voltage or other vibration signals are collected at the same time, read them separately according to the forward and reverse operating conditions, and associate them with the corresponding basic vibration signal to form forward segment data and reverse segment data;
[0016] S3. Extract high-dimensional candidate features from the forward and reverse segments of the basic vibration signal to form their respective basic vibration feature vectors; if various signals such as sound, current, voltage or other vibration signals are also collected, extract candidate features from them respectively, and then extract candidate features from the forward and reverse segments of each signal to form their respective feature vectors.
[0017] S4. The feature vectors of each signal of the same motor obtained in S3 under forward and reverse rotation conditions are spliced or fused, or the difference, ratio, maximum value, minimum value or weighted fusion value are calculated between features with the same dimension and corresponding physical meaning to form an extended motor-level feature vector.
[0018] S5. Select features based on the OK / NG labels of the training samples to obtain a core feature subset, and use the core feature subset to train a support vector machine classification model;
[0019] S6. Use the trained support vector machine classification model to make a comprehensive judgment on the motor-level feature vectors of the motor under test, and output the SVM decision score;
[0020] S7. Output segmented confidence results based on decision scores;
[0021] S8. Output detection results, key features, scores, confidence levels, and review suggestions; and generate samples to be reviewed based on prediction conflicts, the distance between the score and the binary classification threshold, and feature similarity.
[0022] As a further improvement of the present invention, S1 specifically includes:
[0023] Vibration sensors are placed at locations that reflect the transmission path of motor defects. Vibration signals from the motor are collected by the vibration sensors, and the direction of the vibration signal is automatically identified according to the "forward / reverse" identifier in the sample file name. If the file name does not contain direction information, the direction of the vibration signal is determined according to the signal acquisition order or metadata. Finally, the forward and reverse data of the same motor are bound into a complete sample.
[0024] As a further improvement of the present invention, in the extraction of high-dimensional candidate features in S3, the candidate indicators include the types of time domain, frequency domain, time-frequency, envelope, autocorrelation and frequency band ratio;
[0025] The time-domain and envelope features include mean, standard deviation, RMS, peak value, peak-to-peak value, skewness, kurtosis, peak factor, impulse factor, margin factor, waveform factor, absolute value quantile, short-time frame statistics, difference statistics, envelope statistics, bandpass time-domain statistics, and bandpass envelope statistics.
[0026] The frequency domain features include FFT overall spectrum statistics, Welch power spectrum statistics, spectrum centroid, spectrum bandwidth, spectrum entropy, spectrum flatness, rolloff, total power, peak frequency, Top-k peak amplitude, band mean, band median, band RMS, band p90, band p95, band peak value, band energy, and peak / median ratio.
[0027] The time-frequency features are based on STFT to calculate the statistics of energy changes over time in each frequency band, including mean, std, cv, median, p90, p95, max, max_div_median, and temporal_entropy.
[0028] The autocorrelation features are extracted from peak, peak_lag_ms, mean, and std within the delay range.
[0029] The frequency band ratio feature is used to describe the prominence of local anomalous peaks relative to the background frequency band.
[0030] As a further improvement of the present invention, in step S5, when performing feature selection based on the OK / NG labels of the training samples, core features are screened from the candidate indicators of the high-dimensional candidate feature library. The specific process includes:
[0031] a1. Calculate the OK / NG discriminant for each candidate feature;
[0032] a2. Calculate and sort the AUC of individual indicators;
[0033] a3. Remove highly correlated redundant features and retain features with higher discriminative power;
[0034] a4. Jointly search the support vector machine and the number of features to obtain multiple candidate solutions. Evaluate the multiple candidate solutions according to the set evaluation index to obtain the evaluation score. Select the candidate solution with the highest evaluation score as the final selection result.
[0035] a5. Draw box plots, scatter plots, or spectrum plots for the features in the selected results.
[0036] As a further improvement of the present invention, step a2 specifically includes:
[0037] For each fundamental vibration characteristic, calculate the forward and reverse AUCs separately, and then take the average of the two as the paired average AUC; the AUC can be converted from the Mann-Whitney U statistic.
[0038] p = area under the ROC curve, AUC = max(p, 1-p),
[0039] Where p is the probability that the AUC of the NG motor is greater than the AUC of the OK motor when one NG motor and one OK motor are randomly selected; when the AUC of the NG motor and the AUC of the OK motor are equal, it is counted as 0.5.
[0040] Step a3 specifically includes:
[0041] Indicators with higher discriminative power and larger AUC values are retained. Pearson correlation is used for redundancy removal, eliminating candidates with excessive overlap with the selected indicators. The Pearson correlation coefficient is calculated as the covariance divided by the product of the standard deviations of the two variables.
[0042] ,
[0043] in, Representing variables The sample mean; Representing variables The sample mean; These represent two sets of observed variables that need to be analyzed for correlation, and are the two sets of statistical sample data corresponding to the formula; Indicates the first Composed of observed sample values, For sample serial number ( ), representing the independent observation data corresponding to each group; the numerator is the sum of the products of the deviations from the mean of the two variables, reflecting the linear trend of change between the variables; the denominator is the square root of the product of the sum of the squares of the deviations from the mean of the two variables, used to normalize the correlation coefficient and limit the result to the interval [-1,1];
[0044] r xy When the value is close to 1, the two indicators change in almost the same direction as the sample changes, showing a positive correlation.
[0045] r xy When the value approaches -1, the two indicators change almost in opposite directions, showing a negative correlation.
[0046] r xy When the value is close to 0, there is no obvious linear relationship.
[0047] As a further improvement of the present invention, step a4 specifically includes:
[0048] a41. Select a number of indicators, select an upper limit for the correlation coefficient, select an SVM kernel function and its parameters, select an NG class weight, and select a binary classification threshold to obtain a complete candidate solution;
[0049] a42. Calculate the cross-validation, training set, and test set performance of candidate solutions, and establish the selection formula:
[0050] S = a × balanced accuracy of CV + b × balanced accuracy of test set + c × no-go recall of test set
[0051] Where S is the evaluation score, a is the weight of the balanced accuracy of CV, b is the weight of the balanced accuracy of the test set, and c is the weight of the NG recall of the test set.
[0052] a43. Compare multiple candidate solutions to select the final selected result: select the candidate solution with the highest evaluation score; when multiple groups need to be retained, select the candidate solution with an evaluation score higher than the set threshold.
[0053] As a further improvement of the present invention, in step S5, a support vector machine classification model is trained using a subset of core features. The specific process includes:
[0054] After selecting the core features, each motor is represented as a motor-level feature vector for training, according to the combination method determined in S4; with F forward F represents the core feature of forward rotation. reverse If we represent the inversion of core features, then the motor-level feature vector can be expressed as:
[0055] X=[F forward ,F reverse ];
[0056] Or X=[F forward ,F reverse ,|F forward -F reverse |,F forward / F reverse ];
[0057] The support vector machine is trained using motor-grade OK / NG tags as supervision signals. The support vector machine uses functions including linear kernel, RBF kernel, and polynomial kernel, and sets class weights or adjusts the decision boundary. The C, gamma, kernel function, class weights, number of features, and binary classification threshold of the support vector machine are determined through cross-validation or automatic search.
[0058] As a further improvement of the present invention, in step S6, the support vector machine employs kernel functions including linear, radial basis function, and polynomial kernels; when a linear kernel function is used, the calculation process of the SVM decision score includes:
[0059] score=w1×x1+w2×x2+w3×x3+...+w n ×x n +b,
[0060] Where x1,x2,...,x n Let w1, w2, ..., w be the input feature vector of the current motor. n Let b be the weight of each feature trained by the SVM, b be the bias of the SVM, and score be the SVM decision score.
[0061] As a further improvement of the present invention, in step S7, outputting segmented confidence results based on decision scores includes:
[0062] SVM outputs continuous decision scores for the features of the motor samples under test. A decision boundary value is set for the decision score. When the decision score is greater than the decision boundary value, an NG confidence result is output. NG confidence results are categorized from highest to lowest score as high-confidence NG, leaning towards NG, and weakly leaning towards NG, with higher scores indicating a closer approximation to NG. When the decision score is less than or equal to the decision boundary value, an OK confidence result is output. OK confidence results are categorized from lowest to highest score as high-confidence OK, leaning towards OK, and weakly leaning towards OK, with lower scores indicating a closer approximation to OK.
[0063] As a further improvement of the present invention, the motor defect detection method with high-dimensional candidate feature library and segmented confidence output also includes:
[0064] Before outputting in S8, read the forward and reverse rotation files of the same motor, automatically identify the direction, read the basic vibration signal, extract the core features consistent with the training phase, input the SVM model trained in S5 into S6 to obtain the score, and then obtain the confidence result in S7; if there are other optional signals, extract, combine and select features according to the method determined in the training phase and then input them into the model.
[0065] The output includes: sample number, forward and reversed files, predicted labels, six-segment classification, SVM score, distance from OK / NG boundary, key outlier features, and whether a re-examination is recommended;
[0066] When manual labels conflict with model predictions, or when a sample is in the weakly propensity OK / weakly propensity NG gray zone, the system adds the sample to the list of samples to be reviewed; and / or retrieves historical samples with similar features to identify suspected mislabeled, boundary samples, or abnormal samples.
[0067] The beneficial effects of this invention are: by covering multiple defect manifestations through a high-dimensional candidate feature library, the risk of missed detection caused by a small number of empirical features is reduced; by automatically selecting high-dimensional features to compress them, overfitting is reduced and stability for small samples is improved; by binding forward / reverse rotation to modeling, the output results directly correspond to a single motor; by using continuous scores from SVM for comprehensive judgment, the problem of indivisible thresholds for single indicators is avoided; by using six-segment confidence output, release, sampling, re-inspection, and interception are supported; by using key features and box plots, the interpretability of the model is improved; by using a list of samples to be reviewed, label cleaning and dataset iteration are assisted; compared with end-to-end deep models, this method is easier to implement in scenarios with small samples and label noise. Attached Figure Description
[0068] Figure 1 This is the final input feature box plot of the OK / NG training set in this invention;
[0069] Figure 2 This is the training set confusion matrix diagram in this invention;
[0070] Figure 3 This is the test set confusion matrix diagram in this invention. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0072] This invention discloses a motor defect detection method based on a high-dimensional candidate feature library and segmented confidence output. The purpose is to: construct a high-dimensional candidate feature library covering time domain, frequency domain, time-frequency domain, envelope, autocorrelation, and frequency band ratio to improve coverage of different motor defect manifestations; bind forward and reverse signals of the same motor into motor-level samples, so that the detection results directly correspond to a single motor; automatically select a small number of stable, interpretable, and highly discriminative core features from the high-dimensional candidate features; use a support vector machine to comprehensively judge the core features and output continuous decision scores; map the continuous decision scores to multiple confidence levels to support release, re-inspection, and interception decisions; and generate samples to be reviewed based on prediction conflicts, the distance between the score and the binary classification threshold, and feature similarity for label cleaning and model iteration.
[0073] The following steps, S1 to S8, illustrate the general process while incorporating specific data from the same small motor project. This project collected 419 samples, including 219 OK samples and 200 NG samples, with 335 samples in the training set and 84 samples in the validation set. Specifically, the method includes the following steps:
[0074] S1. Collect at least one vibration signal of the same motor under forward and reverse operating conditions; after identifying the forward and reverse directions of the vibration signals, bind the forward and reverse vibration signals of the same motor into a motor-level sample.
[0075] In the above-described small motor embodiment, at least one vibration signal is collected at a sampling rate of 51200Hz. Data is collected for 6 seconds for each motor, including 3 seconds of forward rotation and 3 seconds of reverse rotation.
[0076] Vibration sensors can be placed at locations that reflect the transmission path of motor defects. The system uses the "motor" as the smallest judgment object, binding the forward and reverse rotation data of the same motor into a complete sample.
[0077] The following methods can be used to identify the forward and reverse directions of vibration signals:
[0078] During the inference phase, the system can automatically identify the direction based on the "forward / reverse" indication in the sample filename. For example, the forward / reverse identification process can be pre-set during data acquisition; the first acquisition is for forward signals, the second for reverse signals, and this information is written in the filename of the saved file. During inference, the filename is used to identify which signal is forward and which is reverse. If the file is saved in TDMS format, different channels in the format are acquired and calculated in a pre-set order.
[0079] If the filename does not contain direction information, the direction of the vibration signal can be determined by the acquisition order or metadata. For example, for a single sample, after acquiring multiple signals, the acquired signals are sequentially named [Signal 1], [Signal 2], [Signal 3], etc. During processing, the sequential positional relationship of these signals is not changed; odd-numbered signals are defined as forward rotation signals, and even-numbered signals are defined as reverse rotation signals. When multiple motor samples exist, they should also be paired according to sample number or adjacent order; for example, Signal 1 and Signal 2 belong to the same motor.
[0080] S2. Read the forward and reverse segments of the basic vibration signal from the collected data; if sound, current, voltage or other vibration signals are collected simultaneously during the vibration signal acquisition process, read the sound, current, voltage or other vibration signals under the forward and reverse operating conditions respectively and associate them with the corresponding basic vibration signal to form forward segment data and reverse segment data.
[0081] The basic implementation of this invention only requires the acquisition of one vibration signal. This vibration signal serves as the basic data, read in S2 according to forward and reverse rotation conditions, and used to extract high-dimensional candidate features in S3. The extracted features are processed in S4 and used for feature filtering and SVM model training in S5. The basic forward rotation data is the forward rotation vibration signal, and the basic reverse rotation data is the reverse rotation vibration signal. If the system simultaneously acquires other vibration signals, sound signals, current signals, or voltage signals, each signal can be read in direction in S2, candidate features can be extracted for each signal in S3, and the feature vectors of different signals can be concatenated or fused in S4. That is, the candidate features of each signal during forward rotation are concatenated and fused with the forward rotation vibration features to form forward rotation features, and the candidate features of each signal during reverse rotation are concatenated and fused with the reverse rotation vibration features to form reverse rotation features.
[0082] In an extended implementation, if the detection system also collects other signals, such as another vibration signal, sound signal, current signal, or voltage signal, candidate features can be extracted for each signal in S3 to obtain the feature vector corresponding to each signal. In S4, the system can directly concatenate or fuse these feature vectors, or, when the feature vectors of different signals have the same dimension and corresponding physical meaning, calculate the difference, ratio, maximum value, minimum value, or weighted fusion value between the corresponding features of different signals to form an extended motor-level feature vector.
[0083] For example, if the basic vibration signal feature is V, the optional sound signal feature is A, and the optional current signal feature is I, then the extended feature vector can be represented as:
[0084] X=[V] or X=[V,A,I],
[0085] It can also be expressed as:
[0086] X=[V,A,I,|VA|,V / A],
[0087] The above extensions do not change the detection process of this invention, which is based on a high-dimensional candidate feature library of vibration signals and SVM segmented confidence output.
[0088] S3. Extract high-dimensional candidate features from the forward and reverse segments of the basic vibration signal to form their respective basic vibration feature vectors; if various signals such as sound, current, voltage or other vibration signals are also collected, extract candidate features from them respectively, and then extract candidate features from the forward and reverse segments of each signal to form their respective feature vectors.
[0089] In this embodiment, 1089 candidate indicators are extracted from the forward and reverse rotation segments. This is equivalent to generating a 1089-dimensional high-dimensional feature for each segment of the signal. These indicator features cover time domain, frequency domain, time-frequency, envelope, autocorrelation, and bandwidth ratio types. The purpose is to subsequently filter these high-dimensional features to select those with the highest possible discriminative power. The aforementioned 1089 candidate indicators are merely examples in this embodiment; the types and number of indicators in the candidate feature library are not limited to these. Other candidate indicators can be added based on the motor type, acquisition conditions, and detection requirements. Newly added indicators will participate in subsequent feature selection and model training together with existing indicators.
[0090] The candidate feature library is classified as follows:
[0091]
[0092] (1) Temporal and envelope features:
[0093] Time-domain and envelope-type features include mean, standard deviation, RMS, peak value, peak-to-peak value, skewness, kurtosis, peak factor, impulse factor, margin factor, waveform factor, absolute value quantile, short-time frame statistics, difference statistics, envelope statistics, bandpass time-domain statistics, and bandpass envelope statistics.
[0094] The bandpass time-domain characteristics can be obtained from frequency bands such as 20-200Hz, 200-800Hz, 800-2000Hz, 2000-5000Hz, 5000-10000Hz, and 10000-20000Hz. For each frequency band, bandpass signal statistics, bandpass envelope statistics, and envelope modulation index can be extracted.
[0095] (2) Frequency domain characteristics:
[0096] Frequency domain features include FFT overall spectrum statistics, Welch power spectrum statistics, spectrum centroid, spectrum bandwidth, spectrum entropy, spectrum flatness, rolloff, total power, peak frequency, Top-k peak amplitude, band mean, band median, band RMS, band p90, band p95, band peak value, band energy, peak / median ratio, etc.
[0097] FFT and Welch bands can be divided using the same frequency band, including:
[0098] 0-100Hz, 0-200Hz, 100-300Hz, 200-500Hz, 300-450Hz, 450-600Hz, 500-1000Hz, 550-650Hz, 600-850Hz, 850-900Hz, 900- 950Hz, 950-1000Hz, 1000-1500Hz, 1000-2000Hz, 1500-2500Hz, 2000-3000Hz, 2000-4000Hz, 2000-12000Hz, 2300-2600Hz, 3000-3600Hz, 3400-3900Hz, 4000-6000Hz, 4000-8000Hz, 4800-5600Hz, 5600-6500Hz, 6500-8000Hz, 8000-10000Hz, 8000- 12000Hz, 8500-8700Hz, 9000-9800Hz, 10000-12000Hz, 12000-16000Hz, 12000-18000Hz, 16000-20000Hz, 18000-25600Hz.
[0099] For each frequency band, statistics such as median, mean, rms, p90, p95, peak, energy, and peak_div_median can be extracted.
[0100] (3) Time-frequency characteristics:
[0101] Time-frequency features are based on STFT to calculate the statistics of energy changes over time in each frequency band, including mean, std, cv, median, p90, p95, max, max_div_median, and temporal_entropy.
[0102] STFT frequency bands may include 0-200Hz, 200-800Hz, 800-2000Hz, 2000-4000Hz, 4000-6000Hz, 6000-8000Hz, 8000-12000Hz, 12000-18000Hz, and 18000-24000Hz.
[0103] (4) Autocorrelation and bandwidth ratio characteristics:
[0104] Autocorrelation features can extract peak, peak_lag_ms, mean, and std within delay ranges of 1-5ms, 5-20ms, 20-80ms, and 80-200ms.
[0105] The frequency band ratio feature is used to describe the prominence of local anomalous peaks relative to the background frequency band, for example:
[0106]
[0107] like Figure 1 Example of a strong feature boxplot of the training set: multiple mid-frequency bands and time-frequency features are discriminative between OK and NG distributions, but a single threshold is difficult to completely separate them.
[0108] The following is a summary of the 1089 candidate indicators used in one embodiment, categorized by type, listing the name of each category and the corresponding number of indicators.
[0109]
[0110] S4. The feature vectors of each signal of the same motor obtained in S3 under forward and reverse rotation conditions are spliced or fused, or the difference, ratio, maximum value, minimum value or weighted fusion value are calculated between features with the same dimension and corresponding physical meaning to form an extended motor-level feature vector.
[0111] Suppose this characteristic is A, and for forward and reverse rotation, it is Aclockwise and Aclockwise respectively. 正转 A 反转 .
[0112] When using the splicing method, A 正转 A 反转 Both values are retained, that is, [A] 正转 A反转 ] as a feature of this sample; when using the difference method, that is, using (A 正转 -A 反转 (A) is used as a feature of the sample; when using the ratio method, (A) is used. 正转 / A 反转 ( ) as features of the sample. Statistical fusion refers to other calculations including finding the maximum value, mean, etc.
[0113] The choice between concatenation, difference calculation, ratio calculation, or statistical fusion depends on the specific characteristics of the samples. Different methods can be selected to sufficiently distinguish between OK and NG samples. This embodiment uses the concatenation method, thus expanding the 1089 basic indicators in each direction into 2178 candidate input columns. Subsequent feature selection is based on basic indicators, with the number of input columns being twice the number of selected basic indicators.
[0114] S5. Select features based on the OK / NG labels of the training samples to obtain a core feature subset, and use the core feature subset to train a support vector machine classification model.
[0115] In this system, the OK / NG labels for the motors are pre-assigned by production line staff based on their production experience. After assigning OK or NG labels to the corresponding motors, data from these motors is collected as the basis for training and verification. A reproducible training and test set is established using all available data, ensuring that the forward and reverse signals of the same motor are not separated. In this embodiment, the "test set" participates in the evaluation of candidate solutions; its nature is to reserve a verification set and it is not used as an independent external test set.
[0116] The high-dimensional candidate feature library contains a large number of redundant and weakly correlated indicators. To reduce the risk of overfitting, this embodiment selects core features from 1089 candidate indicators. The number of core features can be 10-50, preferably 20-30.
[0117] The specific process of core feature selection may include:
[0118] a1. Calculate the OK / NG discriminant for each candidate feature, such as AUC, mutual information, Fisher score, KS statistic, and inter-class distance / intra-class distance ratio.
[0119] a2. Calculate and sort the AUC of individual indicators.
[0120] Calculate the AUC for each metric using the training set and perform the initial ranking. Without using ranking information from the test set, first identify the metrics that best distinguish between OK and NG on their own. Calculate the forward AUC and reverse AUC for each basic metric, and then take the average of the two as the "pairwise average AUC". The AUC can be converted from the Mann-Whitney U statistic.
[0121] p = area under the ROC curve, AUC = max(p, 1-p).
[0122] Where p is the probability that the NG motor's index value is greater than the OK motor's index value when randomly selecting one NG motor and one OK motor (if they are equal, it is counted as 0.5). Since some index values may be larger for NG motors as a whole, or for OK motors as a whole, the program takes the larger value between p and 1-p, only evaluating the discrimination ability, without pre-defining the direction.
[0123] When the AUC is close to 0.5, the values of OK and NG overlap significantly, indicating weak single-indicator discrimination. When the AUC is close to 1.0, OK and NG are more easily separated by this indicator, demonstrating strong single-indicator discrimination. A high AUC does not guarantee inclusion in the final model; if it is highly correlated with previously retained indicators, it will still be removed in the next step.
[0124] a3. Remove highly correlated redundant features and retain features with higher discriminative power.
[0125] We retain indicators with higher discriminative power and larger AUC values, but at the same time, we need to avoid indicators with too high correlation. Therefore, we need to perform a second screening step: Pearson correlation redundancy removal.
[0126] While retaining high AUC indicators, candidates with excessive overlap with the selected indicators are removed to avoid multiple indicators repeatedly describing almost the same oscillation phenomenon. The Pearson correlation coefficient is calculated by dividing the covariance by the product of the standard deviations of the two variables.
[0127]
[0128] Formula explanation and parameter interpretation: Representing variables The sample mean; Representing variables The sample mean; These represent two sets of observed variables that need to be analyzed for correlation, and are the two sets of statistical sample data corresponding to the formula; Indicates the first Composed of observed sample values, For sample serial number ( ), representing the independent observation data corresponding to each group; the numerator is the sum of the products of the deviations from the mean of the two variables, reflecting the linear trend of change between the variables; the denominator is the square root of the product of the sum of the squares of the deviations from the mean of the two variables, used to normalize the correlation coefficient and limit the result to the interval [-1,1].
[0129] r xyClose to 1: The two indicators change in almost the same direction as the sample changes (positive correlation).
[0130] r xy Near -1: The two indicators change almost in opposite directions (negative correlation).
[0131] r xy Close to 0: No obvious linear relationship.
[0132] This process compares absolute values |r|, therefore strong positive and negative correlations are considered duplicate information. During screening, data is scanned from highest to lowest based on AUC ranking. Each candidate indicator has two columns: positive and negative. The program calculates the correlation coefficient between these two columns and the positive and negative columns of all retained indicators. If any combination satisfies |r| ≥ the threshold, the candidate is eliminated; otherwise, it is retained.
[0133] a4. Jointly search the support vector machine (SVM) and the number of features to obtain multiple candidate solutions. Evaluate the multiple candidate solutions according to the set evaluation index to obtain the evaluation score. Select the candidate solution with the highest evaluation score as the final selection result.
[0134] In this embodiment, step a4 uses the SVM (Support Vector Machine) method as an example, but it is not limited to SVM and is also applicable to other machine learning classifiers.
[0135] Specific step a4 includes the following sub-steps:
[0136] a41. Select a number of indicators, a correlation coefficient upper limit, an SVM kernel function and its parameters, an NG class weight, and a binary classification threshold to obtain a complete candidate solution.
[0137] More features are not necessarily better; the number of features needs to be matched with the amount of data to achieve good discriminative performance. Similarly, finding a good SVM model requires studying and comparing several other parameters. The purpose of this step is to compare different feature counts and model parameters using the same data partitioning system to select the best-performing combination. Joint retrieval involves combining multiple options, training and comparing them one by one, specifically including:
[0138] a411. Comparison of the number of basic indicators used:
[0139] The program attempts the following target quantities in sequence: 4, 6, 8, 10, 12, 16, 20, 24, 32, 48.
[0140] The numbers here refer to the "number of basic indicators," not the final number of input columns. Each basic indicator has positive and negative values, therefore:
[0141]
[0142] The reason for trying multiple numbers of metrics is that too few metrics may miss useful vibrational information, leading to underfitting; too many metrics, while potentially improving the accuracy of the training set, may also learn random differences in the training samples, leading to overfitting. Therefore, we cannot assume that a certain number of metrics is always the best; we must compare them with actual validation results.
[0143] a412. Compare the redundancy removal strength of two types of correlation:
[0144] The program attempts to use the upper limits of Pearson absolute correlation coefficients of 0.75 and 0.90 respectively.
[0145]
[0146] For each combination of "number of indicators + upper limit of correlation coefficient," the program re-scans starting from the top AUC ranking, generating a new feature list. For example, if the target is 32 indicators with an upper limit of 0.75 for the correlation coefficient, the program doesn't directly select the top 32 indicators by AUC ranking; instead, it scans and deletes highly correlated indicators as it goes. In this case, it scanned up to the 324th ranked indicator globally before obtaining 32 basic indicators that do not exceed the correlation limit. Therefore, even if the target number of indicators is the same, different upper limits for the correlation coefficient may result in different final lists of indicators.
[0147] a413. Compare the classification boundaries of two SVMs:
[0148] The program compares two types of SVM kernel functions:
[0149]
[0150] Each motor can be imagined as a point in the feature space. The linear kernel is equivalent to trying to separate the two types of points with a flat plate; the radial basis kernel allows this interface to bend.
[0151] a414. Compare the penalty parameter C:
[0152] The C-control model prioritizes classification errors in the training set: a smaller C allows for some misclassification of training samples, resulting in smoother boundaries and a more conservative model; a larger C makes a greater effort to correctly classify training samples, making the model fit the training data better, but excessively large C may lead to overfitting.
[0153] The C values for the linear kernel attempts are: 0.01, 0.03, 0.1, 0.3, 1, 3.
[0154] The C values for the radial basis core attempts are: 0.03, 0.1, 0.3, 1, and 3.
[0155] This cannot be simply interpreted as "the larger C is, the better," because an excessively large C may lead to overfitting on the training set. Therefore, we still need to consider the results of cross-validation and the test set.
[0156] a415. Comparison of radial basis kernel parameter γ:
[0157] In this embodiment, among the two kernel functions compared, γ (gamma) is only used for the radial basis kernel. It controls the size of the influence range of a single training sample: if γ is small, the influence range of a single sample is large, and the classification boundary is smoother. If γ is large, the influence range of a single sample is small, and the boundary can be more curved and detailed, but if it is too large, it is easier to follow random changes in the training data. Five fixed candidate values of γ (0.0003, 0.001, 0.003, 0.01, and 0.03) can be preset and compared one by one.
[0158] a416. Compare the weights of the NG category:
[0159] In industrial inspection, misjudging a true NG as OK is called "NG missed detection"; misjudging a true OK as NG is called "OK over-detection". Generally, NG missed detection is a serious error, while OK over-detection is acceptable to a certain extent.
[0160] The program sets the OK weight to 1 and then tries NG weights in sequence: 1, 1.5, 2, 3, 4. The meanings are as follows:
[0161] NG has a weight of 1: OK and NG have the same cost for a single classification error.
[0162] NG weight greater than 1: During training, more attention is paid to the cost of NG misclassification, which is usually beneficial to reduce NG missed detection.
[0163] A higher NG weight is not necessarily better; an excessively high weight may result in more OKs being classified as NG, increasing the chances of OKs being over-punished.
[0164] In this embodiment, the selected models choose an NG weight of 3, which means that the penalty for an NG misclassification during training is 3 times that for an OK misclassification.
[0165] a417. Obtained 155 sets of SVM parameters:
[0166] The linear kernel has 6 C values, each of which is combined with 5 NG weights: 6 × 5 = 30 sets of linear kernel parameters.
[0167] The radial basis function has 5 C values, 5 γ values, and 5 NG weights: 5×5×5=125 sets of radial basis function parameters.
[0168] Therefore, each feature list requires training: 30 + 125 = 155 sets of SVM parameters. Combined with the upper limit of 2 correlation coefficients and 10 target features, this results in 2 × 10 × 155 = 3100 model blocks.
[0169] Here, "model block" refers to a set of models whose feature list and SVM parameters have been determined, but whose decision threshold has not yet been finalized.
[0170] a418. Five-fold stratified cross-validation:
[0171] Simply looking at how accurate a model is on its own training data is insufficient, as the model may only have "remembered" the training samples. Therefore, the program performs 5-fold stratified cross-validation within the 335 training samples. The purpose of stratification is to prevent a particular fold from having a large number of OKs and very few NGs, which could cause excessive fluctuations in the evaluation. In this embodiment, the cross-validation uses a pre-determined list of features, and features are not re-selected for each fold. Specifically:
[0172] (1) Divide the 335 training samples into 5 parts, and try to keep the OK and NG ratios consistent in each part.
[0173] (2) In the first round, four of them were used for training, and the remaining one was used for verification.
[0174] (3) In the second round, another copy is used for verification, and the remaining 4 copies are used for training.
[0175] (4) Repeat 5 rounds so that each training sample is predicted exactly once without participating in the fitting of that round.
[0176] (5) Combine the off-wheel predictions of 335 samples to obtain the CV (Cross Validation) results.
[0177] a419. Search binary classification threshold:
[0178] SVM outputs a continuous score for each motor. While 0 can typically be used as the boundary, to balance missed NGs and over-detected OKs, this program also compares other thresholds:
[0179] If the score is greater than the threshold, it is judged as NG.
[0180] If the score is less than or equal to the threshold: it is considered OK.
[0181] Lowering the threshold makes it easier to classify as NG, which usually reduces the number of missed NG detections, but may increase the number of OK detections.
[0182] Increased threshold: It is less likely to be judged as NG, which may reduce the number of OKs that are over-detected, but increases the risk of missing NGs.
[0183] Threshold candidates are generated in the following four steps:
[0184] (1) First, obtain 335 training scores.
[0185] Given a defined list of features and SVM parameters, the program first fits the SVM to 335 training samples. After fitting, each training motor will receive a continuous score. For example, the range of the 335 training scores for the final model (see step a43 for specific configuration) is -2.5944 to 2.8600.
[0186] At this point, the SVM model has been trained. When comparing different thresholds later, the SVM will not be retrained. Instead, different boundary lines will be used to re-convert the same batch of continuous scores into OK or NG.
[0187] (2) Obtain 39 quantile thresholds from the training score distribution.
[0188] The program evenly selects 39 percentage points between 3% and 97%.
[0189] q j =3%+j×(97%-3%) / 38, j=0,1,…,38.
[0190] Therefore, the first few positions are approximately 3%, 5.47%, and 7.95%, the middle position includes 50%, and the last few positions are approximately 92.05%, 94.53%, and 97%.
[0191] The common meaning of "3 percentile" is that approximately 3% of training scores are not higher than this number; "50 percentile" is the median; "97 percentile" means that approximately 97% of training scores are not higher than this number.
[0192] Using quantiles instead of fixed intervals allows candidate thresholds to automatically adapt to the score distribution of each model. When scores are concentrated, the candidate thresholds are more densely packed; when scores are dispersed, the candidate range expands accordingly. Using only 3% to 97% avoids a large number of attempts near the minimum and maximum values, which would classify almost all samples into the same extreme boundary.
[0193] (3) Add 13 more fixed thresholds.
[0194] The fixed thresholds are: -2, -1.5, -1, -0.5, -0.3, -0.15, 0, 0.15, 0.3, 0.5, 1, 1.5, 2.
[0195] Supplementing the fixed threshold serves two purposes:
[0196] Ensure that all models are compared using a common reference boundary to facilitate cross-model comparisons.
[0197] We guarantee that we will test 0, the default boundary commonly used in SVM, as well as multiple candidate values near 0.
[0198] For example:
[0199] When the threshold is 0, a score > 0 is considered NG, and a score ≤ 0 is considered OK.
[0200] When the threshold is changed to -0.15, samples that were originally between -0.15 and 0 will also be reclassified as NG, which usually reduces the number of missed NGs, but may increase the number of missed OKs.
[0201] When the threshold is changed to 0.15, samples that were originally between 0 and 0.15 will be reclassified as OK, which may reduce the over-detection of OK samples, but increase the risk of missed detection of NG samples.
[0202] (4) Merge and delete duplicate values.
[0203] The program merges the 39 quantile thresholds with the 13 fixed thresholds, and then deletes candidates with exactly the same value: 39 + 13 = 52.
[0204] If a certain quantile happens to be equal to a fixed threshold, the merged result will be less than 52. No such complete repetition occurred in this run, therefore each model block obtained 52 different thresholds.
[0205] For the same model block, the program will apply these 52 thresholds one by one to: the 335 out-of-round scores generated by 5-fold cross-validation; the 335 training scores generated by the full model; and the 84 test scores generated by the full model.
[0206] Then, the balanced accuracy, OK recall, NG recall, OK missed detections, and NG missed detections were calculated separately. In other words, 52 thresholds correspond to 52 decision rules, rather than retraining 52 SVM models.
[0207] Therefore, the total number of candidate results is: 3100 × 52 = 161200
[0208] Each candidate result represents a complete scheme that can be directly used for prediction, including: number of indicators + specific list of indicators + upper limit of correlation coefficient + kernel function + C + γ + OK / NG class weights + binary classification threshold + cross-validation results + training set results + test set results.
[0209] a42. Calculate cross-validation, training set performance, and test set performance.
[0210] Establish the model selection formula:
[0211] S = a × balanced accuracy of CV + b × balanced accuracy of test set + c × no-go recall of test set
[0212] Where S is the evaluation score, a is the weight of the CV balanced accuracy, b is the weight of the test set balanced accuracy, and c is the weight of the test set NG recall.
[0213] The most important of the evaluation indicators is:
[0214] Balanced precision: The average of OK recall and NG recall. Even if the number of OK and NG cases is different, the class with the larger number of cases will not dominate the results.
[0215] NG recall rate: The proportion of all real NGs that are correctly identified as NGs. The higher this value, the fewer NGs are missed.
[0216] Training / Test Gap: A large gap between the two may indicate that the model only performs well on the training data.
[0217] The actual model selection first calculates:
[0218] S = 0.45 × CV balanced accuracy + 0.45 × test set balanced accuracy + 0.10 × test set NG recall.
[0219] This weighting design means: 45% is used to assess the stability of cross-validation within the training set; 45% is used to assess the overall classification balance on the test set; and 10% is used to further emphasize improving the recall rate of out-of-class (NG) tests on the test set to reduce missed detections.
[0220] If the principal scores are the same, the preference is then shifted to models with smaller training / test gaps, higher test accuracy, higher cross-validation NG recall, fewer features, and smaller NG weights.
[0221] a43. Compare multiple candidate solutions to select the final selected solution.
[0222] Each candidate solution receives an S-value. The S-values of all candidate solutions are compared, and the optimal candidate solution is selected as the final chosen solution. If multiple solutions need to be retained, an S-value threshold can be set, and candidate solutions with values greater than this threshold are selected. The program evaluates all 161,200 candidate results using the same method to obtain the solution with the optimal S-value. This embodiment ultimately uses 32 basic metrics (6 in the time domain and 26 in the frequency domain / time-frequency domain), unfolded into a 64-dimensional input, with a correlation coefficient upper limit of 0.75, radial basis kernel SVM, C=3, γ=0.01, OK / NG weights of 1 and 3 respectively, and a binary classification threshold of 0. The training score range and... Figure 2 , Figure 3 All of these correspond to this scheme. After final selection, the specific list of indicators, the upper limit of correlation coefficient, kernel function, C, γ, class weight, binary classification threshold, and auxiliary threshold used for segmented confidence output are saved as a complete set of parameters and kept consistent during the inference phase.
[0223] a5. Draw box plots, scatter plots, or spectrograms for the features in the selected results to confirm their interpretability.
[0224] The process of training a support vector machine classification model using a subset of core features includes:
[0225] After selecting the core features, each motor is represented as a motor-level feature vector for training, according to the combination method determined in S4. If F forward F represents the core feature of forward rotation. reverse If we represent the inversion of core features, then the motor-level feature vector can be expressed as:
[0226] X=[F forward ,F reverse ]
[0227] You can also add the difference or ratio between forward and reverse rotation:
[0228] X=[F forward ,F reverse ,|F forward -F reverse |,F forward / F reverse ]
[0229] The support vector machine (SVM) classification model is trained using motor-level OK / NG labels as supervisory signals. Both training and inference in SVM classification are performed using a single motor as the basic unit. After training, if the features of a signal from the motor being inferred are used as input, the SVM will output an SVM decision score and the specific classification category.
[0230] SVM can use linear kernels, RBF kernels, multinomial kernels, or other kernel functions. To meet the requirement of minimizing missed detections in NG (Not Given) algorithms, class weights can be set or decision boundaries can be adjusted. The C, gamma, kernel function, class weights, number of features, and binary classification threshold of SVM can be determined through cross-validation or automatic search. The auxiliary threshold used for segmented confidence output is determined based on the score distribution of the training set.
[0231] S6. Use the trained support vector machine classification model to comprehensively determine the motor-level feature vectors of the motor under test and output the SVM decision score.
[0232] SVM stands for Support Vector Machine. The SVM decision score is a continuous numerical value output by the SVM classification model, representing the direction and degree of a sample relative to the decision boundary. The binary classification threshold is denoted as θ: a score > θ indicates an NG (Not Good) classification, and a score ≤ θ indicates an OK classification; the larger |score - θ| is, the farther the sample is from the binary classification boundary.
[0233] For example, if the binary classification threshold is 0, a value greater than 0 indicates NG and a value less than 0 indicates OK, then a score of -0.1 and a score of -1 are both judged as OK, and a score of -1 is more biased towards OK than a score of -0.1; a score of 10 is judged as NG.
[0234] SVM decision scores can be processed using mature machine learning libraries. SVMs can employ linear kernel functions, radial basis function (RBF) kernels, polynomial kernels, or other kernel functions. Taking linear SVM as an example, the decision score is a weighted sum. The core formula is:
[0235] score=w1×x1+w2×x2+w3×x3+...+w n ×x n +b,
[0236] Where x1,x2,...,x n For the current input feature vector of the motor (e.g., x1=forward rotation_energy of a certain frequency band, x2=reverse rotation_energy of a certain frequency band, x3=forward rotation_peak / median, x4=reverse rotation_peak / median, etc.), w1, w2, ..., w n Let b be the weight of each feature trained by the SVM, b be the bias of the SVM, and score be the SVM decision score.
[0237] S7. Output segmented confidence results based on decision scores.
[0238] SVM outputs continuous decision scores for the features of the motor samples under test. A decision boundary value is set for the decision score. When the decision score is greater than the decision boundary value, an NG confidence result is output. NG confidence results are categorized from highest to lowest score as high-confidence NG, leaning towards NG, and weakly leaning towards NG, with higher scores indicating a closer approximation to NG. When the decision score is less than or equal to the decision boundary value, an OK confidence result is output. OK confidence results are categorized from lowest to highest score as high-confidence OK, leaning towards OK, and weakly leaning towards OK, with lower scores indicating a closer approximation to OK.
[0239] The following is an example of how this invention maps continuous decision scores to six confidence results. In this embodiment, 0 is used as the binary classification boundary; for samples in the training set with the true label OK and score ≤ 0, and the true label NG and score > 0, the 1 / 3 and 2 / 3 quantiles of the scores are taken as four auxiliary thresholds on both sides (retaining two decimal places).
[0240]
[0241] The above thresholds can be adjusted based on the product, data collection system, cost of false positives, cost of false negatives, and customer acceptance criteria. The number of segments can also be expanded to three, five, or more segments.
[0242] S8. Output detection results, key features, scores, confidence levels, and review suggestions; and generate samples to be reviewed based on prediction conflicts, the distance between the score and the binary classification threshold, and feature similarity.
[0243] During the inference phase, before the S8 output, the system reads the forward and reverse rotation files of the same motor, automatically identifies the direction, reads the basic vibration signal, first extracts candidate features consistent with those defined in the training phase, then constructs the model input according to the combination method determined in the training phase and the final core feature list, and then performs S6 scoring and S7 six-segment classification. If there are other optional signals, candidate features are extracted simultaneously, and after processing according to the fusion method and core feature list determined in the training phase, they are input into the model.
[0244] The output includes: sample number, forward and reversed files, predicted labels, six-segment classification, SVM score, distance from OK / NG boundary, key anomaly features, and whether a re-examination is recommended.
[0245] Here, the predicted label refers to the OK or NG label; the six-segment classification is to subdivide the OK and NG categories into 3 subcategories each; the distance from the OK / NG boundary is the absolute value of the difference between the SVM score of the motor sample and the binary classification threshold θ, |score - θ|.
[0246] The key anomaly is that when the Support Vector Machine (SVM) classification model determines an error as NG (Not Given), the model automatically identifies indicators that significantly influence this decision. During inference, the program behaves as follows: if the prediction is OK, it only outputs the original SVM score, OK result, and six-segment result, without performing NG impact analysis; if the prediction is NG, in addition to the original results, it outputs, by default, up to five of the input indicators with the largest NG directional push greater than 0. Each indicator is labeled with its full Chinese name, forward / reverse direction, program code, current value, median OK value in the training set, SVM score after replacement, and NG directional push.
[0247] The program employs a per-index replacement method for the current motor for local interpretation. During model training, the program additionally saves the median of each feature in the OK samples of the training set. After inference results in NG, the following steps are performed: Calculate the original SVM score using the actual input values of each feature of the motor; Select only one feature at a time and replace it with the median of the OK samples in the training set, keeping other inputs unchanged; Recalculate the SVM score using the replaced input; Compare the score changes before and after the replacement; If the SVM score decreases significantly after the replacement, it indicates that the current value of the index is pushing the model result towards NG; The greater the decrease, the greater its impact on the current NG judgment; Retain the full Chinese name of the index and the forward / reverse direction, and arrange them in descending order of score decrease.
[0248] The calculation formula is: NG direction push amount = original score - replacement score.
[0249] A push value greater than 0 indicates that the SVM score decreased after replacing it with the OK reference value, and the original value in this column pushed the result toward NG in this inference. A push value less than or equal to 0 indicates that it is not included in "NG Main Influencing Indicators".
[0250] When a manually labeled sample conflicts with a model prediction, or when a sample falls within the weakly propensity OK / weakly propensity NG gray zone, the system adds the sample to a pending review list. The system can also retrieve historical samples with similar features to identify suspected mislabeled samples, boundary samples, or samples with abnormal collection patterns. The distance between the score and the binary classification threshold can be represented by |score-θ|.
[0251] The following provides a further explanation of the overall results and reasoning process of the aforementioned small motor embodiments.
[0252] Example 1:
[0253] (1) Implementation example of a small motor project.
[0254] The above-described small motor examples collected a total of 419 samples, of which 219 were OK and 200 were NG. The training set consisted of 335 units, of which 175 were OK and 160 were NG; the test set (i.e., the reserved validation set) consisted of 84 units, of which 44 were OK and 40 were NG.
[0255]
[0256] The acquired signals include at least one vibration signal with a sampling rate of 51200Hz. Each motor consists of 3 seconds of forward rotation and 3 seconds of reverse rotation. The analysis is based on this vibration signal, and the forward and reverse rotations of the same motor are bound as motor-level samples.
[0257] like Figure 2 Example of a training set confusion matrix: In the training set, NG has 0 false negatives, while OK has a small number of false positives. Figure 3 Example of test set obfuscation matrix: No NG was missed in the test set, and a small number of OK was over-detected.
[0258] (2) Reasoning example.
[0259] The motor under test corresponds to two data files, with the filenames being: A 正转 .tdms; A 反转 .tdms.
[0260] The system automatically identifies forward and reverse rotation, reads the basic vibration signal, and extracts the core feature F for forward rotation. forward and reverse core feature F reverseThe signals are concatenated into a motor-level feature vector and input into the SVM. If other signals exist simultaneously, they are processed according to the extraction, fusion, and filtering methods determined during the training phase before being input into the model.
[0261] If the output score is -1.2, it is judged as 2-prone OK; if the output score is 0.42, it is judged as 4-weakly prone NG; if the output score is 1.8, it is judged as 6-high confidence NG. When the score is close to the 0 boundary or conflicts with the manual label, the sample enters the review list.
[0262] This embodiment constructs a 1089-dimensional high-dimensional candidate feature library for motor defect detection, covering time domain, frequency domain, time-frequency domain, envelope, autocorrelation, and frequency band ratio. Forward and reverse rotation signals of the same motor are bound as motor-level samples and their features are concatenated. A small number of core features are automatically selected from the high-dimensional candidate features, balancing discriminability, stability, redundancy, and engineering constraints. Support Vector Machines (SVMs) are used to output continuous decision scores, instead of just binary classification labels. The SVM decision scores are mapped to six confidence segments, supporting production line-level tiered processing. Samples to be reviewed are generated based on prediction conflicts, the distance between the score and the binary classification threshold, and feature similarity, for label cleaning and model iteration. The basic vibration signal, optional extended signal, sensitive frequency band, high-dimensional feature library, feature selection, SVM scores, and segmented output are combined into a complete detection process.
[0263] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A method for detecting motor defects based on a high-dimensional candidate feature library and piecewise confidence output, characterized in that, Includes the following steps: S1. Collect at least one vibration signal of the same motor under forward and reverse rotation conditions; bind the forward and reverse vibration signals of the same motor into a motor-level sample according to the sample number, file name, collection order or metadata; S2. Read the forward and reverse segments of the basic vibration signal from the collected data; if sound, current, voltage or other vibration signals are collected at the same time, read them separately according to the forward and reverse operating conditions, and associate them with the corresponding basic vibration signal to form forward segment data and reverse segment data; S3. Extract high-dimensional candidate features from the forward and reverse segments of the basic vibration signal to form their respective basic vibration feature vectors; if various signals such as sound, current, voltage or other vibration signals are also collected, extract candidate features from them respectively, and then extract candidate features from the forward and reverse segments of each signal to form their respective feature vectors. S4. The feature vectors of each signal of the same motor obtained in S3 under forward and reverse rotation conditions are spliced or fused, or the difference, ratio, maximum value, minimum value or weighted fusion value are calculated between features with the same dimension and corresponding physical meaning to form an extended motor-level feature vector. S5. Select features based on the OK / NG labels of the training samples to obtain a core feature subset, and use the core feature subset to train a support vector machine classification model; S6. Use the trained support vector machine classification model to comprehensively determine the motor-level feature vectors of the motor under test and output the SVM decision score; S7. Output segmented confidence results based on decision scores; S8. Output detection results, key features, scores, confidence levels, and review suggestions; and generate samples to be reviewed based on prediction conflicts, the distance between the score and the binary classification threshold, and feature similarity.
2. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 1, characterized in that, S1 specifically includes: Vibration sensors are placed at locations that reflect the transmission path of motor defects. Vibration signals from the motor are collected by the vibration sensors, and the direction of the vibration signal is automatically identified according to the "forward / reverse" identifier in the sample file name. If the file name does not contain direction information, the direction of the vibration signal is determined according to the signal acquisition order or metadata. Finally, the forward and reverse data of the same motor are bound into a complete sample.
3. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 1, characterized in that, In the extraction of high-dimensional candidate features in S3, the candidate indicators include the types of time domain, frequency domain, time-frequency, envelope, autocorrelation, and frequency band ratio. The time-domain and envelope features include mean, standard deviation, RMS, peak value, peak-to-peak value, skewness, kurtosis, peak factor, impulse factor, margin factor, waveform factor, absolute value quantile, short-time frame statistics, difference statistics, envelope statistics, bandpass time-domain statistics, and bandpass envelope statistics. The frequency domain features include FFT overall spectrum statistics, Welch power spectrum statistics, spectrum centroid, spectrum bandwidth, spectrum entropy, spectrum flatness, rolloff, total power, peak frequency, Top-k peak amplitude, band mean, band median, band RMS, band p90, band p95, band peak value, band energy, and peak / median ratio. The time-frequency features are based on STFT to calculate the statistics of energy changes over time in each frequency band, including mean, std, cv, median, p90, p95, max, max_div_median, and temporal_entropy. The autocorrelation features are extracted from peak, peak_lag_ms, mean, and std within the delay range. The frequency band ratio feature is used to describe the prominence of local anomalous peaks relative to the background frequency band.
4. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 1, characterized in that, In step S5, when selecting features based on the OK / NG labels of the training samples, core features are selected from the candidate indicators in the high-dimensional candidate feature library. The specific process includes: a1. Calculate the OK / NG discriminant for each candidate feature; a2. Calculate and sort the AUC of individual indicators; a3. Remove highly correlated redundant features and retain features with higher discriminative power; a4. Jointly search the support vector machine and the number of features to obtain multiple candidate solutions. Evaluate the multiple candidate solutions according to the set evaluation index to obtain the evaluation score. Select the candidate solution with the highest evaluation score as the final selection result. a5. Draw box plots, scatter plots, or spectrum plots for the features in the selected results.
5. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 4, characterized in that, Step a2 specifically includes: For each fundamental vibration characteristic, calculate the forward and reverse AUCs separately, and then take the average of the two as the paired average AUC; the AUC can be converted from the Mann-Whitney U statistic. p = area under the ROC curve, AUC = max(p, 1-p), Where p is the probability that the AUC of the NG motor is greater than the AUC of the OK motor when one NG motor and one OK motor are randomly selected; when the AUC of the NG motor and the AUC of the OK motor are equal, it is counted as 0.
5. Step a3 specifically includes: Indicators with higher discriminative power and larger AUC values are retained. Pearson correlation is used for redundancy removal, eliminating candidates with excessive overlap with the selected indicators. The Pearson correlation coefficient is calculated as the covariance divided by the product of the standard deviations of the two variables. , in, Representing variables The sample mean; Representing variables The sample mean; These represent two sets of observed variables that need to be analyzed for correlation, and are the two sets of statistical sample data corresponding to the formula; Indicates the first Composed of observed sample values, For sample serial number ( ), representing the independent observation data corresponding to each group; the numerator is the sum of the products of the deviations from the mean of the two variables, reflecting the linear trend of change between the variables; the denominator is the square root of the product of the sum of the squares of the deviations from the mean of the two variables, used to normalize the correlation coefficient and limit the result to the interval [-1,1]; r xy When the value is close to 1, the two indicators change in almost the same direction as the sample changes, showing a positive correlation. r xy When the value approaches -1, the two indicators change almost in opposite directions, showing a negative correlation. r xy When the value is close to 0, there is no obvious linear relationship.
6. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 4, characterized in that, Step a4 specifically includes: a41. Select a number of indicators, select an upper limit for the correlation coefficient, select an SVM kernel function and its parameters, select an NG class weight, and select a binary classification threshold to obtain a complete candidate solution; a42. Calculate the cross-validation, training set, and test set performance of candidate solutions, and establish the selection formula: S = a × balanced accuracy of CV + b × balanced accuracy of test set + c × no-go recall of test set Where S is the evaluation score, a is the weight of the balanced accuracy of CV, b is the weight of the balanced accuracy of the test set, and c is the weight of the NG recall of the test set. a43. Compare multiple candidate solutions to select the final selected result: select the candidate solution with the highest evaluation score; when multiple groups need to be retained, select the candidate solution with an evaluation score higher than the set threshold.
7. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 1, characterized in that, In step S5, a support vector machine classification model is trained using a subset of core features. The specific process includes: After selecting the core features, each motor is represented as a motor-level feature vector for training, according to the combination method determined in S4; with F forward F represents the core feature of forward rotation. reverse If we represent the inversion of core features, then the motor-level feature vector can be expressed as: X=[F forward ,F reverse ]; Or X=[F forward ,F reverse ,|F forward -F reverse |,F forward / F reverse ]; The support vector machine is trained using motor-grade OK / NG tags as supervision signals. The support vector machine uses functions including linear kernel, RBF kernel, and polynomial kernel, and sets class weights or adjusts the decision boundary. The C, gamma, kernel function, class weights, number of features, and binary classification threshold of the support vector machine are determined through cross-validation or automatic search.
8. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 1, characterized in that, In S6, the support vector machine uses kernel functions including linear, radial basis kernels, and polynomial kernels; When using a linear kernel function, the calculation process for SVM decision scores includes: score=w1×x1+w2×x2+w3×x3+...+w n ×x n +b, Where x1,x2,...,x n Let w1, w2, ..., w be the input feature vector of the current motor. n Let b be the weight of each feature trained by the SVM, b be the bias of the SVM, and score be the SVM decision score.
9. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 1, characterized in that, In step S7, the segmented confidence results are output based on the decision scores, including: SVM outputs continuous decision scores for the features of the motor samples under test. A decision boundary value is set for the decision score. When the decision score is greater than the decision boundary value, an NG confidence result is output. NG confidence results are categorized from highest to lowest score as high-confidence NG, leaning towards NG, and weakly leaning towards NG, with higher scores indicating a closer approximation to NG. When the decision score is less than or equal to the decision boundary value, an OK confidence result is output. OK confidence results are categorized from lowest to highest score as high-confidence OK, leaning towards OK, and weakly leaning towards OK, with lower scores indicating a closer approximation to OK.
10. The motor defect detection method based on a high-dimensional candidate feature library and piecewise confidence output according to claim 1, characterized in that, Also includes: Before outputting S8, read the forward and reverse rotation files of the same motor, automatically identify the direction, read the basic vibration signal, extract the core features consistent with the training phase, input the support vector machine classification model trained by S5 in S6 to obtain the SVM decision score, and then obtain the confidence result in S7. If other optional signals exist, the features are extracted, combined, and selected in the manner determined during the training phase, and then input into the support vector machine classification model. The output of S8 includes: sample number, forward and reversed files, predicted label, six-segment classification, SVM score, distance from OK / NG boundary, key anomaly features, and whether a re-examination is recommended; When manual labels conflict with model predictions, or when a sample is in the weakly propensity OK / weakly propensity NG gray zone, the system adds the sample to the list of samples to be reviewed; and / or retrieves historical samples with similar features to identify suspected mislabeled, boundary samples, or abnormal samples.
