Teaching motion track variable stiffness learning method, electronic equipment and storage medium

By demonstrating the rigidity learning method of teaching movement trajectory, combined with the time of time, data coding and variable rigidity control, the problem of insufficient safety and adaptability in the non -structured environment in non -structured environments, and realizing the robot's in a complex environment. High -efficiency and flexible exercise reproduction and generalization.

CN119369418AActive Publication Date: 2025-01-28启元实验室

Patent Information

Application Number
CN202411946189.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-01-28
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The existing robotic arm teaching learning methods face the problems of insufficient safety, adaptability and generalization capabilities in unstructured environments, and it is difficult to accurately reproduce the movement tasks in the new environment and adapt to external interference.

Method used

Proposal a method of transforming the trajectory of teaching movement, through time -to -time, data coding, data reconstruction and security constraint optimization, combined with variable rigidity control, regulate the reappearance of teaching movement trajectory, improve the movement of robotics in the complex environment, Safety and adaptability.

Benefits of technology

The robotic reappearance of the teaching movement is safe, flexible, and efficient in the unstructured environment, improved the resistance and generalization capacity of external interference, and enhanced the intelligent control capabilities of robots in a complex environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119369418A_ABST
    Figure CN119369418A_ABST
Patent Text Reader

Abstract

The invention provides a teaching motion track variable stiffness learning method, electronic equipment and a storage medium, and relates to the technical field of robot teaching learning. The teaching motion track variable stiffness learning method comprises the following steps: carrying out time normalization processing on a teaching motion track; performing data coding on the teaching motion track after the time normalization processing is completed; obtaining mean value information and variance information of each dimension according to the coded teaching motion trail so as to perform data reconstruction on the teaching motion trail; performing security constraint optimization on the teaching motion track after data reconstruction to obtain a reproduced teaching motion track; and according to the mean value information and variance information of each dimension of the teaching motion track, the teaching motion track is reproduced by using variable stiffness adjustment. According to the teaching motion trail variable stiffness learning method, teaching learning, a probability model, gradient optimization and variable stiffness control are combined, teaching of the teaching motion trail under the task constraint condition can be met, and the safety of the robot in the process of reproducing the teaching motion trail is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of robot teaching and learning, and in particular to a teaching motion trajectory variable stiffness learning method, electronic equipment and storage medium. Background Art

[0002] The teaching learning algorithm is a flexible imitation learning mechanism that allows non-expert users to teach the robot motion skills in a user-friendly way and reduce the robot's motion search space. If the robot has learned the motion task in the task space and obtained the motion skills through generalization learning, the robot can reproduce the motion task in different new environments and at different locations. The key to teaching learning is to obtain a generalized representation of the motion task from several demonstrations, so that the robot can reproduce the learned motion task, and the robot is no longer limited to following the pre-set teaching trajectory, but also needs to be able to handle a variety of external interferences and constraints to use the learned motion skills in new environments and situations.

[0003] The current teaching and learning methods face many challenges in unstructured environments, and robots need higher safety and flexibility. The current teaching and learning methods for robotic arms mainly have the following problems: (1) Safety issues: When executing tasks, the robot’s motion needs to meet strict safety constraints. Existing technologies cannot ensure the safety of motion while effectively meeting the task constraints when handling such tasks.

[0004] (2) Poor adaptability: When dealing with tasks in unstructured environments, existing technologies often lack sufficient adaptability and flexibility when faced with external interference or new environments. Robots may not be able to accurately reproduce learned movements or respond appropriately when encountering unforeseen situations, making it difficult to adapt to the diversity and variability of tasks.

[0005] (3) Limited generalization ability: Although methods such as imitation learning can handle complex tasks to a certain extent, their generalization ability is still limited. When a robot reproduces learned movements in a new environment, it may not be able to handle newly emerging constraints and interference well.

[0006] In order to overcome the shortcomings of existing technologies, researchers are exploring new teaching and learning methods to improve the safety, adaptability, generalization ability and teaching efficiency of robots. Although the existing teaching and learning methods for manipulators have made significant progress in some aspects, there are still many challenges in unstructured environments, especially in tasks with high requirements for safety and flexibility. Therefore, developing new teaching and learning methods to overcome the shortcomings of existing technologies and improve the intelligent control capabilities of robots in complex environments is an important development direction in this field. Summary of the invention

[0007] In order to solve at least one of the above problems, the present application proposes a variable stiffness learning method for teaching motion trajectory, an electronic device and a storage medium.

[0008] According to the first aspect of the present application, at least one embodiment of the present application provides a variable stiffness learning method for a teaching motion trajectory, comprising: performing time normalization processing on the teaching motion trajectory; performing data encoding on the teaching motion trajectory after the time normalization processing; obtaining mean information and variance information of each dimension of the teaching motion trajectory according to the data-encoded teaching motion trajectory to perform data reconstruction on the teaching motion trajectory; performing safety constraint optimization on the teaching motion trajectory after data reconstruction to obtain a reproduced teaching motion trajectory; and adjusting the reproduced teaching motion trajectory using variable stiffness according to the mean information and variance information of each dimension of the teaching motion trajectory.

