Collaborative robot motion trail skill learning method
By time alignment and modeling of LSTM models on multiple teaching trajectories, combined with the improved DMP algorithm to generalize in space, the problem of insufficient modeling error and generalization ability in complex motion trajectory learning is solved, and high precision is achieved and smooth motion trajectory generation.
Patent Information
- Application Number
- CN202411944203.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art faces the problems of single teaching trajectory modeling error and insufficient generalization ability of multi-dimensional trajectory in the learning of complex motion trajectory.
By aligning multiple teaching trajectories in time, modeling and regressing using the LSTM model, and generalizing in space with improved DMP algorithms, high-precision and smooth motion trajectories are generated.
The accuracy and ability of motion trajectory modeling are improved, and the generated trajectory is more in line with the needs of different tasks, has strong adaptability, and is better than traditional methods.
Smart Images

Figure CN119458372A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robot skill learning, and in particular relates to a collaborative robot motion trajectory skill learning method. Background Art
[0002] Teaching learning methods allow robots to learn tasks by observing human-demonstrated actions. Learning complex motion trajectories, especially the modeling of time series characteristics and multi-dimensional trajectories, still faces challenges. The dynamic motion primitive (DMP) method can model motion trajectories through a simplified spring-damper system and generalize the trajectory smoothly, but DMP can only model and generalize from a single teaching trajectory (IJSPEERT AJ, NAKANISHI J, HOFFMANN H, et al. Dynamical movement primitives: learning attractor models for motor behaviors [J]. Neural Computation, 2013, 25 (2): 328-373.). Long short-term memory networks (LSTM) can effectively capture time series characteristics and can learn the temporal relationship between the trajectories. However, for some movements involving complex spatial and temporal interactions, LSTM may not be able to fully capture the spatial features, resulting in problems in generalization. Summary of the invention
[0003] Aiming at the problems of motion modeling errors caused by the uncertainty of a single teaching trajectory and insufficient generalization ability of multi-dimensional motion trajectories using a dynamic motion primitive method, the present invention proposes a collaborative robot motion trajectory skill learning method.
[0004] In order to achieve the above object, the technical solution of the present invention is:
[0005] First, multiple teaching trajectories are time-aligned; then, LSTM is used to model and regress multiple teaching trajectories; finally, the trajectories are generalized in space by combining the improved DMP algorithm, which specifically includes the following steps:
[0006] Step 1: trajectory data acquisition: obtaining the teaching motion trajectory by dragging the collaborative robot for teaching or other methods, wherein the teaching motion trajectory includes the time series information of the trajectory, including position, speed, and acceleration;
[0007] Step 2: Preprocessing of teaching data: For the teaching motion trajectory obtained in step 1, the dynamic time warping algorithm is used to time-align the teaching motion trajectory so that the motion forms of different teaching trajectories remain consistent to the greatest extent; then the time series characteristics of the trajectory are normalized to meet the input requirements of the neural network LSTM model;
[0008] Step 3: Use the LSTM model to model the motion trajectory based on the time series characteristics: take the time variable as input, and learn the time series characteristics of the trajectory through the LSTM model. Specifically, first use the time series processed in step 2 as the input of the LSTM model, and the corresponding spatial coordinates as the output for training; after the training is completed, use the time variable as the model input, and obtain the regression trajectory of multiple teaching trajectories according to the specific optimization criteria;
[0009] Step 4: Generalize the motion trajectory using the improved DMP: Use the improved dynamic motion primitives to generalize the regression trajectory obtained in step 3.
[0010] The calculation formula of the improved dynamic motion primitive is:
[0011]
[0012] In formula (1), x represents the motion state of the system, and They represent the first-order derivative and the second-order derivative of x respectively; g represents the target state where the system motion finally converges; α y and β y is a constant; τ is the convergence speed of the regression trajectory, x0 is the initial value of the system motion state; s is a time-independent variable and satisfies the regular system shown in formula (2); f is a nonlinear function, as shown in formula (3).
[0013]
[0014] In formula (2), s∈(0,1], a is a positive number.
[0015]
[0016] In the formula, Ψ i is the Gaussian basis function, ω i is the weight of each Gaussian basis function, N is a positive integer, which is the total number of basis functions; any complex motion trajectory in space can be obtained by weighting different basis functions and weight combinations.
[0017] The present invention has the following beneficial effects:
[0018] 1) The long short-term memory network (LSTM) deep learning model is used to model and regress the time series teaching trajectory, which can capture the temporal dependence and complex nonlinear relationships in the data and improve the accuracy and ability of motion trajectory modeling.
[0019] 2) Trajectory regression is performed through LSTM, and then combined with the improved DMP algorithm, the trajectory is generalized in multi-dimensional space, which can generate high-precision and smooth trajectories. This combination makes the generated trajectory more in line with the needs of different tasks and has strong adaptability.
[0020] 3) Traditionally, LSTM and DMP are technologies used for trajectory modeling and trajectory optimization respectively. This invention proposes a new method that uses LSTM to learn the temporal features of the trajectory and combines it with the improved DMP for trajectory optimization, thereby improving the effect of motion trajectory skill learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 The present invention is a flowchart of a collaborative robot motion trajectory skill learning method.
[0022] Figure 2 These are multiple teaching trajectory data obtained by dragging and teaching the collaborative robot used in the embodiment of the present invention.
[0023] Figure 3 Taught trajectory and regression and generalized trajectories obtained using a collaborative robot motion trajectory skill learning method.
[0024] Figure 4 A comparison chart of the regression trajectories obtained by the method of the present invention and two other imitation learning methods. DETAILED DESCRIPTION
[0025] like Figure 1 As shown, an embodiment of the present invention provides a collaborative robot motion trajectory skill learning method. First, multiple teaching trajectories are time-aligned; then, multiple teaching trajectories are modeled and regressed using LSTM; finally, the trajectories are generalized in space by combining the improved DMP algorithm, which specifically includes the following steps:
[0026] Step 1: First, collect the motion trajectory of the collaborative robot. Use the drag-and-drop teaching method to collect the motion trajectory of the collaborative robot.
[0027] Step 2. Secondly, pre-process the teaching motion trajectory collected in step 1. First, use the dynamic time warping algorithm (DTW) to time-align the teaching motion trajectory so that the motion forms of different teaching trajectories are as consistent as possible. Then, perform minimum-maximum normalization on the data. Linearly map the data to a specified range (usually [0,1]) for normalization. The formula is as follows:
[0028]
[0029] Where X is the coordinate data of each teaching trajectory.
[0030] Step 3: Convert the data into a format suitable for LSTM, usually a three-dimensional tensor format of (batch_size, seq_len, features). Use the LSTM model to model the motion trajectory based on time series characteristics. Take time t as input and the spatial coordinates (x, y) of the time trajectory as output. Use the Adam optimizer and mean square error loss function to train the LSTM network. The number of input variable features of the network is 1, the number of output features is 2, the number of LSTM layers is 2, and the state dimension of each LSTM hidden layer is 128. The LSTM layer processes the input of each time step and learns the time series information through the recursive relationship between time steps. The output of the LSTM is passed to a fully connected layer to output the final prediction result: the x and y coordinates of the motion trajectory; the generated trajectory coordinates are then denormalized and restored to the original coordinate range.
[0031] Step 4. Finally, use the improved dynamic motion primitives to generalize the regressed motion trajectory.
[0032] The calculation formula of the improved dynamic motion primitive is:
[0033]
[0034] In the formula, x represents the system motion state, and Respectively x The first and second derivatives of . g represents the target state of the system's motion, and the system will converge to this target state. y and β y It is equivalent to the proportional coefficient and differential coefficient in the proportional differential controller, which is usually set as a constant. τ is used to achieve the convergence speed of the trajectory. The nonlinear function f can be expressed as:
[0035]
[0036] In the formula, Ψ i is the Gaussian basis function, ω i is the weight of each Gaussian basis function, and N is the total number of basis functions. Any complex motion trajectory in space can be obtained by weighting different basis functions and weight combinations. Where s is a time-independent variable, s∈(0,1], and s satisfies the following regular system as shown, where a is a positive number.
[0037]
[0038] In this embodiment, the collaborative robot is dragged to perform motion trajectory skill learning algorithm verification. The teaching motion trajectory data is as follows: Figure 2 As shown, there are 4 teaching tracks. Figure 3 The red solid line in the middle is the motion trajectory regressed by LSTM. The root mean square error RMSE between the regression trajectory and the original teaching trajectory is 1.5687mm. The purple short dotted line is the effect of trajectory generalization using the improved DMP. Figure 3 It can be seen that the proposed motion trajectory skill learning algorithm can extract motion features from multiple teaching trajectories and accurately generalize to new target point positions while maintaining the original trajectory features.
[0039] The comparison of regression trajectories obtained by the proposed method and the GMM-GMR and GMM-GMR-noise methods is shown in Figure 2. Figure 4 The root mean square errors of the regression trajectory and teaching trajectory obtained by the three methods are shown in Table 1. Figure 4 As can be seen from Table 1, the regression trajectory obtained by the method disclosed in the present invention has a significantly better smoothness than the method based on GMM-GMR while ensuring a smaller root mean square error.
[0040] From the above analysis, it can be seen that since the present invention can combine the LSTM network's feature modeling and regression of multiple motion trajectories with the improved dynamic motion primitives' generalization ability for multi-dimensional motion trajectories, it is possible to regress and generalize the trajectories while maintaining the original motion trajectory characteristics, thereby improving the effect of motion trajectory skill learning.
[0041] Table 1. Comparison of the root mean square error between the regression trajectory and the teaching trajectory
[0042] method The present method GMM-GMR regression GMM-GMR-Noise Regression RMSE(mm) 1.5687 1.8476 3.9397
Claims
1. A collaborative robot motion trajectory skill learning method, characterized by: First, multiple teaching trajectories are time-aligned; then, the multiple teaching trajectories are modeled and regressed using the long short-term memory network; finally, the trajectories are generalized in space by combining the improved dynamic motion primitive algorithm, which specifically includes the following steps: Step 1: trajectory data acquisition: obtaining the teaching motion trajectory by dragging the collaborative robot for teaching or other methods, wherein the teaching motion trajectory includes the time series information of the trajectory, including position, speed, and acceleration; Step 2: Preprocessing of teaching data: For the teaching motion trajectory obtained in step 1, the dynamic time warping algorithm is used to time-align the teaching motion trajectory so that the motion forms of different teaching trajectories are kept consistent to the greatest extent; then the time series characteristics of the trajectory are normalized to meet the input requirements of the long short-term memory network model of the neural network; Step 3: Use the long short-term memory network model to model the motion trajectory based on the time series characteristics: take the time variable as input, and learn the time series characteristics of the trajectory through the long short-term memory network model. Specifically, first use the time series processed by step 2 as the input of the long short-term memory network model, and the corresponding spatial coordinates as the output for training; after the training is completed, use the time variable as the model input, and obtain the regression trajectory of multiple teaching trajectories according to a specific optimization criterion; Step 4: Generalize the motion trajectory using the improved dynamic motion primitive algorithm: Use the improved dynamic motion primitive to generalize the regression trajectory obtained in step 3. The calculation formula of the improved dynamic motion primitive is: In formula (1), x represents the system motion state, and They represent the first-order derivative and the second-order derivative of x respectively; g represents the target state where the system motion finally converges; α y and β y is a constant; τ is the convergence speed of the regression trajectory, x0 is the initial value of the system motion state; s is a time-independent variable and satisfies the regular system shown in formula (2); f is a nonlinear function, as shown in formula (3); In formula (2), s∈(0,1], a is a positive number; In the formula, Ψ i is the Gaussian basis function, ω i is the weight of each Gaussian basis function, N is a positive integer, which is the total number of basis functions; any complex motion trajectory in space can be obtained by weighting different basis functions and weight combinations.