A robot milling path error compensation method and system

By constructing a neural prediction model for path error and extracting path features using a convolutional network with data augmentation and dynamically adjusted convolutional kernels, the problem of insufficient accuracy in predicting robot milling path errors in existing technologies is solved, and high-precision error compensation is achieved.

CN122308257APending Publication Date: 2026-06-30HUAZHONG UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2026-03-11
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing methods for compensating for errors in robotic milling paths are insufficient to meet the high-precision requirements of aviation, shipbuilding, and new energy vehicles. Neural network-based methods suffer from insufficient prediction accuracy due to insufficient training data and the introduction of noisy data, and they also ignore the continuity of the milling path and the spatial correlation of the robot joint configuration.

Method used

By constructing a neural prediction model for path error, data augmentation is performed using K-means clustering and sliding window method. Path features are extracted by combining a two-dimensional convolutional network with dynamically adjusted kernel size and a bidirectional LSTM layer, along with an iterative compensation strategy to achieve high-precision error compensation.

Benefits of technology

It improves the accuracy of path error prediction and achieves high-precision error compensation for robot milling paths, meeting the machining accuracy requirements of aviation, shipbuilding and new energy vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122308257A_ABST
    Figure CN122308257A_ABST
Patent Text Reader

Abstract

This application belongs to the field of robot machining and error compensation, and more specifically, relates to a method and system for path error compensation in robot milling. This application achieves data augmentation of historical path sequences through K-means clustering, sliding window generation of subsequences, and sequence discreteness filtering operations. This results in a large number of training path sequences that retain the physical laws of path errors, thereby improving the path prediction accuracy of the path error prediction model. A spatial feature extraction layer composed of multiple two-dimensional convolutional networks with dynamically adjustable kernel sizes accurately extracts the path spatial features of the current path sequence. The path error prediction model accurately obtains the initial positioning error of each current path point in the current path sequence, which, combined with an iterative compensation strategy, corrects the pose parameters of each current path point, achieving high-precision error compensation for the robot's current path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of robot machining and error compensation, and more specifically, relates to a method and system for error compensation in robot milling machining paths. Background Technology

[0002] With the increasing level of industrial intelligence, industrial robots have become an important part of industries such as aerospace, new energy vehicles, and shipbuilding due to their advantages of high flexibility and large workspace. However, existing industrial robots are affected by factors such as milling force and their own weight during the processing, and their path accuracy is difficult to meet the high milling accuracy requirements of the skin edges of aerospace, shipbuilding, and new energy vehicles. Therefore, it is necessary to compensate for path errors (spatial coordinate errors of path points and angle errors of various joints of the robot at path points) in the robot milling process.

[0003] Existing error compensation methods are mainly divided into physical model-based and model-free methods. Physical model-based methods are affected by complex nonlinear factors such as gear backlash and friction in robots, making it difficult to accurately model the machining path. Therefore, model-free methods based on neural networks have begun to be widely used in machining path compensation. However, most existing neural network-based path error compensation methods focus on single-point positioning accuracy, ignoring the continuity of the milling path and the spatial correlation of robot joint configurations, thus making it difficult for neural networks to accurately predict machining path errors. In addition, since there is limited real training data available for milling processes of the same type of robot, data augmentation is needed to expand the historical training data. However, existing data augmentation methods used for neural network training introduce a large amount of noise data, which disrupts the true physical laws of robot path errors, resulting in insufficient accuracy of neural network machining path error prediction. Summary of the Invention

[0004] To address the aforementioned deficiencies in existing technologies, this application provides a method for compensating for robot milling path errors. The method aims to construct a neural prediction model for path errors and utilize small sample data to effectively train the model, enabling it to accurately extract the spatial and temporal features of the robot milling path and achieve accurate prediction and compensation of robot milling path errors.

