Robot grinding surface roughness prediction method based on deep learning and considering dynamic factors
By adopting deep learning methods in robot grinding and combining CNN and BiLSTM, BiLSTM hyperparameters are optimized and attention mechanism is introduced, the complex impact of dynamic factors on surface roughness is solved, and high-precision surface roughness prediction and processing quality improvement is achieved.
Patent Information
- Application Number
- CN202510074013.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-16
AI Technical Summary
The impact of dynamic factors on surface roughness during robot grinding processing is complex, and traditional prediction methods are difficult to accurately capture, resulting in low prediction accuracy and lack of adaptability.
A deep learning-based approach is adopted, combining convolutional neural network (CNN) and bidirectional long and short-term memory network (BiLSTM), the BiLSTM hyperparameters are optimized through improved whale optimization algorithms, and an attention mechanism is introduced to realize self-extracting of dynamic factor features and high-precision prediction of surface roughness.
It improves the accuracy and adaptability of surface roughness prediction, can better capture complex dynamic behaviors during grinding, reduce processing defects and unqualified products, and improve the quality and consistency of workpieces.
Smart Images

Figure CN120011749A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial robots, and in particular to a method for predicting surface roughness of robot grinding processes based on deep learning and taking dynamic factors into consideration. Background Art
[0002] Robotic grinding technology is an important branch of modern advanced manufacturing. It has been widely used in aerospace, automobile manufacturing, precision molds and other fields due to its advantages of high flexibility, high degree of automation and significant processing efficiency. However, compared with traditional processing methods, robotic grinding not only has higher flexibility and adaptability, but its dynamic characteristics are also more complex, making surface quality control during grinding more challenging.
[0003] As a complex nonlinear system, robotic grinding involves the combined influence of multiple static factors such as grinding speed, feed speed, grinding depth, abrasive particle size, and dynamic factors such as vibration signals and grinding force signals. Traditional machining quality research usually assumes that machining parameters are constant throughout the process, while ignoring the volatility and non-uniformity of surface characteristics caused by dynamic changes. The dynamic characteristics in robotic grinding can be attributed to the following aspects: the multi-degree-of-freedom characteristics of the robot system and the diversity of workpiece shapes make the mechanical behavior in the grinding process more complex and prone to unstable vibrations; the parameters such as force, temperature, and workpiece material properties in the machining process change over time, and the effects of these changes on the grinding process under different working conditions are highly nonlinear; compared with traditional machine tools, robots have lower stiffness and are prone to chatter, especially under high loads and high-speed motion. Therefore, the dynamic characteristics in the robotic grinding process have a significant impact on surface roughness, and its influence mechanism is complex and difficult to accurately describe through traditional models. Chatter not only affects the stability of the machining process, but also has a significant impact on the surface roughness of the workpiece, which is directly related to the machining quality and service life.
[0004] In robotic grinding, surface roughness is an important indicator to measure the processing quality and directly affects the function and service life of parts. Due to the complexity of the grinding process, surface roughness is closely related to dynamic factors such as vibration signals, grinding forces, and noise in the grinding process. In-depth research on the influence of dynamic factors on the vibration of robotic grinding on surface roughness and the construction of an efficient prediction model are the key to improving the accuracy and reliability of robotic processing. The highly nonlinear and coupled relationship between these factors makes roughness prediction a challenge. Traditional empirical formulas and theoretical models are difficult to fully capture these relationships. Prediction methods based on machine learning and deep learning can analyze large-scale process data and explore the implicit relationship between roughness and key process parameters, providing new solutions for optimizing grinding processes and achieving high-quality processing.
[0005] At present, the prediction of surface roughness in robot grinding is mainly based on static factors and simple structures such as BP neural network. However, there are dynamic factors affecting the process of robot grinding. The feature extraction process often relies on manual feature extraction, which leads to difficulties in dynamic factor feature selection, low surface roughness prediction accuracy, lack of adaptability, and easy loss of important information when predicting surface roughness.
[0006] Therefore, it is necessary to propose a surface roughness prediction method for robot grinding based on deep learning considering dynamic factors according to the characteristics of complex, time-varying and nonlinear dynamic factors in the robot machining process, so as to realize self-extraction of dynamic factor features and surface roughness prediction of robot grinding and improve the prediction accuracy. Summary of the invention
[0007] In order to solve the problems existing in the process of surface roughness prediction of robot grinding, the present invention provides a method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors. The method can consider the dynamic factors in the process of robot grinding, use convolutional neural network to realize self-extraction of spatial features of dynamic factors, and use improved whale algorithm to optimize the hyperparameters of bidirectional long short-term memory network to realize time series feature extraction, improve the prediction accuracy of the model and adapt to dynamic changes in grinding.
[0008] To achieve the above object, the present invention provides the following solutions:
[0009] A method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors includes the following steps:
[0010] Data collection and data preprocessing, data set construction, including:
[0011] Design and conduct robotic grinding experiments, collect static and dynamic factors and surface roughness measurements during the experimental grinding process, and construct a data set;
[0012] Using a convolutional neural network to automatically extract spatial features of dynamic factors (such as vibration signals and grinding force signals) in the grinding process, the dataset can capture complex dynamic behaviors and reduce redundant information;
[0013] Extracting temporal features from the spatial features through a bidirectional long short-term memory network to adapt to diverse working conditions;
[0014] Standardize and normalize the spatial features, temporal features and static factors to ensure consistency of data dimensions;
[0015] The construction of the surface roughness prediction model for robot grinding includes the following steps:
[0016] Based on the feature extraction and model prediction of the Bi-directional Long Short-Term Memory (BiLSTM) network, the improved whale optimization algorithm is used to adaptively optimize the hyperparameters of the Bi-directional Long Short-Term Memory network to improve the convergence speed and adapt to dynamic changes in processing;
[0017] Introducing an attention mechanism to the extracted features to automatically assign weights to different factors and focus on important features;
[0018] Combined with S1, an IWOA-CNN-BiLSTM-Attention surface roughness prediction model is constructed;
[0019] Predicting the surface roughness of the workpiece to be measured includes the following steps:
[0020] The static factors, the extracted features and the surface roughness measurement values are input into a prediction model for model training, and a surface roughness prediction value is output to realize a surface roughness prediction function;
[0021] The surface roughness prediction model was evaluated using mean absolute percentage error (MAPE), root mean square error (RMSE) and goodness of fit (R 2 ) for indicator evaluation.
[0022] The experimental device is mainly composed of an ABB-IRB4600 six-degree-of-freedom grinding and polishing robot, an electric spindle, a six-axis force / torque sensor, a vibration acceleration sensor, a surface roughness measuring instrument, a data acquisition card and a grinding wheel. The electric spindle can realize the adjustment of any speed within the rated speed range during the grinding process, and the six-axis force / torque sensor and vibration acceleration sensor are used to collect the grinding force signal and vibration signal during the processing process, and the surface roughness measuring instrument is used to collect the surface roughness value of the workpiece after processing.
[0023] Optionally, the static factors include spindle speed, feed rate, grinding depth and abrasive particle size, and each process parameter is set to 4 levels to cover a wide range of processing conditions; the dynamic factors include vibration signals and grinding force signals to provide more comprehensive dynamic characteristics for surface roughness prediction.
[0024] The spatial features are processed by median filtering and noise reduction before extraction, and a one-dimensional convolutional neural network is used to automatically learn and extract key features from the original data of dynamic factors, and integrate the time domain and frequency domain information of multiple signals to provide more accurate and comprehensive input data. The convolutional neural network layer includes two convolutional layers, namely:
[0025] In the first convolutional layer, a convolution kernel of size [3, 1] is used, 32 filters are set, and pool_size is set to 2 in the maximum pooling layer;
[0026] In the second convolutional layer, a convolution kernel of size [5, 1] is used, 64 filters are set, and pool_size is set to 2 in the maximum pooling layer.
[0027] Optionally, the extracted spatial features are passed as input to the BiLSTM layer, which captures the long-term dependencies and time-reverse relationships of dynamic factors through bidirectional temporal modeling capabilities, thereby more accurately understanding the impact of complex dynamic processes on surface roughness. The bidirectional long short-term memory network layer consists of four levels, with the number of units being 100, 110, 90, and 90, respectively.
[0028] Optionally, the Min-Max normalization method is used to normalize the noise-reduced data, and the formula Complete the standardization process, where X′ is the maximum and minimum normalized value, X is the actual data, and X min , X max are the minimum and maximum values in the actual data respectively.
[0029] Optionally, in the robot grinding process, the complexity, time-varying and nonlinear characteristics of dynamic factors directly affect the prediction accuracy of surface roughness, and the improved whale algorithm is used to optimize the hyperparameters of the bidirectional long short-term memory network to improve the prediction accuracy of the prediction model. Three key improvements are made to the traditional whale optimization algorithm (WOA): an improved Tent chaos map initialization strategy is introduced to enhance the diversity of the initial population; an elite reverse learning strategy is adopted to retain the optimal solution; and an adaptive weight factor is introduced to dynamically adjust the search ability of the algorithm.
[0030] Optionally, during the hyperparameter optimization process, at the initial stage of the BiLSTM model, the root mean square error (RMSE) between the model predicted value and the actual value is used as the fitness function, and the upper and lower bounds of the hyperparameter optimization are adopted: the upper bound of the learning rate is 0.1, and the lower bound is 0.001; the upper bound of the number of hidden layer nodes is 80, and the lower bound is 70; the upper bound of the L2 regularization coefficient is 0.1, and the lower bound is 1e-5.
[0031] Optionally, CNN is used to extract spatial features, BiLSTN is used to extract temporal features, Attention mechanism weights are allocated, and the improved whale algorithm is used to optimize BiLSTM hyperparameters to construct an IWOA-CNN-BiLSTM-Attention robot grinding surface roughness prediction model.
[0032] Optionally, during the training process of the surface roughness prediction model, the batch size is set to 32, the training cycle (epochs) is set to 100 times, the root mean square error (RMSE) is used as the objective function to measure the prediction error, the optimization process adopts the Adam algorithm with adaptive learning rate, the maximum training times (MaxEpochs) is set to 100, the batch processing times (MiniBatchSize) is set to 32, and the learning rate drop factor (LearnRateDropFactor) is set to 0.5.
[0033] Optionally, the improved Tent chaotic map initialization strategy, the elite reverse learning strategy, and the adaptive weight factor are calculated by the following formula: r p =-e p +2×rand(n e ,dim)×(u b -l b ) (2)
[0034] Compared with the prior art, the advantages and positive effects of the present invention are:
[0035] (1) By combining convolutional neural networks (CNN) and bidirectional long short-term memory networks (BiLSTM), the spatial and temporal features of dynamic factors (such as vibration signals and grinding force signals) in the grinding process can be effectively extracted to capture complex dynamic behaviors. The attention mechanism is introduced to automatically assign weights to different factors and focus on important features, thereby improving the accuracy of surface roughness prediction.
[0036] (2) The improved whale optimization algorithm (IWOA) adaptively optimizes the BiLSTM hyperparameters and enhances the adaptability of the model. This enables it to quickly adapt to diverse processing conditions and dynamic changes, and improves the generalization ability of the model under different conditions.
[0037] (3) By accurately predicting surface roughness, it can provide an important reference for robot grinding, help optimize machining parameters and process flow, reduce machining defects and unqualified products, and thus improve the quality and consistency of machined workpieces.
[0038] The present invention provides a method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors, which can achieve:
[0039] (1) The proposed prediction model uses a convolutional neural network (CNN) to extract the spatial features of dynamic factors and a bidirectional long short-term memory network (BiLSTM) to extract the temporal features in the spatial features. The static factors and the extracted features are standardized and normalized to ensure the consistency of data dimensions and adaptability to diverse working conditions.
[0040] (2) The improved whale optimization algorithm (IWOA) is used to adaptively optimize the hyperparameters of the BiLSTM layer to ensure that the model can quickly adapt to new data sets, and the attention mechanism is introduced to achieve automatic feature weight allocation. Combined with the link in (1), a robot grinding surface roughness prediction model is constructed, the processed static factors and extracted features are input into the prediction model, and the surface roughness prediction value is output to complete the grinding surface roughness prediction.
[0041] (3) By combining static and dynamic factors, the effect of the surface roughness prediction model can be analyzed more comprehensively and the prediction accuracy of the model can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to explain the technical solution of the present invention in detail, the drawings used in the present invention are briefly introduced.
[0043] Figure 1 Flowchart of the surface roughness prediction model for robotic grinding;
[0044] Figure 2 This is a diagram of the robot grinding experimental equipment;
[0045] Figure 3 It is a schematic diagram of self-extraction of dynamic factor space features;
[0046] FIG4 is a diagram showing the effect of using median filtering to reduce the noise of the processed signal;
[0047] Figure 5 Flowchart for optimizing bidirectional long short-term memory network hyperparameters to improve the whale algorithm;
[0048] Figure 6 is a diagram of the fitness value and loss function value of the hyperparameters of the bidirectional long short-term memory network optimized by the improved whale algorithm;
[0049] FIG7 shows the predicted values, measured values and error values of the robot grinding surface roughness prediction model;
[0050] Figure 8 These are the fitness values of the three groups of surface roughness prediction models. DETAILED DESCRIPTION
[0051] In order to further understand the content of the present invention, the surface roughness prediction of ABB-IRB4600 six-degree-of-freedom grinding and polishing robot is taken as an example. Figure 1 , Figure 2, Figure 3 , Figure 4 and Figure 5 , the specific implementation scheme of the present invention is described in detail. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the examples.
[0052] The purpose of the present invention is to provide a robot grinding surface roughness prediction method based on deep learning and considering dynamic factors, so as to improve the prediction accuracy of workpiece surface roughness during robot grinding.
[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific examples.
[0054] Figure 1 In the present invention, a method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors is provided, and the embodiment includes the following steps:
[0055] S1, data collection and data preprocessing, building a data set, said S1 includes:
[0056] S11, design and carry out robot grinding experiments, collect static and dynamic factors and surface roughness measurement values during the experimental grinding process, and construct a data set;
[0057] S12, using a convolutional neural network to automatically extract spatial features of dynamic factors (such as vibration signals and grinding force signals) in the grinding process from the data set, capturing complex dynamic behaviors and reducing redundant information;
[0058] S13, extracts temporal features from the extracted spatial features through a bidirectional long short-term memory network to adapt to diverse working conditions;
[0059] S14, standardizing and normalizing the extracted spatial features, temporal features and static factors to ensure the consistency of data dimensions;
[0060] S2, constructing a robot grinding surface roughness prediction model, said S2 comprising:
[0061] S21, based on the feature extraction and model prediction of the Bi-directional Long Short-Term Memory (BiLSTM), the improved whale optimization algorithm is used to adaptively optimize the hyperparameters of the Bi-directional Long Short-Term Memory network to improve the convergence speed and adapt to the dynamic changes of processing;
[0062] S22, introduces the attention mechanism to automatically assign weights to different factors and focus on important features;
[0063] S23, combining step S1 to construct an IWOA-CNN-BiLSTM-Attention surface roughness prediction model;
[0064] S3, predicting the surface roughness of the workpiece to be measured, said S3 comprising:
[0065] S31, inputting the static factors, the extracted features and the surface roughness measurement values into a prediction model for model training, outputting a surface roughness prediction value, and realizing a surface roughness prediction function;
[0066] S32, using mean absolute percentage error (MAPE), root mean square error (RMSE) and goodness of fit (R 2 ) for indicator evaluation.
[0067] Figure 1 In the paper, the IWOA-CNN-BiLSTM-Attention surface roughness prediction model consists of four core modules: improved whale optimization algorithm (IWOA), convolutional neural network (CNN), bidirectional long short-term memory network (BiLSTM) and attention mechanism. The structural design of the model closely matches the dynamics and complexity of the robot grinding process, especially under the combined influence of static factors (such as spindle speed, feed speed, etc.) and dynamic factors (such as vibration signals, grinding forces, etc.), it can fully mine and utilize this information to improve the accuracy of surface roughness prediction.
[0068] Figure 2 In the present invention, a robot grinding processing experimental platform is built, which is mainly composed of an ABB-IRB4600 six-degree-of-freedom grinding and polishing robot, an electric spindle, a six-axis force / torque sensor, a vibration acceleration sensor, a surface roughness measuring instrument, a data acquisition card and a grinding wheel. The main equipment model parameters are shown in Table 1.
[0069] Table 1 Experimental platform equipment parameters
[0070] Device Name Model parameters Six-degree-of-freedom grinding and polishing robot ABB-IRB 4600 Electric spindle Changzhou Hanqi Motor GDZ-14 Six-axis force / torque sensor ATI IP-65 Vibration Accelerometer YDI 621-2 Data Acquisition Card VK701H+ Surface Roughness Measuring Instrument TR200 Fiber polishing wheel 125mm×16mm×13mm
[0071] The grinding process parameter range was selected, and the ABB-IRB4600 six-degree-of-freedom grinding and polishing robot was used to conduct a full-factor grinding experiment on C45 steel with spindle speed, feed speed, grinding depth and abrasive particle size as static factors, and vibration signal and grinding force signal as dynamic factors. Four levels were set for each static parameter to cover a wide range of processing conditions. The selection of these parameters was based on the grinding dosage gradient commonly used in the industry. The experimental process parameters are shown in Table 2.
[0072] Table 2 Experimental process parameters
[0073] Process parameters Parameter values Workpiece size 400mm×350mm×120mm Grinding wheel size 125mm× 16mm× 12.7mm Abrasive particle size F(mesh) <![CDATA[320 # 、600 # 、800 # 、1000 # ]]> <![CDATA[Spindle speed n (r·min -1 )]]> 1800、2100、2400、2700 <![CDATA[Grinding depth a p (mm)]]> 0.1、0.2、0.3、0.4 <![CDATA[Feed rate V w (mm·min -1 )]]> 5、10、15、20
[0074] The specific experimental process is carried out as follows:
[0075] S111, prepare new workpieces and build the experimental platform according to the expected results;
[0076] S112, connecting the force sensor, the vibration acceleration sensor and the workpiece by bolts, and programming the robot teaching pendant;
[0077] S113, performing a grinding experiment according to the determined process parameters and processing sequence. During the processing, sensor signals are collected, and the start and end of signal collection are manually controlled;
[0078] S114, during the data collection process, a six-axis force / torque sensor and a vibration acceleration sensor are used to collect grinding force and vibration signals in real time. The signals are transmitted to the computer through a VK701H+ data acquisition card, with a sampling frequency of 10 times per second to ensure the accuracy and integrity of the signals;
[0079] S115, the spindle speed in the grinding parameters was changed in each experiment, and the grinding depth, feed speed and abrasive grain size remained unchanged;
[0080] S116, when the four-level grinding experiment of the spindle speed is completed, the grinding depth is changed, and the spindle speed, feed speed and abrasive grain size remain unchanged. When the four-level grinding experiment of the grinding depth is completed, the feed speed and abrasive grain size are changed respectively to complete the four-level grinding experiment of each;
[0081] S117, after the processing is completed, the surface quality of the workpiece is measured using a surface roughness measuring instrument. Five points are evenly selected from the processed part of the specimen to measure the surface roughness value of each point, and then the average value of the five points is calculated as the roughness value here, as shown in Table 3.
[0082] Table 3 Surface roughness experimental data
[0083]
[0084] The present invention uses a one-dimensional convolutional neural network (CNN) to extract features from grinding force signals and vibration signals. CNN has a powerful local feature extraction capability and can extract key time domain features and frequency domain features from the original time series signal. Before feature extraction, the signal is subjected to median filtering and noise reduction processing. Median filtering can effectively remove noise from the signal, retain the essential features of the signal, reduce redundant information, thereby making the feature extraction process more accurate and reducing computational complexity.
[0085] Figure 3 In the model, the signal after noise reduction and filtering is input into the convolutional neural network (CNN) model for dynamic factor feature extraction, which includes 2 convolution layers. In the first convolution layer, a convolution kernel of size [3, 1] is used, and 32 filters (featuremaps) are set. The second convolution layer uses a convolution kernel of size [5, 1] and 64 filters are set. The size of the convolution kernel in the time dimension is 2, and the size in the feature dimension is 1. After the convolution layer, the model sets 2 layers of maximum pooling (Max Pooling). The pool_size of each pooling layer is set to 2. The pooling operation can minimize the data dimension while retaining important features, thereby reducing the amount of calculation and improving the training efficiency of the model.
[0086] The model uses the ReLU activation function. The nonlinear characteristics of the activation function enable the network to better capture the nonlinear relationship in the signal. The Dropout layer randomly discards some neurons during the training process, and the discard probability is set to 0.5 to prevent overfitting and improve the generalization ability of the model.
[0087] Figure 4 shows the effect of median filtering when the signal-to-noise ratio is 13dB. Median filtering can effectively remove noise from the signal, retain the essential characteristics of the signal, and reduce redundant information, thereby making the feature extraction process more accurate and reducing computational complexity.
[0088] Figure 5 The present invention adopts the improved whale algorithm to optimize the hyperparameters of the bidirectional long short-term memory network (BiLSTM), introduces the improved Tent chaotic map initialization strategy to enhance the diversity of the initial population, adopts the elite reverse learning strategy to retain the optimal solution, and introduces the adaptive weight factor to dynamically adjust the search ability of the algorithm. The improved measures are used to enhance the global search ability and convergence speed of the IWOA algorithm, so that it can effectively avoid local optimality.
[0089] The three key improvements are:
[0090] (1) Adopt the Tent chaotic map initialization strategy to expand the spatial coverage and avoid the population concentration distribution problem caused by random initialization. The improved Tent chaotic map is calculated by the following formula:
[0091]
[0092] In the formula, k represents the number of mappings, z k Represents the k-th function value.
[0093] (2) Elite Opposition-Based Learning (EOBL) strategy enhances the diversity of the population by generating reverse individual positions. The reverse position is calculated using the following formula:
[0094] r p =-e p +2×rand(n e ,dim)×(u b -l b ) (2)
[0095] In the formula, e p is the position of each elite individual identified from the initial population; n e is the number of elite individuals in the initial population; u b and l b are the upper and lower bounds of parameter optimization, respectively.
[0096] (3) Adaptive weight factor adjustment: By dynamically adjusting the search capability, the algorithm can enhance the global exploration capability in the early stage and focus on local search in the later stage to improve the convergence efficiency. The adaptive weight factor is calculated by the following formula:
[0097]
[0098] Where, T max is the maximum number of iterations, and t is the current number of iterations.
[0099] The improved whale optimization algorithm is expressed as follows in the stages of encircling prey, preying and searching:
[0100] X(t+1)=ωω*X * (t)-A·D, |A|≤1, and p<0.5 (4)
[0101]
[0102] X(t+1)=ω*X rand -A·D,|A|>1, and p<0.5 (6)
[0103] Where A is the coefficient vector, X *为 The position vector of the current optimal solution, X is the position vector of the current solution. X needs to be updated every time the optimal solution appears in the calculation process. * , b is used to define the logarithmic spiral shape, l is a random number in [0, 1], X rand Indicates the number and position of randomly selected whales.
[0104] The specific improvement process is carried out in the following steps:
[0105] S211, Population initialization and optimization strategy: The population is initialized using the improved Tent chaotic map, and the population is initialized according to the given upper and lower bounds. By introducing an adaptive weight factor, the whale optimization algorithm dynamically adjusts the position X of the individual during predation search and attack to better explore the global optimal solution;
[0106] S212, individual position update: compare the randomly generated, value with |A|, if |A|≤1 and p<0.5, update the current individual optimal position of the whale according to formula (4); if p≥0.5, update the individual optimal position during the whale attack process according to formula (5); if |A|>1 and p<0.5, update the individual optimal position during the whale search process according to formula (6);
[0107] S213, elite individual selection and reverse learning: set the number of elite individuals, use the elite reverse learning strategy to select elite individuals from the population, and generate their reverse positions r p These elite individuals are combined with the reverse positions to generate a new population, evaluate and update the best position and its fitness value, and ensure that the algorithm always retains the optimal solution during the search process.
[0108] In the early stage of the BiLSTM model, the root mean square error (RMSE) between the model prediction value and the actual value is used as the fitness function, and the upper and lower bounds of hyperparameter optimization are adopted: the upper bound of the learning rate is 0.1, and the lower bound is 0.001; the upper bound of the number of hidden layer nodes is 80, and the lower bound is 70; the upper bound of the L2 regularization coefficient is 0.1, and the lower bound is 1e-5. Using the IWOA algorithm, the position of individuals in the population is updated, that is, the BiLSTM hyperparameter combination is adjusted. The maximum training times (MaxEpochs) is set to 100, the batch processing times (MiniBatchSize) is set to 32, and the learning rate drop factor (LeamRateDropFactor) is set to 0.5. By evaluating the individual fitness value (RMSE), IWOA can select the best individual and guide other individuals to move closer to the optimal solution. Repeat this process until the maximum number of iterations is reached or the fitness function is minimized.
[0109] After the above optimization process, the optimal hyperparameter combination of the BiLSTM model was finally obtained. The specific values of these optimized hyperparameters (learning rate, number of hidden layer nodes, and L2 regularization coefficient) are shown in Table 4, and serve as the basis for configuring the BiLSTM model training options to achieve the best prediction performance.
[0110] Table 4. Hyperparameters after BiLSTM optimization
[0111] Hyperparameters Learning Rate Hidden layer nodes L2 regularization coefficient Optimal parameters 0.01 78 0.0003
[0112] Figure 6 shows the fitness value and loss function value of the model. As can be seen from the figure, as the epoch value increases during the training process, the loss function value gradually decreases and eventually approaches 0. This shows that as the training progresses, the difference between the model prediction value and the actual value gradually decreases, the performance of the model is improved, and the accuracy continues to increase, achieving high-precision prediction of the surface roughness of the robot grinding process.
[0113] The specific process of the robot grinding surface roughness prediction model is as follows:
[0114] S231, dynamic factor feature extraction: Convolutional neural network (CNN) is used to extract spatial features of dynamic factors, and the extracted spatial features are input into bidirectional long short-term memory network (BiLSTM) for temporal feature extraction;
[0115] S232, BiLSTM hyperparameter optimization: The improved whale optimization algorithm (IWOA) is used to optimize the hyperparameters of the BiLSTM model, searching for the optimal number of hidden layer nodes, the optimal initial learning rate, and the optimal L2 regularization coefficient. The optimized hyperparameters are used in the CNN-BiLSTM-Attention model to improve the learning ability and prediction accuracy of the model.
[0116] S233, data preprocessing: Before model training, all dynamic factors (such as vibration signals and grinding force signals) are subjected to median filtering for noise reduction to ensure that the model can accurately capture key information and features. The signal data after noise reduction is further standardized to avoid imbalance in model learning during training due to inconsistent numerical ranges of different features;
[0117] S234, data set division and normalization: The Min-Max normalization method is used to normalize the denoised data. Complete the standardization process, where X′ is the maximum and minimum normalized value, X is the actual data, and X min , X max are the minimum and maximum values in the actual data respectively;
[0118] S235, the data set is divided into 80% as training set and 20% as test set for model training and verification;
[0119] S236, constructing an IWOA-CNN-BiLSTM-Attention surface roughness prediction model: according to the number of input and output variables, determine the number of nodes in the model input layer, hidden layer and output layer, build a network structure, connect the features extracted by CNN and the BiLSTM optimized by IWOA through the hidden layer, output layer, attention mechanism and full connection layer, and construct an IWOA-CNN-BiLSTM-Attention surface roughness prediction model. Input static factors, extracted features and surface roughness measurement values into the model, output the surface roughness prediction value, and realize the surface roughness prediction of robot grinding;
[0120] S237, Model Evaluation and Validation: The predicted data obtained by the training model are compared with the test data, and the root mean square error (RMSE), mean absolute percentage error (MAPE) and goodness of fit (R 2 ) and other indicators to evaluate the model and verify the effectiveness and accuracy of the model. Through these evaluation indicators, the performance of the model in practical applications can be comprehensively judged.
[0121] The mean absolute percentage error (MAPE), root mean square error (RMSE) and goodness of fit (R 2 ) is calculated by the following formula:
[0122]
[0123]
[0124]
[0125] In the formula, y i Represents the test set, that is, the actual value output at that moment; represents the predicted value; n is the number of test samples in the test set; Represents the average of the predicted value samples and the true value, where i = 1, 2, …, n.
[0126] The smaller the RMSE and MAPE values are, the smaller the prediction error is and the higher the prediction accuracy of the model is. 2 ) is used to evaluate the model's fit to the data, R 2 The closer the value is to 1, the stronger the model's ability to explain the data and the better the fitting effect. Therefore, smaller RMSE and MAPE values are associated with higher R 2 The values together indicate the superiority of the prediction model in terms of accuracy and fit.
[0127] At this point, the surface roughness prediction process of robot grinding is completed.
[0128] The effectiveness of the present invention is verified by experiments below. A GA-BP neural network prediction model, a CPO-CNN-BiLSTM-Attention deep learning prediction model, and an IWOA-CNN-BiLSTM-Attention deep learning prediction model are constructed for comparative analysis.
[0129] Figure 7 (a) is a comparison between the predicted values and the true values of the three groups of surface roughness prediction models, Figure 7 (b) is the prediction effect and error value of the prediction model of the present invention, and Table 5 is the calculation results of the evaluation indexes of the three groups of prediction models. In Figure 7, the compared prediction model and the prediction model of the present invention can both predict the change trend of surface roughness well.
[0130] Table 5 Calculation results of evaluation indicators of group 3 prediction models
[0131]
[0132] As shown in Figure 7 and Table 5, compared with other models, the MAPE value of the prediction model of the present invention is reduced by 1.440% and 0.034%, the RMSE value is reduced by 1.390% and 0.043%, and the R 2 In addition, the maximum absolute errors of the CPO-CNN-BiLSTM-Attention and GA-BP prediction models are 0.11μm and 0.13μm, and the maximum relative errors are 18.5% and 14.6%, respectively. The maximum absolute error of the IWOA-CNN-BiLSTM-Attention prediction model is 0.1μm, and the maximum relative error is 8.6%. The error fluctuation is more gentle, and the fitting effect is better than other models, indicating that the IWOA-CNN-BiLSTM-Attention prediction model proposed in the present invention has good feature extraction and model prediction capabilities.
[0133] Figure 8 The fitness values of the three surface roughness prediction models are shown in Figure 2. The IWOA-CNN-BiLSTM-Attention prediction model and the CPO-CNN-BiLSTM-Attention prediction model converged after 40 iterations, but the IWOA-CNN-BiLSTM-Attention model had a lower convergence value of 0.02823. A lower fitness value means that the prediction results of the model on different data points are more stable and reliable.
[0134] Although the exemplary embodiments of the present invention have been described in detail, this does not limit the scope of the present invention. Those skilled in the art may modify the present invention in details and form without departing from the scope and spirit disclosed in the claims, and all changes made should belong to the protection scope of the technical solution of the present invention, and the scope of the present invention is not limited by the above technical solution, but is defined by the claims.
Claims
1. A method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors, characterized in that: Includes the following step: S1, data collection and data preprocessing, building a data set, said S1 includes: S11, design and carry out robot grinding experiments, collect static and dynamic factors and surface roughness measurement values during the experimental grinding process, and construct a data set; S12, using a convolutional neural network to automatically extract spatial features of dynamic factors (such as vibration signals and grinding force signals) in the grinding process from the data set, capturing complex dynamic behaviors and reducing redundant information; S13, extracting temporal features from the spatial features through a bidirectional long short-term memory network to adapt to diverse working conditions; S14, standardizing and normalizing the spatial features, temporal features, and static factors to ensure that data dimensions are consistent; S2, constructing a robot grinding surface roughness prediction model, said S2 comprising: S21, based on the feature extraction and model prediction of the Bi-directional Long Short-Term Memory (BiLSTM), the improved whale optimization algorithm is used to adaptively optimize the hyperparameters of the Bi-directional Long Short-Term Memory network to improve the convergence speed and adapt to the dynamic changes of processing; S22, introducing an attention mechanism (Attention) to the extracted features to automatically assign weights of different factors and focus on important features; S23, combining S1 to construct an IWOA-CNN-BiLSTM-Attention surface roughness prediction model; S3, predicting the surface roughness of the workpiece to be measured, said S3 comprising: S31, inputting the static factors, the extracted features and the surface roughness measurement values into a prediction model for model training, outputting a surface roughness prediction value, and realizing a surface roughness prediction function; S32, using mean absolute percentage error (MAPE), root mean square error (RMSE) and goodness of fit (R 2 ) for indicator evaluation.
2. According to claim 1, a robot grinding surface roughness prediction method based on deep learning and considering dynamic factors is characterized in that: In S11, the experimental device is mainly composed of an ABB-IRB4600 six-degree-of-freedom grinding and polishing robot, an electric spindle, a six-axis force / torque sensor, a vibration acceleration sensor, a surface roughness measuring instrument, a data acquisition card and a grinding wheel. The grinding process can be adjusted to any speed within the rated speed range by the electric spindle. The grinding force signal and vibration signal during the processing are collected by the six-axis force / torque sensor and the vibration acceleration sensor, and the surface roughness value of the workpiece after processing is collected by the surface roughness measuring instrument. The static factors include spindle speed, feed speed, grinding depth and abrasive particle size. Each process parameter is set to 4 levels to cover a wide range of processing conditions; the dynamic factors include vibration signals and grinding force signals, which provide more comprehensive dynamic characteristics for surface roughness prediction.
3. The method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors according to claim 1, characterized in that: In S12, the signal is subjected to median filtering and noise reduction processing before the spatial feature is extracted, and a one-dimensional convolutional neural network is used to automatically learn and extract key features from the original data of dynamic factors, and integrate the time domain and frequency domain information of multiple signals to provide more accurate and comprehensive input data. The convolutional neural network layer includes two convolutional layers, namely: In the first convolutional layer, a convolution kernel of size [3, 1] is used, 32 filters are set, and pool_size is set to 2 in the maximum pooling layer; In the second convolutional layer, a convolution kernel of size [5, 1] is used, 64 filters are set, and pool_size is set to 2 in the maximum pooling layer.
4. The method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors according to claim 1, characterized in that: In S13, the extracted spatial features are passed as input to the BiLSTM layer, which captures the long-term dependency and time inverse relationship of dynamic factors through bidirectional temporal modeling capabilities, thereby more accurately understanding the impact of complex dynamic processes on surface roughness. The bidirectional long short-term memory network layer in S13 consists of four levels, with the number of units being 100, 110, 90 and 90 respectively.
5. The method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors according to claim 1, characterized in that: In S14, the Min-Max normalization method is used to normalize the noise-reduced data, and the formula Complete the standardization process, where X′ is the maximum and minimum normalized value, X is the actual data, and X min , X max are the minimum and maximum values in the actual data respectively.
6. The method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors according to claim 1, characterized in that: In the S21, in the robot grinding process, the complexity, time-varying and nonlinear characteristics of dynamic factors directly affect the prediction accuracy of surface roughness. The improved whale algorithm is used to optimize the hyperparameters of the bidirectional long short-term memory network to improve the prediction accuracy of the prediction model; three key improvements are made to the traditional whale optimization algorithm (WOA): an improved Tent chaotic mapping initialization strategy is introduced to enhance the diversity of the initial population; Adopt elite reverse learning strategy to retain the optimal solution; And introduce adaptive weight factors to dynamically adjust the algorithm's search capabilities; During the hyperparameter optimization process, in the early stage of the BiLSTM model, the root mean square error (RMSE) between the model prediction value and the actual value was used as the fitness function, and the upper and lower bounds of hyperparameter optimization were adopted: the upper bound of the learning rate was 0.1, and the lower bound was 0.001; the upper bound of the number of hidden layer nodes was 80, and the lower bound was 70; the upper bound of the L2 regularization coefficient was 0.1, and the lower bound was 1e-5.
7. The method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors according to claim 1, characterized in that: In S23, CNN extracts spatial features, BiLSTN extracts temporal features, Attention mechanism weights are allocated, and the improved whale algorithm optimizes BiLSTM hyperparameters to jointly construct an IWOA-CNN-BiLSTM-Attention robot grinding surface roughness prediction model; during the surface roughness prediction model training process, the batch size is set to 32, the training cycle (epochs) is set to 100 times, and the root mean square error (RMSE) is used as the objective function to measure the prediction error. The optimization process adopts the Adam algorithm with adaptive learning rate, the maximum training times (MaxEpochs) is set to 100, the batch processing times (MiniBatchSize) is set to 32, and the learning rate drop factor (LearnRateDropFactor) is set to 0.
5.
8. The method for predicting surface roughness of robot grinding based on deep learning and considering dynamic factors according to claim 6, characterized in that: The improved Tent chaotic map initialization strategy, elite reverse learning strategy, and adaptive weight factor are calculated by the following formula: r p =-e p +2×rand(n e ,dim)×(u b -l b ) (2)
Citation Information
Cited By
Ultrasonic vibration internal cooling lubrication grinding system based on deep reinforcement learning
CN120395571A
Grinding wheel wear state monitoring method and related product
CN120448821A
Building optical intelligent lighting and lighting optimization management system
CN121030315A
Precision boring and milling machine machining surface roughness prediction method based on deep learning
CN121167220A