[0009] For example, in some embodiments of the present application, the step of performing time normalization processing on the teaching motion trajectory includes: selecting one of the teaching motion trajectories as a reference template trajectory; calculating the cumulative distance from each of the teaching motion trajectories other than the reference template trajectory in the teaching motion trajectory to the reference template trajectory; selecting the teaching motion trajectory with the smallest cumulative distance as the standard template trajectory; matching the other teaching motion trajectories in the teaching motion trajectory except the standard template trajectory with the standard template trajectory to align each teaching motion trajectory.

[0010] For example, in some embodiments of the present application, the step of calculating the cumulative distance from each teaching motion trajectory in the teaching motion trajectory other than the reference template trajectory to the reference template trajectory includes: constructing a distance matrix D (m, n) between each teaching motion trajectory Qj and the reference template trajectory Pi, wherein each element on the distance matrix D (m, n) is the Euclidean distance between the selected teaching motion trajectory Qj and each element in the reference template trajectory Pi, m is an integer less than or equal to i and greater than or equal to 1, n is an integer less than or equal to j and greater than or equal to 1, i and j represent the number of elements in the reference template trajectory Pi and the teaching motion trajectory Qj, respectively; taking D (1, 1) as the starting point and D (i, j) as the ending point, determining the element with the smallest value in the distance matrix D according to the set direction, and accumulating them to obtain the cumulative distance from each teaching motion trajectory to the reference template trajectory, wherein the set direction is downward, rightward, and lower-rightward.

[0011] For example, in some embodiments of the present application, the step of data encoding the teaching motion trajectory after the completion time normalization processing includes: using a Gaussian mixture model to construct a model for the teaching motion trajectory, including: using a k-means clustering algorithm on the data set of the teaching motion trajectory to obtain clustering information; obtaining a priori probability, a mean vector and a covariance matrix in the Gaussian mixture model according to the clustering information; determining a first conditional value according to the prior probability, the mean vector and the covariance matrix; when the first conditional value is a minimum value, determining the number of Gaussian components corresponding to the first conditional value as the optimal number of Gaussian components of the model; Determining the model parameters in the constructed model includes: calculating the probability of the Gaussian component corresponding to the data set and calculating the expected value according to Bayes' theorem; adjusting the model parameters in the Gaussian mixture model according to the probability of the Gaussian component and the expected value, so as to maximize the prior probability, the mean vector and the covariance matrix, thereby performing data encoding on the teaching motion trajectory.

[0012] For example, in some embodiments of the present application, the step of obtaining the mean information and variance information of each dimension of the teaching motion trajectory according to the teaching motion trajectory after data encoding to reconstruct the data of the teaching motion trajectory includes: based on the Gaussian mixture regression algorithm, according to the maximized mean vector and the covariance matrix, calculating the conditional expectation and covariance matrix of each Gaussian component; mixing the conditional expectation and covariance matrix of each Gaussian component to obtain the reconstructed data points and covariance constraints in the teaching motion trajectory; according to the reconstructed data points and the covariance constraints, obtaining the mean information and variance information of all dimensions in the task space that change with time.

[0013] For example, in some embodiments of the present application, the step of performing safety constraint optimization on the teaching motion trajectory after data reconstruction to obtain a reproduced teaching motion trajectory includes: determining the number of attractor points based on the optimal number of Gaussian components, and initializing the attractor point sequence as the time-varying mean information of all dimensions in the task space; optimizing the cost function based on the attractor point sequence, and optimizing the teaching motion trajectory after data reconstruction based on the cost function; and determining, when the attractor point sequence converges, that the current teaching motion trajectory is the reproduced teaching motion trajectory.

[0014] For example, in some embodiments of the present application, the step of using variable stiffness to adjust the reproduced teaching motion trajectory based on the mean information and variance information of each dimension of the teaching motion trajectory includes: constructing a controller based on the mean information; determining the adaptive stiffness matrix of the controller based on the variance information, so as to change the stiffness to adjust the reproduced teaching motion trajectory to achieve motion reproduction.

[0015] For example, in some embodiments of the present application, the step of constructing a controller according to the mean value information includes: The controller is constructed as follows:

[0016] in, is the acceleration of the trajectory point in the teaching motion trajectory, K is the number of Gaussian components, is the weight coefficient, is the position gain matrix, is the mean information, is the position of the trajectory point in the teaching motion trajectory, is the damping coefficient, is the velocity of the trajectory point in the teaching motion trajectory.

[0017] According to the second aspect of the present application, at least one embodiment of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors execute a method as described in any one of the first aspects.

[0018] According to a third aspect of the present application, at least one embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method as described in any one of the first aspects is implemented.