[0005] In a first aspect, this application provides a method for compensating for errors in robot milling machining paths, including: S1. Obtain the robot's historical path sequence and perform data augmentation and expansion processing on the historical path sequence to obtain a training path sequence set consisting of multiple training path sequences. The historical path sequence includes the robot's pose parameters at each path point within the historical time interval. The pose parameters include joint configurations and the Cartesian space coordinates corresponding to the joint configurations. S2. Construct a path error prediction model and train the path error prediction model based on the training path sequence set; S3. Based on the path error prediction model, perform path error prediction processing on the robot's current path sequence to obtain the initial positioning error of the pose parameters of each current path point in the current path sequence. The initial positioning error includes Cartesian space coordinate error. S4. Based on the initial positioning error of the current path point, the pose parameters of each current path point are corrected through an iterative compensation strategy, and the parameters of the current path points stored in the robot's controller are replaced based on the corrected pose parameters of each current path point.

[0006] Furthermore, the historical path sequences are augmented and expanded using data augmentation techniques, including: S21. Based on the K-means clustering algorithm, the historical path sequence is divided into multiple initial path sequences by grouping the path points that are adjacent in time into a preset number. S22. Using the sliding window method and the linear congruential method, randomly obtain multiple candidate sub-path sequences from each initial path sequence, and calculate the sequence discreteness corresponding to each candidate sub-path sequence. S23. Select each candidate sub-path sequence whose sequence dispersion value is less than the first preset value as the training path sequence, and construct a training path sequence set based on each training path sequence.

[0007] Furthermore, the sequence discreteness corresponding to each candidate sub-path sequence is calculated, as shown in the formula:

[0008] Where SED represents the sequence discreteness of the Kth candidate sub-path sequence. This represents the path length of the Kth candidate sub-path sequence. Indicates the robot at the waypoint i pose parameters, Indicates the robot at the waypoint i The joint configuration.

[0009] Furthermore, the path error prediction model is a hybrid temporal network model, which includes a spatial feature extraction layer, a temporal feature extraction layer, a fully connected layer, and an output layer. The spatial feature extraction layer includes multiple two-dimensional convolutional networks with different kernel sizes, and the temporal feature extraction layer is a bidirectional LSTM (Long Short-Term Memory) layer.

[0010] Furthermore, the kernel size of the 2D convolutional network is dynamically adjusted based on the Cartesian space coordinates of each path point in the path sequence to be processed in the input space feature extraction layer. The dynamic adjustment process of the kernel size of the 2D convolutional network includes: Obtain the Cartesian space coordinates of the target path points in the path sequence to be processed, and calculate the number of path points in the path sequence to be processed whose spatial distance from the target path point is less than a preset threshold distance. Based on the number of path points whose spatial distance from the target path point is less than the preset threshold distance, adjust the kernel size of the two-dimensional convolutional network used to extract the spatial feature information of the target path points.

[0011] Traditional fixed-size convolutional kernels are prone to causing severe feature extraction distortion. In sparse, flat areas, fixed kernels force points outside the neighborhood, far away, and lacking error similarity into the convolution calculation, potentially introducing spatial noise. In densely populated corners, fixed kernels may miss valid points belonging to the same error-similar neighborhood, potentially causing loss of similarity information. Dynamically adjusting the convolutional kernel size ensures that the network can accurately frame and extract the purest local similarity information under any curvature and velocity domain.

[0012] Furthermore, the pose parameters of each current path point are corrected through an iterative compensation strategy, including: S41. Based on the initial positioning error corresponding to the current path point, perform initial correction on the Cartesian space coordinates of the current path point, and use the corrected current path point as the nominal path point. S42. Based on the robot's inverse kinematics model and the Cartesian space coordinates of the nominal path points, obtain the joint configuration corresponding to the nominal path points; S43. Based on the Cartesian space coordinates and joint configuration of the nominal path points, the nominal positioning error of the nominal path points is obtained through the path error prediction model. S44. Based on the nominal positioning error, correct the pose parameters of the nominal path point; S45. Repeat step S42 until the maximum number of iterations is reached or the nominal path point after pose parameter correction meets the preset convergence condition, and then use the nominal path point as the current path point.

