Workpiece surface roughness prediction method, system and equipment and storage medium
Through the multi-core support vector regression model optimized by double-threshold endpoint monitoring and genetic algorithm, the problem of feature unpreprocessed and optimization range limitations in the prediction of workpiece surface roughness is solved, the prediction accuracy and efficiency are improved, and the surface roughness of workpiece is achieved efficient monitoring.
Patent Information
- Application Number
- CN202411192738.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-17
AI Technical Summary
The prior art did not perform multi-dimensional feature preprocessing on the collected vibration signals in the workpiece surface roughness prediction, resulting in large errors in the prediction results, and the grid search method has limited optimization scope, so it is impossible to effectively process outliers and model parameters, resulting in prediction accuracy. Restricted.
The double-threshold endpoint monitoring interception method and outlier detection are used to optimize the multi-core support vector regression model through genetic algorithm, and feature normalization, dimensionality reduction and outlier elimination are performed to achieve the optimization of the model hyperparameters.
It improves the accuracy and efficiency of workpiece surface roughness prediction, reduces the number of features, enhances the model's modeling ability of complex data, and ensures the reliability and consistency of the prediction results.
Smart Images

Figure CN119150157A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of grinding vibration signal processing, and in particular to a workpiece surface roughness prediction method, system, equipment and storage medium. Background Art
[0002] As the manufacturing industry continues to increase its requirements for product quality, accurate prediction of workpiece surface roughness during grinding becomes increasingly important.
[0003] Traditional detection methods rely on offline measurement and manual sampling, which is not only time-consuming and labor-intensive, but also unable to achieve real-time monitoring of the machining process. After more than a decade of rapid development, data mining technology has played a powerful role in finance, securities, venture capital and other fields. For example, the document "Research on Data Collection and Analysis of Ultra-precision Machining Process and Surface Quality Prediction" uses vibration signals and force signals to extract multi-dimensional features, optimizes the support vector machine model based on the grid search method, and realizes the classification prediction of surface roughness.
[0004] However, in view of the requirements of industrial sites, the methods in the above literature require continuous signal preprocessing before they can be used. However, the current method only inputs the characteristics of the collected workpiece vibration signal into the support vector machine model to realize classification prediction, and does not preprocess the multidimensional characteristics of the collected vibration signal, which leads to large errors in the prediction results. In addition, since the grid search method requires an internal hyperparameter combination, relies on expert experience and has a very limited optimization range, it is insufficient in handling outliers and model parameters, resulting in limited prediction accuracy. Summary of the invention
[0005] In view of the deficiency that the prior art does not preprocess the multi-dimensional features of the collected vibration signals, thus resulting in large errors in the prediction results, the present invention proposes a method, system, equipment and storage medium for predicting the surface roughness of a workpiece, which efficiently intercepts and cleans abnormal data through a double-threshold endpoint monitoring interception method and outlier detection, and proposes a multi-objective adaptive optimization method based on the second generation of genetic algorithm to achieve optimization of model hyperparameters, thereby solving the problems existing in the prior art.
[0006] A method for predicting the surface roughness of a workpiece comprises the following steps:
[0007] Obtaining the processing section vibration signal data from the original vibration signal of the workpiece, and extracting the time domain features, frequency domain features and entropy features of the processing section vibration signal data;
[0008] The eigenvalues corresponding to the time domain features, frequency domain features and entropy features are normalized, the importance of the normalized eigenvalues is ranked, and the eigenvalues with close correlation with the surface roughness of the workpiece are screened out;
[0009] Perform feature dimensionality reduction on the features corresponding to the selected eigenvalues to obtain a feature matrix after dimensionality reduction;
[0010] The reduced-dimensional feature matrix is combined with its corresponding surface roughness index to obtain a data set;
[0011] Eliminate data with outliers in the data set to obtain a normal data set;
[0012] The normal data set is input into the multi-core support vector regression model MKL-SVR optimized based on the second-generation genetic algorithm to obtain the predicted value of the workpiece surface roughness;
[0013] The surface roughness of the workpiece is predicted according to the predicted value of the surface roughness of the workpiece.
[0014] Furthermore, a double-threshold endpoint detection method is used to obtain the processing section vibration signal data in the original vibration signal of the workpiece, which specifically includes the following steps:
[0015] Draw a short-time Fourier transform diagram of the original vibration signal, select the window pane parameters, and intercept the window pane signal x; the energy of the window pane signal x is expressed as the short-time energy E n , the short-time energy E of the pane n The calculation formula is:
[0016]
[0017] Where N represents the number of panes, n represents the sequence number of the pane, and m represents the point sequence number in the pane signal;
[0018] Define the number of times that adjacent amplitude sampling values change their signs as zero crossing, and the windowed signal x in a window n The number of zero crossings of (m) is defined as the short-time zero crossing rate Z n , the short-time zero-crossing rate Z n The calculation formula is:
[0019]
[0020] According to the window pane short-time energy threshold CE, the number of window panes that continuously exceed the threshold, and the short-time zero-crossing rate threshold CZ, the beginning and end points of the processing stage are obtained, thereby completing the interception of the processing section vibration signal; the expressions of the window pane short-time energy threshold CE and the short-time zero-crossing rate threshold CZ are respectively:
[0021]
[0022] Among them, λ represents the coefficient, L represents the total length of the vibration signal, l represents the window length, and i represents the serial number of the workpiece.
[0023] Furthermore, the method further includes performing a median filtering noise reduction process on the processing section vibration signal data after acquiring the processing section vibration signal data in the original vibration signal of the workpiece.
[0024] Furthermore, the normalization of the characteristic values corresponding to the time domain features, the frequency domain features and the entropy features specifically includes the following steps:
[0025] The vibration signal of the same workpiece is divided into q segments, and the same feature has q feature quantities in the vibration signal of a workpiece;
[0026] The same feature of the same workpiece is normalized, and the normalization formula is expressed as:
[0027]
[0028] Among them, F std is the eigenvalue after standard normalization; x ij is the jth feature quantity of the same feature of the i-th workpiece; is the mean of the corresponding feature; S m is the standard deviation of the corresponding feature; the value range of j is [1,q], and q is a positive integer.
[0029] Furthermore, the importance of the normalized features is ranked using the random forest method, and the feature values with close correlation with the workpiece surface roughness are screened out, which specifically includes the following steps:
[0030] Build a random forest model and determine the number of decision trees to be 700 and the maximum depth of the tree to be 160;
[0031] Calculate the average prediction error of each feature over all trees;
[0032] Assess the importance of each feature based on the mean prediction error;
[0033] Rank the importance of each feature;
[0034] The features with the top 80% cumulative importance are selected as important features.
[0035] Furthermore, the principal component analysis method PCA is used to perform feature dimension reduction on the features corresponding to the selected eigenvalues to obtain a feature matrix after dimension reduction, which specifically includes the following steps:
[0036] Construct a feature matrix corresponding to the selected eigenvalues;
[0037] Calculate the covariance matrix of the feature matrix and obtain the eigenvalues and eigenvectors corresponding to the covariance matrix;
[0038] Arrange the eigenvectors according to their corresponding eigenvalues to construct a projection matrix, in which each column is used as an eigenvector of a principal component;
[0039] Multiply the feature matrix and the projection matrix on the left to obtain the principal component space, and output the contribution rate of each principal component in turn;
[0040] The principal components with the top 85% cumulative contribution rates were selected to construct the feature matrix after dimensionality reduction.
[0041] Furthermore, the OPTICS clustering method is used to remove data with outliers in the data set to obtain a normal data set; specifically, the following steps are included:
[0042] Construct the OPTICS model and fit the OPTICS model using the low-dimensional feature matrix and corresponding indicators;
[0043] According to the cluster labels generated by the OPTICS model, the sample data corresponding to the abnormal labels and their corresponding indicators are removed to obtain a normal data set.
[0044] Furthermore, the optimization process of the multi-core support vector regression model MKL-SVR based on the second-generation genetic algorithm optimization is expressed as:
[0045] The kernel function of the support vector regression model SVR is expressed as:
[0046]
[0047] Among them, a and a' are the feature vectors of the input sample data, ||a-a'|| represents the Euclidean distance between the feature vectors a and a', and γ p is a parameter of the radial basis kernel function of the pth feature, and each feature corresponds to a kernel parameter γ p ;
[0048] The multi-core support vector regression model MKL-SVR is obtained by optimizing the support vector regression model SVR based on the second-generation genetic algorithm, which is expressed as:
[0049]
[0050] f(u)-y i ≤∈+ξ i,j
[0051] Where K is the number of cores, ω k is the weight vector associated with k kernel functions, C is a regularization coefficient, ∈ is the gap coefficient; ξ i,j and is the slack variable associated with the jth feature; ξ i , are the relaxation factors of the i-th sample; N represents the number of panes, u represents the input sample data, and y i Represents output sample data.
[0052] The present invention also includes a workpiece surface roughness prediction system, comprising:
[0053] The acquisition module is used to acquire the processing section vibration signal data in the original vibration signal of the workpiece, and extract the time domain characteristics, frequency domain characteristics and entropy characteristics of the processing section vibration signal data.
[0054] The screening module is used to normalize the eigenvalues corresponding to the time domain features, frequency domain features and entropy features, sort the importance of the normalized eigenvalues, and screen out the eigenvalues with a close correlation with the surface roughness of the workpiece.
[0055] The feature dimension reduction module is used to perform feature dimension reduction on the features corresponding to the screened eigenvalues to obtain a feature matrix after dimension reduction.
[0056] The combination module is used to combine the feature matrix after dimension reduction with its corresponding surface roughness index to obtain a data set.
[0057] The elimination module is used to eliminate data with outliers in the data set to obtain a normal data set.
[0058] The prediction value acquisition module is used to input the normal data set into the multi-core support vector regression model MKL-SVR optimized based on the second-generation genetic algorithm to obtain the prediction value of the workpiece surface roughness.
[0059] The prediction module is used to predict the surface roughness of the workpiece according to the predicted value of the surface roughness of the workpiece.
[0060] The present invention also includes a workpiece surface roughness prediction computer device, including: a memory, a processor and a computer program stored in the memory, and the processor implements the steps of the workpiece surface roughness prediction method when executing the computer program.
[0061] The present invention also includes a readable storage medium, characterized in that the readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, they are used to execute the steps of the workpiece surface roughness prediction method.
[0062] The present invention provides a workpiece surface roughness prediction method, system, device and storage medium, which have the following beneficial effects:
[0063] The present invention standardizes and normalizes different features of the workpiece surface processing segment signal to eliminate the influence of different dimensions and magnitudes, thereby ensuring the consistency and repeatability between different workpieces and batches; at the same time, the normalized features are screened and reduced in dimension, which can greatly reduce the number of features while retaining data information and improving the prediction effect of the model; at the same time, the multi-core support vector regression model MKL-SVR optimized by the second-generation genetic algorithm is adopted to enhance the modeling and fitting capabilities of the model for complex data, thereby improving the accuracy of the predicted value of the workpiece surface roughness. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic diagram of a workpiece surface roughness prediction process in an embodiment of the present invention;
[0065] Figure 2 This is a diagram showing the effect of processing phase endpoint detection combining short-time energy and short-time zero-crossing rate in an embodiment of the present invention;
[0066] Figure 3 A schematic diagram of the importance ranking and retained features of all features in the embodiment of the present invention;
[0067] Figure 4 This is a graph showing outlier detection results using the OPTICS clustering method in an embodiment of the present invention;
[0068] Figure 5 This is a graph showing the effect of regression prediction on surface roughness in an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0070] The present invention proposes a method for predicting the surface roughness of a workpiece. The double threshold endpoint detection technology is used to intercept the processing section signal, and then filtering and noise reduction and feature normalization processing are performed. The random forest algorithm (RF) and principal component analysis (PCA) are combined to perform feature screening and dimension reduction, and the OPTICS clustering method is used to eliminate abnormal samples. The multi-kernel support vector regression (MKL-SVR) model optimized by the second generation of genetic algorithm is used to predict the surface roughness. The method specifically includes the following steps:
[0071] S1. Through the dual threshold endpoint detection technology, the processing segment signal can be automatically and accurately intercepted from the continuous original vibration signal, eliminating the interference of the non-processing segment signal, and ensuring the accuracy and efficiency of signal processing; specifically:
[0072] S1.1. Draw a short-time Fourier transform diagram of the original vibration signal, select appropriate window parameters, and intercept the window signal x. The energy of the window signal x is called the short-time energy E n , calculate the short-time energy E of the pane n , and its calculation formula is as follows:
[0073]
[0074] S1.2, define the number of times that the adjacent amplitude sampling values change their sign as zero crossing, and the signal x in one window after windowing n The number of zero crossings of (m) is defined as the short-time zero crossing rate Z n , calculate Z n , the calculation formula is as follows:
[0075]
[0076] S1.3. Comprehensively considering the short-time energy threshold CE, the number of panes that continuously exceed the threshold, and the short-time zero-crossing rate threshold CZ, the beginning and end points of the processing stage can be correctly identified and the signal truncation can be completed; generally, the short-time energy threshold is 75% of the average pane energy, the short-time zero-crossing rate threshold is the average zero-crossing rate, and the number of panes that continuously exceed the threshold is 5. The expressions of the pane short-time energy threshold CE and the short-time zero-crossing rate threshold CZ are:
[0077]
[0078] Among them, λ represents the coefficient, L represents the total length of the signal, and l represents the window length.
[0079] S2. Perform median filtering and noise reduction on the processing section signal to effectively remove noise and pulse sequences and improve signal quality.
[0080] S3. Extract time domain, frequency domain and entropy features from the denoised signal. The features include mean, standard deviation, root mean square value, peak, root mean square value of peak, Rss, kurtosis, skewness, average frequency, median frequency, center of gravity frequency, mean square frequency, root mean square frequency, frequency variance, frequency standard deviation, approximate entropy, permutation entropy, fuzzy entropy, power spectrum entropy and energy entropy, a total of 20 features. The frequency spectrum is obtained by fast Fourier transform, and the features are standardized to eliminate the influence of different dimensions and magnitudes.
[0081] When calculating features, the denoised signal of the same workpiece is divided into q segments. Therefore, the same feature has q feature quantities in a workpiece signal. The same feature of the same workpiece is normalized to effectively avoid outlier interference and improve model stability. The normalization formula is as follows:
[0082]
[0083] Among them, F std is the eigenvalue after standard normalization, x ij is the jth eigenvalue of the i-th workpiece, is the mean of the corresponding feature, S m is the standard deviation of the corresponding feature, j ranges from [1,q], m is a positive integer, and its maximum value is equal to the number of different features.
[0084] S4. Sort the importance of the normalized features based on the random forest method to screen out important features with high correlation with surface roughness; specifically, the following steps are included:
[0085] (1) Build a random forest model and determine the number of decision trees: 700 and the maximum tree depth: 160.
[0086] (2) Train the model.
[0087] (3) Calculate the prediction error of each feature on the Out-of-Bag samples.
[0088] (4) Calculate the average prediction error of each feature over all trees to evaluate its importance.
[0089] (5) Feature importance ranking.
[0090] (6) The top 80% of the features with the highest cumulative importance are selected as important features.
[0091] S5. Perform principal component analysis (PCA) on the obtained important features to further reduce the feature dimension and obtain a low-dimensional feature matrix. Confirmation condition for the feature number p after PCA dimension reduction: the cumulative contribution rate of the features after dimension reduction is greater than 85%; specifically, the following steps are included:
[0092] (1) Calculate the covariance matrix of the feature matrix.
[0093] (2) Calculate the eigenvalues and eigenvectors corresponding to the covariance matrix.
[0094] (3) Construct a projection matrix, each column of which is the eigenvector of a principal component.
[0095] (4) Multiply the original data by the projection matrix to obtain the principal component space.
[0096] (5) Output the contribution rate of each principal component in turn.
[0097] (6) The principal components with the top 85% cumulative contribution rates are selected as the low-dimensional feature matrix after dimensionality reduction.
[0098] S6. Combining the low-dimensional feature matrix with the corresponding surface roughness index to obtain a data set, using the OPTICS clustering method to automatically classify the data set, identify abnormal samples and remove them; specifically including the following steps:
[0099] (1) Construct the OPTICS model and fit the model using a low-dimensional feature matrix and corresponding indicators.
[0100] (2) According to the clustering labels generated by the model, samples and corresponding indicators corresponding to abnormal labels are eliminated.
[0101] (3) Visualize clustering and verify the clustering effect.
[0102] S7. The obtained relevant normal data set is divided into a training set and a test set according to a preset ratio. The two loss functions of the maximum error of the surface roughness index and the root mean square error are used as multi-objective evaluation functions. The minimization of the objective evaluation function is taken as the optimization goal. The MKL-SVR model is trained based on the second-generation iterative genetic algorithm to determine the appropriate hyperparameters of the MKL-SVR model. The model after adaptive optimization is used for regression prediction to achieve accurate prediction of the surface roughness of the workpiece.
[0103] Among them, the kernel function of the SVR model is a multi-kernel radial basis kernel function, that is, each feature corresponds to a kernel parameter γ p , and its multi-core kernel function formula is as follows:
[0104]
[0105] Among them, a and a' are the feature vectors of the input sample data, ||a-a'|| represents the Euclidean distance between the feature vectors a and a', and γ p is a parameter of the radial basis kernel function of the pth feature, and each feature corresponds to a kernel parameter γ p .
[0106] The optimization problem expression update formula of the MKL-SVR model is:
[0107]
[0108] f(u)-y i ≤∈+ξ i,j
[0109] Where K is the number of cores, ω k is the weight vector associated with k kernel functions, C is a regularization coefficient, ∈ is the gap coefficient; ξ i,j and is the slack variable associated with the jth feature; ξ i , are the relaxation factors of the i-th sample; N represents the number of panes, u represents the input sample data, and yi Represents output sample data.
[0110] Based on the concept of the present invention, an embodiment is proposed, which specifically includes the following steps:
[0111] Step S1, continuously collect the original vibration signal on the support shaft during the machine tool processing, draw a time domain diagram of a beat and a short-time Fourier transform time-frequency domain diagram, and determine the selected window length of 32768 and the window shift of 16384 in combination with the process data; compare the window pane energy and the short-time zero-crossing rate with the window pane energy threshold and the short-time zero-crossing rate threshold. In this embodiment, the average value of the zero-crossing rate of the entire signal is selected as the threshold of the short-time zero-crossing rate, and the product of the energy mean of the entire signal and the window pane length is selected as the threshold of the window pane energy; if the window pane energy and the short-time zero-crossing rate exceed the threshold for 5 windows continuously, the starting point of the processing segment is correctly identified, otherwise, the end point of the processing segment is identified, the processing segment signal is intercepted, and other irrelevant signals are eliminated.
[0112] Draw a short-time Fourier transform diagram of the original vibration signal, select appropriate window parameters, and intercept the window signal X n ; Pane signal X n The energy is called short-time energy E n , calculate the short-time energy E of the pane n , and its calculation formula is as follows:
[0113]
[0114] Define the number of times that adjacent amplitude sampling values change their signs as zero crossing. After windowing, the signal X in one window pane is n The number of zero crossings of (m) is defined as the short-time zero crossing rate Z n , calculate Z n , the calculation formula is as follows, where X n is the signal, X n (m) is the value of the signal at the mth point:
[0115]
[0116] The effect of endpoint detection in the processing stage by combining short-time energy and short-time zero-crossing rate is as follows: Figure 2 As shown; by comprehensively considering the short-time energy threshold, the number of panes that continuously exceed the threshold, and the short-time zero-crossing rate threshold, the first and last endpoints of the processing stage can be correctly identified and the signal truncation is completed; generally, the short-time energy threshold is 75% of the average pane energy, the short-time zero-crossing rate threshold is the average zero-crossing rate, and the number of panes that continuously exceed the threshold is 5.
[0117] Step S2, performing a median filter denoising process with a moving window parameter of 5 on the processing section signal to obtain a denoised signal with outliers removed;
[0118] Step S3, in this example, the feature normalization formula is improved; when calculating the feature, the signal after noise reduction of the same workpiece is divided into n segments, so the same feature has n feature quantities in a workpiece signal, and the same feature of the same workpiece is standardized and normalized to effectively avoid the interference of abnormal values and improve the stability of the model; the time domain features include mean, root mean square value, standard deviation, peak value, root mean square value of peak value, kurtosis, and skewness, the frequency domain features include average frequency, median frequency, center of gravity frequency, frequency variance, and mean square frequency, and the entropy features include myopic entropy, sample entropy, fuzzy entropy, permutation entropy, energy entropy, and power spectrum entropy. There are 18 features in total; the processing segment signal is divided into 12 segments, and the features of each segment are calculated and normalized to obtain the normalized feature set F std , the standard normalization formula is updated as follows:
[0119]
[0120] Among them, x ij is the jth feature of the i-th sample, is the mean of the corresponding feature, S m is the standard deviation of the corresponding feature, the value range of i is [1,n], the value range of j is [1,m], n=242, m=12.
[0121] Step S4, supervised learning training is performed based on the random forest method, the normalized feature importance is sorted, and the top 80% of the features with the highest to lowest cumulative importance are selected. After screening, the remaining 101 features are used as the important feature set. The importance ranking of all features in this example and the important features retained are as follows Figure 3 shown.
[0122] Step S5, the obtained relevant important feature set is subjected to principal component analysis (PCA) feature dimensionality reduction, and the variance contribution rate and cumulative contribution rate of the main factors are output. With the cumulative contribution rate exceeding 85% as the standard, the number of main factors is selected as 4, and a 4-dimensional low-dimensional feature matrix set is obtained. The variance contribution rate and cumulative contribution rate of the PCA main factors in this example are shown in the following table:
[0123] Table 1 Variance contribution rate and cumulative contribution rate of PCA main factors
[0124]
[0125] Step S6, the low-dimensional feature matrix set is combined with the corresponding roughness as a label to obtain a data set, and the OPTICS clustering method is used to automatically classify the data set. Points that are not clustered are regarded as abnormal points. Such points are removed to obtain a normal data set. The outlier detection results of this method are as follows: Figure 4 As shown, the gray dots and gray crosses represent outliers;
[0126] Step S7, divide the obtained relevant normal data set into training set and test set in a ratio of 9:1, use the maximum error of surface roughness index and root mean square error as two loss functions as multi-objective evaluation functions, use cross-validation to improve the training accuracy of genetic algorithm, and determine the appropriate MKL-SVR model parameters according to the Pareto frontier given by the second generation of genetic algorithm; update the formula of multi-core radial basis kernel function, and iterate training and regression prediction of the adaptively optimized SVR model. The formula of multi-core radial basis kernel function is as follows, x and x' are the feature vectors of input samples, ||x-x'|| represents the Euclidean distance between them, and γ p is a parameter of the radial basis kernel function of the pth feature:
[0127]
[0128] The optimization problem expression update formula of the MKL-SVR model is as follows, K is the number of cores, ω k is the weight vector associated with k kernel functions, C is a regularization coefficient, ∈ is the gap coefficient; ξ i,j and is the slack variable associated with the j-th feature.
[0129]
[0130] f(x i )-y i ≤∈+ξ i,j
[0131] The roughness predicted by regression is compared with the actual roughness, and the prediction accuracy P is calculated, which is used to evaluate the accuracy of the prediction model. In this example, the prediction accuracy P is 90.0%, from which it can be seen that in the case of a small number of samples, the present invention can realize real-time monitoring of the surface roughness of the workpiece, and the signal processing is simple and efficient. The calculation formula of the accuracy P is as follows:
[0132]
[0133] Among them, n p is the number of samples to be predicted, Y i is the actual roughness value, Y' i is the roughness value predicted by regression. The roughness effect of regression prediction is as follows: Figure 5 shown.
[0134] The present invention provides an innovative, standardized method for processing grinding vibration signals based on machine learning, which is particularly suitable for the technical field of workpiece surface roughness monitoring during the grinding process. Through a series of precisely defined steps, the present invention not only improves the efficiency and consistency of grinding vibration signal processing, but is also particularly suitable for small sample conditions, reducing the technical threshold. The method includes using a double threshold endpoint detection technology to intercept the processing segment signal, followed by filtering, denoising and feature normalization processing. Furthermore, the random forest algorithm (RF) and principal component analysis (PCA) are combined for feature screening and dimensionality reduction, the OPTICS clustering method is used to eliminate abnormal samples, and the multi-core support vector regression (MKL-SVR) model optimized by the second generation of genetic algorithms is used to predict surface roughness. The standardized process and surface roughness prediction technology of the present invention provide an efficient and reliable quality control solution for the manufacturing industry, and have broad industrial application prospects.
[0135] Based on the same inventive concept, the present invention also proposes a workpiece surface roughness prediction system, comprising:
[0136] The acquisition module is used to acquire the processing section vibration signal data in the original vibration signal of the workpiece, and extract the time domain characteristics, frequency domain characteristics and entropy characteristics of the processing section vibration signal data.
[0137] The screening module is used to normalize the eigenvalues corresponding to the time domain features, frequency domain features and entropy features, sort the importance of the normalized eigenvalues, and screen out the eigenvalues with a close correlation with the surface roughness of the workpiece.
[0138] The feature dimension reduction module is used to perform feature dimension reduction on the features corresponding to the screened eigenvalues to obtain a feature matrix after dimension reduction.
[0139] The combination module is used to combine the feature matrix after dimension reduction with its corresponding surface roughness index to obtain a data set.
[0140] The elimination module is used to eliminate data with outliers in the data set to obtain a normal data set.
[0141] The prediction value acquisition module is used to input the normal data set into the multi-core support vector regression model MKL-SVR optimized based on the second-generation genetic algorithm to obtain the prediction value of the workpiece surface roughness.
[0142] The prediction module is used to predict the surface roughness of the workpiece according to the predicted value of the surface roughness of the workpiece.
[0143] Based on the same inventive concept, the present invention also proposes a workpiece surface roughness prediction computer device, comprising: a memory, a processor and a computer program stored in the memory, and the processor implements the steps of the workpiece surface roughness prediction method when executing the computer program.
[0144] Based on the same inventive concept, the present invention also includes a readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, they are used to execute the steps of the workpiece surface roughness prediction method.
[0145] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for predicting workpiece surface roughness, characterized in that: The following steps are involved: Obtaining the processing section vibration signal data from the original vibration signal of the workpiece, and extracting the time domain features, frequency domain features and entropy features of the processing section vibration signal data; The eigenvalues corresponding to the time domain features, frequency domain features and entropy features are normalized, the importance of the normalized eigenvalues is ranked, and the eigenvalues with close correlation with the surface roughness of the workpiece are screened out; Perform feature dimensionality reduction on the features corresponding to the selected eigenvalues to obtain a feature matrix after dimensionality reduction; The reduced-dimensional feature matrix is combined with its corresponding surface roughness index to obtain a data set; Eliminate data with outliers in the data set to obtain a normal data set; The normal data set is input into the multi-core support vector regression model MKL-SVR optimized based on the second-generation genetic algorithm to obtain the predicted value of the workpiece surface roughness; The surface roughness of the workpiece is predicted according to the predicted value of the surface roughness of the workpiece.
2. A method for predicting workpiece surface roughness according to claim 1, characterized in that: The double-threshold endpoint detection method is used to obtain the processing section vibration signal data in the original vibration signal of the workpiece, which specifically includes the following steps: Draw a short-time Fourier transform diagram of the original vibration signal, select the window pane parameters, and intercept the window pane signal x; the energy of the window pane signal x is expressed as the short-time energy E n , the short-time energy E of the pane n The calculation formula is: Where N represents the number of panes, n represents the sequence number of the pane, and m represents the point sequence number in the pane signal; Define the number of times that adjacent amplitude sampling values change their signs as zero crossing, and the windowed signal x in a window n The number of zero crossings of (m) is defined as the short-time zero crossing rate Z n , the short-time zero-crossing rate Z n The calculation formula is: According to the window pane short-time energy threshold CE, the number of window panes that continuously exceed the threshold, and the short-time zero-crossing rate threshold CZ, the beginning and end points of the processing stage are obtained, thereby completing the interception of the processing section vibration signal; the expressions of the window pane short-time energy threshold CE and the short-time zero-crossing rate threshold CZ are respectively: Among them, λ represents the coefficient, L represents the total length of the vibration signal, l represents the window length, and i represents the serial number of the workpiece.
3. A method for predicting workpiece surface roughness according to claim 2, characterized in that: The characteristic values corresponding to the time domain features, frequency domain features and entropy features are normalized. The following steps are involved: The vibration signal of the same workpiece is divided into q segments, and the same feature has q feature quantities in the vibration signal of a workpiece; The same feature of the same workpiece is normalized, and the normalization formula is expressed as: Among them, F std is the eigenvalue after standard normalization; x ij is the jth feature quantity of the same feature of the i-th workpiece; is the mean of the corresponding feature; S m is the standard deviation of the corresponding feature, the value range of i is [1, q]; the value range of j is [1, m], and m is a positive integer.
4. A method for predicting workpiece surface roughness according to claim 1, characterized in that: The random forest method is used to sort the importance of the normalized features and select the feature values that are close to the surface roughness of the workpiece. The specific steps include: Build a random forest model and determine the number of decision trees to be 700 and the maximum depth of the tree to be 160; Calculate the average prediction error of each feature over all trees; Assess the importance of each feature based on the mean prediction error; Rank the importance of each feature; The features with the top 80% cumulative importance are selected as important features.
5. A method for predicting workpiece surface roughness according to claim 1, characterized in that: The principal component analysis method PCA is used to perform feature dimension reduction on the features corresponding to the selected eigenvalues to obtain a feature matrix after dimension reduction, which specifically includes the following steps: Construct a feature matrix corresponding to the selected eigenvalues; Calculate the covariance matrix of the feature matrix and obtain the eigenvalues and eigenvectors corresponding to the covariance matrix; Arrange the eigenvectors according to their corresponding eigenvalues to construct a projection matrix, in which each column is used as an eigenvector of a principal component; Multiply the feature matrix and the projection matrix on the left to obtain the principal component space, and output the contribution rate of each principal component in turn; The principal components with the top 85% cumulative contribution rates were selected to construct the feature matrix after dimensionality reduction.
6. A workpiece surface roughness prediction method according to claim 1, characterized in that: The OPTICS clustering method is used to remove data with outliers in the data set to obtain a normal data set; specifically, the following steps are included: Construct the OPTICS model and fit the OPTICS model using the low-dimensional feature matrix and corresponding indicators; According to the cluster labels generated by the OPTICS model, the sample data corresponding to the abnormal labels and their corresponding indicators are removed to obtain a normal data set.
7. A method for predicting workpiece surface roughness according to claim 1, characterized in that: The optimization process of the multi-core support vector regression model MKL-SVR based on the second-generation genetic algorithm optimization is expressed as follows: The kernel function of the support vector regression model SVR is expressed as: Among them, a and a' are the feature vectors of the input sample data, ||a-a'|| represents the Euclidean distance between the feature vectors a and a', and γ p is a parameter of the radial basis kernel function of the pth feature, and each feature corresponds to a kernel parameter γ p ; The multi-core support vector regression model MKL-SVR is obtained by optimizing the support vector regression model SVR based on the second-generation genetic algorithm, which is expressed as: f(u)-y i ≤∈+ξ i,j Where K is the number of cores, ω k is the weight vector associated with k kernel functions, C is a regularization coefficient, ∈ is the gap coefficient; ξ i,j and is the slack variable associated with the jth feature; ξ i , are the relaxation factors of the i-th sample; N represents the number of panes, u represents the input sample data, and y i Represents output sample data.
8. A workpiece surface roughness prediction system, characterized in that: include: An acquisition module is used to acquire the vibration signal data of the processing section in the original vibration signal of the workpiece, and to extract the time domain characteristics, frequency domain characteristics and entropy characteristics of the vibration signal data of the processing section; A screening module is used to normalize the eigenvalues corresponding to the time domain features, frequency domain features and entropy features, sort the importance of the normalized eigenvalues, and screen out the eigenvalues with a close correlation with the surface roughness of the workpiece; The feature dimension reduction module is used to perform feature dimension reduction on the features corresponding to the selected eigenvalues to obtain a feature matrix after dimension reduction; A combination module is used to combine the feature matrix after dimension reduction with its corresponding surface roughness index to obtain a data set; The elimination module is used to eliminate data with abnormal values in the data set to obtain a normal data set; The prediction value acquisition module is used to input the normal data set into the multi-core support vector regression model MKL-SVR optimized based on the second-generation genetic algorithm to obtain the prediction value of the workpiece surface roughness; The prediction module is used to predict the surface roughness of the workpiece according to the predicted value of the surface roughness of the workpiece.
9. A computer device for predicting workpiece surface roughness, characterized in that: include: A memory, a processor and a computer program stored in the memory, wherein the processor implements the steps of the workpiece surface roughness prediction method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, they are used to execute the steps of the workpiece surface roughness prediction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Machining process intelligent monitoring system based on cutting feature selection and method thereof
CN113741377A
Online monitoring method for early flutter of plunge grinding machining of inner circle of bearing ring
CN115890366A
Bearing ring cylindrical grinding surface roughness monitoring method and system
CN118424171A
Method and Apparatus for Efficient Use of CNC Machine Shaping Tool Including Cessation of Use No Later than the Onset of Tool Deterioration By Monitoring Audible Sound During Shaping
US20170320182A1
Cited By
Brake disc machining quality control method and device based on hyper-parameters and medium
CN121187252A