[0019] Through the above-mentioned example embodiments, the present application provides a variable stiffness learning method for a teaching motion trajectory. By combining teaching learning, probability models, gradient optimization and variable stiffness control, the teaching of the teaching motion trajectory under the task constraints is met through the optimization of safety constraints, thereby ensuring the motion safety of the robot in the process of reproducing the teaching motion trajectory; utilizing the mean information and variance information in the teaching motion trajectory to extract the key features of the teaching motion trajectory, and through variable stiffness control, enabling the robot to adapt to a variety of external interferences and constraints, thereby improving the ability to handle unpredictable events; utilizing probability models and gradient optimization, enabling the robot to reproduce motion tasks in different new environments based on the learned motion skills, thereby improving the robot's generalization ability; realizing the robot's ability to safely, flexibly and efficiently perform energetic component assembly tasks in unstructured environments, thereby improving the robot's generalization ability and adaptability, and enhancing the robot's resistance to external interference through variable stiffness control. The present application has broad application prospects and practical application value.

[0020] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] By describing in detail exemplary embodiments thereof with reference to the accompanying drawings, the above and other objects, features and advantages of the present application will become more apparent. The accompanying drawings described below are only some embodiments of the present application, and are not intended to limit the present application.

[0022] Figure 1 A flow chart showing a variable stiffness learning method for teaching motion trajectory according to an exemplary embodiment is shown; Figure 2 A schematic diagram showing an exemplary embodiment of finding an optimal cumulative distance through a dynamic time warping algorithm; Figure 3 A schematic diagram showing the relationship between weight matrix elements and variance information of an exemplary embodiment; Figure 4 A schematic diagram showing data encoding of a spatial trajectory when the Gaussian component is 6 according to an exemplary embodiment; Figure 5 A schematic diagram of safety constraint optimization of a two-dimensional trajectory of a reproducible teaching motion trajectory of an exemplary embodiment is shown; Figure 6 A structural diagram of an electronic device provided by the present application is shown. DETAILED DESCRIPTION

[0023] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0024] The described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of these specific details, or other modes, components, materials, devices, etc. may be adopted. In these cases, known structures, methods, devices, implementations, materials or operations will not be shown or described in detail.

[0025] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0026] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0027] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.

[0028] Figure 1 A flow chart of a variable stiffness learning method for teaching motion trajectories according to an exemplary embodiment is shown.

[0029] like Figure 1 As shown, the variable stiffness learning method for teaching motion trajectory includes: steps S101-S105.

[0030] In step S101, time normalization processing is performed on the teaching motion trajectory.

[0031] In step S102, data encoding is performed on the teaching motion trajectory after the time normalization processing is completed.

[0032] In step S103, according to the data-encoded teaching motion trajectory, mean information and variance information of each dimension of the teaching motion trajectory are obtained to reconstruct data of the teaching motion trajectory.

[0033] In step S104, safety constraint optimization is performed on the teaching motion trajectory after data reconstruction to obtain a reproduced teaching motion trajectory.

[0034] In step S105 , the teaching motion trajectory is reproduced using variable stiffness adjustment according to the mean information and variance information of each dimension of the teaching motion trajectory.

[0035] According to the example embodiment, after obtaining the teaching data of the demonstration example, after projecting the observed data into the task space, further preprocessing operations are required, because when performing the same motion task during the teaching process, the time length of each teaching motion trajectory cannot be guaranteed to be exactly the same, and nonlinear time distortion will always occur between demonstrations, resulting in inconsistent time series of multiple teaching motion trajectories. Therefore, in order to use the probability model to extract meaningful variances in the teaching motion trajectory, it is necessary to perform time normalization processing on the teaching motion trajectory, perform dynamic time warping preprocessing on multiple teaching motion trajectories, eliminate the nonlinear time distortion of multiple teaching motion trajectories, and achieve normalized alignment of multiple teaching motion trajectories.

[0036] Step S101 performs time normalization processing on the teaching motion trajectory, including steps S1011-S1014: Step S1011, selecting a trajectory in the teaching motion trajectory as a reference template trajectory.

[0037] Collect multiple demonstration motion trajectories, which include motion trajectories of the robot when performing motion tasks, and select one trajectory as a reference template trajectory. The robot includes a mechanical arm, but this application only takes this as an example and is not limited to this.

[0038] Step S1012, calculating the cumulative distance from each teaching motion trajectory in the teaching motion trajectory except the reference template trajectory to the reference template trajectory.

[0039] Perform dynamic time warping (DTW) preprocessing on the teaching motion trajectory: construct a distance matrix D (m, n) between each teaching motion trajectory Qj and the reference template trajectory Pi, where each element on the distance matrix D (m, n) is the Euclidean distance between the selected teaching motion trajectory Qj and each element in the reference template trajectory Pi. m is an integer less than or equal to i and greater than or equal to 1. n is an integer less than or equal to j and greater than or equal to 1. i and j represent the number of elements in the reference template trajectory Pi and the teaching motion trajectory Qj, respectively.

[0040] According to some embodiments, the Euclidean distance between elements is calculated according to the following formula:

[0041] in, is the Euclidean distance between elements, is the element in the reference template trajectory, is the element in the selected teaching motion trajectory.

