Feature fusion and refinement embedding sparse Bayesian learning method and system for contour error monitoring in robotic surface milling
Through feature fusion and sparse Bayesian learning methods, a dictionary matrix is constructed using the joint angle and cutting force signals during the robot machining process, which solves the problems of high model complexity and poor real-time performance in the existing technology. It realizes fast and accurate machining error monitoring during the robot surface milling process and reduces measurement costs.
Patent Information
- Application Number
- CN202411869866.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The existing deep learning-based machining error prediction model cannot meet the needs of actual industrial sites due to its high model complexity and poor real-time performance. Especially in the robotic surface milling process, it is difficult to achieve fast and accurate machining error monitoring.
The feature fusion and refinement embedding sparse Bayesian learning method is adopted. By collecting the joint angles, acceleration signals and cutting force signals during the robot machining process, a dictionary matrix is constructed, and a regression prediction model is established using sparse Bayesian learning to achieve rapid monitoring of robot machining errors.
It effectively reduces the cost of monitoring machining errors during robotic surface milling, improves real-time performance and accuracy, reduces the need for measuring complex surface parts, and has potential for practical industrial applications.
Smart Images

Figure CN119939530B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of robotics technology, and in particular relates to a feature fusion and refinement embedded sparse Bayesian learning method and system for robot surface milling contour error monitoring. Background Art
[0002] Complex curved parts are widely used in aerospace, shipbuilding, nuclear power, and other manufacturing fields. Machining these parts requires complex trajectory planning, frequent load changes during cutting, and the coupling of multiple error sources affects the final machining accuracy. Therefore, monitoring machining errors is crucial for high-precision machining and optimizing process parameters.
[0003] Compared to traditional CNC machine tools, industrial robots with serial joints offer advantages such as a large workspace, high flexibility, strong integration and scalability, and good cost-effectiveness. They are increasingly being used in the milling and polishing of complex curved parts. However, due to the robot's low stiffness, it is very prone to chatter under milling forces, resulting in significant force-induced deformation. Under the perturbations of cutting forces, the robot control system may generate robot joint servo errors. Furthermore, factors such as robot linkage and assembly errors can also cause geometric errors in the robot. Combined with these factors, during robotic milling, undesirable material removal occurs between the workpiece and the tool, leading to significant contour errors. Rapid prediction and compensation of robot machining errors is an important research topic in machining state monitoring and control.
[0004] Methods that predict machining errors through calculation and simulation of mechanism models are usually complex to model and time-consuming to simulate, making them unsuitable for industrial sites with complex working conditions. Many researchers have combined data-driven algorithms to predict the surface roughness and posture of parts, but there is less research on machining error monitoring. Error monitoring methods provide more accurate and faster machining error information. Some scholars have also achieved the prediction and monitoring of thin-walled parts machining errors through statistical methods, but they consider fewer error-influencing factors. Existing deep learning-based machining error prediction models cannot meet actual needs due to their high model complexity and poor real-time performance.
[0005] Therefore, there is an urgent need for a rapid prediction method for machining errors that comprehensively considers the sources of robot machining errors and can monitor the machining errors of robots under varying working conditions based on the physical quantities of the machining process.
[0006] Through the above analysis, the problems and defects of the existing technology are as follows:
[0007] The existing deep learning-based machining error prediction model cannot meet actual needs due to its high model complexity and poor real-time performance. Summary of the Invention
[0008] In response to the problems existing in the prior art, the present invention provides a feature fusion and refinement embedded sparse Bayesian learning method and system for robot surface milling contour error monitoring.
[0009] The present invention is implemented as follows: a feature fusion and refinement embedded sparse Bayesian learning method and system for robot surface milling contour error monitoring includes:
[0010] S1, according to the proposed processing parameters, the robot performs air cutting motion and milling experiments for different processing tasks, and simultaneously collects joint angles, acceleration signals and cutting force signals, and measures the processing error of the workpiece after milling;
[0011] S2, processes and calculates the original signal collected in S1 to obtain the feature vector of the model input, and uses the measured processing error as the model label;
[0012] S3, performs feature weighting on the feature vectors calculated in S2 and performs feature fusion to construct a dictionary matrix;
[0013] S4, establishing a regression prediction model based on the dictionary matrix and processing error obtained in S3;
[0014] First, it is assumed that the weights between the model input features and the labels satisfy the Gaussian prior distribution to promote most coefficient weights to tend to 0 and achieve the sparsity of the model weights; according to the Bayesian formula, the posterior distribution of the weight variables is obtained, and the expectation and variance of the posterior distribution of the weight coefficients are estimated by maximizing the posterior probability; the variance and the hyperparameters affecting the sparsity of the weights are estimated by maximizing the marginal likelihood function, that is, maximizing the expectation of the joint likelihood function under the posterior distribution of the weights to optimize, and the minimum solution of the transformed loss function can be found to optimize the hyperparameters; the posterior expectation and variance of the model weights, as well as the hyperparameters are iteratively updated during the training process, and the iterative process is terminated according to the set change threshold to achieve the sparsification of the model weight vector and the construction of a sparse model.
[0015] Furthermore, in step S1, air cutting motion and milling experiments of parts with different processing positions and curved surface features are carried out according to the designed processing trajectory and process parameters; the acceleration sensor is attached to the main shaft, and the acceleration and cutting force signals during the milling process are collected through the dynamometer system and the data acquisition system, and the angles of each joint of the robot during the processing are obtained through the robot open data acquisition system, and the workpiece after milling is scanned using a structured light camera to measure the processing error.
[0016] Furthermore, in step S2, the process parameters of the robot milling experiment, such as the spindle speed, feed rate and cutting depth, are used as static input features of the error monitoring model.
[0017] The robot end stiffness is calculated from the joint stiffness, Jacobian matrix and joint angle:
[0018] K S =J -T (q)K q J -1 (q)
[0019] Where J is the Jacobian matrix, q is the joint angle, K S and K q are the Cartesian stiffness matrix and joint stiffness respectively; the joint stiffness vector is expressed as: K q =diag(K q1 ,K q2 ,K q3 ,K q4 ,K q5 ,K q6 ), K qi represents the stiffness of the i-th joint, K q Is a 6×6 diagonal matrix, each diagonal item represents the robot joint stiffness; the diagonal matrix K S The first three values represent the three static stiffnesses in the Cartesian coordinate direction. Recorded as
[0020] The difference in tool tip position is taken as the end tracking error of the robot under cutting force disturbance, which is expressed as:
[0021] δ tracking =k m (p cutting )-k m (p idlecutting )
[0022] Where k m is the calibrated kinematic model, p cutting and p idlecutting Represent the joint angles of the robot during cutting and air cutting respectively; the calculated tracking error value is weighted and used as the input feature of the error monitoring model
[0023] Prediction of cutting force migration;
[0024] For the collected original signals of acceleration, cutting force and joint angle, we first remove the non-cutting segment data, perform downsampling and time sequence alignment operations, and characterize the relationship between the robot joint angle, acceleration signal and cutting force as follows:
[0025]
[0026] Among them, k represents the current moment, Fa (k) represents the cutting force at the current moment, q1(kj), q2(kj), q3(kj), q4(kj), q5(kj), q6(kj), a(kj), (j = 0, 1, ..., n) represent the angles and acceleration signals of each joint at the previous moment and the current moment; F a (kj), (j = 1, 2, ..., l) represents the predicted cutting force value at some previous moment, n and l represent the time lag order related to the input and output, respectively, f represents the nonlinear relationship between input and output, and f is constructed using a data-driven model; during model training, the time-series aligned data is converted into multidimensional data according to the above formula;
[0027] The feature extractor is defined as follows:
[0028]
[0029] Among them F ES is the deep feature expression contained in the extracted input time series signal, A feature extractor representing the source data; x s is the input source data sample, Represents the feature extractor parameters;
[0030] The extracted source domain features are then input into the regressor to predict the cutting force, and the output dimension is 1. The regression loss of the regressor is as follows:
[0031]
[0032] where n s is the number of source samples, Represents the calculation of mean square error (MSE): represents the regressor parameters;
[0033] Based on the kernel embedding theory of conditional distribution, a conditional distribution embedding operator is proposed to measure the difference in conditional probability distribution. X and O Y The variables X and Y, the corresponding reproducing kernel Hilbert space (RKHS) is and By embedding p(Y|X) into RKHS, the conditional mean embedding can be defined as:
[0034]
[0035] where ψ(x): And φ(Y): and yes The operator characterizes the characteristics of the conditional distribution. When a fixed x is taken, a conditional mean embedding value μ is obtained. Y|x ;
[0036] According to the calculation formula of conditional probability distribution, it is equal to the ratio of joint probability distribution to marginal probability distribution of input; the conditional embedding operator calculation can be defined as the combination of cross covariate operator and independent covariate operator:
[0037]
[0038] When a data set D = {(x1,y1),(x2,y2),...,(x n ,y n )}hour, The estimated value of can be defined as follows:
[0039]
[0040] Where F=(φ(y1),φ(y2),...,φ(y n )), and is the Gram matrix of the variable sample, with a regularization term added to ensure it is well-posed;
[0041] A conditional distribution embedding operation is designed to estimate the difference between conditional probability distributions. It is defined as follows and used as the loss function for network parameter updates to minimize domain differences.
[0042]
[0043] The matrix K XX' Calculation using Gaussian kernel κ:
[0044] K XX' (i,j)=κ(X i ,X j ')= <f(X i ),f(X j ')>
[0045] Where <·,·> represents the vector inner product;
[0046] The conditional embedding distribution difference is calculated using the new features formed by the second fully connected layer of the target pose unlabeled input data features, the predicted value of the regression network, the new features formed by the second fully connected layer of the source pose data features and their label values. The conditional embedding distribution difference is calculated by using the new features formed by the second fully connected layer of the unlabeled input data features, the predicted value of the regression network, the new features formed by the second fully connected layer of the target pose labeled data features and their label values.
[0047] The target domain has labeled data and its predicted value is used to calculate the regression loss. It can be calculated as:
[0048]
[0049] For the training of the feature extractor of the target data and the task-specific regressor, the following weighted ensemble loss function is used for parameter update:
[0050]
[0051] in, is the regression loss of labeled data in the target domain, Represents the difference in conditional distribution metrics between source domain data and target domain unlabeled data, Represents the difference in conditional distribution between labeled and unlabeled data in the target domain, α s and β t is a trade-off parameter;
[0052] The network is trained by minimizing the target pose regression loss and the difference between the two conditional embedding distributions, and the optimizer is used to update the network parameters. After the iteration is completed, the cutting force prediction model of the target pose is obtained:
[0053]
[0054] Adaptive variational mode decomposition (AVMD) is used to extract time-frequency domain features. This allows for adaptive optimization of the number of decomposition levels, K, and the penalty factor, γ, improving the performance of cutting force feature extraction. The number of decomposition levels is set empirically, and the cross-correlation spectral index (CSI) is used to adaptively optimize the penalty factor, as described by the following formula:
[0055]
[0056] Where T is the length of the original signal, i and j are the ordinal numbers of the intrinsic mode functions, and u i and u j The sub-signals decomposed by the AVMD method; for each penalty factor γ within the set range, the VMD method is used to decompose the original signal, and then its CSI is obtained according to the above formula; the penalty factor corresponding to the minimum CSI value is selected as the optimal value; the original signal is decomposed into several sub-component signals, and the time-frequency domain features are extracted using energy entropy The energy of each sub-signal is calculated as:
[0057]
[0058] The energy entropy of the sub-signal is given by:
[0059]
[0060] Where r i =R i / R is the percentage of each sub-signal energy to the total signal energy.
[0061] Furthermore, in step S3, the tracking error of the robot end under the influence of the cutting force describes the position deviation of the robot end under the action of the cutting force, which is most closely related to the contour error of the final machined workpiece;
[0062] Divide the error value into multiple intervals with fixed width; count the number of error values in each interval and calculate the probability p of each interval i , that is, the number of samples in the interval divided by the total number of samples; the resulting probability distribution can describe the frequency of different error ranges; after discretization, the information entropy is calculated:
[0063]
[0064] Among them, n is the number of intervals after discretization, p i is the probability of the i-th interval; the larger the information entropy value, the more dispersed the distribution of the feature and the higher the uncertainty;
[0065] The weight of each column of tracking error values is set to a combination of information entropy and variance ratio:
[0066]
[0067] Among them, α H and β ζ is a parameter that controls information entropy and variance weight; N t The number of feature columns representing the tracking error. The information entropy measures the uncertainty of the tracking error value in each column. The variance measures the degree of dispersion of the tracking error in each column. The weighting method combining the information entropy and variance can more comprehensively measure the importance of the feature.
[0068] Select multiple measurement points at equal distances on each trajectory to form a label dataset for the prediction model;
[0069] For the robot end stiffness, cutting force characteristics and weighted tracking error characteristics obtained above, a structured feature row vector is constructed in combination with the processing parameters. The feature vectors of multiple samples constitute a feature matrix, which is then normalized to eliminate the influence of large differences in the magnitude of different features.
[0070] The Gaussian kernel distribution can be expressed as:
[0071]
[0072] Where σ is the bandwidth of the Gaussian kernel, which is optimized using a random search algorithm; is the feature row vector. For the regression model of feature fusion and physical knowledge embedding, the feature vector is mapped by kernel function to obtain a feature kernel dictionary matrix with Gaussian distribution. The dictionary matrix is configured as a structured sorting of static features and dynamic features according to the order of measurement points, which not only reflects the trend of features but also avoids the overlap of feature signals. The feature kernel dictionary matrix Φ is expressed as:
[0073]
[0074] The machining error can be expressed as follows:
[0075] y m =y p +ε;y p =Φω
[0076] Where y m is the measured processing error, y p is the predicted processing error, ε is the prediction noise caused by uncertainty in the processing and measurement process; Φ is the constructed dictionary matrix, and ω is the corresponding weight coefficient, which can be expressed as:
[0077] ω=[ω1,ω2,...,ω M-1 ,ω M ,b] T .
[0078] Furthermore, in step S4, a regression prediction model is established based on the dictionary matrix and processing error obtained above; the sparse Bayesian learning method introduces sparsity based on the idea of Bayesian theorem and assumes a Gaussian prior distribution for the weights, which can greatly reduce model redundancy and improve computational efficiency, model generalization ability and interpretability; the probability distribution of the noise variable can be assumed to be a normal probability density function ε~N(0,λI), where λ is the variance, which is affected by the processing uncertainty caused by vibration and cutting heat and the measurement uncertainty; y m The likelihood function is defined as:
[0079]
[0080] A Gaussian prior distribution is introduced on the weight vector to make most of the weight coefficients approach zero, thus achieving the sparsity of the weight vector. In this way, the processing error can be predicted only by the relevant columns in the dictionary matrix and the corresponding sparse weights, which improves the computational efficiency. Usually, in order to calculate the homogeneous analytical solution of the posterior, the prior distribution is the conjugate prior of the likelihood function, that is:
[0081]
[0082] where ξ i Impact i The probability of the weight coefficient tending to zero is used to control the sparsity of the weight coefficient, reduce the complexity of the model, and avoid overfitting. According to the Bayesian formula, the posterior distribution of the weight variable can be expressed as:
[0083]
[0084] In the formula, Λ=diag{ξ1,ξ2,...,ξ N} and P(y m |λ,Λ) represents the marginal distribution of the measured processing error, and N is the number of weights. The posterior expectation and variance of the weight coefficient are estimated by finding the maximum value of the posterior probability, which is expressed as:
[0085] μ ω =λ -1 ∑ ω Φ T y m
[0086] ∑ ω =λ(Φ T Φ+λΛ -1 ) -1
[0087] Then, the hyperparameters λ and Λ are optimized by maximizing the marginal likelihood function. For the convenience of calculation, the logarithm of the likelihood function is taken, i.e., logP(y m |λ,Λ); the optimization of marginal likelihood is equivalent to maximizing its lower bound, the weighted posterior distribution P(ω|y m ,λ k ,Λ k ) can be expressed as:
[0088]
[0089] The above operations can generate the following loss function:
[0090]
[0091] The optimization problem can be solved by making the partial derivative of the loss function with respect to the hyperparameters equal to zero, and the hyperparameters λ and Λ can be updated as follows:
[0092]
[0093] Among them <·> i represents the item of the i-th vector, <·> iiRepresents the item in the i-th row and i-th column of the matrix; during the iteration process, when the 1-norm of the weight vector || μ ω When the relative change between ||1 and the standard deviation of the predicted noise and the value of the previous iteration is less than the set threshold for multiple consecutive times, the model is considered to have converged. At this point, the model weights are sparse enough, the noise prediction tends to be stable, and the model prediction performance and reliability are high. The convergence condition is expressed as:
[0094]
[0095] in is the set convergence threshold.
[0096] Another object of the present invention is to provide a feature fusion and refinement embedded sparse Bayesian learning system comprising:
[0097] The acquisition module is used to perform robot air cutting motion and milling experiments for different processing tasks according to the planned processing parameters. It also collects joint angles, acceleration signals, and cutting force signals, and measures the processing errors of the workpiece after milling.
[0098] The processing module is used to process and calculate the collected raw signals to obtain the feature vector of the model input and use the measured processing error as the model label;
[0099] Fusion module, which is used to perform feature weighting on the calculated feature vectors and perform feature fusion to construct a dictionary matrix;
[0100] A module is established to establish a regression prediction model based on the obtained dictionary matrix and processing error.
[0101] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the feature fusion and refinement embedding sparse Bayesian learning method.
[0102] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the feature fusion and refinement embedding sparse Bayesian learning method.
[0103] Another object of the present invention is to provide an information data processing terminal, which is used to implement the feature fusion and refinement embedded in the sparse Bayesian learning system.
[0104] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0105] First, the present invention relates to a feature fusion and refinement embedded in a sparse Bayesian learning method and system for robotic surface milling profile error monitoring. Feature vectors composed of process parameters, robot stiffness, cutting force, and tracking error are structured and fused into a dictionary matrix, and combined with a sparse Bayesian learning method to implement robotic machining error monitoring. Robot milling experiments are conducted on parts with different characteristic curved surfaces under varying postures. During the cutting process, the robot's joint angles, spindle acceleration signals, and cutting force signals are collected, and part machining errors are used as labels to construct a dataset. The robot's end-point stiffness is calculated by combining joint stiffness with the Jacobian matrix, and the cutting force is predicted by combining the monitored acceleration and joint angles with a deep migration network. The predicted cutting force is spatiotemporally aligned with the machining position, followed by feature extraction in the time, frequency, and time-domains, and principal component analysis is performed to achieve redundancy dimensionality reduction. After the robot's kinematic parameters are calibrated, the end-point tracking error under cutting force perturbations is calculated using joint angles collected during both idle and cutting operations, and unsupervised global feature weighting is performed. The feature matrix constructed by process parameters, robot end stiffness, cutting force characteristics and weighted tracking error characteristics is normalized and kernel function mapping is performed to achieve feature fusion. Combined with the dictionary matrix and processing error, a regression prediction model is established. First, it is assumed that the weight between the model input feature and the label satisfies the Gaussian prior distribution to promote the majority of coefficient weights to tend to 0 and achieve the sparsity of the model weight. According to the Bayesian formula, the posterior distribution of the weight variable can be obtained, and the expectation and variance of the posterior distribution of the weight coefficient are estimated by maximizing the posterior probability. The variance and the hyperparameters affecting the sparsity of the weight are estimated by maximizing the marginal likelihood function, that is, maximizing the expectation of the joint likelihood function under the posterior distribution of the weight to optimize, and the minimum solution of the converted loss function can be found to optimize the hyperparameters. The posterior expectation and variance of the model weights, as well as the hyperparameters are iteratively updated during the training process, and the iterative process is terminated according to the set change threshold to achieve the sparsification of the model weight vector and the construction of a sparse model. The present invention realizes the robot milling error monitoring of parts with different characteristic surfaces under variable posture, effectively reducing the part measurement cost.
[0106] The present invention aims to provide a sparse Bayesian learning method and system for feature fusion and refinement embedded in robotic surface milling contour error monitoring. This method fuses feature vectors consisting of machining parameters, robot stiffness at the machining position, cutting force characteristics, and tracking error characteristics into a dictionary matrix, and constructs a sparse Bayesian regression model to predict robotic milling errors. This reduces the need to measure workpieces with changing feature surfaces in new poses, significantly reducing experimental and measurement costs.
[0107] The proposed method utilizes process parameters, robot stiffness information, cutting force signals, and tracking error to monitor machining errors, enabling error monitoring at different robot positions and on surfaces with varying features. The robot's end-of-line stiffness is calculated using joint angles collected by internal sensors during machining combined with the Jacobian matrix, while cutting force is predicted from acceleration. Sensor installation does not affect robot machining operations, making the method simple, convenient, and cost-effective, with potential for widespread industrial application.
[0108] The method proposed in the present invention utilizes a data-driven model to establish a mapping relationship between process parameters, robot stiffness, cutting force, tracking error and machining error, without the need for a complex parameter identification process or compensation strategy.
[0109] The method proposed in the present invention adopts a sparse Bayesian learning algorithm and utilizes machining physical quantities to realize machining error monitoring at different positions of the robot and on variable feature surfaces, thereby reducing the need for measuring parts and thus reducing measurement and time costs.
[0110] Second, the expected benefits and commercial value of the technical solution of the present invention after transformation are:
[0111] Existing methods use sensors or equipment such as scanners or three-coordinate measuring machines to measure the machining errors of complex curved parts, which are relatively expensive and their performance is also limited by the size and surface characteristics of the parts. In addition, complex curved parts need to be measured after machining, which makes it difficult to measure them on the machine. After the technical solution of the present invention is converted, the physical signals during the robot milling process are used to indirectly reflect the machining errors of complex curved parts. The machining errors are monitored using process parameters, robot stiffness information, cutting force signals and tracking errors, realizing the monitoring of machining errors at different positions of the robot and on surfaces with variable features. The stiffness of the robot end is calculated by combining the joint angle collected by the internal sensor during the machining process with the Jacobian matrix, and the cutting force is predicted by the acceleration. The installation of the acceleration sensor does not affect the robot machining operation. It is simple and convenient to use, highly economical, and has the potential to be promoted to actual industrial applications. It has the potential to replace commercial sensors and equipment such as scanners and three-coordinate dynamometers for machining errors, thereby reducing machining costs and increasing profits.
[0112] The technical solution of the present invention overcomes technical bias: the technical field of machining error monitoring to which the present invention relates currently has problems such as high prices of commercial sensors and equipment such as scanners and three-coordinate dynamometers, and certain limitations in their use scenarios. The technical solution proposed by the present invention establishes a mapping relationship between process parameters, robot stiffness, cutting force, tracking error and machining error through a data-driven model, without the need for complex parameter identification processes or compensation strategies. For mass production in actual industrial sites, the trained model can be used to accurately monitor machining errors. This breaks through technical bias and is a new machining error monitoring method and monitoring process. The technical biases overcome include the simplification of complex process flows, the reduction of machining and measurement costs, and the improvement of machining operation safety and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0113] Figure 1 This is a flow chart of the feature fusion and refinement embedding sparse Bayesian learning method provided by an embodiment of the present invention.
[0114] Figure 2 This is a structural block diagram of the feature fusion and refinement embedded sparse Bayesian learning system provided by an embodiment of the present invention.
[0115] Figure 3 It is a schematic flow chart of the basic method provided by an embodiment of the present invention.
[0116] Figure 4 This is a diagram of the robot kinematics model provided by an embodiment of the present invention.
[0117] Figure 5 This is a diagram of a robot kinematic parameter calibration experimental platform provided by an embodiment of the present invention.
[0118] Figure 6 3 is a comparison diagram of position errors before and after calibration provided by an embodiment of the present invention.
[0119] Figure 7 It is a curved workpiece drawing designed according to a scaled-down part of an aircraft engine casing provided by an embodiment of the present invention.
[0120] Figure 8 This is a diagram of a robot milling and data acquisition system provided by an embodiment of the present invention.
[0121] Figure 9 This is a diagram of an error measurement experiment for robot-processed parts provided by an embodiment of the present invention.
[0122] Figure 10 3 is a stiffness distribution diagram of the robot end at different measurement points provided by an embodiment of the present invention.
[0123] Figure 11 This is a tracking error distribution diagram under three processing tasks designed according to an embodiment of the present invention.
[0124] Figure 12 This is a comparison chart of the predicted and measured cutting force values for BT3 in Task B provided in an embodiment of the present invention.
[0125] Figure 13 3 is a comparison chart of the predicted and measured cutting force values for CT1 in Task C provided in an embodiment of the present invention.
[0126] Figure 14 This is a flow chart of processing a cutting force signal provided by an embodiment of the present invention.
[0127] Figure 15 This is a PCA dimensionality reduction graph of the cutting force signal provided by an embodiment of the present invention.
[0128] Figure 16 is the accumulated saliency map provided by the embodiment of the present invention.
[0129] Figure 17 This is a distribution diagram of machining errors of workpiece measurement points under three machining tasks provided by an embodiment of the present invention.
[0130] Figure 18 This is a weight vector value diagram after training provided by an embodiment of the present invention.
[0131] Figure 19 3 is a comparison chart of the predicted and measured values of the machining errors of the test set provided by the embodiment of the present invention.
[0132] Figure 20 3 is a comparison chart of the error measurement value provided by the embodiment of the present invention, the benchmark-1 and the prediction results of the proposed method on the test set.
[0133] Figure 21 3 is a comparison chart of the error measurement value provided by the embodiment of the present invention, the benchmark-2 and the prediction results of the proposed method on the test set.
[0134] Figure 22 3 is a comparison diagram before and after machining error compensation provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0135] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0136] like Figure 1 As shown, a feature fusion and refinement embedding sparse Bayesian learning method provided by an embodiment of the present invention includes the following steps:
[0137] S1, according to the proposed processing parameters, the robot performs air cutting motion and milling experiments for different processing tasks, and simultaneously collects joint angles, acceleration signals and cutting force signals, and measures the processing error of the workpiece after milling;
[0138] S2, processes and calculates the original signal collected in S1 to obtain the feature vector of the model input, and uses the measured processing error as the model label;
[0139] S3, performs feature weighting on the feature vectors calculated in S2 and performs feature fusion to construct a dictionary matrix;
[0140] S4, establishing a regression prediction model based on the dictionary matrix and processing error obtained in S3;
[0141] The present invention first conducts air-cutting and milling experiments on the robot based on the proposed machining parameters. During the experiments, multimodal data, including the robot's joint angles, acceleration signals, and cutting force signals, are collected simultaneously to reflect changes in dynamic and mechanical properties during machining. After the milling task is completed, the error of the machined workpiece is measured to obtain data on actual machining accuracy. The goal of this stage is to provide complete and authentic experimental data for subsequent analysis and modeling.
[0142] The collected raw signals are processed, including denoising, normalization, time series segmentation, and frequency domain analysis, to improve data quality and representation capabilities. Based on this signal processing, key feature vectors of the machining task are calculated, such as joint angle change rate, acceleration frequency distribution, and cutting force peak value. These processed feature vectors serve as the model input, and the annotated machining error data serves as the model's output labels.
[0143] To build a more accurate prediction model, the present invention evaluates the influence weight of each feature after feature extraction, using a weighted approach to strengthen the contribution of key features to model performance. Simultaneously, feature vectors from different modalities (such as joint angles, acceleration signals, and cutting force signals) are fused to form a unified dictionary matrix. This dictionary matrix effectively integrates multimodal feature information and reflects the overall characteristics of the machining process.
[0144] Based on the dictionary matrix derived from feature fusion and the machining error labels, a sparse Bayesian learning method is used to establish a regression prediction model. Using regularization constraints, the sparse Bayesian method automatically selects the features that most influence machining errors, building an efficient sparse model. This method improves the model's prediction accuracy while reducing the impact of redundant features, making the model more concise and easier to generalize.
[0145] The dictionary matrix and machining error data are input into a sparse Bayesian model, and the model parameters are optimized through a training process. During training, the model continuously adjusts feature weights and regression coefficients based on the deviation between the actual machining error and the predicted value to achieve higher prediction accuracy. Furthermore, the model can dynamically adjust its structure based on experimental data from different machining tasks, demonstrating strong adaptability.
[0146] The resulting sparse Bayesian prediction model can be used to predict errors for future machining tasks. By inputting new machining parameters and signal features, the model can estimate machining errors in real time and provide reference recommendations for optimizing machining parameters. This method, based on feature fusion and sparse learning, significantly improves the efficiency and accuracy of error prediction while reducing the time cost of experimentation and debugging, and has broad industrial application value.
[0147] First, it is assumed that the weights between the model input features and the labels satisfy the Gaussian prior distribution to promote most coefficient weights to tend to 0 and achieve the sparsity of the model weights; according to the Bayesian formula, the posterior distribution of the weight variables is obtained, and the expectation and variance of the posterior distribution of the weight coefficients are estimated by maximizing the posterior probability; the variance and the hyperparameters affecting the sparsity of the weights are estimated by maximizing the marginal likelihood function, that is, maximizing the expectation of the joint likelihood function under the posterior distribution of the weights to optimize, and the minimum solution of the transformed loss function can be found to optimize the hyperparameters; the posterior expectation and variance of the model weights, as well as the hyperparameters are iteratively updated during the training process, and the iterative process is terminated according to the set change threshold to achieve the sparsification of the model weight vector and the construction of a sparse model.
[0148] As a preferred embodiment, in step S1
[0149] In step S1, air cutting motion and milling experiments were conducted according to the designed machining trajectory and process parameters, with different machining positions and surface features. An accelerometer was attached to the spindle, and acceleration and cutting force signals were collected during the milling process using a dynamometer system and data acquisition system. The robot's open data acquisition system was used to obtain the angles of each robot joint during machining. A structured light camera was used to scan the milled workpiece and measure machining errors.
[0150] As a preferred embodiment, in step S2
[0151] In step S2, the process parameters of the robot milling experiment, such as spindle speed, feed rate and cutting depth, are used as static input features of the error monitoring model.
[0152] The robot end stiffness is calculated from the joint stiffness, Jacobian matrix and joint angle:
[0153] K S=J -T (q)K q J -1 (q)
[0154] Where J is the Jacobian matrix, q is the joint angle, K S and K q are the Cartesian stiffness matrix and joint stiffness respectively; the joint stiffness vector is expressed as: K q =diag(K q1 ,K q2 ,K q3 ,K q4 ,K q5 ,K q6 ), K qi represents the stiffness of the i-th joint, K q Is a 6×6 diagonal matrix, each diagonal item represents the robot joint stiffness. S The first three values represent the three static stiffnesses in the Cartesian coordinate direction. Recorded as
[0155] Robot kinematics is a key factor influencing machining errors. The Denavit-Hartenberg (DH) parameter method is used to establish the robot's kinematic model. Calibration instruments are used to measure the actual position of the robot's end-users in different postures. A solution algorithm is then used to calibrate the DH parameters, combining the collected joint angles with the kinematic model.
[0156] After calibrating the DH parameters, the influence of the robot's geometric errors is ignored. The corresponding joint angles are then collected during both the robot's free-cutting motion and the cutting motion. The calibrated DH parameters are then used to calculate the corresponding tool tip position in the workpiece coordinate system, combining the workpiece coordinate system and the tool coordinate system. The difference in tool tip position is taken as the robot's end-tracking error under cutting force disturbances, expressed as:
[0157] δ tracking =k m (p cutting )-k m (p idlecutting )
[0158] Where k m is the calibrated kinematic model, p cutting and p idle cutting Represent the joint angles of the robot during cutting and air cutting respectively. The calculated tracking error value is weighted and used as the input feature of the error monitoring model
[0159] The detailed process of cutting force migration prediction can be found in patent application: 202410588786.7. The following is only a brief introduction.
[0160] For the collected original signals of acceleration, cutting force and joint angle, we first remove the non-cutting segment data, perform downsampling and time sequence alignment operations, and characterize the relationship between the robot joint angle, acceleration signal and cutting force as follows:
[0161]
[0162] Among them, k represents the current moment, F a (k) represents the cutting force at the current moment, q1(kj), q2(kj), q3(kj), q4(kj), q5(kj), q6(kj), a(kj), (j=0, 1, ..., n) represent the angles and acceleration signals of each joint at the previous moment and the current moment. F a (kj), (j = 1, 2, ..., l) represents the predicted cutting force at previous moments, n and l represent the order of the time lag associated with the input and output, respectively, and f represents the nonlinear relationship between the input and output. A data-driven model is used to construct f. During model training, the time-aligned data is converted into multidimensional data according to the above formula.
[0163] The PCA method is used to assign pseudo labels to the test data in the target pose to meet the network input dimension requirements. The obtained source domain data and target domain data are input into the proposed deep transfer regression model. First, a deep network model is established, including a feature extraction network and a fully connected network to extract time series data features and perform regression prediction on the features. The CNN feature extraction network and FC regression prediction module are first trained using the source domain data, and then the pre-trained model parameters are transferred to the target domain model with the same structure. The feature extractor is defined as follows:
[0164]
[0165] Among them F ES is the deep feature expression contained in the extracted input time series signal, Represents the feature extractor of the source data. s is the input source data sample, Represents feature extractor parameters.
[0166] The extracted source domain features are then input into the regressor to predict the cutting force, and the output dimension is 1. The regression loss of the regressor is as follows:
[0167]
[0168] where n sis the number of source samples, Represents the calculation of mean square error (MSE): represents the regressor parameters.
[0169] Based on the kernel embedding theory of conditional distribution, a conditional distribution embedding operator is proposed to measure the difference in conditional probability distribution. X and O Y The variables X and Y, the corresponding reproducing kernel Hilbert space (RKHS) is and By embedding p(Y|X) into RKHS, the conditional mean embedding can be defined as:
[0170]
[0171] where ψ(x): And φ(Y): and yes The operator characterizes the characteristics of the conditional distribution. When a fixed x is taken, a conditional mean embedding value μ is obtained. Y|x .
[0172] According to the calculation formula of conditional probability distribution, it is equal to the ratio of joint probability distribution to marginal probability distribution of input. The conditional embedding operator calculation can be defined as the combination of cross covariate operator and independent covariate operator:
[0173]
[0174] When a data set D = {(x1,y1),(x2,y2),...,(x n ,y n )}hour, The estimated value of can be defined as follows:
[0175]
[0176] Where F=(φ(y1),φ(y2),...,φ(y n )), and is the Gram matrix of the variable samples, with a regularization term added to ensure it is well-posed.
[0177] We design a conditional distribution embedding operation to estimate the difference between conditional probability distributions. It is defined as follows and used as the loss function for network parameter updates to minimize domain differences.
[0178]
[0179] The matrix K XX' Calculation using Gaussian kernel κ:
[0180] K XX' (i,j)=κ(X i ,X j ')= <f(X i ),f(X j ')>
[0181] where <·,·> represents the vector inner product.
[0182] The conditional embedding distribution difference is calculated using the new features formed by the second fully connected layer of the target pose unlabeled input data features, the predicted value of the regression network, the new features formed by the second fully connected layer of the source pose data features and their label values. The conditional embedding distribution difference is calculated by using the new features formed by the second fully connected layer of the unlabeled input data features, the predicted value of the regression network, the new features formed by the second fully connected layer of the target pose labeled data features and their label values.
[0183] The target domain has labeled data and its predicted value is used to calculate the regression loss. It can be calculated as:
[0184]
[0185] For the training of the feature extractor of the target data and the task-specific regressor, the following weighted ensemble loss function is used for parameter update:
[0186]
[0187] in, is the regression loss of labeled data in the target domain, Represents the difference in conditional distribution metrics between source domain data and target domain unlabeled data, Represents the difference in conditional distribution between labeled and unlabeled data in the target domain, α s and β t is a trade-off parameter.
[0188] The network is trained by minimizing the target pose regression loss and the difference between the two conditional embedding distributions, and the optimizer is used to update the network parameters. After the iteration is completed, the cutting force prediction model of the target pose is obtained:
[0189]
[0190] After changing the robot's posture during actual processing, the monitored robot joint angles and acceleration signals are input into the established prediction model for training and iterative prediction in combination with a small amount of labeled data, so as to obtain the real-time and accurate cutting force under the new posture.
[0191] The predicted cutting force signal is aligned with the workpiece measurement point in space, and the time domain, frequency domain, and time-frequency domain features closely related to the part processing error are extracted from the cutting force signal near each measurement point. Converting the dynamic cutting force into structured multi-domain information is conducive to establishing a robot processing error prediction model. Time domain features Including maximum value average value variance Peak-to-peak value RMS value Kurtosis and skewness Represents the cutting force components in three directions. The change of cutting force in the time domain reflects the unevenness of material removal during the cutting process, and further reflects the change of machining error. Frequency domain characteristics Including frequency average energy Frequency variance Frequency Center and mean square frequency The characteristics of cutting force in the frequency domain mainly reflect dynamic stability and have a great influence on machining errors.
[0192] Time-frequency domain analysis methods can mine the joint distribution information between the time domain and the frequency domain. The variational mode decomposition (VMD) method is robust to noise and sampling processes, decomposing the original signal into sub-signals with a specific sparsity for subsequent time-frequency domain feature extraction. The number of decomposition layers and the setting of the penalty factor have a significant impact on the decomposition effect. The adaptive variational mode decomposition method (AVMD) is used to extract time-frequency domain features, which can achieve adaptive optimization of the number of decomposition layers K and the penalty factor γ, thereby improving the performance of feature extraction. The number of decomposition layers is set based on experience, and the cross-correlation spectrum index (CSI) is used to achieve adaptive optimization of the penalty factor. Its description formula is as follows:
[0193]
[0194] Where T is the length of the original signal, i and j are the ordinal numbers of the intrinsic mode functions, and u i and u j is the sub-signal decomposed by the AVMD method. For each penalty factor γ within the set range, the original signal is decomposed using the VMD method, and then its CSI is obtained according to the above formula. The penalty factor corresponding to the minimum CSI value is selected as the optimal value. The original signal is decomposed into several sub-component signals, and the time-frequency domain features are extracted using energy entropy. The energy of each sub-signal is calculated as:
[0195]
[0196] The energy entropy of the sub-signal is given by:
[0197]
[0198] Where r i =R i / R is the percentage of each sub-signal energy to the total signal energy.
[0199] These features not only provide a deep understanding of the variations in cutting forces during machining, but also offer a physically interpretable basis for analyzing and optimizing errors that may occur during machining.
[0200] Considering that all cutting force features contain redundant information, the principal component analysis (PCA) method is used to reduce the redundancy of all cutting force features to retain the principal components that reflect the deep feature expression and structure of the data. PCA operations are performed on the cutting forces in the three directions respectively. First, the feature matrix composed of time domain, frequency domain and time-frequency domain features is Normalized separately, the original feature dimension is d o . Then solve the covariance matrix about The calculation result of the characteristic value represents the information contained in the corresponding dynamic feature significance. Then calculate the significance ratio of the dynamic feature and sort it in descending order. According to the ranking, add up the first m significance ratio values to get the total significance s p If s p Less than the set threshold s t , then increase the value of m, if it reaches the set threshold, then output the reduced matrix and the corresponding dimension d after reduction r Finally, the dimensionality reduction results of the cutting force characteristics in the three directions are integrated to obtain the final cutting force characteristics.
[0201] As a preferred embodiment, in step S3
[0202] In step S3, the robot end tracking error under the influence of cutting force describes the position deviation of the robot end under the action of cutting force. It is most closely related to the contour error of the final machined workpiece. Therefore, the features constituted by the tracking error are weighted to emphasize its importance in the feature matrix. A global unsupervised feature weighting method is proposed to adaptively adjust the weight of the tracking error feature term. The error value is divided into multiple intervals with a fixed width. The number of error values in each interval is counted, and the probability p of each interval is calculated. i, which is the number of samples in the interval divided by the total number of samples. The resulting probability distribution can describe the frequency of different error ranges.
[0203] Calculate the information entropy after discretization:
[0204]
[0205] Among them, n is the number of intervals after discretization, p i is the probability of the ith interval. The larger the information entropy value, the more dispersed the distribution of the feature and the higher the uncertainty.
[0206] The weight of each column of tracking error values is set to a combination of information entropy and variance ratio:
[0207]
[0208] Among them, α H and β ζ is a parameter that controls information entropy and variance weight. N t The number of feature columns representing the tracking error. Information entropy measures the uncertainty of the tracking error value for each column. Variance measures the dispersion of the tracking error for each column. Combining information entropy and variance weighting can provide a more comprehensive measure of feature importance.
[0209] Multiple measurement points are selected at equal intervals on each trajectory to form the label dataset of the prediction model.
[0210] For the robot end stiffness, cutting force characteristics and weighted tracking error characteristics obtained above, a structured feature row vector is constructed in combination with the processing parameters. The feature vectors of multiple samples constitute a feature matrix, which is then normalized to eliminate the influence of large differences in the magnitude of different features.
[0211] To perform feature fusion on the feature matrix, in order to overcome the disadvantage that feature information is linearly indistinguishable in low-dimensional space, a kernel function is introduced to map sample features to high-dimensional space. The Gaussian kernel has good nonlinear fitting properties and is easy to adjust weights to fit different data distributions and map complex relationships. The Gaussian kernel distribution can be expressed as:
[0212]
[0213] Where σ is the bandwidth of the Gaussian kernel, which is optimized using a random search algorithm. For the regression model of feature fusion and physical knowledge embedding, the kernel function is mapped to the feature vector to obtain a feature kernel dictionary matrix with a Gaussian distribution. The dictionary matrix is configured as a structured ordering of static and dynamic features according to the order of the measurement points, which not only reflects the trend of the features but also avoids the overlap of feature signals. The feature kernel dictionary matrix Φ is expressed as:
[0214]
[0215] The machining error can be expressed as follows:
[0216] y m =y p +ε;y p =Φω
[0217] Where y m is the measured processing error, y p is the predicted processing error, ε is the prediction noise caused by uncertainty in the processing and measurement process. Φ is the constructed dictionary matrix, and ω is the corresponding weight coefficient, which can be expressed as:
[0218] ω=[ω1,ω2,...,ω M-1 ,ω M ,b] T
[0219] As a preferred embodiment, in step S4
[0220] In step S4, a regression prediction model is established based on the dictionary matrix and machining error obtained in the above steps. The sparse Bayesian learning method introduces sparsity based on the idea of Bayes' theorem and assumes a Gaussian prior distribution for the weights. This can greatly reduce model redundancy and improve computational efficiency, model generalization ability, and interpretability. The probability distribution of the noise variable can be assumed to be a normal probability density function ε~N(0,λI), where λ is the variance, which is affected by machining uncertainty caused by vibration and cutting heat, as well as measurement uncertainty. m The likelihood function is defined as:
[0221]
[0222] A Gaussian prior distribution is introduced on the weight vector, so that most of the weight coefficients are close to zero, achieving the sparsity of the weight vector. In this way, the processing error can be predicted only by the relevant columns in the dictionary matrix and the corresponding sparse weights, which improves the computational efficiency. Usually, in order to calculate the homogeneous analytical solution of the posterior, the prior distribution is the conjugate prior of the likelihood function, that is:
[0223]
[0224] where ξ i Impact i The probability of approaching zero is used to control the sparsity of the weight coefficients, reduce the complexity of the model, and avoid overfitting. According to the Bayesian formula, the posterior distribution of the weight variable can be expressed as:
[0225]
[0226] In the formula, Λ=diag{ξ1,ξ2,...,ξ N} and P(y m |λ,Λ) represents the marginal distribution of the measured processing error, and N is the number of weights. The posterior expectation and variance of the weight coefficient are estimated by finding the maximum value of the posterior probability, which is expressed as:
[0227] μ ω =λ -1 ∑ ω Φ T y m
[0228] ∑ ω =λ(Φ T Φ+λΛ -1 ) -1
[0229] Then the hyperparameters λ and Λ are optimized by maximizing the marginal likelihood function. For the convenience of calculation, the logarithm of the likelihood function is taken, i.e. logP(y m |λ,Λ). Optimizing the marginal likelihood is equivalent to maximizing its lower bound, the weighted posterior distribution P(ω|y m ,λ k ,Λ k ) can be expressed as:
[0230]
[0231] The above operations can generate the following loss function:
[0232]
[0233] The optimization problem can be solved by making the partial derivative of the loss function with respect to the hyperparameters equal to zero, and the hyperparameters λ and Λ can be updated as follows:
[0234]
[0235] Among them <·> i represents the item of the i-th vector, <·> ii represents the item in the i-th row and i-th column of the matrix. During the iteration, when the 1-norm of the weight vector || μ ω The model is considered converged when the relative change between ||1 and the standard deviation of the prediction noise is less than the set threshold for multiple consecutive times. At this point, the model weights are sufficiently sparse, the noise prediction tends to be stable, and the model prediction performance and reliability are high. The convergence condition is expressed as:
[0236]
[0237] in is the set convergence threshold.
[0238] like Figure 2 As shown, a feature fusion and refinement embedded sparse Bayesian learning system provided by an embodiment of the present invention includes:
[0239] The acquisition module is used to perform robot air cutting motion and milling experiments for different processing tasks according to the planned processing parameters. It also collects joint angles, acceleration signals, and cutting force signals, and measures the processing errors of the workpiece after milling.
[0240] The processing module is used to process and calculate the collected raw signals to obtain the feature vector of the model input and use the measured processing error as the model label;
[0241] Fusion module, which is used to perform feature weighting on the calculated feature vectors and perform feature fusion to construct a dictionary matrix;
[0242] A module is established to establish a regression prediction model based on the obtained dictionary matrix and processing error.
[0243] This paper uses an acquisition module to conduct both dry-cutting and actual milling experiments with the robot, based on pre-set machining parameters. During the experiments, multimodal data, including joint angles, acceleration signals, and cutting force signals, are collected during the robot's motion. After the machining task is completed, workpiece errors are measured to obtain machining error data. The acquisition module ensures the correlation between the dynamic characteristics of the machining process and the machining results, providing a high-quality experimental foundation for subsequent data processing.
[0244] The processing module preprocesses the collected raw multimodal signals, including data denoising, normalization, and feature extraction. By analyzing time and frequency domain features, it generates feature vectors that reflect the robot's motion state and machining mechanical properties. Furthermore, the measured machining error data is used as labels and associated with the feature vectors to form the input dataset for the machine learning model. The processing module's precise calculations ensure the quality of the data input, laying the foundation for the development of the regression prediction model.
[0245] The fusion module weights the multimodal feature vectors, assigning higher weights to features that have a greater impact on machining error prediction. The module then fuses these weighted feature vectors to integrate the core information of the multimodal data and construct a high-dimensional dictionary matrix. This dictionary matrix comprehensively reflects the multimodal characteristics of the machining process and provides an accurate and efficient input feature space for the sparse Bayesian learning model.
[0246] The module uses sparse Bayesian learning to establish a regression prediction model based on the dictionary matrix and processing error data. This method uses regularization constraints to screen and model key features, significantly improving the model's prediction accuracy and generalization capabilities. Furthermore, computer devices and information data processing terminals equipped with memory and processors can load readable storage media containing computer programs and execute the algorithmic steps of feature fusion and sparse Bayesian learning, providing intelligent solutions for error prediction and process optimization in practical industrial applications.
[0247] like Figure 3 A feature fusion and refinement embedding sparse Bayesian learning method and system for robot surface milling contour error monitoring, which uses the spindle speed, feed rate and cutting depth of the robot milling experiment as the static input features of the error monitoring model.
[0248] Robot stiffness includes joint stiffness, link stiffness, and end effector stiffness. It contains information about the robot's spatial configuration, the robot's motion transfer equations, and the workpiece's position. The robot's end effector stiffness is calculated from the joint stiffness, Jacobian matrix, and joint angles:
[0249] K S =J -T (q)K q J -1 (q)
[0250] Where J is the Jacobian matrix, q is the joint angle, K S and K q are the Cartesian stiffness matrix and joint stiffness respectively; the joint stiffness vector is expressed as: K q =diag(K q1 ,K q2 ,K q3 ,K q4 ,K q5 ,K q6 ), K qi represents the stiffness of the i-th joint, K q is a 6×6 diagonal matrix, each diagonal item represents the joint stiffness of the robot. The specific joint stiffness of the robot used in the experiment is shown in Table 1. The diagonal matrix K S The first three values represent the three static stiffnesses in the Cartesian coordinate direction. Recorded as
[0251] Table 1 COMAU Smart5 NJ220 robot joint stiffness (unit: Nmm / rad)
[0252]
[0253] Robot kinematics is a key factor affecting machining errors. The DH (Denavit-Hartenberg) parameter method is used to establish the robot kinematic model. Figure 4 As shown in Figure 2. The robotic arm can be viewed as a kinematic chain consisting of a series of joints and links, with fixed coordinate systems on the links. The transformation relationship between adjacent link coordinate systems is determined by the link length a. i , connecting rod torsion angle α i , joint distance d i , joint rotation angle θ i Homogeneous transformation can be expressed as:
[0254]
[0255] In the formula i-1 T i is the homogeneous transformation matrix of the i-th joint coordinate system relative to the i-1-th joint coordinate system, where i is the robot joint number; Rot represents the rotation matrix, and Trans represents the translation matrix.
[0256] For a 6-DOF serial robot, the transformation matrices of adjacent links are multiplied in sequence to obtain the homogeneous transformation relationship between the end flange coordinate system and the robot base coordinate system:
[0257] b T6= b T1 1 T2 2 T3 3 T4 4 T5 5 T6
[0258] Symbols 1-6 represent the number of robot joint angles. The calculated end position can be expressed as:
[0259] P calculated =p(θ,d,α,a)
[0260] The standard DH parameters of the COMAU Smart5NJ220-2.7 robot used in this case are shown in Table 2.
[0261] Table 2 COMAU Smart5 NJ220-2.7 robot standard DH parameters
[0262]
[0263] Due to the manufacturing and assembly errors of the robot links, as well as the deviation caused by the joint clearance, when the end position is calculated using standard DH parameters, there is a large deviation between the calculated result and the planned position. The actual robot end position can be expressed as:
[0264] P measured =p(θ+δθ,d+δd,α+δα,a+δa)
[0265] Therefore, it is necessary to correct the DH parameters through calibration experiments to improve the accuracy of the kinematic model. A laser tracker (Leica AT901-MR) is used to measure the actual position of the end effector at different positions of the robot. Its positioning accuracy is 25μm / m and the posture accuracy is 0.01°. The laser tracker reflector is fixed on the end of the robot, and the laser tracker is used to monitor the position of the reflector. A structured light camera (SCANTECH ReadyScanB11) is used to measure the relative position of the reflector relative to the center of the robot end. The experimental platform is as follows: Figure 5 shown.
[0266] After the robot returns to the zero position, the robot's 1, 3, and 6 axes are uniformly rotated within the range of ±20°, ±20°, and ±180°, respectively, and the actual position of the reflector at each rotation angle is recorded. The measured positions are used to fit the three space circles and their normal vectors to obtain the rotation transformation matrix between the robot base coordinate system and the tracker coordinate system. Combining the end flange center position and the measured position at the robot zero position, the translation vector between the robot base coordinate system and the tracker coordinate system is calculated. Then, 64 measurement points are uniformly collected within the range of 900×1200×900mm above the robot workbench, and the corresponding joint angles are recorded for calibrating the DH parameters. According to the relative position of the reflector target ball relative to the center of the robot end measured by the structured light camera, combined with the homogeneous transformation matrix, the tracker measurement data is converted to the robot base coordinate system, and the error between the measured position and the calculated position is calculated and expressed as:
[0267] δP=P measured -P calculated
[0268] When the DH parameter error is small, it can be simplified to the corresponding linear equation. For each measurement point, there are errors in the X, Y, and Z directions, which are expressed as follows:
[0269]
[0270] For a multi-joint robot with multiple DH parameters, the above formula can be written in matrix form:
[0271] A·δ DH =B
[0272] Where A is the Jacobian matrix. Every three rows form a group, and there are n groups, where n is the number of measurement points. The Jacobian matrix is expressed as follows:
[0273]
[0274] B is the error matrix of n measurement points:
[0275] B=[δp 1x ,δp 1y ,δp 1z ,...δp nx ,δp ny ,δp nz ,] T
[0276] δ DH is the error of the DH parameter to be calibrated:
[0277] δ DH =[δθ0,...δθ6,δd0,...δd6,δα0,...δα6,δa0,...δa6] T
[0278] The least squares method is used to identify the DH parameter error:
[0279] δ DH =(A T A) -1 ·A T ·B
[0280] The obtained parameter error is superimposed on the standard DH parameter to obtain a new set of DH parameters, and then the position error is re-solved and iterated repeatedly until the position error is small enough. The DH parameter error after calibration is shown in Table 3. Figure 6 As shown in the figure, the results show that after calibrating the DH parameters, the geometric error of the robot is effectively reduced, and the average position error is reduced from 3.73mm to 0.69mm, a reduction of 81.5%.
[0281] Table 3 DH parameter errors of COMAU Smart5 NJ220-2.7 robot calibration
[0282]
[0283] Under the perturbations of milling forces at the robot end, the robot joints are subject to additional loads and torques. This reduces the response speed and accuracy of the joint servo system, increases joint servo errors, and causes the actual cutting path to deviate from the set path, resulting in end-of-line tracking error. Therefore, end-of-line tracking error under cutting forces is of great significance for the analysis and prediction of machining errors.
[0284] After calibrating the DH parameters, the influence of the robot's geometric errors is ignored. The corresponding joint angles are then collected during both the robot's idle cutting and cutting conditions. The calibrated DH parameters are used to calculate the corresponding tool tip position in the workpiece coordinate system, combining the workpiece coordinate system and the tool coordinate system. The difference in tool tip position is taken as the robot's end tracking error under cutting force disturbances and expressed as:
[0285] δ tracking =k m (p cutting )-k m (p idlecutting )
[0286] Where k m is the calibrated kinematic model, p cutting and p idlecutting Represent the joint angles of the robot during cutting and air cutting, respectively.
[0287] The process of cutting force migration prediction, feature extraction and dimensionality reduction is as follows:
[0288] The detailed process of cutting force migration prediction can be found in patent application: 202410588786.7. The following is only a brief introduction.
[0289] The frequency response function between acceleration and cutting force is expressed in the Laplace domain as:
[0290]
[0291] Where m is the modal number, R k is the model residual, ξ k and ω nk are the k-th order damping ratio and natural frequency respectively.
[0292] Converting it into the form of a differential equation, the cutting force can be calculated by the inverse estimate of the acceleration:
[0293]
[0294] Among them A j (j=0,...,n), B j (j=1,...,l) are the coefficients of the differential equation, a j (j=0,...,n) and is the jth derivative with respect to time, n and l are a and F a The order of .
[0295] The data-driven approach can be used to establish a dynamic nonlinear relationship between the monitored acceleration signal and joint angle signal and the cutting force. In the nonlinear dynamic prediction model, the relationship between the acceleration monitoring signal and the cutting force is represented by the following discrete time dynamic system model:
[0296]
[0297] Among them, k represents the current moment, F a (k) represents the cutting force at the current moment, q1(kj), q2(kj), q3(kj), q4(kj), q5(kj), q6(kj), a(kj), (j=0, 1, ..., n) represent the angles and acceleration signals of each joint at the previous moment and the current moment. F a (kj), (j = 1, 2, ..., l) represent the predicted values of cutting force at previous moments, and n and l represent the order of time delay related to input and output, respectively.
[0298] The PCA method is used to assign pseudo labels to the test data in the target pose to meet the network input dimensionality requirements. The obtained source domain data and target domain data are input into the proposed deep transfer regression model. First, a deep network model is established, including a feature extraction network and a fully connected network to extract time series data features and perform regression prediction on these features. The CNN feature extraction network and FC regression prediction module are first trained using the source domain data. The parameters of the pre-trained model are then transferred to the target domain model with the same structure. The feature extractor is defined as follows:
[0299]
[0300] Among them F ES is the deep feature expression contained in the extracted input time series signal, Represents the feature extractor of the source data. s is the input source data sample, Represents feature extractor parameters.
[0301] The extracted source domain features are then input into the regressor to predict the cutting force, and the output dimension is 1. The regression loss of the regressor is as follows:
[0302]
[0303] where n s is the number of source samples, Represents the calculation of mean square error (MSE): represents the regressor parameters.
[0304] Based on the kernel embedding theory of conditional distribution, a conditional distribution embedding operator is proposed to measure the difference in conditional probability distribution. X and O Y The variables X and Y, the corresponding reproducing kernel Hilbert space (RKHS) is and By embedding p(Y|X) into RKHS, the conditional mean embedding can be defined as:
[0305]
[0306] where ψ(x): And φ(Y): and yes The operator characterizes the characteristics of the conditional distribution. When a fixed x is taken, a conditional mean embedding value μ is obtained. Y|x .
[0307] According to the calculation formula of conditional probability distribution, it is equal to the ratio of joint probability distribution to marginal probability distribution of input. The conditional embedding operator calculation can be defined as the combination of cross covariate operator and independent covariate operator:
[0308]
[0309] When a data set D = {(x1,y1),(x2,y2),...,(x n ,y n )}hour, The estimated value of can be defined as follows:
[0310]
[0311] Where F=(φ(y1),φ(y2),...,φ(y n )), and is the Gram matrix of the variable samples, with a regularization term added to ensure it is well-posed.
[0312] We design a conditional distribution embedding operation to estimate the difference between conditional probability distributions. It is defined as follows and used as the loss function for network parameter updates to minimize domain differences.
[0313]
[0314] The matrix K XX' Calculation using Gaussian kernel κ:
[0315] K XX' (i,j)=κ(X i,X j ')= <f(X i ),f(X j ')>
[0316] where <·,·> represents the vector inner product.
[0317] The conditional embedding distribution difference is calculated using the new features formed by the second fully connected layer of the target pose unlabeled input data features, the predicted value of the regression network, the new features formed by the second fully connected layer of the source pose data features and their label values. The conditional embedding distribution difference is calculated by using the new features formed by the second fully connected layer of the unlabeled input data features, the predicted value of the regression network, the new features formed by the second fully connected layer of the target pose labeled data features and their label values.
[0318] The target domain has labeled data and its predicted value is used to calculate the regression loss. It can be calculated as:
[0319]
[0320] For the training of the feature extractor of the target data and the task-specific regressor, the following weighted ensemble loss function is used for parameter update:
[0321]
[0322] in, is the regression loss of labeled data in the target domain, Represents the difference in conditional distribution metrics between source domain data and target domain unlabeled data, Represents the difference in conditional distribution between labeled and unlabeled data in the target domain, α s and β t is a trade-off parameter.
[0323] The network is trained by minimizing the target pose regression loss and the difference between the two conditional embedding distributions. The number of iterations is set to 100, the initial learning rate of the regressor is set to 0.0001, and the network parameters are updated using the Adam optimizer. After the iteration is completed, the cutting force prediction model of the target pose is obtained:
[0324]
[0325] Then, a milling experiment was conducted to verify that the workpiece shape surface in the experiment was derived from the airway surface shape of the actual industrial aircraft engine casing scale part, such as Figure 7 (a). Based on the surface features extracted from the receiver, the following Figure 7The workpiece shown in (b) is made of aluminum alloy 6061. In order to verify the generalization ability of the prediction model, three processing tasks A, B, and C were designed, as shown in Table 4.
[0326] Table 4 Designed robot milling tasks
[0327]
[0328] The generalization performance of the prediction model is reflected in three aspects: the variability of part surface shape, the corresponding workpiece scalability, and the variability of the robot milling position. The varying curvature and size of the workpiece, as well as the varying workpiece placement, enrich the diversity of process information representing the relationship between machining errors and cutting parameters, cutting forces, machined surface features, and robot pose. In Task A, the surface feature is a 40% scaled image of the inner casing airway surface, encompassing 16 machining paths AS1 to AS16, machined on two identical workpieces. In Task B, the surface feature is the inner casing airway surface and eight machining paths BS1-BS4 and BT1-BT4. In Task C, the surface feature is a 25% scaled image of the outer casing airway surface, encompassing six machining paths CS1-CS2 and CT1-CT4. Comparisons between Tasks A and B demonstrate model adaptability under scalability and robot position variations, while comparisons between Tasks B and C demonstrate model adaptability under scalability and robot position variations.
[0329] The overall scenario of the robot milling system is as follows Figure 8 As shown in Figure 2 . The milling experiments were conducted using a six-degree-of-freedom industrial robot (COMAU Smart5 NJ 220-2.7). The robot has a maximum payload of 220 kg and a repeatability of 0.06 mm. The COMAU Robotics open data acquisition system C5G open was used to acquire the actual joint angles during the robot's machining process. The milling spindle (Jaeger Z100-H540.08 S3W2) had a maximum speed of 30,000 rpm and a maximum torque of 5 Nm. The accelerometer (DYTRAN 3263A2) was magnetically mounted on the spindle and had a bandwidth of 4000 Hz. A dynamometer (Kistler 9129AA) was mounted on the worktable, and the workpiece was fixed to the dynamometer. The acceleration and cutting force signals were acquired using an NI 9234 data acquisition board. The acquisition software was LabVIEW 2018, with a sampling frequency of 25.6 kHz.
[0330] Milling experiments were conducted using a double-flute carbide ball-end milling cutter (SANDVIK2B330-1000-NCH10F) with a diameter of 10 mm and a helix angle of 30°. For each of the three designed machining tasks, each workpiece trajectory followed the extracted characteristic curve. Thirty sets of milling experiments were conducted on four workpieces with different process parameters, as shown in Table 5. Task A involved a three-factor, four-level orthogonal experiment conducted on two workpieces. Across the 30 sets of milling trajectories, feed rates and depths of cut were varied, with rotational speeds ranging from 5500 to 8000 rpm.
[0331] Table 5 Milling process parameters
[0332]
[0333]
[0334] The milled workpiece is scanned and captured using a structured light camera (SCANTECH ReadyScan B11) to obtain topographic point cloud data, such as Figure 9 As shown in the figure, the device achieves a measurement accuracy of 20 μm and a resolution of 25 μm, which, compared to the measured workpiece's error, meets the measurement requirements. The acquired point cloud data is processed using Geomagic software. First, a coarse registration is performed between the reference CAD model and the point cloud data, followed by a best-fit fine registration. Subsequently, an offset is performed using the unmachined surface as a reference to obtain the cross-sectional profile information of the deepest machined area under each trajectory. The measured profile is then compared with the 2D theoretical profile to determine the contour error of the machined workpiece.
[0335] The stiffness distribution of the robot end at all measurement points under the three machining tasks is calculated based on the actual collected joint angles, joint stiffness and Jacobian matrix, as shown in the figure. Figure 10 According to the above-mentioned tracking error calculation method under cutting force disturbance, the tracking error distribution of the robot end under cutting force disturbance under three machining tasks is shown as follows: Figure 11 shown.
[0336] In Table 5, the AS1-AS16, BS1-BS4, and CS1-CS2 groups are used as source domains, while the remaining groups are used as target domains. First, the non-cutting segments at the beginning and end of the data are removed, and outliers are eliminated. A low-pass filter with a cutoff frequency of 1000 Hz is then used to eliminate noise fluctuations contained in the raw cutting force data. Downsampling is then performed with a time lag order of n = 6 and l = 5. The time series data is synchronized and processed according to discrete time relationships into a format that conforms to the proposed network architecture to construct a dataset. The proposed transfer learning algorithm is used to predict cutting forces under different poses and process parameters. The predicted values are compared with the measured values, and the MAE and RMSE are used as evaluation metrics for the model's prediction performance, defined as follows:
[0337]
[0338]
[0339] Where x i and y i are input value and measured value respectively, n t The evaluation index calculation of the prediction results of some experimental groups is shown in Table 6. The ratio of the predicted RMSE to the cutting force peak value is less than 15%. The comparison results between the predicted values and the measured values are shown in Table 6. Figure 12 and Figure 13 As shown, Figure 12 is the prediction result of BT3 in task B, Figure 13 The predicted results for CT1 in Task C are shown in Figure 2. The peak and phase match between the predicted and measured values is good. Although there are some deviations in local areas, they are within an acceptable range. The results show that the proposed migration prediction method has high prediction accuracy.
[0340] Table 6 Results of the prediction performance evaluation indicators of some test sets under Task B and Task C
[0341]
[0342] After obtaining high-precision cutting force prediction results, the predicted cutting force is processed to obtain the dynamic characteristics of the error prediction model. According to the spatial position of the measurement point, the cutting force is uniformly pre-processed along the cutting trajectory. The cutting segment is evenly divided into 40 segments using the sliding window sampling method and aligned with the selected measurement points in time and space. The processing process is as follows: Figure 14 As shown. Before establishing the error prediction model, the time domain, frequency domain and time-frequency domain features of the dynamic cutting force are extracted. The predicted cutting force signal is aligned with the workpiece measurement point in space, and the time domain, frequency domain and time-frequency domain features closely related to the part processing error are extracted from the cutting force signal near each measurement point. Converting the dynamic cutting force into structured multi-domain information is conducive to establishing a robot processing error prediction model. Time domain features Including maximum value average value variance Peak-to-peak value RMS value Kurtosis and skewness Represents the cutting force components in three directions. The change of cutting force in the time domain reflects the unevenness of material removal during the cutting process, and further reflects the change of machining error. Frequency domain characteristics Including frequency average energy Frequency variance Frequency Center and mean square frequency The characteristics of cutting force in the frequency domain mainly reflect dynamic stability and have a great influence on machining errors.
[0343] Time-frequency domain analysis methods can mine the joint distribution information between the time domain and the frequency domain. The variational mode decomposition (VMD) method is robust to noise and sampling processes, decomposing the original signal into sub-signals with a specific sparsity for subsequent time-frequency domain feature extraction. The number of decomposition layers and the setting of the penalty factor have a significant impact on the decomposition effect. The adaptive variational mode decomposition method (AVMD) is used to extract time-frequency domain features, which can achieve adaptive optimization of the number of decomposition layers K and the penalty factor γ, thereby improving the performance of feature extraction. The number of decomposition layers is set based on experience, and the cross-correlation spectrum index (CSI) is used to achieve adaptive optimization of the penalty factor. Its description formula is as follows:
[0344]
[0345] Where T is the length of the original signal, i and j are the ordinal numbers of the intrinsic mode functions, and u i and u j is the sub-signal decomposed by the AVMD method. For each penalty factor γ within the set range, the original signal is decomposed using the VMD method, and then its CSI is obtained according to the above formula. The penalty factor corresponding to the minimum CSI value is selected as the optimal value. The original signal is decomposed into several sub-component signals, and the time-frequency domain features are extracted using energy entropy. The energy of each sub-signal is calculated as:
[0346]
[0347] The energy entropy of the sub-signal is given by:
[0348]
[0349] Where r i =R i / R is the percentage of each sub-signal energy to the total signal energy.
[0350] These features not only provide a deep understanding of the variations in cutting forces during machining, but also offer a physically interpretable basis for analyzing and optimizing errors that may occur during machining.
[0351] Considering that all cutting force features contain redundant information, the principal component analysis (PCA) method is used to reduce the redundancy of all cutting force features to retain the principal components that reflect the deep feature expression and structure of the data. PCA operations are performed on the cutting forces in the three directions respectively. First, the feature matrix composed of time domain, frequency domain and time-frequency domain features is Normalized separately, the original feature dimension is d o . Then solve the covariance matrix about The calculation result of the characteristic value represents the information contained in the corresponding dynamic feature significance. Then calculate the significance ratio of the dynamic feature and sort it in descending order. According to the ranking, add up the first m significance ratio values to get the total significance s p If s p Less than the set threshold s t , then increase the value of m, if it reaches the set threshold, then output the reduced matrix and the corresponding dimension d after reduction r Finally, the dimensionality reduction results of the cutting force characteristics in the three directions are integrated, and the overall processing flow chart is as follows: Figure 15 The dynamic cutting force features are reduced from 195 to 57, the cumulative significance threshold is set to 99%, the complexity of the dynamic features is reduced by 70.77%, and the cumulative significance is shown in Figure 16 shown.
[0352] Among them, the robot end tracking error under the influence of cutting force describes the position deviation of the robot end under the action of cutting force. It is most closely related to the contour error of the final machined workpiece. Therefore, the features constituted by the tracking error are weighted to emphasize its importance in the feature matrix. A global unsupervised feature weighting method is proposed to adaptively adjust the weight of the tracking error feature term. The error value is divided into multiple intervals with a fixed width. The number of error values in each interval is counted, and the probability p of each interval is calculated. i , which is the number of samples in the interval divided by the total number of samples. The resulting probability distribution can describe the frequency of different error ranges. After discretization, the information entropy is calculated:
[0353]
[0354] Among them, n is the number of intervals after discretization, p i is the probability of the ith interval. The larger the information entropy value, the more dispersed the distribution of the feature and the higher the uncertainty.
[0355] The weight of each column of tracking error values is set to a combination of information entropy and variance ratio:
[0356]
[0357] Among them, α H and β ζ It is a parameter that controls information entropy and variance weight. N tThe number of feature columns representing the tracking error. Information entropy measures the uncertainty of the tracking error value for each column. Variance measures the dispersion of the tracking error for each column. Combining information entropy and variance weighting can provide a more comprehensive measure of feature importance.
[0358] 40 measurement points are selected at equal intervals on each trajectory, and a total of 1200 machining error points are obtained, which constitute the label data set of the prediction model. The machining error distribution of the workpiece measurement points under each machining task is as follows: Figure 17 shown.
[0359] For the robot end stiffness, cutting force characteristics and weighted tracking error characteristics obtained above, a structured feature row vector is constructed in combination with the processing parameters. The eigenvectors of multiple samples constitute a feature matrix, which is then normalized to eliminate the influence of large differences in feature dimensions.
[0360] To perform feature fusion on the feature matrix, in order to overcome the disadvantage that feature information is linearly indistinguishable in low-dimensional space, a kernel function is introduced to map sample features to high-dimensional space. The Gaussian kernel has good nonlinear fitting properties and is easy to adjust weights to fit different data distributions and map complex relationships. The Gaussian kernel distribution can be expressed as:
[0361]
[0362] Where σ is the bandwidth of the Gaussian kernel, which is optimized using a random search algorithm. For the regression model of feature fusion and physical knowledge embedding, the kernel function is mapped to the feature vector to obtain a feature kernel dictionary matrix with a Gaussian distribution. The dictionary matrix is configured as a structured ordering of static and dynamic features according to the order of the measurement points, which not only reflects the trend of the features but also avoids the overlap of feature signals. The feature kernel dictionary matrix Φ is expressed as:
[0363]
[0364] The machining error can be expressed as follows:
[0365] y m =y p +ε;y p =Φω
[0366] Where y m is the measured processing error, y p is the predicted processing error, ε is the prediction noise caused by uncertainty in the processing and measurement process. Φ is the constructed dictionary matrix, and ω is the corresponding weight coefficient, which can be expressed as:
[0367] ω=[ω1,ω2,...,ω M-1 ,ω M ,b]T
[0368] A regression prediction model is established based on the dictionary matrix and machining errors obtained in the above steps. The sparse Bayesian learning method introduces sparsity based on the Bayesian theorem and assumes a Gaussian prior distribution for the weights. This can significantly reduce model redundancy and improve computational efficiency, model generalization, and interpretability. The probability distribution of the noise variable can be assumed to be a normal probability density function ε~N(0,λI), where λ is the variance, which is affected by machining uncertainty caused by vibration and cutting heat, as well as measurement uncertainty. m The likelihood function is defined as:
[0369]
[0370] A Gaussian prior distribution is introduced on the weight vector, so that most of the weight coefficients are close to zero, achieving the sparsity of the weight vector. In this way, the processing error can be predicted only by the relevant columns in the dictionary matrix and the corresponding sparse weights, which improves the computational efficiency. Usually, in order to calculate the homogeneous analytical solution of the posterior, the prior distribution is the conjugate prior of the likelihood function, that is:
[0371]
[0372] where ξ i Impact i The probability of approaching zero is used to control the sparsity of the weight coefficients, reduce the complexity of the model, and avoid overfitting. According to the Bayesian formula, the posterior distribution of the weight variable can be expressed as:
[0373]
[0374] In the formula, Λ=diag{ξ1,ξ2,...,ξ N} and P(y m |λ,Λ) represents the marginal distribution of the measured processing error, and N is the number of weights. The posterior expectation and variance of the weight coefficient are estimated by finding the maximum value of the posterior probability, which is expressed as:
[0375] μ ω =λ -1 ∑ ω Φ T y m
[0376] ∑ ω =λ(Φ T Φ+λΛ -1 ) -1
[0377] Then the hyperparameters λ and Λ are optimized by maximizing the marginal likelihood function. For the convenience of calculation, the logarithm of the likelihood function is taken, that is, logP(y m|λ,Λ). Optimizing the marginal likelihood is equivalent to maximizing its lower bound, the weighted posterior distribution P(ω|y m ,λ k ,Λ k ) can be expressed as:
[0378]
[0379] The above operations can generate the following loss function:
[0380]
[0381] The optimization problem can be solved by making the partial derivative of the loss function with respect to the hyperparameters equal to zero, and the hyperparameters λ and Λ can be updated as follows:
[0382]
[0383] Among them <·> i represents the item of the i-th vector, <·> ii represents the item in the i-th row and i-th column of the matrix. During the iteration, when the 1-norm of the weight vector || μ ω The model is considered converged when the relative change between ||1 and the standard deviation of the prediction noise is less than the set threshold for multiple consecutive times. At this point, the model weights are sufficiently sparse, the noise prediction tends to be stable, and the model prediction performance and reliability are high. The convergence condition is expressed as:
[0384]
[0385] in is the set convergence threshold.
[0386] Specifically, the feature vector constructed for each measurement point and its measured machining error value together form a set of samples. The total number of samples in the dataset is 1200, the input spatial dimension is the number of columns in the dictionary matrix, and the output spatial dimension is 1. In Table 5, the AS1-AS16, BS1-BS4, and CS1-CS2 groups are used as training sets, totaling 880 sample points. These samples are randomly shuffled before training. The remaining groups are used as test sets, totaling 320 sample points, to test the trained model. According to the sparse Bayesian learning method constructed above, the feature matrices in the divided training sets are fused and then used to iteratively train the model weights and hyperparameters. The Gaussian kernel width hyperparameter is optimized to 1.0. The total number of iterations is set to 300, and the termination criterion is that the relative error between the 1-norm of the weight vector and the standard deviation of the predicted noise after the current iteration and the value of the previous iteration is less than 1e-4 for five consecutive times. The final model iteration terminates at the 166th iteration. The standard deviation of the prediction noise converges to about 0.082mm, the training process tends to be stable, and the model prediction accuracy and reliability are improved. The values in the weight vector after training are displayed in Figure 18 In the figure, the blue stems represent the items in the weight vector that are close to 0, which are set to 0. The red stems represent the non-zero items, which have a total of 279 items, accounting for 31.67% of the total. This shows that the complexity of the model is reduced by 68.33%, and the sparsity of the model is reflected.
[0387] After model training is completed, a converged weight vector is obtained. The feature matrix in the test set is fused and then multiplied by the weight vector to obtain the error prediction value. The prediction process of the machining error of the 320 measurement points selected under the target task takes only 0.002 seconds, which meets the needs of actual industrial sites. MAE, RMSE and R 2 was used to evaluate the prediction performance, R 2 The definition is as follows:
[0388]
[0389] Where, and are the i-th predicted value and measured value respectively, is the mean of the measured values, and n is the sample size. The smaller the MAE and RMSE, the better the prediction accuracy. 2 The closer the value is to 1, the more reliable the prediction performance is. The calculation results of the evaluation indicators are listed in Table 7. The comparison results between the predicted values and the measured values are shown in Table 7. Figure 19 The prediction results show good prediction accuracy and the model has strong generalization ability. 2 The values are 0.0729mm, 0.0906mm and 0.9496 respectively.
[0390] Table 7 Results of the test set machining error prediction performance evaluation index
[0391]
[0392]
[0393] Two benchmarks are used to compare the performance of error prediction and demonstrate the superiority of the proposed model. (1) Benchmark-1: a comparison with a deep neural network (DNN) model that directly uses machining parameters, robot stiffness, cutting force dynamic characteristics, and tracking error as input features; and (2) an ablation experiment: a comparison with a sparse Bayesian model that does not consider the tracking error under cutting force perturbations, referred to as Benchmark-2.
[0394] (1) After obtaining the above-mentioned feature vector composed of process parameters, robot stiffness and cutting force characteristics, the weighted end tracking error is directly added to the feature vector and divided into training set and test set according to the processing group. The feature vector is not subjected to feature fusion and is directly used to train and test DNN. The number of DNN iterations is 100, the number of network layers is 8, the number of neurons in each layer is 32, and the optimization algorithm is Adam. The prediction results of the test set are used to demonstrate the comparison of prediction capabilities, such as Figure 20 As shown. Compared with DNN, the proposed model performs feature fusion on the composed feature vectors, overcoming the shortcomings of feature information overlapping and linear indistinguishability in low-dimensional space, and the dictionary matrix fuses the comprehensive information contained in different types of features to better express the complex state of the processing process. In addition, sparsification retains the most valuable information for error prediction, reduces the model complexity and computational complexity, and effectively avoids overfitting, improving the generalization ability of the model. The proposed model significantly improves the prediction accuracy, with MAE on the test set reduced by 58.32%, RMSE reduced by 61.50%, and R 2 The improvement is 43.88%, as shown in Table 8.
[0395] Table 8 Performance comparison between the proposed model and baseline-1
[0396]
[0397] (2) After constructing the dictionary matrix using process parameters, robot end stiffness and cutting force dynamic characteristics, without considering the influence of servo error, the sparse Bayesian model is trained in combination with the measured machining contour error labels. The comparative prediction results of the test set are as follows: Figure 21As shown. Compared with the benchmark-2, the proposed model takes into account the end tracking error caused by the joint servo error under the cutting force disturbance, which reflects the deviation between the actual position and the expected position of the end caused by the dynamic load change, and is closely related to the final processing error. The proposed model uses the end tracking error calculated at each measurement point as the input feature of the processing error prediction model, and performs unsupervised global feature weighting to highlight its importance. It performs adaptive weight adjustment based on the feature's own information content and the correlation between features, which is conducive to improving the prediction accuracy. Compared with the ablation model, the proposed model has higher prediction accuracy. As shown in Table 9, the MAE on the test set is reduced by 48.66%, the RMSE is reduced by 52.32%, and the R 2 An increase of 22.03%.
[0398] Table 9 Performance comparison between the proposed model and baseline-2
[0399]
[0400]
[0401] The comparison results with the two methods show that the proposed method has higher prediction accuracy than the deep neural network that considers all features but does not perform feature fusion and sparsification, and the sparse Bayesian model that does not consider tracking error, which verifies the effectiveness and advantages of the proposed method.
[0402] Pre-compensation of machining errors is considered an effective method to improve robot machining accuracy. For large-scale parts production in actual industrial sites, after the machining errors are predicted using the proposed error prediction model, pre-compensation of the tool position for subsequent workpieces can be performed to offset the machining errors caused by the coupling of multiple factors and improve machining accuracy. For the i-th tool position CL i (x i ,y i ,z i ,α i ,β i ,γ i ), according to the predicted machining error, its spatial position is compensated, and the tool position after compensation The milling experiment is carried out using the tool position after compensation, and the scanning measurement of the part processing error is performed. The measurement results are compared with the theoretical contour to obtain the processing error after compensation. The comparison of the processing error before and after compensation is as follows: Figure 22 The results show that after pre-compensation of the machining trajectory, the machining accuracy is significantly improved. The peak value, mean value, and standard deviation of the absolute value of the machining error are reduced by 66.09%, 66.40%, and 61.65%, respectively. The statistical characteristics are shown in Table 10, which verifies the effectiveness of the pre-compensation method based on the error prediction model.
[0403] Table 10 Statistical representation of machining error indicators in compensation experiments
[0404]
[0405] 1. Specific application fields or related products of the present invention.
[0406] Intelligent manufacturing and industrial automation fields
[0407] Data-driven intelligent production: Robotic milling error monitoring technology can collect extensive real-time data on process parameters, robot stiffness, cutting force signals, and tracking errors. In an intelligent manufacturing environment, this data can be integrated into the company's big data platform. Through data analysis and machine learning algorithms, potential patterns and optimization points in the machining process can be discovered. For example, based on the machining error data of different products, the robot's machining path planning and cutting parameter settings can be intelligently adjusted, achieving personalized and precise production plan customization, promoting the transformation of the production process from a traditional experience-driven to a data-driven one.
[0408] Automated production process optimization: This monitoring technology provides a crucial feedback mechanism for industrial automation. When machining errors are detected outside a preset range, the robot control system automatically triggers adjustments, such as changing the tool path or adjusting the cutting speed, without requiring human intervention. This not only improves production efficiency but also enhances the stability and reliability of the entire automated production process, ensuring consistent product quality and better integrating robotic milling into intelligent manufacturing and industrial automation production lines.
[0409] Precision machining and efficient production fields
[0410] Ensuring Precision Machining Accuracy: Precision machining applications such as aerospace components and high-end medical devices place extremely high demands on precision. Robotic milling error monitoring technology accurately detects minute machining errors at different robot positions and when processing surfaces with varying features. Through real-time feedback, the operator or control system can take timely action, such as fine-tuning the robot's motion and optimizing cutting force control, to ensure that every detail meets the stringent standards of precision machining, thereby guaranteeing high performance and quality.
[0411] Improved production efficiency: By promptly detecting and correcting machining errors, this technology effectively reduces scrap and rework rates caused by these errors. This eliminates the significant time and resources wasted on handling substandard products during the production process, enabling smoother robotic milling operations and increasing the yield of qualified products per unit time. This achieves the synergistic development of precision machining and efficient production, meeting the dual demands of high-quality and efficient production in the modern manufacturing industry.
[0412] Real-time monitoring and feedback control areas
[0413] Comprehensive Real-Time Process Monitoring: This technology provides real-time, uninterrupted monitoring of every critical aspect of the robotic milling process. From the dynamic changes in process parameters and fluctuations in robot stiffness during machining to the real-time magnitude of cutting forces and the immediate evolution of tracking errors, all information is accurately captured and transmitted to the monitoring system. This provides operators and control systems with a comprehensive "window" into the machining process, enabling them to monitor machining status at all times and identify potential problems promptly.
[0414] Precise feedback control implementation: Based on data acquired through real-time monitoring, a precise feedback control system can be constructed. If machining errors are detected to be trending outside the allowable range or have already exceeded the standard, the system will quickly feed back relevant information to the robot's control unit. Based on pre-set control strategies, such as adjusting the robot's joint motion angles and changing cutting parameters, the machining process is adjusted in real time to ensure that machining errors remain within a reasonable range, achieving precise control and optimization of the machining process.
[0415] Tool life and resource utilization areas
[0416] Extending tool life: Cutting force is one of the key factors affecting tool life, and robotic milling error monitoring technology can monitor cutting force signals in real time. By analyzing the relationship between cutting force and machining error, if excessive cutting force is found to be causing excessive tool wear, cutting parameters can be adjusted promptly, such as reducing cutting depth and feed rate. This reduces tool load, effectively extending tool life, reducing the frequency and cost of tool replacement, and improving tool resource utilization.
[0417] Optimizing overall resource allocation: Accurate machining error monitoring facilitates the rational planning and utilization of various production resources. On the one hand, by reducing scrap caused by machining errors, this avoids the waste of raw materials. On the other hand, by optimizing the machining process, the utilization rate of equipment such as robots and cutting tools is increased, allowing each resource to achieve greater value. Furthermore, effective control of machining errors reduces the additional energy consumption caused by rework, achieving optimal resource allocation and efficient utilization.
[0418] Energy conservation, emission reduction and environmental protection
[0419] Reducing energy consumption: During robotic milling, improper machining parameter settings (such as excessive cutting speeds and forces) often lead to excessive energy consumption. Machining error monitoring technology allows for real-time adjustment of machining parameters based on machining errors to optimize performance. For example, if an increase in machining error is detected, possibly due to excessive cutting forces, timely reduction of these forces not only improves machining accuracy but also reduces the additional energy required to overcome these forces, thereby achieving energy conservation and emission reduction goals.
[0420] Reduced waste: Processing error monitoring technology effectively reduces scrap rates and reduces waste generated by processing substandard products. Furthermore, by optimizing the processing process, it improves the utilization rate of raw materials, further reducing the demand for raw materials. This indirectly reduces waste emissions from raw material mining and processing, thus playing a positive role in environmental protection.
[0421] In summary, robot milling error monitoring technology has extensive and important applications in many important fields, and is of great significance to improving the overall level of manufacturing and achieving sustainable development.
[0422] 2. Relevant evidence of the technical effects obtained by the embodiments of the present invention.
[0423] The machining errors predicted by the data-driven model established by the present invention are in good agreement with the machining errors measured by existing high-precision scanners and other sensors, demonstrating good prediction accuracy. Specific evidence is shown in the following example: Figure 19 The results show that the proposed model has effective prediction performance in milling experiments of parts with different processing positions and varying feature surfaces. The MAE, RMSE and R between the predicted values and the measured values are shown in Figure 2. 2 They are 0.0729mm, 0.0906mm and 0.9496 respectively, showing good prediction accuracy. A model comparison was carried out to prove the superiority of the proposed model. (1) Compared with the deep neural network model that directly uses processing parameters, robot stiffness, cutting force dynamic characteristics and tracking error as input features, called benchmark-1. Compared with the deep neural network model, the proposed model performs feature fusion on the composed feature vectors, overcoming the shortcomings of feature information overlapping and linear indistinguishability in low-dimensional space, and the dictionary matrix fuses the comprehensive information contained in different types of features, better expressing the complex state of the machining process. In addition, sparsification retains the most valuable information for error prediction, reduces the model complexity and computational complexity, effectively avoids overfitting, and improves the generalization ability of the model. The comparison of error measurement values, benchmark-1 and the prediction results of the proposed method on the test set is shown in the figure below. Figure 20The proposed model significantly improves the prediction accuracy, with MAE on the test set reduced by 58.32%, RMSE reduced by 61.50%, and R 2 Improved by 43.88%. (2) Ablation experiment: compared with the sparse Bayesian model that does not consider the tracking error under cutting force disturbance, called benchmark-2. Compared with benchmark-2, the proposed model takes into account the end tracking error caused by the joint servo error under cutting force disturbance, which reflects the deviation between the actual position and the expected position of the end caused by the dynamic load change, and is closely related to the final processing error. The proposed model uses the end tracking error calculated at each measurement point as the input feature of the processing error prediction model, and performs unsupervised global feature weighting to highlight its importance. It performs adaptive weight adjustment based on the feature's own information content and the correlation between features, which is conducive to improving prediction accuracy. Compared with the ablation model, the proposed model has higher prediction accuracy. The comparison of the error measurement value, the benchmark-2 and the prediction results of the proposed method on the test set is shown in the figure. Figure 21 As shown, the MAE on the test set is reduced by 48.66%, the RMSE is reduced by 52.32%, and the R 2 The improvement was 22.03%. The comparison results with the two methods show that the proposed method has higher prediction accuracy than the deep neural network that considers all features but does not perform feature fusion and sparsification, and the sparse Bayesian model that does not consider tracking errors, which verifies the effectiveness and advantages of the proposed method. For the large-scale production of parts in actual industrial sites, after the proposed error prediction model is used to predict the machining error, the subsequent workpiece is pre-compensated for the machining tool position to offset the machining error caused by the coupling of multiple factors and improve the machining accuracy. The comparison of machining errors before and after compensation is as follows: Figure 22 As shown in Figure 3, the results show that after pre-compensation of the machining trajectory, the machining accuracy is significantly improved, and the peak value, mean value and standard deviation of the absolute value of the machining error are reduced by 66.09%, 66.40% and 61.65% respectively.
[0424] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will appreciate that the above-mentioned devices and methods can be implemented using computer-executable instructions and / or contained in processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0425] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.
Claims
1. A feature fusion and refinement embedding sparse Bayesian learning method, characterized by: The following steps are involved: S1, according to the proposed processing parameters, the robot performs air cutting motion and milling experiments for different processing tasks, and simultaneously collects joint angles, acceleration signals and cutting force signals, and measures the processing error of the workpiece after milling; S2, processes and calculates the original signal collected in S1 to obtain the feature vector of the model input, and uses the measured processing error as the model label; S3, performs feature weighting on the feature vectors calculated in S2 and performs feature fusion to construct a dictionary matrix; S4, establishing a regression prediction model based on the dictionary matrix and processing error obtained in S3; First, it is assumed that the weights between the model input features and labels satisfy the Gaussian prior distribution to promote most coefficient weights to tend to 0 and achieve the sparsity of the model weights; According to the Bayesian formula, the posterior distribution of the weight variables is obtained, and the expectation and variance of the posterior distribution of the weight coefficients are estimated by maximizing the posterior probability. The variance and hyperparameters that affect the sparsity of the weights are estimated by maximizing the marginal likelihood function, that is, maximizing the expectation of the joint likelihood function under the posterior distribution of the weights to optimize the hyperparameters. The transformed loss function can be minimized to optimize the hyperparameters. The posterior expectation and variance of the model weights, as well as the hyperparameters, are iteratively updated during the training process, and the iteration process is terminated according to the set change threshold to achieve the sparsification of the model weight vector and the construction of a sparse model. In step S4, a regression prediction model is established based on the obtained dictionary matrix and the processing error; the sparse Bayesian learning method introduces sparsity based on the idea of Bayesian theorem, assumes a Gaussian prior distribution for the weights, and the probability distribution of the noise variable can be assumed to be a normal probability density function ε~N(0,λI), where λ is the variance, which is affected by the processing uncertainty caused by vibration and cutting heat and the measurement uncertainty; y m The likelihood function is defined as: Where y m is the measured machining error, Φ is the constructed dictionary matrix, and ω is the corresponding weight coefficient; A Gaussian prior distribution is introduced on the weight vector to make most of the weight coefficients approach zero, thus achieving the sparsity of the weight vector. In this way, the processing error can be predicted only by the relevant columns in the dictionary matrix and the corresponding sparse weights, which improves the computational efficiency. Usually, in order to calculate the homogeneous analytical solution of the posterior, the prior distribution is the conjugate prior of the likelihood function, that is: where ξ i Impact i The probability of the weight coefficient tending to zero is used to control the sparsity of the weight coefficient, reduce the complexity of the model, and avoid overfitting. According to the Bayesian formula, the posterior distribution of the weight variable can be expressed as: In the formula, Λ=diag{ξ1,ξ2,...,ξ N }、P(y m |λ,Λ) represents the marginal distribution of the measured processing error, and N is the number of weights. The posterior expectation and variance of the weight coefficient are estimated by finding the maximum value of the posterior probability, which is expressed as: m ω =λ -1 S ω F T y m S ω =λ(Φ T F+lL -1 ) -1 Then, the hyperparameters λ and Λ are optimized by maximizing the marginal likelihood function. For the convenience of calculation, the logarithm of the likelihood function is taken, i.e., logP(y m |λ,Λ); the optimization of marginal likelihood is equivalent to maximizing its lower bound, the weighted posterior distribution P(ω|y m ,λ k ,Λ k ) can be expressed as: The above operations can generate the following loss function: The optimization problem can be solved by making the partial derivative of the loss function with respect to the hyperparameters equal to zero, and the hyperparameters λ and Λ can be updated as follows: Among them <·> i represents the item of the i-th vector, <·> ii Represents the item in the i-th row and i-th column of the matrix; during the iteration process, when the 1-norm of the weight vector || μ ω When the relative change between ||1 and the standard deviation of the prediction noise is less than the set threshold for multiple consecutive times, the model is considered to have converged. At this point, the model weights are sufficiently sparse, the noise prediction tends to be stable, and the model prediction performance and reliability are high. The convergence condition is expressed as: in is the set convergence threshold.
2. The feature fusion and refinement embedding sparse Bayesian learning method according to claim 1, characterized in that: In step S1, air cutting motion and milling experiments of parts with different processing positions and curved surface features are carried out according to the designed processing trajectory and process parameters; an acceleration sensor is attached to the main shaft, and the acceleration and cutting force signals during the milling process are collected through the dynamometer system and the data acquisition system. The angles of each joint of the robot during the processing are obtained through the robot open data acquisition system, and the workpiece after milling is scanned using a structured light camera to measure the processing error.
3. The feature fusion and refinement embedding sparse Bayesian learning method according to claim 1, characterized in that: In step S3, the tracking error of the robot end under the influence of the cutting force describes the position deviation of the robot end under the action of the cutting force, which is most closely related to the contour error of the final machined workpiece; Divide the error value into multiple intervals with fixed width; count the number of error values in each interval and calculate the probability p of each interval i , that is, the number of samples in the interval divided by the total number of samples; the resulting probability distribution can describe the frequency of different error ranges; after discretization, the information entropy is calculated: Among them, n is the number of intervals after discretization, p i is the probability of the i-th interval; the larger the information entropy value, the more dispersed the distribution of the feature and the higher the uncertainty; The weight of each column of tracking error values is set to a combination of information entropy and variance ratio: Among them, α H and β ζ is a parameter that controls information entropy and variance weight; N t The number of feature columns representing the tracking error. The information entropy measures the uncertainty of the tracking error value in each column. The variance measures the degree of dispersion of the tracking error in each column. The weighting method combining the information entropy and variance can more comprehensively measure the importance of the feature. Select multiple measurement points at equal distances on each trajectory to form a label dataset for the prediction model; For the robot end stiffness, cutting force characteristics and weighted tracking error characteristics obtained above, a structured feature row vector is constructed in combination with the processing parameters. The feature vectors of multiple samples constitute a feature matrix, which is then normalized to eliminate the influence of large differences in the magnitude of different features. The Gaussian kernel distribution can be expressed as: Where σ is the bandwidth of the Gaussian kernel, which is optimized using a random search algorithm. For the regression model of feature fusion and physical knowledge embedding, the kernel function is mapped to the feature vector to obtain a feature kernel dictionary matrix with a Gaussian distribution. The dictionary matrix is configured as a structured ordering of static and dynamic features according to the order of measurement points, which not only reflects the trend of the features but also avoids the overlap of feature signals. The feature kernel dictionary matrix Φ is expressed as: The machining error can be expressed as follows: y m =y p +ε;y p =Φω Where y m is the measured processing error, y p is the predicted processing error, ε is the prediction noise caused by uncertainty in the processing and measurement process; Φ is the constructed dictionary matrix, and ω is the corresponding weight coefficient, which can be expressed as: ω=[ω1,ω2,...,ω M-1 ,oh M ,b] T 。 4. A feature fusion and refinement embedding sparse Bayesian learning system implementing the feature fusion and refinement embedding sparse Bayesian learning method according to any one of claims 1 to 3, characterized in that: The feature fusion and refinement embedding sparse Bayesian learning system includes: The acquisition module is used to perform robot air cutting motion and milling experiments for different processing tasks according to the planned processing parameters. It also collects joint angles, acceleration signals, and cutting force signals, and measures the processing errors of the workpiece after milling. The processing module is used to process and calculate the collected raw signals to obtain the feature vector of the model input and use the measured processing error as the model label; Fusion module, which is used to perform feature weighting on the calculated feature vectors and perform feature fusion to construct a dictionary matrix; A module is established to establish a regression prediction model based on the obtained dictionary matrix and processing error.
5. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the feature fusion and refinement embedding sparse Bayesian learning method according to any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the feature fusion and refinement embedding sparse Bayesian learning method according to any one of claims 1 to 3.
7. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the steps of the feature fusion and refinement embedding sparse Bayesian learning method as described in any one of claims 1-3.
Citation Information
Patent Citations
Robot milling cutting force monitoring method considering pose-dependent dynamic characteristics
CN118372244A
Network space-time monitoring method based on group sparse Bayesian learning
CN106845511A
Milling machining cutting force monitoring method and system based on mechanism and data hybrid driving
CN118720853A