[0013] Furthermore, the process of determining whether the nominal path point after pose parameter correction meets the preset convergence condition includes: Based on the pose parameters of the nominal path points before correction, a first pose matrix is ​​constructed, and based on the pose parameters of the nominal path points after correction, a second pose matrix is ​​constructed. Obtain the rotation angle between the first pose matrix and the second pose matrix. When the rotation angle is lower than the preset angle, it indicates that the nominal path point after the pose parameter correction meets the preset convergence condition.

[0014] Secondly, this application also provides a robot milling machining path error compensation system for performing any of the methods in the first aspect, including: The data augmentation module is used to acquire the robot's historical path sequences and perform data augmentation and expansion processing on the historical path sequences to obtain a training path sequence set consisting of multiple training path sequences. The model building module is used to build a path error prediction model and train the path error prediction model based on the training path sequence set; The positioning error acquisition module is used to perform path error prediction processing on the robot's current path sequence based on the path error prediction model, and obtain the initial positioning error of the pose parameters of each current path point in the current path sequence. The path point correction module is used to correct the pose parameters of each current path point based on the initial positioning error of the current path point through an iterative compensation strategy, and to replace the parameters of the current path points stored in the robot's controller based on the corrected pose parameters of each current path point.

[0015] Thirdly, this application also provides an electronic device, comprising: at least one memory for storing a program; and at least one processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute any of the methods of the first aspect.

[0016] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to perform the method described in the first aspect or any possible implementation thereof.

[0017] In summary, the technical solutions conceived by this invention have the following beneficial effects compared with the prior art: 1. By combining K-means clustering, sliding window generation of subsequences, and sequence dispersion filtering, data augmentation of historical path sequences can be achieved, thereby obtaining a large number of training path sequences that retain the physical laws of path errors. The generated training path sequences can then be used to improve the path prediction accuracy of the path error prediction model.

[0018] 2. A spatial feature extraction layer composed of multiple two-dimensional convolutional networks with dynamically adjustable kernel sizes can accurately extract the path spatial features of the current path sequence; a temporal feature extraction layer composed of bidirectional LSTM layers can accurately extract the temporal features of the current path sequence. Based on the path spatial and temporal features of the current path sequence, the initial positioning error of each current path point in the current path sequence can be accurately obtained through a path error prediction model. This can be combined with an iterative compensation strategy to correct the pose parameters of each current path point, thereby achieving high-precision error compensation for the robot's current path. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the robot milling path error compensation method provided in the embodiments of this application.

[0021] Figure 2 This is a schematic diagram illustrating the process of obtaining candidate sub-path sequences provided in an embodiment of this application.

[0022] Figure 3 This is a schematic diagram of the path error prediction model provided in the embodiments of this application.

[0023] Figure 4 This is a schematic diagram of the kernel size adjustment process of the two-dimensional convolutional network provided in the embodiments of this application.

[0024] Figure 5 This is a schematic diagram of the iterative process of the current path point provided in the embodiments of this application.

[0025] Figure 6 This is a schematic diagram of the structure of the robot milling machining path error compensation system provided in the embodiments of this application.

[0026] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0027] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0028] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.

[0029] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.

[0030] Figure 1 This is a flowchart illustrating the robot milling path error compensation method provided in this application embodiment. The method includes at least the following steps: S1. Obtain the robot's historical path sequence and perform data augmentation and expansion processing on the historical path sequence to obtain a training path sequence set consisting of multiple training path sequences.

[0031] In this embodiment, the executing entity can be a robot controller. The historical path sequence includes the robot's pose parameters at each path point within a historical time interval. These pose parameters include joint configurations and their corresponding Cartesian space coordinates, which can also be directly calculated based on the robot's motion model and joint configurations. The joint configuration includes the rotation angle parameters (joint angles) of each joint at the corresponding path point. The historical path sequence is obtained after correction based on the actual task requirements when the robot performs the target milling task, and therefore can be used to train the path error prediction model. Furthermore, since the sample size of the historical path sequence is relatively small, data augmentation processing is required to obtain a large number of usable training samples.