[0042] With D(1,1) as the starting point and D(i,j) as the end point, the smallest element in the distance matrix D is determined according to the set direction, and accumulated to obtain the cumulative distance from each teaching motion trajectory to the reference template trajectory. The set directions are downward, rightward, and rightward and downward.

[0043] like Figure 2 As shown, taking the reference template trajectory Pi as {1, 0, 2, 3, 1} and the selected teaching motion trajectory as {2, 1, 2, 3, 1} as an example, taking D (1, 1) as the starting point, setting the direction to downward, right and lower right, the cumulative distance from the teaching motion trajectory to the reference template trajectory is 2.

[0044] Step S1013, selecting the teaching motion trajectory with the smallest cumulative distance as the standard template trajectory.

[0045] After obtaining the cumulative distance from each teaching motion trajectory to the reference template trajectory, the teaching motion trajectory with the smallest cumulative distance is selected as the standard template trajectory.

[0046] Step S1014, matching the other teaching motion trajectories in the teaching motion trajectory except the standard template trajectory with the standard template trajectory to align each teaching motion trajectory.

[0047] After obtaining the teaching motion trajectory and performing dynamic time warping preprocessing, multiple Gaussian mixture models (GMM) are used to model the teaching motion trajectory, extract the correlation characteristics between multiple teaching motion trajectories, obtain the probability density function of the teaching motion trajectory, and use the probability model to perform data encoding and characterization of the motion teaching trajectory. Step S102 performs data encoding on the teaching motion trajectory after the time normalization processing is completed, including: Step S1021, using a Gaussian mixture model to construct a model for the teaching motion trajectory.

[0048] Use Gaussian mixture model to obtain each teaching motion trajectory The probability density function of . represents the time variable of the teaching motion trajectory, The spatial trajectory variable represents the teaching motion trajectory. Therefore, the teaching motion trajectory data sample The dimension D is equal to the dimension of the task space plus a time dimension. Teaching motion trajectory data sample belongs to dataset X.

[0049] Based on the Bayesian information criterion, the complexity and fitting performance of the model are weighed, and the k-means clustering algorithm is used on the data set X in the teaching motion trajectory to obtain clustering information.

[0050] Initialize all components of the Gaussian mixture model according to the clustering information, including: prior probability, mean vector and covariance matrix in the Gaussian mixture model.

[0051] The first conditional value BIC is determined based on the prior probability, the mean vector and the covariance matrix.

[0052]

[0053]

[0054]

[0055] Where N is the number of elements of all teaching motion trajectories, N data samples The log-likelihood function of , P is the number of free parameters of the model, is the prior probability in the Gaussian mixture model, is the probability of each Gaussian component k of the data set X.

[0056] According to some embodiments, the number K of Gaussian components will affect the fitting accuracy of the observed data. Too few Gaussian components will result in the inability to fully fit the teaching data; too many Gaussian components will not only increase the complexity of the model, but also cause overfitting, resulting in reduced generalization ability. In order to estimate the optimal number K of Gaussian components, the Bayesian information criterion can be used to weigh the complexity and fitting performance of the model. By gradually increasing the number of Gaussian components, training the Gaussian mixture model, and calculating the BIC value each time, the minimum value of the BIC value corresponds to the estimated optimal number of Gaussian components.

[0057] The Gaussian mixture model is trained by gradually increasing the number of Gaussian components K, and the first conditional value BIC is calculated each time. When the first conditional value BIC is the minimum value, the number of Gaussian components corresponding to the first conditional value BIC is determined as the optimal number of Gaussian components K of the model.

[0058] Step S1022, determining the model parameters in the constructed model.

[0059] After obtaining the optimal number of Gaussian components K, the k-means clustering algorithm of the data set X is used to initialize each Gaussian component. Then, the Gaussian mixture model is trained using the expectation maximization algorithm. During the optimization process, the goal is to maximize the log-likelihood function of the probability density function of the teaching motion data represented by the Gaussian mixture model. To this end, the following two steps are repeated until the log-likelihood function The change in value is below a certain threshold: Step 1: According to Bayes' theorem, calculate the probability of the Gaussian component corresponding to the data set X and calculate the expected value.

[0060]

[0061]

[0062] in, is the probability of the Gaussian component corresponding to the data set X, is the expected value, The mean vector of the Gaussian distribution is , the covariance matrix is , is the prior probability of Gaussian component j in the Gaussian mixture model, that is, the weight coefficient of the Gaussian component, is the conditional probability density function of the jth Gaussian component, which obeys the Gaussian distribution , whose mean vector is , the covariance matrix is .

[0063] Step 2: According to the probability and expected value of the Gaussian components, adjust the model parameters in the Gaussian mixture model, including the prior probability, mean vector and covariance matrix.

[0064]

[0065]

[0066]

[0067] in, is the mean vector, is the covariance matrix.

[0068] Repeat the above two steps until the log-likelihood function The change value of is lower than a certain set threshold, which maximizes the prior probability, mean vector and covariance matrix, thereby encoding the teaching motion trajectory.

