Thread Rolling Process Detection Method
Through machine learning algorithm combined with signal processing, automatic adjustment of detection standards is solved, and the problem of manual setting of standards in existing screw detection methods is achieved, and the automation and applicability of screw detection is improved.
Patent Information
- Application Number
- CN202011131084.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-21
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2040-10-21
AI Technical Summary
The existing screw detection methods rely on manual setting of standard values, resulting in low detection automation and inapplicable to screws of different specifications, and high labor costs.
The machine learning algorithm is used to combine signal processing, and the pressure signal of the screw is detected through the pressure sensing device, the model is established using grouping and classification steps, and the detection standards are automatically adjusted to achieve automation and applicability improvement.
This enables no need to set yield standards for each screw, improves the applicability and automation of the inspection process, and reduces labor costs.
Smart Images

Figure CN114462441B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a process detection method, in particular to a tapping process detection method for detecting the yield of the tapping process. Background Art
[0002] After the screw has completed the rolling process, it is necessary to conduct spot checks to confirm whether there are defects in the thread. The current detection method is to detect and compare by the naked eye, which consumes labor costs and is inaccurate. Another current detection method is to use a pressure sensor to sense the extrusion force of the screw relative to the sensing surface, and then convert it into a numerical value by an arithmetic device. The numerical value is compared with a preset standard value. When there is a difference between the numerical value and the standard value, it indicates that the screw is skewed or has a misaligned thread. The on-site staff then adjusts the process or machine according to the monitoring results.
[0003] The current detection method can indeed achieve automated and standardized detection through the pressure sensor. However, the standard value used to judge the screw yield depends on the setting of the staff. If it is necessary to detect other specification screws, it needs to be reset again, so it is necessary to improve. Summary of the Invention
[0004] Therefore, an object of the present invention is to provide a tapping process detection method that improves the applicability of the detection process through signal processing and combines machine learning algorithms.
[0005] Thus, the tapping process detection method of the present invention includes a signal acquisition step of detecting the contour of the workpiece and converting it into a pressure signal, a clustering step of clustering the pressure signal, a labeling step of labeling the result obtained in the clustering step on the pressure signal, a classification step of classifying the labeled pressure signal, a training step of establishing a model, training and validating using an algorithm, and a verification step of detecting the yield using the validated model.
[0006] The signal acquisition step includes a sensing sub-step of using a pressure sensing device to sense the pressure value of the workpiece relative to the pressure sensing device, and a conversion sub-step of converting the pressure value into the pressure signal.
[0007] The clustering step includes a first outlier processing sub-step of defining outliers in the pressure signal and establishing outlier labels, a first dimensionality reduction sub-step of reducing the signal dimension other than the outliers, a first component analysis sub-step of extracting feature dimensions, and a setting label sub-step of distinguishing and respectively establishing good product and bad product labels.
[0008] The labeling step labels the good products, bad products, and abnormal clusters obtained by using the set labeling sub-step and the first outlier processing sub-step on the pressure signals obtained in the signal acquisition step respectively.
[0009] The classification step includes a second outlier processing sub-step for analyzing abnormal clusters, a sample extraction sub-step for extracting training samples and test samples for good products, bad products, and abnormal clusters respectively, a second dimensionality reduction sub-step for reducing the dimension of the pressure signals labeled by the training samples, and a second component analysis sub-step for extracting feature dimensions.
[0010] The object of the present invention and the technical problems solved by it can be further realized by the following technical measures.
[0011] Preferably, in the above-mentioned thread rolling process detection method, in the first outlier processing sub-step of the clustering step, the median absolute deviation rule is adopted, and there is a definition process of defining the value exceeding 5 times the median absolute deviation as an outlier, and a clustering analysis process of using the K-means algorithm to divide the outliers into three clusters.
[0012] Preferably, in the above-mentioned thread rolling process detection method, in the first dimensionality reduction sub-step of the clustering step, there is a first fast Fourier transform process for reducing the data dimension to 20 to 25 dimensions, and a first inverse Fourier transform process for removing noise.
[0013] Preferably, in the above-mentioned thread rolling process detection method, in the first component analysis sub-step of the clustering step, there is a first new dimension process for adding three dimensions, a first standardization dimension process for performing the standard score method, and a first feature extraction process for making the maximum variance reach more than 90%.
[0014] Preferably, in the above-mentioned thread rolling process detection method, in the set labeling sub-step of the clustering step, the hierarchical clustering method is used to establish the labels of good products and bad products.
[0015] Preferably, in the above-mentioned thread rolling process detection method, in the set labeling sub-step of the clustering step, the Gaussian mixture model is used.
[0016] Preferably, in the above-mentioned thread rolling process detection method, in the second outlier processing sub-step of the classification step, the K-means algorithm is used to divide the pressure signals labeled as abnormal into three clusters.
[0017] Preferably, in the above-mentioned thread rolling process detection method, in the second dimensionality reduction sub-step of the classification step, there is a second fast Fourier transform process for reducing the data dimension to 20 to 25 dimensions, and a second inverse Fourier transform process for removing noise.
[0018] Preferably, in the above-mentioned thread rolling process detection method, in the second component analysis sub-step of the classification step, there is a second newly added dimension process of adding three new dimensions, a second standardization dimension process of performing a standard score method, and a second feature extraction process of making the maximum variance reach more than 90%.
[0019] Preferably, in the above-mentioned thread rolling process detection method, the training step uses one or a combination of extreme gradient method, logistic regression, random forest, decision tree, and deep learning.
[0020] The beneficial effect of the present invention is that through the signal acquisition step, each workpiece contour is detected and converted into the pressure signal, which is converted into the pressure signal for analysis. The clustering step provides the label data required for the classification step, enabling the user to directly establish the prediction mechanism for this batch of workpieces from the training step, without setting the yield standard for each type of workpiece individually, effectively improving the applicability. Description of the Drawings
[0021] Figure 1 is a block flow chart illustrating an embodiment of the thread rolling process detection method of the present invention;
[0022] Figure 2 is a block flow chart assisting in explaining the step flow of the embodiment;
[0023] Figure 3 is a schematic diagram illustrating a pressure sensing device detecting a workpiece in this embodiment;
[0024] Figure 4 is a schematic diagram illustrating the pressure sensing device detecting the workpiece from another angle;
[0025] Figure 5 is a signal diagram showing a pressure signal detected by the pressure sensing device;
[0026] Figure 6 is a signal diagram showing the signal diagram after being processed by a first dimension reduction sub-step;
[0027] Figure 7 is a signal diagram showing the signal diagram after being processed by a set label sub-step;
[0028] Figure 8 is a signal diagram showing the signal diagram after being processed by a second outlier processing sub-step; and
[0029] Figure 9 is a signal diagram illustrating a verification step. Detailed Description of the Invention
[0030] The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0031] Referring to Figure 1 and 2 , an embodiment of the detection method for the thread rolling process of the present invention includes a signal acquisition step 1 of detecting the contour of a workpiece I (shown in Figure 3 ) and converting it into a pressure signal, a clustering step 2 for clustering the pressure signal, a labeling step 3 of labeling the result obtained in the clustering step 2 to the pressure signal, a classification step 4 for classifying the labeled pressure signal, a training step 5 of establishing a model, training and validating using an algorithm, and a verification step 6 of detecting the yield using the validated model.
[0032] Referring to Figures 1 to 3 , specifically, the signal acquisition step 1 includes a sensing sub-step 11 of using a pressure sensing device 7 to sense the pressure value of the workpiece I relative to the pressure sensing device 7, and a conversion sub-step 12 of converting the pressure value into the pressure signal. The pressure sensing device 7 is an accelerometer, a strain gauge, or a piezoelectric transducer that uses data acquisition technology. By sensing the force generated on the surface of the workpiece I relative to the sensing surface, and through the conversion sub-step 12, the pressure value is converted into the pressure signal for subsequent steps.
[0033] Referring to Figures 3 to 4 , specifically, the pressure sensing device 7 includes a fixing module 71 adapted to abut against one side of the workpiece I, a moving module 72 adapted to abut against and drive the workpiece I to move laterally, and a detection unit 73 disposed in the fixing module 71. The moving module 72 includes a base member 721 and a threaded member 722 formed on the contact surface between the base member 721 and the workpiece I. The detection unit 73 includes a horizontal radial force sensing member 731 for measuring the horizontal radial force from the threaded member 722 pressing the thread of the workpiece I, a vertical axial force sensing member 732 for measuring the vertical axial force from the incorrect matching, and a horizontal force sensing member 733 for measuring the horizontal force from the moving module 72 pushing against the workpiece I relative to the fixing module 71.
[0034] The moving module 72 cooperates with the fixing module 71 to support the workpiece I through the frictional force relative to the workpiece I, and then drives the moving module 72 as Figure 2The workpiece I rotates by means of the lateral movement shown, thereby driving the workpiece I to rotate, and causing the workpiece I to thread-extrude the threaded part 722. At this time, the horizontal radial force sensing member 731 starts to sense the horizontal radial force. When there are burrs on the thread of the workpiece I, the horizontal radial force relative to the threaded part 722 will be different; the vertical axial force sensing member 732 starts to measure the vertical axial force. When the workpiece I is skewed or distorted, different vertical axial forces will be generated because it does not match the fixed module 71 and the moving module 72; the horizontal force sensing member 733 also senses the horizontal force at the same time. When there is a difference between the size of the workpiece I itself and the standard size, the horizontal force exerted on the fixed module 71 due to the push of the moving module 72 will also be different..
[0035] Accordingly, after collecting the above horizontal radial force, vertical axial force, and the horizontal force, the detection unit 73 will convert the pressure value into the pressure signal. When the above pressure value varies due to the defects of the workpiece I itself, it will also be presented in the pressure signal. Generally speaking, the pressure signals presented by the qualified products that meet the standards are roughly the same and the number is large. The defective products that do not meet the standards will present different pressure signals due to different defects. Accordingly, by analyzing most of the pressure signals and a small number of abnormal pressure signals, the yield rate of the thread rolling process can be understood.
[0036] Refer to Figure 5 And cooperate with Figure 1 、 2 , since the pressure signals collected at this time are still mixed with a lot of noise and are about four hundred dimensions. Because the dimension is quite high, although the ability of machine learning prediction and classification usually increases with the increase of the number of dimensions, considering that the number of the collected pressure signals does not increase exponentially, the available data becomes very sparse, making it difficult statistically and resulting in the curse of dimensionality phenomenon. Therefore, both the clustering step 2 and the classification step 4 need to reduce the numerical dimension.
[0037] Refer back to Figure 1 , the clustering step 2 includes a first outlier processing sub-step 21 for defining the outliers in the pressure signal and establishing outlier labels, a first dimension reduction sub-step 22 for reducing the dimension of the signals other than the outliers, a first component analysis sub-step 23 for extracting the feature dimensions, and a setting label sub-step 24 for distinguishing and respectively establishing the labels of the qualified products and the defective products.
[0038] Among them, the first outlier processing sub-step 21 is based on the Median Absolute Deviation (MAD) rule, and has a definition process 211 that defines a value exceeding 5 times the median absolute deviation as an outlier, and a clustering analysis process 212 that uses the k-means clustering algorithm to divide the outliers into three clusters.
[0039] In the clustering analysis process 212, three cluster centroids are initially randomly separated. The Euclidean distance is calculated for all values relative to the cluster centroids, and all values are classified into the three clusters by being assigned to the nearest cluster centroid. Since the initial cluster centroids are randomly assigned, it is necessary to continuously update the cluster centroids based on the values of each clustering until convergence occurs when all the cluster centroids no longer change. At this time, the Euclidean distance between the values within each cluster and their respective cluster centroids reaches the minimum.
[0040] Refer to Figure 5 、 6 And in cooperation with Figure 1 The first dimension reduction sub-step 22 has a first Fast Fourier Transform process 221 (FFT) that reduces the data dimension to 20 to 25 dimensions, and a first Inverse Fast Fourier Transform process 222 (IFFT). First, the pressure signal is converted to a frequency domain signal through the first Fast Fourier Transform process 221, and the signals at 20 to 50 times the frequency are extracted. Then, through the first Inverse Fast Fourier Transform process 222, the frequency domain signal is converted back to the pressure signal, and thus the signal is smoothed as Figure 5 shown.
[0041] It should be noted that the first Fast Fourier Transform process 221 can actually also use the Discrete Fourier Transform (DFT). However, considering the efficiency of data sorting, the more efficient Fast Fourier Transform is adopted in this embodiment.
[0042] In this embodiment, the first component analysis sub-step 23 has a first new dimension process 231 that adds three dimensions, a first standardization dimension process 232 that performs the Standard Score method, and a first feature extraction process 233 that makes the maximum variance reach more than 90%.
[0043] In the first new dimension process 231, first find values such as area, the positions where peak values appear, and peak values. The peak value is the integer part of the median of the positions where peak values appear. Then calculate the median of all positions where peak values appear and the difference between each position where a peak value appears and the median respectively. Next, add three new dimensions: area, the difference between the position where a peak value appears and the median, and the peak value. Combining with the original 20 dimensions, the number of dimensions of the values will be 23 to 28 at this time. It should be noted that in practice, it is found that due to the resolution of data collection and the duration of the maximum pressure value, the same peak value may appear at multiple time points. In this case, the integer part of the median of these time points is uniformly obtained to facilitate the execution of subsequent steps.
[0044] In the first dimension standardization process 232, each value is individually subtracted from the average of all values, and then divided into different ranges according to the standard deviation of all values.
[0045] In the first feature extraction process 233, Principal Component Analysis (PCA) is used to extract PCA features, and the maximum variance is made to reach more than 90%. At this time, the number of dimensions will be reduced from 23 to 28 dimensions to 5 dimensions without affecting the data characteristics, achieving the effect of maintaining the maximum variance, not affecting the data characteristics, and reducing the dimensions. The 5 dimensions at this time include the linear combination under the maximum explanatory variance in the explanatory variables, and each dimension is independent of each other, thus avoiding the problem of variance inflation.
[0046] In addition to principal component analysis, Fast Independent Component Analysis (Fast ICA) can also be used, so it is not limited to the above.
[0047] Refer to Figure 7 And cooperate with Figure 1 、 2 , next, execute the set label sub-step 24. In this embodiment, the Hierarchical Cluster method is used, and the Euclidean Distance is used in combination with the Average Linkage method to calculate the average value of the distances between two clusters respectively. Finally, as Figure 6Shown as being divided into two groups, respectively representing good products and defective products. It should be particularly noted that, in addition to the hierarchical clustering method, in this embodiment, a Gaussian Mixture Model (GMM) can also be used to calculate the probability that each of the two groups belongs to a group greater than 0.5 for clustering, so it is not limited to the above.
[0048] Combining the abnormal clusters defined and divided into three groups in the first outlier processing sub-step 21, and the good products and defective products separated in the setting label sub-step 24 of the clustering step 2, the label step 3 can be used to label each of the original 400-dimensional pressure signals one by one as the label data required for the subsequent classification step 4 prediction modeling.
[0049] The classification step 4 includes a second outlier processing sub-step 41 for analyzing abnormal clusters, a sampling sub-step 42 for separately extracting training samples and test samples for good products, defective products, and abnormal clusters, a second dimension reduction sub-step 43 for reducing the dimension of the pressure signal of the label of the training samples, and a second component analysis sub-step 44 for extracting feature dimensions.
[0050] Refer to Figure 8 And cooperate with Figure 1 , 2 , the second outlier processing sub-step 41 uses the K-means algorithm to divide the pressure signals that have been labeled as abnormal into three groups.
[0051] Next, 70% of the pressure signals are separately extracted as training samples (TestTrain Data) in good products, defective products, and abnormal clusters, and 30% of the pressure signals are used as test samples (Validation Data) for evaluating the goodness of the model and adjusting the model parameters.
[0052] Since the dimensions of the training samples and the test samples are still quite high at this time, the second dimension reduction sub-step 43 needs to be executed, which has a second fast Fourier transform process 431 for reducing the data dimension to 20 to 25 dimensions, and a second inverse Fourier transform process 432 for removing noise. The same as the process in the clustering step 2, first, the pressure signal is converted to the frequency domain signal through the second fast Fourier transform process, and the signals with 20 to 50 times the frequency are extracted, and then through the second inverse Fourier transform process, the frequency domain signal is converted back to the pressure signal, thereby smoothing the signal.
[0053] Similarly, the second fast Fourier transform process 431 can actually also use the discrete Fourier transform, but considering the efficiency of data collation, the more efficient fast Fourier transform is used in this embodiment.
[0054] The second component analysis sub-step 44 has a second new dimension process 441 that adds three new dimensions, a second standardization dimension process 442 that performs the Standard Score method, and a second feature extraction process 443 that makes the maximum variance reach more than 90%.
[0055] In the second new dimension process 441, first find values such as area, the position where the peak value appears, and the peak value. The peak value is the integer part of the median of the position where the peak value appears. Then calculate the median of all positions where the peak value appears and the difference between each position where the peak value appears and the median. Then add three new dimensions: area, the difference between the position where the peak value appears and the median, and the peak value. Combining with the original 20 dimensions, the number of values will be 23 to 28 dimensions at this time.
[0056] In the second standardization dimension process 442, each value is individually subtracted from the average of all values, and then divided into different intervals according to the standard deviation of all values.
[0057] In the second feature extraction process 443, PCA features are extracted through the principal component analysis method, and the maximum variance reaches more than 90%. At this time, the number of dimensions will be reduced from 23 to 28 dimensions to 5 dimensions without affecting the data characteristics, achieving the effect of retaining the maximum variance, not affecting the data characteristics, and reducing the dimensions.
[0058] Similarly, for the second feature extraction process 443 of the second component analysis sub-step 44, in addition to the principal component analysis, the FastICA (Fast Independent Component Analysis) method can also be used.
[0059] After the classification step 4, the labeled good products, bad products, and abnormal clusters have been smoothed, dimension-reduced, and standardized to form 2 to 5 feature dimensions with a maximum variance of more than 90%.
[0060] In this embodiment, the training step 5 is performed by the Extreme Gradient Boosting (XGBoost) method. Through incremental training, regression trees (Classification and Regression Tree, CART) that continuously integrate and stack to generate Prediction Scores are generated, thereby reducing the prediction error rate. Then, the trained extreme gradient boosting regression algorithm is used to predict the process yield.
[0061] The following specifically describes the parameters that need to be modified during execution:
[0062] colsample_bytree = 1,
[0063] # Sampling ratio of rows. The higher it is, the more cols each tree uses, which will increase the complexity of each small tree
[0064] booster = "gbtree",
[0065] # Maximum depth of the tree. The higher it is, the deeper the model can grow, and the higher the model complexity
[0066] max_depth = 5,
[0067] # Boosting will increase the weights of misclassified data, and this parameter is to make the weights not increase so fast. Therefore, the larger it is, the more conservative the model will be
[0068] eta = 0.001,
[0069] eval_metric = "error"
[0070] # num_class = 4,
[0071] objective = "binary:logistic",
[0072] # The larger it is, the more conservative the model will be, and relatively the model complexity is lower
[0073] gamma = 0
[0074] It should be specifically noted that in addition to using XGBoost for the training step 5, machine learning tools such as Logistic Regression, Random Forest, Decision Tree, Deep Learning, etc. can also be selected to execute or be combined with each other. Therefore, it is not limited to the above
[0075] Cooperate with Figure 2 Refer to Figure 9 , the results predicted by the model established using the training step 5 are as shown in Table 1 below
[0076]
[0077] Then, the validation step 6 can be executed to verify the usability of the model established in the training step 5 using the test samples. Finally, the parameters can be adjusted step by step to optimize the training effect, and a better model can be obtained. The results after validation are as shown in Table 2 below
[0078]
[0079]
[0080] However, the above are only embodiments of the present invention, and the scope of the present invention cannot be limited thereby. All simple equivalent changes and modifications made according to the claims and the content of the specification of the present invention still fall within the scope covered by the present invention.
Claims
1. A method for detecting a thread rolling process, characterized in that: The thread rolling process detection method includes: A signal acquisition step of detecting the contour of a workpiece and converting it into a pressure signal, including a sensing sub-step of using a pressure sensing device to sense the pressure value of the workpiece relative to the pressure sensing device, and a conversion sub-step of converting the pressure value into the pressure signal; A clustering step of clustering the pressure signal, and including a first outlier processing sub-step of defining outliers in the pressure signal and establishing outlier labels, a first dimensionality reduction sub-step of reducing the signal dimension other than the outliers, a first component analysis sub-step of extracting feature dimensions, and a set label sub-step of distinguishing and respectively establishing good product and bad product labels; A labeling step of labeling the good products, bad products, and abnormal clusters obtained by the set label sub-step and the first outlier processing sub-step on the pressure signal obtained in the signal acquisition step; A classification step of classifying the labeled pressure signal, and including a second outlier processing sub-step of analyzing the abnormal cluster, an extraction sample sub-step of respectively extracting training samples and test samples for the good products, bad products, and abnormal clusters, a second dimensionality reduction sub-step of reducing the dimension of the pressure signal of the label of the training sample, and a second component analysis sub-step of extracting feature dimensions; A training step of establishing and training a model using an algorithm and the training samples, and verifying the model using the test samples; and A detection step of detecting the yield rate using the verified model.
2. The tooth rolling process detection method according to claim 1, wherein: The first outlier processing sub-step of the clustering step is based on the median absolute deviation rule, and has a definition process of defining a value exceeding 5 times the median absolute deviation as an outlier, and a clustering analysis process of using the K-means algorithm to divide the outliers into three clusters.
3. The thread rolling process detection method according to claim 1, wherein: The first dimensionality reduction sub-step of the clustering step has a first fast Fourier transform process of reducing the data dimension to 20 to 25 dimensions, and a first inverse Fourier transform process of removing noise.
4. The tooth-rolling process detection method according to claim 1, wherein: The first component analysis sub-step of the clustering step has a first new dimension process of adding three dimensions, a first standardization dimension process of performing the standard score method, and a first feature extraction process of making the maximum variance reach more than 90%.
5. The thread rolling process detection method according to claim 1, wherein: The set label sub-step of the clustering step is to establish good product and bad product labels using the hierarchical clustering method.
6. The thread rolling process detection method according to claim 1, wherein: The set label sub-step of the clustering step is to establish good product and bad product labels using the Gaussian mixture model.
7. The detection method for the thread rolling process according to claim 1, wherein: The second outlier processing sub-step of the classification step is to use the K-means algorithm to divide the pressure signal labeled as abnormal into three clusters.
8. The tooth-rolling process detection method according to claim 1, characterized in that: The second dimensionality reduction sub-step of the classification step has a second fast Fourier transform process of reducing the data dimension to 20 to 25 dimensions, and a second inverse Fourier transform process of removing noise.
9. The thread rolling process detection method according to claim 1, wherein: The second component analysis sub-step of the classification step has a second new dimension process of adding three dimensions, a second standardization dimension process of performing the standard score method, and a second feature extraction process of making the maximum variance reach more than 90%.
10. The thread rolling process detection method according to claim 1, characterized in that: The algorithm of the training step uses one or a combination of the extreme gradient method, logistic regression, random forest, decision tree, and deep learning.
Citation Information
Patent Citations
Screw detection method, device and system and detection machine
CN105783730A
Multidimensional data anomaly detection method and device based on XGBoost
CN111275288A