[0032] In one possible implementation, the historical path sequence is augmented with data, including: S21. Based on the K-means clustering algorithm, the historical path sequence is divided into multiple initial path sequences by grouping the path points that are adjacent in time into a preset number. S22. Using the sliding window method and the linear congruential method, randomly obtain multiple candidate sub-path sequences from each initial path sequence, and calculate the sequence discreteness corresponding to each candidate sub-path sequence. S23. Select each candidate sub-path sequence whose sequence dispersion value is less than the first preset value as the training path sequence, and construct a training path sequence set based on each training path sequence.

[0033] In the embodiments of this application, such as Figure 2 As shown, the K-means clustering algorithm divides the path points of a historical path sequence into K temporally consecutive initial path sequences. Then, the window length is set. L and movement interval I Based on the K initial path sequences, a sliding window is used to randomly generate multiple candidate sub-path sequences (corresponding to sequence 1 and sequence n in the figure). These candidate sub-path sequences can be represented as follows: ,in, Representing the n A sequence of candidate sub-paths L This represents the sequence length (number of path point numbers or number of time steps). For the first The joint configuration at each path point, if the robot has 6 joint angle parameters, then It is a column vector with 6 parameters.

[0034] Subsequently, to measure the difference between the generated candidate sub-path sequences and the standard equidistant sequence, i.e., to preserve the physical laws governing path error, the KL (Kullback-Leibler) divergence is introduced. In information theory, KL sequence dispersion can be used to measure the distance between two random probability distributions. As the difference between the two random distributions increases, their relative entropy also increases. Removing the constant term from the KL (Kullback-Leibler) divergence formula yields the formula for calculating the sequence dispersion corresponding to the candidate sub-path sequences:

[0035] Where SED represents the sequence discreteness of the Kth candidate sub-path sequence. This represents the path length of the Kth candidate sub-path sequence. Indicates the robot at the waypoint i pose parameters, Indicates the robot at the waypoint i The joint configuration.

[0036] Since a smaller SED value indicates that the probability distribution of the subsequence is closer to the standard equidistant milling distribution, a first preset value is set, and candidate sub-path sequences with a sequence dispersion value less than the first preset value are used as training path sequences, thereby effectively eliminating invalid data that have been severely distorted due to random sampling.

[0037] S2. Construct a path error prediction model and train the path error prediction model based on the training path sequence set.

[0038] In the embodiments of this application, such as Figure 3 As shown, the path error prediction model is a hybrid temporal network model, which includes a spatial feature extraction layer, a temporal feature extraction layer, a fully connected layer, and an output layer. The spatial feature extraction layer includes multiple two-dimensional convolutional networks with different kernel sizes, and the temporal feature extraction layer is a bidirectional LSTM layer.

[0039] The spatial feature extraction layer is used to extract the spatial feature information of each path point in the path sequence. Through multiple two-dimensional convolutional networks with different kernel sizes, convolution operations are applied to the adjacent path points of each target path point, thereby obtaining the correlation features between robot joint angles and high-level semantic information about the changes in joint angles of adjacent path points. The convolution operation can be described as follows:

[0040] in, Indicates the first k Features extracted by each convolutional kernel Represents the convolution kernel. This represents the spatial feature information of each path point within a time step L adjacent to path point t. This represents the convolution operation.

[0041] The kernel size of the two-dimensional convolutional network in this embodiment is dynamically adjusted based on the Cartesian space coordinates of each path point in the path sequence to be processed in the input spatial feature extraction layer. The Cartesian space coordinates can be directly obtained from the joint configuration of the path points. The dynamic adjustment process of the kernel size of the two-dimensional convolutional network includes: Obtain the Cartesian space coordinates of the target path points in the path sequence to be processed, and calculate the number of path points in the path sequence to be processed whose spatial distance from the target path point is less than a preset threshold distance. Based on the number of path points whose spatial distance from the target path point is less than the preset threshold distance, adjust the kernel size of the two-dimensional convolutional network used to extract the spatial feature information of the target path points.