[0069] According to some embodiments, since the k-means clustering algorithm is used for initialization and the optimal number of Gaussian components is estimated, the speed at which the expectation maximization algorithm converges to the local minimum is relatively fast. At this time, the teaching motion trajectory represented in the form of a Gaussian mixture model can not only encode the teaching motion trajectory with the mean, but also obtain the variance information of the teaching motion trajectory.

[0070] The teaching data is generalized by the Gaussian Mixture Regression (GMR) algorithm to characterize the characteristics of the teaching trajectory. The mean and variance information of each dimension of the teaching trajectory in the task space under a given time step is calculated. The teaching trajectory is reconstructed and a continuous trajectory output (reproduced trajectory) is obtained after generalization processing, such as Figure 4As shown, Figure 4 Schematic diagram of data encoding of spatial trajectory when the number of Gaussian components is 6, wherein GMM1, GMM2, GMM3, GMM4, GMM5, and GMM6 are 6 Gaussian components. Step S103 obtains mean information and variance information of each dimension of the teaching motion trajectory according to the data-encoded teaching motion trajectory to reconstruct the teaching motion trajectory, including: In step S1031, based on the Gaussian mixture regression algorithm, the conditional expectation and covariance matrix of each Gaussian component are calculated according to the maximized mean vector and covariance matrix.

[0071] The basis of the Gaussian mixture regression algorithm is the Gaussian regulation theorem and the linear combination of Gaussian probability distribution. In order to learn to reproduce the motion task, a time series of the task space trajectory is required. Therefore, time can be used as input and the space trajectory as output. Under this assumption, the mean vector and covariance matrix of the Gaussian component can be divided into two parts, time and space:

[0072] Among them, the superscript t represents time, and the superscript c represents a spatial point.

[0073] If a given time input , then according to the Gaussian adjustment theorem, the conditional expectation can be calculated for each Gaussian component k and the estimated covariance matrix :

[0074]

[0075] In step S1032, the conditional expectation and covariance matrix of each Gaussian component are mixed to obtain the reconstructed data points and covariance constraints in the teaching motion trajectory.

[0076] Consider the entire GMM, according to the time input The reconstructed data points and covariance constraints can be calculated by mixing the Gaussian components.

[0077]

[0078]

[0079] in, To reconstruct the data points, is the covariance constraint, Gaussian component k proportion.

[0080]

[0081] in, is the prior probability of Gaussian component i, is the conditional probability density function of the i-th Gaussian component, which obeys the Gaussian distribution , whose mean vector is , the covariance matrix is . is the conditional probability density function of the kth Gaussian component, which obeys the Gaussian distribution , whose mean vector is , the covariance matrix is .

[0082] In step S1033, continuous evaluation is performed based on the reconstructed data points and covariance constraints to obtain the time-varying mean and variance information of all dimensions in the task space, so as to reconstruct the teaching motion trajectory.

[0083] According to some embodiments, mean information refers to a learned smooth motion trajectory, and variance information refers to the trajectory differences between multiple demonstration examples.

[0084] The present application also provides a gradient-based trajectory optimization method, which dynamically describes the task space trajectory based on attractors, optimizes the cost function by finding the optimal sequence of attractors, obtains the optimal reproducing teaching motion trajectory, and optimizes the generalized motion trajectory to meet the constraints in the task, such as avoiding collisions. Step S104 performs safety constraint optimization on the teaching motion trajectory after data reconstruction, and obtains the reproducing teaching motion trajectory including: Step S1041, determining the number of attractor points according to the number of optimal Gaussian components, and initializing the attractor point sequence to the mean information of all dimensions in the task space that varies with time.

[0085] Attractor points are defined in the task space of learning motion. The number of attractor points is determined according to the number of Gaussian components of the Gaussian mixture model, and then initialized to the time-varying mean information of all dimensions in the task space.

[0086] A similarity criterion is designed for the entire motion task. This similarity criterion is used to evaluate the similarity between the teaching motion and the reproduced motion, and a cost function related to the trajectory information is used as an evaluation criterion to evaluate the collision or proximity between the entire trajectory and the collidable object.

[0087] Step S1042, optimizing the cost function according to the attractor point sequence, and optimizing the teaching motion trajectory after data reconstruction according to the cost function.

[0088] Attractors are used to dynamically describe the task space trajectory. The cost function is optimized by finding the optimal sequence of attractors. The teaching motion trajectory after data reconstruction is optimized according to the cost function to obtain the optimal reproduction teaching motion trajectory.

[0089] Define a cost function for the similarity criterion, which is used to evaluate the similarity between the taught motion and the reproduced motion, and use a cost function related to the trajectory information as the evaluation criterion to determine the deviation between the task space state and the learned state mean, and perform adaptive weighting based on the variance information.

[0090] In order to make the teaching motion and the reproduced motion similar, the cost function of the similarity criterion is defined as:

[0091] in, is the state of the task space at time t. This cost function is used to determine the deviation between the task space state and the learned state mean. is the time-dependent diagonal matrix of weights, Elements Calculated based on variance information:

