Robot milling path error prediction method and system and storage medium
The feature information of the robot and workpiece is obtained through sensing equipment, dimension conversion and feature matrix are combined, sliding windows are built for feature fusion, and mixed neural network models are input for error prediction, which solves the problem of difficult to achieve high-precision prediction of robot milling path errors in the existing technology, and realizes high-precision error prediction and real-time compensation.
Patent Information
- Application Number
- CN202411871349.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The prior art is difficult to achieve high-precision prediction and real-time compensation of robot milling path errors, resulting in the machining accuracy being unable to meet the finishing requirements.
The preset sensing device obtains the sensing information of the robot and the workpiece, confirms the feature information, and performs dimension conversion and feature matrix combination to determine the characteristics of the tool site. Then, a sliding window is built for feature fusion and a hybrid neural network model is input for error prediction to adjust the milling path.
It realizes high-precision prediction and real-time compensation of robot milling path errors, improves machining accuracy and efficiency, and meets the needs of high-precision machining.
Smart Images

Figure CN119691701A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of error prediction and supplementation, and in particular to a robot milling path error prediction method, system and storage medium. Background Art
[0002] In the field of milling, for the processing of large, complex and special-shaped parts, robot milling has the advantages of low cost, good flexibility, intelligence, and large operating space compared to multi-axis CNC machine tools. However, due to the low structural stiffness and low trajectory accuracy of industrial robots, especially the deformation of the end under the action of milling force, insufficient dynamic performance and uneven distribution of workpiece allowance, the contour error during the processing is significant, which seriously affects the processing quality and efficiency. This makes the processing accuracy unable to meet the requirements of fine processing. In order to enable robot milling to meet the required processing quality and efficiency, it is necessary to predict and compensate the error of the robot milling path.
[0003] At present, traditional error compensation methods are mostly based on static models or empirical rules, which are difficult to deal with complex nonlinear dynamic errors in processing. In international research, some advanced manufacturing companies and research institutions have tried to introduce error prediction methods based on dynamic models or simple machine learning algorithms, but their ability to capture complex dynamic characteristics is insufficient, and the fusion processing of multi-feature information is still in the exploratory stage. Domestic research started late, mostly focusing on the analysis and local optimization of a single feature, lacking systematic and intelligent solutions. As a result, it is impossible to achieve high-precision prediction and real-time compensation of contour errors during the processing process, making robot milling unable to meet high-precision processing requirements. Summary of the invention
[0004] Based on this, the purpose of the present invention is to provide a robot milling path error prediction method, system and storage medium, aiming to solve the problem in the prior art that there is a lack of a method that can accurately predict the robot milling path error with high precision.
[0005] A robot milling path error prediction method according to an embodiment of the present invention comprises: Acquire robot sensor information and workpiece sensor information through a preset sensor device, and confirm robot feature information and workpiece feature information respectively according to the robot sensor information and workpiece sensor information; Performing dimension conversion on the robot feature information and the workpiece feature information to determine a robot feature matrix and a workpiece feature matrix, and combining the robot feature matrix and the workpiece feature matrix to determine tool location point features at each tool location point; Arrange the tool location point features in order, construct a sliding window of a preset size, and select all the tool location point features in the sliding window through the sliding window for fusion to determine the fusion feature; The fusion features are input into a preset hybrid neural network model to predict the contour error of the robot at different tool positions, thereby adjusting the milling path of the robot.
[0006] In addition, a robot milling path error prediction method according to the above embodiment of the present invention may also have the following additional technical features: Furthermore, the step of confirming the workpiece feature information according to the workpiece sensing information includes: Determine the point cloud information of the workpiece according to the workpiece sensing information, and divide the sphere into spheres with each tool position point as the sphere center and the diameter of the tool as the diameter, and determine the sphere area corresponding to each tool point and the area point cloud coordinates; The coordinates of the regional point cloud are converted into workpiece point cloud data in a tool coordinate system, wherein the tool coordinate system corresponding to the tool position point is a coordinate system with the tool position point as the origin, the tool feed direction as the X axis, and the tool axis direction as the Z axis; The workpiece point cloud data is dimensionally unified to determine workpiece feature information.
[0007] Furthermore, the step of dimensionally unifying the workpiece point cloud data to determine the workpiece feature information includes: Performing grid division with a preset grid length on three planes xy, yz and xz in the tool coordinate system, wherein the preset grid length is less than the minimum spacing of the scanned point cloud, so that the number of projection points in each grid after division is not greater than one; The grids of the xy, yz, and xz planes are considered as different matrices, each with a size of The workpiece point cloud data is projected onto the xy, yz and xz planes respectively, and the features of the three planes are determined. , , that is, the distribution matrix of the workpiece scanning point cloud at the tool position in the tool coordinate system, is the radius of the tool is the preset grid length; The characteristic expressions of the three planes are:
[0008] Among them, is the minimum spacing of the scanned point cloud, and Represents the projection plane and A grid.
[0009] Furthermore, the robot characteristic information includes robot end stiffness information, robot spatial posture information, and relative position information between a tool and a workpiece. The step of confirming the robot characteristic information according to the robot sensor information includes: Determining the joint angle information of the robot according to the robot sensing information, wherein the joint angle information is the spatial posture information of the robot; Determine machining tool position information according to the robot sensing information, wherein the machining tool position information is the relative position information between the tool and the workpiece; Determine the robot end stiffness matrix, i.e. the robot end stiffness information, through a preset equation group according to the robot sensor information; The preset equation group is:
[0010] in, Indicates that the robot is under external force The stiffness deformation under the action, The joint angle is The corresponding Jacobian matrix is Deformation of robot joints, is the corresponding robot joint stiffness matrix, represents the transpose of the robot Jacobian matrix, is the stiffness matrix of the robot end.
[0011] Furthermore, the step of performing dimension conversion on the robot feature information to determine the robot feature matrix includes: According to the robot feature information, the original feature expression of the robot is determined as follows: , is the robot joint angle, To process the tool position information; Determine a robot feature kernel matrix dictionary according to the robot original feature expression and feature kernel function; The expression of the feature kernel function is:
[0012] in, and express No. i and j List, The mean is 0 and the covariance is ; The expression of the robot feature kernel matrix dictionary is: .
[0013] Furthermore, the step of performing dimension conversion on the workpiece feature information to determine the workpiece feature matrix includes: Constructing a Gaussian convolution kernel and normalizing the Gaussian convolution kernel; Convolving the workpiece feature information with the normalized Gaussian convolution to obtain a workpiece convolution feature matrix, and combining the convolution feature matrices to form the workpiece feature matrix; The Gaussian convolution kernel expression is:
[0014] in, and Respectively represent matrices The row and column indices of and are the mean and standard deviation of the two-dimensional Gaussian distribution in two directions respectively; The normalized Gaussian convolution kernel expression is:
[0015] in, ; The expression of the workpiece convolution feature matrix is:
[0016] in, The row and column indices of and They are convolution kernels. The row and column indices of and ; The workpiece feature matrix expression is: .
[0017] Furthermore, the step of inputting the fusion features into a preset hybrid neural network model to predict the contour error of the robot at different tool positions includes: Extracting spatial dimension features and temporal dimension features from the fused features, and encoding the extracted spatial dimension features and temporal dimension features, thereby capturing long-term dependencies between the extracted features; The input is put into the fully connected layer for regression prediction to obtain the machining error at each tool position.
[0018] Another object of an embodiment of the present invention is to provide a robot milling path error prediction system, the system comprising: A feature information determination module, used to obtain robot sensor information and workpiece sensor information through a preset sensor device, and to respectively determine robot feature information and workpiece feature information according to the robot sensor information and workpiece sensor information; A feature matrix determination module is used to perform dimension conversion on the robot feature information and the workpiece feature information, determine a robot feature matrix and a workpiece feature matrix, and combine the robot feature matrix and the workpiece feature matrix to determine tool location point features at each tool location point; A fusion feature determination module is used to arrange the tool location point features in order, construct a sliding window of a preset size, and select all the tool location point features in the sliding window through the sliding window for fusion to determine the fusion feature; The error prediction module is used to input the fusion features into a preset hybrid neural network model to predict the contour error of the robot at different tool positions, and then adjust the milling path of the robot.
[0019] Another object of an embodiment of the present invention is to provide a storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the above-mentioned robot milling path error prediction method.
[0020] Another object of an embodiment of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned robot milling path error prediction method when executing the program.
[0021] The present invention extracts the feature information of the workpiece and the robot respectively through the information collected by the sensing device, and then determines the robot feature matrix and the workpiece feature matrix of the same dimension through dimensional conversion, so that the two types of features can be combined with each other to determine the tool position feature at each tool position, wherein the robot feature matrix and the workpiece feature information respectively contain information of multiple angle conditions, and through the real-time collection and fusion of these information, the robot milling path error condition in dynamic and complex scenes can be accurately judged. In addition, after determining the tool position feature, a sliding window is constructed to fuse all the features in the sliding window, and after determining the fused feature, the fused feature is used as a preset model input for error prediction. This is because in actual processing, the point cloud at the processing point is not only related to the feature at the current point, but also the processing features before and after the current processing tool position will also affect the processing error of the current point. In this way, the features of multiple tool positions before and after the current tool position are fused with the features of the current tool position, so that the original three-dimensional feature data is converted into four-dimensional structured data, and each four-dimensional structured data includes the data features of the current tool position and multiple tool positions before and after the tool position, thereby further improving the precision and accuracy of error prediction. Therefore, the present invention solves the problem in the prior art that there is a lack of a method for accurately predicting the robot milling path error with high precision. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flow chart of a robot milling path error prediction method in a first embodiment of the present invention; Figure 2 is a structural block diagram of a robot milling path error prediction system in a second embodiment of the present invention; Figure 3 is a schematic structural diagram of an electronic device in a third embodiment of the present invention; Figure 4 It is a schematic diagram of constructing a training set of a hybrid neural network model provided by an embodiment of the present invention; Figure 5 is a schematic diagram of a hybrid neural network provided by an embodiment of the present invention; The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0023] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0024] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0026] Embodiment 1 See also Figure 1 , which is a flow chart of a robot milling path error prediction method in a first embodiment of the present invention, and the method specifically includes steps S01 to S04.
[0027] S01, acquiring robot sensing information and workpiece sensing information through a preset sensing device, and confirming robot feature information and workpiece feature information respectively according to the robot sensing information and workpiece sensing information.
[0028] Specifically, the step of confirming the workpiece feature information according to the workpiece sensing information includes: determining the point cloud information of the workpiece according to the workpiece sensing information, and dividing the sphere with each tool position point as the sphere center and the diameter of the tool as the diameter, and determining the sphere area and the area point cloud coordinates corresponding to each tool point; converting the area point cloud coordinates into workpiece point cloud data under the tool coordinate system, the tool coordinate system corresponding to the tool position point is a coordinate system with the tool position point as the origin, the feed direction of the tool as the X-axis, and the tool axis direction as the Z-axis.
[0029] Furthermore, the workpiece point cloud data is dimensionally unified to determine the workpiece feature information. The step of dimensionally unifying the workpiece point cloud data to determine the workpiece feature information includes: performing grid division with a preset grid length on the three planes xy, yz and xz in the tool coordinate system, wherein the preset grid length is less than the minimum spacing of the scanned point cloud, so that the number of projection points in each grid after division is not greater than one; treating the grids of the xy, yz and xz planes as different matrices, and the size of the matrix is The workpiece point cloud data is projected onto the xy, yz and xz planes respectively, and the features of the three planes are determined. , , that is, the distribution matrix of the workpiece scanning point cloud at the tool position in the tool coordinate system, is the radius of the tool is the preset grid length; The characteristic expressions of the three planes are:
[0030] Among them, is the minimum spacing of the scanned point cloud, and Represents the projection plane and A grid.
[0031] In the specific implementation, the point cloud of the workpiece is first calculated, and at each tool position At , draw a sphere according to the diameter of the tool, calculate the coordinates of all the point clouds in the sphere, and the point cloud coordinates in the sphere are considered to be the meshing features of the workpiece and the tool at the tool position. Convert all the point clouds within the tool range corresponding to the tool position to the tool coordinate system with the tool position as the origin, the feed direction as the x-axis, and the tool axis direction as the z-axis. The corresponding tool radius is Since the number of point clouds extracted at different tool positions may be inconsistent, in order to convert the workpiece point cloud at each tool position into a workpiece feature of uniform dimension, further data processing of the extracted point cloud is required. First, meshing is performed on the three planes xy, yz and xz in the tool coordinate system, and the length of the division is , the length of the grid division satisfies ,in is the minimum spacing of the scanned point cloud, that is, the resolution accuracy of the blue light scanner, so as to ensure that at most one projection point can appear in each divided grid. The grids of the xy, yz and xz planes are regarded as different matrices, and the size of the matrix is The point cloud data converted to the tool coordinate system is projected onto the xy, yz and xz planes respectively. If the corresponding grids in the xy, yz and xz planes If there is a projection point in the grid, the value of the corresponding xy, yz, xz plane matrix at that grid is set to 1, otherwise it is 0. and Represents the projection plane and The features of the three planes are obtained , .
[0032] Specifically, the robot characteristic information includes robot end stiffness information, robot spatial posture information and relative position information between a tool and a workpiece. The step of confirming the robot characteristic information according to the robot sensor information includes: determining the robot joint angle information according to the robot sensor information, the joint angle information is the robot spatial posture information; determining the processing tool position point information according to the robot sensor information, the processing tool position point information is the relative position information between the tool and the workpiece; determining the robot end stiffness matrix, i.e. the robot end stiffness information, through a preset equation group according to the robot sensor information; The preset equation group is:
[0033] in, Indicates that the robot is under external force The stiffness deformation under the action, The joint angle is The corresponding Jacobian matrix is Deformation of robot joints, is the corresponding robot joint stiffness matrix, represents the transpose of the robot Jacobian matrix, is the stiffness matrix of the robot end.
[0034] In the specific implementation, the main reasons for the robot surface machining error include the poor motion accuracy of the robot itself and the stiffness deformation generated during the machining process. When batch machining complex surface parts, the machining path and machining parameters of each part, including tool speed and feed speed, are usually the same, so in theory, the machining error can be compensated by trial cutting. However, for some cast casing parts, the remaining cutting allowance of each part may be different, resulting in different surface contour errors of each part after machining, which may even exceed the tolerance requirements of the drawing. When the machining parameters are the same, the surface contour error of the machined part is only related to the robot posture at the tool position and the undeformed chip thickness of the part at the tool position. Therefore, the posture of the robot at each tool position can be used as the machining feature of the robot, and the undeformed chip thickness of the uneven allowance part at the tool position can be used as the machining feature of the part. Finally, the machining features of the robot and the part are integrated, and the machining contour error of the uneven allowance surface part is predicted by the neural network model.
[0035] The robot has low stiffness, and when the end is deformed by external force, it is easy to produce stiffness deformation, which leads to processing errors. The end stiffness of the robot represents the ability of the robot end to resist deformation under the action of external force. The end stiffness of the robot is only related to the robot posture and joint stiffness. The robot joint is usually regarded as an elastic torsion spring, and the stiffness deformation of the robot end is accumulated by the stiffness deformation of each joint. The robot will produce stiffness deformation under the action of external force. According to the principle of virtual work, the total virtual work generated by the end stiffness actuator due to external force is equal to the total virtual work of the equivalent force applied to the joint. Furthermore, through this equal relationship, the stiffness matrix of the robot end can be determined.
[0036] S02, performing dimension conversion on the robot feature information and the workpiece feature information to determine a robot feature matrix and a workpiece feature matrix, and combining the robot feature matrix and the workpiece feature matrix to determine tool location point features at each tool location point.
[0037] Specifically, in order to combine the features of the robot with the features of the workpiece, the features of the robot need to be structured. The stiffness features, posture features, and relative position features of the tool and the workpiece are nonlinear. A Gaussian kernel function is constructed to map the sample features of the robot from the original space to the high-dimensional space. The sample features of the robot can be adjusted to image features of any dimension through kernel function mapping. It can also alleviate the linear inseparability of feature information in the low-dimensional space and retain the structural advantages of the current feature fusion. For a certain tool position point, the representation of the robot sample feature in the original space is , introduce the Gaussian feature kernel function Expand the sample features to dimensional square matrix, using express.
[0038] Feature kernel function It can be expressed as:
[0039] in and Represents the original space No. i and j List, The mean is 0 and the covariance is ,feature The new vector constructed after combining with other features can be expressed as:
[0040] The different features of the robot obey the Gaussian distribution, and they are arranged in order to obtain the Gaussian feature kernel matrix dictionary. The dimension-enhanced dictionary feature matrix effectively retains the information of the robot's stiffness, joint angle, and tool position, and avoids the overlap between feature signals. The kernel dictionary matrix It is expressed as follows:
[0041] The error of robot milling is not only related to the robot's posture during processing, but also to the processing characteristics of the workpiece, such as feed speed, rotation speed and machining allowance. When the processing parameters are consistent, the machining allowance of the parts to be processed is inconsistent due to part casting, which affects the accuracy consistency of different parts. In more serious cases, the machining error may exceed the tolerance due to excessive machining allowance, resulting in the scrapping of parts. Therefore, it is necessary to construct the part's allowance feature information based on the point cloud information of uneven allowance casting parts, and combine it with the robot's posture information to achieve accurate error prediction of robot milling uneven allowance workpieces.
[0042] Specifically, since the planar feature matrix of the workpiece obtained in step S01 is very sparse, if it is directly used as input to the neural network model, it may cause problems such as excessive computational overhead and low prediction accuracy. At the same time, the size of the workpiece feature matrix obtained is much larger than the robot's feature matrix. Therefore, it is necessary to perform dimensionality reduction processing on the obtained workpiece feature matrix so that the robot's features and the workpiece feature matrix can match each other to increase the model prediction accuracy.
[0043] In order to ensure the consistency of workpiece features and robot features, a two-dimensional Gaussian convolution kernel of size k*k is constructed. It is expressed as:
[0044] in and Respectively represent matrices The row and column indices of and are the mean and standard deviation of the two-dimensional Gaussian distribution in two directions. In order to ensure that the workpiece features after convolution do not introduce additional gain or attenuation, the Gaussian convolution kernel needs to be normalized.
[0045] in , assuming that Gaussian convolution kernel is used to respectively analyze the features of the three planes , After convolution, the workpiece features can be expressed as:
[0046] in The row and column indices of and They are convolution kernels. The row and column indices of and , the size N of the convolution matrix can be expressed as:
[0047] The three convolution matrices are combined and regarded as the processing features of the workpiece. , which contains three plane feature matrices after dimensionality reduction, and the corresponding dimension size is , and the robot's features can be combined as the prediction features of the entire system at the tool position , as the input features of the neural network model.
[0048] S03, arranging the tool location point features in order, constructing a sliding window of a preset size, and selecting all the tool location point features in the sliding window through the sliding window for fusion to determine a fusion feature.
[0049] Specifically, Figure 4 The above shows that the constructed robot and workpiece point cloud processing features can effectively reflect the features related to the error at the processing point. However, in actual processing, the point cloud at the processing point is not only related to the features at the current point, but also the processing features before and after the current processing tool position point will also affect the processing error of the current point. In order to solve this problem, the constructed feature at the tool position point is firstly Arrange them in the order of the knife positions, and then construct a sliding window with a sliding window size of , which means that the 2 before and after the current tool position are L The tool position feature is merged with the current tool position feature, where L represents the processing error of the current tool position affected by the processing tool path before and after. L The influence of the knife position, through this method, the original The three-dimensional feature data is converted into Each of the four-dimensional structured data includes the data features of the current tool position and the L tool positions before and after the tool position. When the number of feature points before the initial tool position and after the last tool position is insufficient, zero padding of the same matrix size is added. At this time, the tool does not contact the workpiece and will not affect the error at the tool position.
[0050] S04, inputting the fusion features into a preset hybrid neural network model to predict the contour error of the robot at different tool positions, and then adjusting the milling path of the robot.
[0051] Specifically, Figure 5 As shown in the figure, the preset hybrid neural network model consists of a convolutional network (CNN layer) and a bidirectional long short-term memory network (BILSTM layer). The network first uses a convolutional neural network to extract spatial and temporal dimension features in the input, and further encodes the extracted features using the BILSTM layer to capture the long-term dependencies between the extracted features, and then inputs them into the fully connected layer for regression prediction to obtain the machining error caused by the robot posture and margin changes at each tool position. The proposed model can not only extract the local correlation features of the input data, but also capture the forward and backward temporal dependencies at the same time, and has excellent performance in processing multi-dimensional complex data.
[0052] Convolutional neural networks extract information from images through convolution kernels of different sizes and use multiple filters to extract various information from images. 3D convolution kernels can slide in three directions to extract information features of the image in height, width, and depth at the same time, and rearrange the extracted features in three-dimensional space to capture the spatial and temporal characteristics of the input data. The output of the convolution layer is downsampled through the pooling layer to reduce the data dimension, effectively preventing overfitting.
[0053] In the process of robot milling, the error at each tool position is not only affected by the previous machining path, but also by the uncut part. Considering only the influence of a single time direction may not accurately predict the machining error. The BILSTM layer captures the bidirectional dependencies in the data by combining the forward and reverse time series, while using past and future information to make more accurate predictions. The BILSTM layer takes the features extracted by the CNN layer as input, and fuses the local features of the context to generate hybrid features that represent global information.
[0054] Finally, the constructed neural network model is used to predict the contour error of the robot at different tool positions, thereby improving the robot's machining accuracy when milling irregular large and complex curved surface parts.
[0055] In summary, the robot milling path error prediction method in the above embodiment of the present invention extracts the feature information of the workpiece and the robot respectively through the information collected by the sensing device, and then determines the robot feature matrix and the workpiece feature matrix of the same dimension through dimensional conversion, so that the two types of features can be combined with each other to determine the tool position feature at each tool position, wherein the robot feature matrix and the workpiece feature information respectively contain information of multiple angle conditions, and through the real-time collection and fusion of these information, the robot milling path error status in dynamic and complex scenes can be accurately judged. In addition, after determining the tool position feature, a sliding window is constructed to All the features in the fusion are fused, and after the fusion features are determined, the fusion features are used as the preset model input for error prediction. This is because in actual processing, the point cloud at the processing point is not only related to the features at the current point, but the processing features before and after the current processing tool position point will also affect the processing error of the current point. In this way, the features of multiple tool positions before and after the current tool position point are fused with the features of the current tool position point, thereby converting the original three-dimensional feature data into four-dimensional structured data. Each four-dimensional structured data includes the data features of the current tool position point and multiple tool positions before and after the tool position point, thereby further improving the precision and accuracy of error prediction. Therefore, the present invention solves the problem in the prior art that there is a lack of a method that can accurately predict the robot milling path error with high precision.
[0056] Embodiment 2 See also Figure 2 , which is a structural block diagram of a robot milling path error prediction system proposed in the second embodiment of the present invention, the robot milling path error prediction system 200 comprises: a feature information determination module 21, a feature matrix determination module 22, a fusion feature determination module 23 and an error prediction module 24, wherein: A feature information determination module 21 is used to obtain robot sensor information and workpiece sensor information through a preset sensor device, and to respectively determine robot feature information and workpiece feature information according to the robot sensor information and workpiece sensor information; A feature matrix determination module 22 is used to perform dimension conversion on the robot feature information and the workpiece feature information, determine a robot feature matrix and a workpiece feature matrix, and combine the robot feature matrix and the workpiece feature matrix to determine tool location point features at each tool location point; A fusion feature determination module 23 is used to arrange the tool location point features in order, construct a sliding window of a preset size, and select all the tool location point features in the sliding window through the sliding window for fusion to determine a fusion feature; The error prediction module 24 is used to input the fusion features into a preset hybrid neural network model to predict the contour error of the robot at different tool positions, and then adjust the milling path of the robot.
[0057] Furthermore, the robot feature information includes robot end stiffness information, robot spatial posture information, and relative position information between the tool and the workpiece. The feature information determination module 21 includes: A regional point cloud coordinate determination unit is used to determine the point cloud information of the workpiece according to the workpiece sensing information, and divide the sphere into spheres with each tool position point as the sphere center and the diameter of the tool as the diameter, and determine the sphere area and regional point cloud coordinates corresponding to each tool point; A coordinate system conversion unit, used for converting the regional point cloud coordinates into workpiece point cloud data in a tool coordinate system, wherein the tool coordinate system corresponding to the tool position point is a coordinate system with the tool position point as the origin, the tool feed direction as the X axis, and the tool axis direction as the Z axis; The dimension unification unit is used to unify the dimension of the workpiece point cloud data to determine the workpiece feature information.
[0058] A joint angle information determination unit, used to determine the joint angle information of the robot according to the robot sensing information, wherein the joint angle information is the spatial posture information of the robot; A processing tool position location information determining unit, used to determine the processing tool position location information according to the robot sensing information, wherein the processing tool position location information is the relative position information between the tool and the workpiece; A robot end stiffness matrix determination unit, used to determine the robot end stiffness matrix, i.e. the robot end stiffness information, according to the robot sensor information through a preset equation group; The preset equation group is:
[0059] in, Indicates that the robot is under external force The stiffness deformation under the action, The joint angle is The corresponding Jacobian matrix is Deformation of robot joints, is the corresponding robot joint stiffness matrix, represents the transpose of the robot Jacobian matrix, is the stiffness matrix of the robot end.
[0060] Furthermore, the dimensionally identical unit includes: A grid division subunit, used for performing grid division of a preset grid length on three planes xy, yz and xz in the tool coordinate system, wherein the preset grid length is less than the minimum spacing of the scanned point cloud so that the number of projection points in each grid after division is not greater than one; The plane feature determination subunit is used to treat the grids of the xy, yz and xz planes as different matrices, respectively. The size of the matrix is The workpiece point cloud data is projected onto the xy, yz and xz planes respectively, and the features of the three planes are determined. , , that is, the distribution matrix of the workpiece scanning point cloud at the tool position in the tool coordinate system, is the radius of the tool is the preset grid length; The characteristic expressions of the three planes are:
[0061] Among them, is the minimum spacing of the scanned point cloud, and Represents the projection plane and A grid.
[0062] Furthermore, the feature matrix determination module 22 includes: A robot original feature expression determination unit is used to determine the robot original feature expression according to the robot feature information: , is the robot joint angle, To process the tool position information; A robot feature kernel matrix dictionary determination unit, used to determine a robot feature kernel matrix dictionary according to the robot original feature expression and feature kernel function; The expression of the feature kernel function is:
[0063] in, and express No. i and j List, The mean is 0 and the covariance is ; The expression of the robot feature kernel matrix dictionary is: .
[0064] A normalization processing unit, used for constructing a Gaussian convolution kernel and performing normalization processing on the Gaussian convolution kernel; A workpiece feature matrix determining unit, configured to obtain a workpiece convolution feature matrix by convolving the workpiece feature information with the normalized Gaussian convolution, and to combine the convolution feature matrices to form the workpiece feature matrix; The Gaussian convolution kernel expression is:
[0065] in, and Respectively represent matrices The row and column indices of and are the mean and standard deviation of the two-dimensional Gaussian distribution in two directions respectively; The normalized Gaussian convolution kernel expression is:
[0066] in, ; The expression of the workpiece convolution feature matrix is:
[0067] in, The row and column indices of and They are convolution kernels. The row and column indices of and ; The workpiece feature matrix expression is: .
[0068] Furthermore, the error prediction module 24 includes: A feature dependency determination unit, used to extract spatial dimension features and temporal dimension features from the fused features, and encode the extracted spatial dimension features and temporal dimension features, so as to capture long-term dependencies between the extracted features; The error prediction unit is used to input the fully connected layer for regression prediction to obtain the machining errors at each of the tool positions.
[0069] The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments, and will not be repeated here.
[0070] Embodiment 3 Another aspect of the present invention provides an electronic device, see Figure 3, shown is a schematic diagram of an electronic device in the third embodiment of the present invention, including a memory 20, a processor 10, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the computer program 30, the robot milling path error prediction method as described above is implemented.
[0071] In some embodiments, the processor 10 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 20, such as executing access restriction programs.
[0072] Among them, the memory 20 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of an electronic device, such as a hard disk of the electronic device. In other embodiments, the memory 20 can also be an external storage device of an electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Further, the memory 20 can also include both an internal storage unit of the electronic device and an external storage device. The memory 20 can not only be used to store application software and various types of data of the electronic device, but also can be used to temporarily store data that has been output or is to be output.
[0073] It should be pointed out that Figure 3 The structure shown does not constitute a limitation on the electronic device. In other embodiments, the electronic device may include fewer or more components than those shown in the figure, or combine certain components, or arrange the components differently.
[0074] The embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the robot milling path error prediction method as described above is implemented.
[0075] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0076] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0077] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0078] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0079] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims
1. A robot milling path error prediction method, characterized in that: The method comprises: Acquire robot sensor information and workpiece sensor information through a preset sensor device, and confirm robot feature information and workpiece feature information respectively according to the robot sensor information and workpiece sensor information; Performing dimension conversion on the robot feature information and the workpiece feature information to determine a robot feature matrix and a workpiece feature matrix, and combining the robot feature matrix and the workpiece feature matrix to determine tool location point features at each tool location point; Arrange the tool location point features in order, construct a sliding window of a preset size, and select all the tool location point features in the sliding window through the sliding window for fusion to determine the fusion feature; The fusion features are input into a preset hybrid neural network model to predict the contour error of the robot at different tool positions, thereby adjusting the milling path of the robot.
2. The robot milling path error prediction method according to claim 1, characterized in that: The step of confirming the workpiece feature information according to the workpiece sensing information comprises: Determine the point cloud information of the workpiece according to the workpiece sensing information, and divide the sphere into spheres with each tool position point as the sphere center and the diameter of the tool as the diameter, and determine the sphere area corresponding to each tool point and the area point cloud coordinates; The coordinates of the regional point cloud are converted into workpiece point cloud data in a tool coordinate system, wherein the tool coordinate system corresponding to the tool position point is a coordinate system with the tool position point as the origin, the tool feed direction as the X axis, and the tool axis direction as the Z axis; The workpiece point cloud data is dimensionally unified to determine workpiece feature information.
3. The robot milling path error prediction method according to claim 2, characterized in that: The step of unifying the dimensions of the workpiece point cloud data to determine the workpiece feature information comprises: Performing grid division with a preset grid length on three planes xy, yz and xz in the tool coordinate system, wherein the preset grid length is less than the minimum spacing of the scanned point cloud, so that the number of projection points in each grid after division is not greater than one; The grids of the xy, yz, and xz planes are considered as different matrices, each with a size of The workpiece point cloud data is projected onto the xy, yz and xz planes respectively, and the features of the three planes are determined. , , that is, the distribution matrix of the workpiece scanning point cloud at the tool position in the tool coordinate system, is the radius of the tool is the preset grid length; The characteristic expressions of the three planes are: Among them, is the minimum spacing of the scanned point cloud, and Represents the projection plane and A grid.
4. The robot milling path error prediction method according to claim 1, characterized in that: The robot characteristic information includes robot end stiffness information, robot spatial posture information, and relative position information between a tool and a workpiece. The step of confirming the robot characteristic information according to the robot sensor information includes: Determining the joint angle information of the robot according to the robot sensing information, wherein the joint angle information is the spatial posture information of the robot; Determine machining tool position information according to the robot sensing information, wherein the machining tool position information is the relative position information between the tool and the workpiece; Determine the robot end stiffness matrix, i.e. the robot end stiffness information, through a preset equation group according to the robot sensor information; The preset equation group is: in, Indicates that the robot is under external force The stiffness deformation under the action, The joint angle is The corresponding Jacobian matrix is Deformation of robot joints, is the corresponding robot joint stiffness matrix, represents the transpose of the robot Jacobian matrix, is the robot end stiffness matrix.
5. The robot milling path error prediction method according to claim 4, characterized in that: The step of performing dimension conversion on the robot feature information to determine the robot feature matrix includes: According to the robot feature information, the original feature expression of the robot is determined as follows: , is the robot joint angle, To process the tool position information; Determine a robot feature kernel matrix dictionary according to the robot original feature expression and feature kernel function; The expression of the feature kernel function is: in, and express No. i and j List, The mean is 0 and the covariance is ; The expression of the robot feature kernel matrix dictionary is: 。 6. The robot milling path error prediction method according to claim 3, characterized in that: The step of performing dimension conversion on the workpiece feature information to determine the workpiece feature matrix includes: Constructing a Gaussian convolution kernel and normalizing the Gaussian convolution kernel; Convolving the workpiece feature information with the normalized Gaussian convolution to obtain a workpiece convolution feature matrix, and combining the convolution feature matrices to form the workpiece feature matrix; The Gaussian convolution kernel expression is: in, and Respectively represent matrices The row and column indices of and are the mean and standard deviation of the two-dimensional Gaussian distribution in two directions respectively; The normalized Gaussian convolution kernel expression is: in, ; The expression of the workpiece convolution feature matrix is: in, The row and column indices of and They are convolution kernels. The row and column indices of and ; The workpiece feature matrix expression is: .
7. The robot milling path error prediction method according to claim 2, characterized in that: The step of inputting the fusion features into a preset hybrid neural network model to predict the contour error of the robot at different tool positions includes: Extracting spatial dimension features and temporal dimension features from the fused features, and encoding the extracted spatial dimension features and temporal dimension features, thereby capturing long-term dependencies between the extracted features; The input is put into the fully connected layer for regression prediction to obtain the machining error at each tool position.
8. A robot milling path error prediction system, characterized in that: Used to implement the robot milling path error prediction method according to any one of claims 1 to 7, the system comprises: A feature information determination module, used to obtain robot sensor information and workpiece sensor information through a preset sensor device, and to respectively determine robot feature information and workpiece feature information according to the robot sensor information and workpiece sensor information; A feature matrix determination module is used to perform dimension conversion on the robot feature information and the workpiece feature information, determine a robot feature matrix and a workpiece feature matrix, and combine the robot feature matrix and the workpiece feature matrix to determine tool location point features at each tool location point; A fusion feature determination module is used to arrange the tool location point features in order, construct a sliding window of a preset size, and select all the tool location point features in the sliding window through the sliding window for fusion to determine the fusion feature; The error prediction module is used to input the fusion features into a preset hybrid neural network model to predict the contour error of the robot at different tool positions, and then adjust the milling path of the robot.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the robot milling path error prediction method according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for predicting a robot milling path error as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for acquiring optimal installation position of workpiece based on contour errors
CN110989490A
Milling machining robot attitude optimizing method and device considering minimum contour error
CN111958611A
Hybrid robot milling error prediction and compensation method based on GRNN
CN112733296A
Industrial robot milling error compensation method, system and device and medium
CN113146630A
Advanced sensing method for deformation error of milling tail end of robot
CN114178600A