[0042] like Figure 4As shown, based on the similarity characteristics of the robot's positioning errors within a certain geometric range in Cartesian space, this embodiment dynamically sets convolutional kernels of different sizes for different path points. First, the target path points are defined. The theoretical spatial location is Calculate the surrounding adjacent path points spatial location The distance to the target location is set to a fixed maximum allowable threshold distance for error similarity. The formula corresponding to the aforementioned preset threshold distance is as follows:

[0043] Then, statistics were compiled to meet the maximum allowable distance. The number of neighboring points. For example, setting the maximum permissible error similarity distance threshold to... .like Figure 2 The path points corresponding to convolution 2 have relatively gentle curvature, the robot moves at a relatively fast speed, and the path points are sparsely distributed, falling into... There are only 7 path points in the neighborhood, so the dynamic convolution kernel size corresponding to this point is set to 7; for example Figure 2 The path points corresponding to convolution 3, at sharp turns with drastic curvature changes, cause the robot to decelerate, resulting in a denser network of path points. At this point, the robot may fall into the same path. There are up to 10 path points in the neighborhood, so the dynamic convolution kernel size corresponding to this point is set to 10.

[0044] like Figure 3 As shown, the dynamic kernel adjustment strategy of this application enables the spatial feature extraction layer to extract the joint configuration information of each current path into noise-free multidimensional semantic spatial features. When these denoised, uniformly sized (maintaining dimensional consistency by adjusting the kernel padding size) fused spatial features are input into the downstream bidirectional LSTM layer, the LSTM layer no longer needs to allocate computing power to combat spatial noise and can fully focus on the temporal evolution of these spatial features. This network structure, which combines spatial feature extraction layers with temporal feature extraction layers, can effectively improve the overall robustness and accuracy of the path error prediction model for predicting errors in complex milling paths.

[0045] S3. Based on the path error prediction model, perform path error prediction processing on the robot's current path sequence to obtain the initial positioning error of the pose parameters of each current path point in the current path sequence. The initial positioning error includes Cartesian space coordinate error. S4. Based on the initial positioning error of the current path point, the pose parameters of each current path point are corrected through an iterative compensation strategy, and the parameters of the current path points stored in the robot's controller are replaced based on the corrected pose parameters of each current path point.

[0046] In the embodiments of this application, such as Figure 5 As shown, the process of correcting the pose parameters of each current path point using the iterative compensation strategy includes: S41, Based on the current path point Corresponding initial positioning error Perform initial corrections on the Cartesian space coordinates of the current path point, and then set the corrected current path point... As nominal path point ; S42. Based on the robot's inverse kinematics model and the Cartesian space coordinates of the nominal path points, obtain the joint configuration corresponding to the nominal path points. ; S43, Based on nominal path points Using the Cartesian coordinates and joint configuration, the nominal path point is obtained through a path error prediction model. nominal positioning error , This represents the nominal positioning error obtained after the nth iteration; S44, Based on nominal positioning error Correct the nominal path point The pose parameters, and the nominal path points The pose parameters are executed as follows The operation, This refers to the path point corresponding to the current path point after the nth iteration. S45. Repeat step S42 until the maximum number of iterations or the nominal path point after pose parameter correction is reached. The preset convergence conditions are met, and the nominal path point is... As the corrected current path point .

[0047] Final prediction error It can be represented as follows:

[0048] in The final positioning error after multiple iterations of the path error prediction model is represented by the corrected current path. This information can be input into the robot controller to compensate for path errors.