[0092] in, is the covariance constraint at time t The i-th diagonal element of for The maximum value constant of the diagonal elements, is the maximum value constant of the weight, indicating the maximum proportion of the collision cost of a single spatial dimension, which is used to map the variance and weight factor. Figure 3 As shown in Figure 1, it is the relationship between the elements of the weight diagonal matrix and the variance information. The larger the variance, the smaller the weight.

[0093] Step S1043, when the attractor point sequence converges, determining the current teaching motion trajectory as the reproduction teaching motion trajectory.

[0094] The recurrence trajectory is optimized according to the gradient information of the similarity criterion cost function, the cost and gradient of the attractor point position are iteratively calculated, and the position of the attractor point is updated until convergence.

[0095]

[0096] In order to make the teaching motion and the reproduced motion similar, a cost function of the similarity criterion is defined; then the reproduced trajectory is optimized based on the gradient information of the similarity criterion cost function. According to the similarity criterion, the variance information is directly included in the optimization process, and all dimensions and time of the task space can be continuously covered. The robot can deviate from the mean trajectory in unimportant parts of the motion to minimize the cost function and thus meet the constraints of the task.

[0097] Figure 5 The figure shows the schematic diagram of the safety constraint optimization of the reproducing teaching motion trajectory of the two-dimensional trajectory. According to the different collision cost weights Col, the reproducing teaching motion trajectory has different degrees of variability. As the collision cost weight Col increases, the difference between the reproducing teaching motion trajectory and the teaching motion trajectory becomes larger and larger, but this difference is limited to the part with large variance: in the motion part with large trajectory variance GMR, the robot can significantly deviate from the generalized trajectory to avoid collision; on the contrary, in the motion part with small trajectory variance, this part of the motion has higher consistency and is only allowed to deviate slightly from the generalized trajectory. In this way, in the process of trajectory optimization, the variance information can be used to separate the non-critical motion parts, and the motion tasks can be performed in a more dynamic way to meet the task constraints such as collision avoidance.

[0098] Based on the mean information and variance information of the teaching motion trajectory, variable stiffness control is used to achieve motion reproduction. The mean information of the teaching motion trajectory is used as the smooth motion trajectory for learning, and the variance information of the teaching motion trajectory is used to indicate the importance of the moving part, and is used to adjust the impedance characteristics in the motion trajectory. While reproducing the teaching motion trajectory, the robot can still maintain active and compliant control capabilities to the outside world to resist unknown disturbances during the motion process. Step S105 uses variable stiffness adjustment to reproduce the teaching motion trajectory according to the mean information and variance information of each dimension of the teaching motion trajectory, including: Step S1051, constructing a controller according to the mean information.

[0099] In the process of reproducing the taught motion trajectory, the expected motion trajectory in Cartesian space can be completely tracked and controlled by the expected force F at the end of the robot arm, so that the robot arm maintains active and compliant control capabilities and can safely deal with unknown interference or errors. Define the expected force F, according to the set expected acceleration command of the robot arm And the virtual mass M of the robotic arm is generated.

[0100]

[0101] Among them, the trajectory point in the teaching motion trajectory The spatial trajectory variables in The position of the end of the robot arm in Cartesian space ,speed and acceleration composition.

[0102] The controller is formed by mixing K linear proportional differential systems to ensure the tracking of the spatial position point and the desired velocity trajectory:

[0103] in, is the acceleration of the trajectory point in the teaching motion trajectory, K is the number of Gaussian components, is the weight coefficient, corresponding to the i The proportionality coefficient of the Gaussian components, is the position gain matrix, that is, the variable stiffness matrix related to the variance information of the teaching motion trajectory, is the mean information, is the position of the trajectory point in the teaching motion trajectory, is the damping coefficient, is the velocity of the trajectory point in the teaching motion trajectory.

[0104] The first term in the above linear proportional differential system is used to ensure the tracking of the spatial position point. When the robot arm is disturbed and deviates from the desired position, it will force the robot arm back to the desired position like a spring. The second term is used to ensure the tracking of the desired velocity trajectory and adjust the tracking speed through the velocity gain.

[0105] Since the weights decay gradually, the system will converge to the position attractor in Cartesian space one by one. The center of the attractor is reconstructed by the teaching trajectory to obtain the mean information of the data point. The motion parts that vary greatly between demonstration examples indicate that the reference trajectory does not need to be tracked accurately, that is, in this case, the stiffness used for position tracking is small, and the controller can better handle other constraints in the task, such as avoiding obstacles; on the other hand, the motion parts that show strong invariance in the demonstration examples need to be tracked accurately, that is, in this case, the stiffness used for position tracking is large. Therefore, the mean information of the attractor center and the variable stiffness matrix They are all learned through observation data of teaching motion trajectories.

[0106] In order to make this motion model reproduce motion at a speed similar to the taught trajectory, define the damping coefficient for:

[0107] in, To control the time cycle interval.