[0049] Furthermore, the convergence criterion is based on a rotation matrix that considers robot calibration errors and non-geometric errors. Specifically, the deviation between the pose parameters of the nominal path points before and after correction is determined using the rotation matrix, which converts the robot's pose parameters before correction into corrected pose parameters. In this embodiment, the process of determining whether the nominal path points after pose parameter correction meet the preset convergence criterion includes: Based on the pose parameters of the nominal path points before correction, a first pose matrix is ​​constructed, and based on the pose parameters of the nominal path points after correction, a second pose matrix is ​​constructed. Obtain the rotation angle of the rotation matrix between the first pose matrix and the second pose matrix. When the rotation angle is lower than a preset angle, it indicates that the nominal path point after pose parameter correction meets the preset convergence condition. The rotation angle can be preset based on the number of joint angles of the robot or an adjustable angle range.

[0050] Figure 6 A robotic milling path error compensation system is provided in the embodiments of this application, such as... Figure 6 As shown, the system includes at least: The data augmentation module is used to acquire the robot's historical path sequences and perform data augmentation and expansion processing on the historical path sequences to obtain a training path sequence set consisting of multiple training path sequences. The model building module is used to build a path error prediction model and train the path error prediction model based on the training path sequence set; The positioning error acquisition module is used to perform path error prediction processing on the robot's current path sequence based on the path error prediction model, and obtain the initial positioning error of the pose parameters of each current path point in the current path sequence. The path point correction module is used to correct the pose parameters of each current path point based on the initial positioning error of the current path point through an iterative compensation strategy, and to replace the parameters of the current path points stored in the robot's controller based on the corrected pose parameters of each current path point.

[0051] like Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: a processor 701, a communications interface 702, a memory 703, and a communication bus 704. The processor 701, communications interface 702, and memory 703 communicate with each other via the communication bus 704. The processor 701 can call software instructions in the memory 703 to execute the methods described in the above embodiments.

[0052] Furthermore, the logical instructions in the aforementioned memory 703 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.

[0053] Based on the methods in the above embodiments, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to execute the methods in the above embodiments.

[0054] Based on the methods in the above embodiments, this application provides a computer program product that, when run on a processor, causes the processor to execute the methods in the above embodiments.

[0055] It is understood that the processor in the embodiments of this application can be a CPU (Central Processing Unit), or other general-purpose processors, DSPs (Digital Signal Processors), ASICs (Application Specific Integrated Circuits), FPGAs (Field Programmable Gate Arrays), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.

[0056] The method steps in this application embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, ROM (Read-only Memory), PROM (Programmable ROM), EPROM (Erasable PROM), EEPROM (Electrically Erasable EPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.

[0057] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line DSL) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD (Solid State Disk)).

[0058] It is understood that the various numerical designations used in the embodiments of this application are merely for the convenience of description and are not intended to limit the scope of the embodiments of this application.

[0059] Those skilled in the art will readily understand that the above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for compensating for errors in a robot milling machining path, characterized in that, include: S1. Obtain the robot's historical path sequence and perform data augmentation and expansion processing on the historical path sequence to obtain a training path sequence set consisting of multiple training path sequences. The historical path sequence includes the robot's pose parameters at each path point within the historical time interval. The pose parameters include joint configurations and Cartesian space coordinates corresponding to the joint configurations. S2. Construct a path error prediction model and train the path error prediction model based on the training path sequence set; S3. Based on the path error prediction model, perform path error prediction processing on the current path sequence of the robot to obtain the initial positioning error of the pose parameters of each current path point in the current path sequence, wherein the initial positioning error includes Cartesian space coordinate error. S4. Based on the initial positioning error of the current path point, the pose parameters of each current path point are corrected through an iterative compensation strategy, and the parameters of the current path points stored in the robot's controller are replaced based on the corrected pose parameters of each current path point.

2. The robot milling machining path error compensation method according to claim 1, characterized in that, The data augmentation and expansion process for the historical path sequence includes: S21. Based on the K-means clustering algorithm, the historical path sequence is divided into multiple initial path sequences by grouping them into a preset number of time-adjacent path points; S22. Randomly obtain multiple candidate sub-path sequences from each of the initial path sequences using the sliding window method and the linear congruential method, and calculate the sequence discreteness corresponding to each candidate sub-path sequence. S23. The candidate sub-path sequences whose sequence dispersion values ​​are less than a first preset value are used as training path sequences, and a training path sequence set is constructed based on each of the training path sequences.

3. The robot milling machining path error compensation method according to claim 2, characterized in that, The calculation of the sequence discreteness corresponding to each of the candidate sub-path sequences is as described in the formula: Where SED represents the sequence discreteness of the Kth candidate sub-path sequence. This represents the path length of the Kth candidate sub-path sequence. Indicates the robot at the waypoint i pose parameters, Indicates the robot at the waypoint i The joint configuration.

4. The robot milling machining path error compensation method according to claim 1, characterized in that, The path error prediction model is a hybrid temporal network model, which includes a spatial feature extraction layer, a temporal feature extraction layer, a fully connected layer, and an output layer. The spatial feature extraction layer includes multiple two-dimensional convolutional networks with different kernel sizes, and the temporal feature extraction layer is a bidirectional LSTM layer.

5. The robot milling machining path error compensation method according to claim 4, characterized in that, The kernel size of the two-dimensional convolutional network is dynamically adjusted based on the Cartesian space coordinates of each path point in the path sequence to be processed input to the spatial feature extraction layer. The dynamic adjustment process of the kernel size of the two-dimensional convolutional network includes: Obtain the Cartesian space coordinates of the target path points in the path sequence to be processed, and calculate the number of path points in the path sequence to be processed whose spatial distance from the target path point is less than a preset threshold distance. Based on the number of path points whose spatial distance from the target path point is less than the preset threshold distance, adjust the kernel size of the two-dimensional convolutional network used to extract the spatial feature information of the target path points.

6. The robot milling machining path error compensation method according to claim 5, characterized in that, The step of correcting the pose parameters of each current path point through an iterative compensation strategy includes: S41. Based on the initial positioning error corresponding to the current path point, perform initial correction on the Cartesian space coordinates of the current path point, and use the corrected current path point as the nominal path point; S42. Based on the inverse kinematics model of the robot and the Cartesian space coordinates of the nominal path point, obtain the joint configuration corresponding to the nominal path point; S43. Based on the Cartesian space coordinates and joint configuration of the nominal path point, obtain the nominal positioning error of the nominal path point through the path error prediction model; S44. Based on the nominal positioning error, correct the pose parameters of the nominal path point; S45. Repeat step S42 until the maximum number of iterations is reached or the nominal path point after the pose parameter correction meets the preset convergence condition, and then use the nominal path point as the current path point.

7. The robot milling machining path error compensation method according to claim 6, characterized in that, The process of determining whether the nominal path point after pose parameter correction meets the preset convergence condition includes: Based on the pose parameters of the nominal path points before correction, a first pose matrix is ​​constructed, and based on the pose parameters of the nominal path points after correction, a second pose matrix is ​​constructed. Obtain the rotation angle between the first pose matrix and the second pose matrix. When the rotation angle is lower than a preset angle, it indicates that the nominal path point after the pose parameter correction meets the preset convergence condition.

8. A robot milling machining path error compensation system, used to perform the method as described in any one of claims 1-7, characterized in that, include: The data augmentation module is used to acquire the robot's historical path sequences and perform data augmentation and expansion processing on the historical path sequences to obtain a training path sequence set consisting of multiple training path sequences. The model building module is used to build a path error prediction model and train the path error prediction model based on the training path sequence set. The positioning error acquisition module is used to perform path error prediction processing on the current path sequence of the robot based on the path error prediction model, and obtain the initial positioning error of the pose parameters of each current path point in the current path sequence. The path point correction module is used to correct the pose parameters of each current path point based on the initial positioning error of the current path point through an iterative compensation strategy, and to replace the parameters of the current path points stored in the robot's controller based on the corrected pose parameters of each current path point.

9. An electronic device, characterized in that, include: At least one memory for storing computer programs; At least one processor is configured to execute a program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, the computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform the method as described in any one of claims 1-7.