[0108] Step S1052, determining the adaptive stiffness matrix of the controller according to the variance information, so as to change the stiffness to adjust the reproduced teaching motion trajectory and realize motion reproduction.

[0109] In Cartesian space, the attractor point sequence to be reached by the system has been given by the Gaussian mixture regression algorithm in step S103, wherein each attractor contains relevant information such as the center and variance information of the attractor.

[0110] In order to make the system have sufficient attraction to the taught motion trajectory when starting from a new situation that has not been demonstrated, and to enable the system to effectively suppress disturbances, the position gain matrix It should not be too large to avoid the system stopping when returning to the trajectory instead of following the remaining motion. Therefore, the position gain matrix Set as an adaptive gain matrix, the gain will increase rapidly when the system leaves the teaching area and will be zero when the system approaches the teaching trajectory.

[0111] Using variance information, the position gain matrix of the controller is designed through eigencomponent decomposition , making the stiffness proportional to the inverse of the trajectory covariance.

[0112]

[0113] in, and is the inverse covariance matrix The eigenvalues ​​and eigenvectors of Proportional to the inverse of the trajectory covariance. is the scaling matrix. is the minimum value of stiffness, is the maximum value of stiffness. is the minimum eigenvalue, is the maximum eigenvalue.

[0114] If a portion of the motion in the teaching trajectory is observed to have a large variance, this portion of the motion trajectory does not need to be tracked accurately, and the motion stiffness of the robot arm will be reduced. Initial range of eigenvalues is determined by the variability in motion, but in practice, the stiffness needs to be limited to a certain range according to the actual situation. In the above formula, according to the initial range of the eigenvalue, Scale and set the stiffness to within the range.

[0115] The present application provides a variable stiffness learning method for teaching motion trajectory, which combines teaching learning, probability model, gradient optimization and variable stiffness control, and optimizes safety constraints to meet the teaching of teaching motion trajectory under task constraints, ensuring the motion safety of the robot in the process of reproducing the teaching motion trajectory; using the mean information and variance information in the teaching motion trajectory, extracting the key features of the teaching motion trajectory, and through variable stiffness control, enabling the robot to adapt to a variety of external interferences and constraints, and improve the ability to handle unpredictable events; using probability models and gradient optimization, the robot can reproduce motion tasks in different new environments according to the learned motion skills, improving the robot's generalization ability; realizing the robot's ability to safely, flexibly and efficiently perform energetic component assembly tasks in unstructured environments. Improve the robot's generalization ability and adaptability, and enhance the robot's resistance to external interference through variable stiffness control, which has broad application prospects and practical application value.

[0116] Figure 6 A structural diagram of an electronic device provided by the present application is shown.

[0117] See also Figure 6 , Figure 6 An electronic device is provided, comprising a processor and a memory. The memory stores computer instructions. When the computer instructions are executed by the processor, the processor executes the computer instructions to achieve the following Figure 1 The method and refinement scheme shown.

[0118] It should be understood that the above-mentioned device embodiments are only illustrative, and the device disclosed in the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0119] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0120] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the processor or chip may be any appropriate hardware processor, such as CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the on-chip cache, off-chip memory, and storage may be any appropriate magnetic storage medium or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random-Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.

[0121] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present disclosure. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0122] The present application also provides a non-transitory computer storage medium storing a computer program. When the computer program is executed by multiple processors, the processors execute the following Figure 1 The method and refinement scheme shown.

[0123] It should be clearly understood that the present application describes how to form and use specific examples, but the present application is not limited to any details of these examples. On the contrary, based on the teaching of the content disclosed in the present application, these principles can be applied to many other embodiments.

[0124] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0125] The exemplary embodiments of the present application are specifically shown and described above. It should be understood that the present application is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present application is intended to cover various modifications and equivalent configurations included in the ideas and scope of the appended claims.

Claims

1. A variable stiffness learning method for teaching motion trajectory, characterized in that: include: Performing time normalization processing on the teaching motion trajectory; Data encoding is performed on the teaching motion trajectory after the completion time normalization processing; According to the teaching motion trajectory after data encoding, the mean information and variance information of each dimension of the teaching motion trajectory are obtained to reconstruct the data of the teaching motion trajectory; Perform safety constraint optimization on the teaching motion trajectory after data reconstruction to obtain the reproducible teaching motion trajectory; According to the mean information and variance information of each dimension of the teaching motion trajectory, the reproducing teaching motion trajectory is adjusted using variable stiffness.

2. The variable stiffness learning method for teaching motion trajectory according to claim 1, characterized in that: The step of performing time normalization processing on the teaching motion trajectory includes: Selecting one of the teaching motion trajectories as a reference template trajectory; Calculating the cumulative distance from each teaching motion trajectory in the teaching motion trajectory other than the reference template trajectory to the reference template trajectory; Select the teaching motion trajectory with the smallest cumulative distance as the standard template trajectory; The other teaching motion trajectories in the teaching motion trajectory except the standard template trajectory are matched with the standard template trajectory to align each teaching motion trajectory.

3. The variable stiffness learning method for teaching motion trajectory according to claim 2, characterized in that: The step of calculating the cumulative distance from each of the teaching motion trajectories other than the reference template trajectory in the teaching motion trajectory to the reference template trajectory comprises: Construct a distance matrix D (m, n) between each teaching motion trajectory Qj and the reference template trajectory Pi, wherein each element on the distance matrix D (m, n) is the Euclidean distance between each element in the selected teaching motion trajectory Qj and the reference template trajectory Pi, m is an integer less than or equal to i and greater than or equal to 1, n is an integer less than or equal to j and greater than or equal to 1, i and j represent the number of elements in the reference template trajectory Pi and the teaching motion trajectory Qj, respectively; Taking D(1,1) as the starting point and D(i,j) as the ending point, the element with the smallest value in the distance matrix D is determined according to the set direction, and the accumulated distance is accumulated to obtain the cumulative distance from each teaching motion trajectory to the reference template trajectory, wherein the set direction is downward, rightward, and lower-rightward.

4. The variable stiffness learning method for teaching motion trajectory according to claim 1, characterized in that: The step of performing data encoding on the teaching motion trajectory after the completion time normalization process comprises: A Gaussian mixture model is used to construct a model for the teaching motion trajectory, including: Using a k-means clustering algorithm on the data set of the teaching motion trajectory to obtain clustering information; Acquire a priori probability, mean vector and covariance matrix in the Gaussian mixture model according to the clustering information; Determine a first conditional value according to the prior probability, the mean vector and the covariance matrix; When the first condition value is a minimum value, determining the number of Gaussian components corresponding to the first condition value as the optimal number of Gaussian components of the model; Determine the model parameters in the constructed model, including: According to Bayes' theorem, the probability of the Gaussian component corresponding to the data set is calculated, and the expected value is calculated; According to the probability of the Gaussian component and the expected value, the model parameters in the Gaussian mixture model are adjusted to maximize the prior probability, the mean vector and the covariance matrix, thereby performing data encoding on the teaching motion trajectory.

5. The variable stiffness learning method for teaching motion trajectory according to claim 4, characterized in that: The step of obtaining mean information and variance information of each dimension of the teaching motion trajectory according to the data-encoded teaching motion trajectory to reconstruct data of the teaching motion trajectory includes: Based on the Gaussian mixture regression algorithm, the conditional expectation and covariance matrix of each Gaussian component are calculated according to the maximized mean vector and the covariance matrix; Mixing the conditional expectation and covariance matrix of each Gaussian component to obtain reconstructed data points and covariance constraints in the teaching motion trajectory; According to the reconstructed data points and the covariance constraints, the mean information and variance information of all dimensions in the task space that vary with time are obtained.

6. The variable stiffness learning method for teaching motion trajectory according to claim 5, characterized in that: The step of performing safety constraint optimization on the teaching motion trajectory after data reconstruction to obtain a reproducing teaching motion trajectory includes: Determine the number of attractor points according to the number of optimal Gaussian components, and initialize the attractor point sequence to mean value information of all dimensions in the task space that varies with time; Optimizing a cost function according to the attractor point sequence, and optimizing the teaching motion trajectory after the data is reconstructed according to the cost function; When the attractor point sequence converges, the current teaching motion trajectory is determined to be the reproduced teaching motion trajectory.

7. The variable stiffness learning method for teaching motion trajectory according to claim 6, characterized in that: The step of adjusting the reproducing teaching motion trajectory using variable stiffness according to the mean information and variance information of each dimension of the teaching motion trajectory comprises: constructing a controller according to the mean information; According to the variance information, the adaptive stiffness matrix of the controller is determined to change the stiffness to adjust the reproduced teaching motion trajectory to achieve motion reproduction.

8. The variable stiffness learning method for teaching motion trajectory according to claim 7, characterized in that: The step of constructing a controller according to the mean value information comprises: The controller is constructed as follows: in, is the acceleration of the trajectory point in the teaching motion trajectory, K is the number of Gaussian components, is the weight coefficient, is the position gain matrix, is the mean information, is the position of the trajectory point in the teaching motion trajectory, is the damping coefficient, is the velocity of the trajectory point in the teaching motion trajectory.

9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Mechanical arm imitation learning method based on dynamic motion primitive and adaptive control

    CN113977580A

  • Control method of high-speed rail passenger station inspection robot mechanical arm operating system

    CN116533252A

  • Space manipulator skill autonomous learning and optimization method based on multilayer conditional probability motion primitives

    CN116922391A

  • Robot variable impedance control strategy learning and generalization method based on imitation learning

    CN117773907A

  • Robot autonomous learning and adaptive trajectory planning method oriented to man-machine cooperation

    CN119077728A

Cited By

  • Rich contact operation task-oriented robot skill learning and control method and device

    CN121018592A

  • Robot skill learning and control method and device for rich-contact operation task

    CN121018592B

  • Track coding method based on motion primitives

    CN121091854A

  • Robot valve machining method and system based on teaching learning skills

    CN122210613A