Mechanical arm track learning method, device and system and storage medium

By using Gaussian hybrid model and expectation maximization algorithm in robotic arm trajectory learning, the problem of inaccurate trajectory learning results in the prior art is solved, and more efficient trajectory learning and complex task execution are achieved.

CN119598235AInactive Publication Date: 2025-03-11BEIJING FORESTRY UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411617844.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing trajectory imitation learning methods are difficult to ensure the accuracy of the final trajectory learning results when processing high-dimensional data and complex trajectories.

Method used

Using a Gaussian hybrid model (GMM)-based robotic arm trajectory learning method, the expected trajectory of the robotic arm is generated by determining the optimal k value, initializing the GMM parameters, and training using the expected maximization algorithm.

Benefits of technology

It improves the accuracy of the robotic arm trajectory learning results, can process high-dimensional data and complex trajectories more effectively, and improves the execution efficiency of the robotic arm in complex tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598235A_ABST
    Figure CN119598235A_ABST
Patent Text Reader

Abstract

The invention discloses a mechanical arm track learning method, device and system and a storage medium, and the method comprises the steps: S1, obtaining an optimal k value according to the historical track data of a mechanical arm; step S2, according to the optimal k value, performing k-means clustering to obtain a GMM (Gaussian Mixture Model) initial parameter; s3, training a GMM initial parameter by using an expectation maximization algorithm; and S4, according to the trained GMM initial parameters, an expected track of the mechanical arm is generated, and the mechanical arm is made to complete a specific operation task. By adopting the technical scheme of the invention, the accuracy of the final trajectory learning result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of robotic arms, and in particular relates to a robotic arm trajectory learning method and device, system, and storage medium. Background Art

[0002] With the rapid development of robotics technology, robotic arms are increasingly used in industry, agriculture, medical care, services and other fields. How to enable robotic arms to autonomously learn and imitate the complex motion trajectories of humans is an important topic in robotics. By introducing trajectory imitation learning methods, robotic arms can learn complex motion patterns from human demonstrations and adjust and optimize them according to specific task requirements, which enables robotic arms to show higher adaptability in a changing environment and improves the execution efficiency of complex tasks. Therefore, in-depth research and development of trajectory imitation learning methods is not only of great significance to improving the intelligence level of robotic arms, but also provides technical support and guarantee for their wide application in various fields.

[0003] At present, trajectory imitation learning mainly relies on simple interpolation and polynomial fitting methods. Miyamoto et al. developed a robot learning system based on bidirectional theory, which successfully simulated and learned tennis serve and upswing using polynomial fitting methods. Billard et al. studied a bio-inspired architecture for robots to imitate and learn human arm movements, and proved that smooth trajectories can be effectively generated through simple interpolation and polynomial fitting methods. Although the above methods have achieved certain results, they have a greater impact on the final trajectory learning results when dealing with high-dimensional data and complex trajectories. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a robot arm trajectory learning method and device, system, and storage medium to improve the accuracy of the final trajectory learning result.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] A robot arm trajectory learning method, comprising:

[0007] Step S1, obtaining the optimal k value according to the historical trajectory data of the robot arm;

[0008] Step S2, obtaining the GMM initial parameters according to the optimal k value;

[0009] Step S3, using the expectation maximization algorithm to train the GMM initial parameters;

[0010] Step S4: Generate the expected trajectory of the robot arm according to the trained GMM initial parameters, so that the robot arm can complete the specific operation task.

[0011] Preferably, in step S2, the GMM initial parameters are obtained by using k-means clustering according to the optimal k value.

[0012] Preferably, in step S4, according to the trained GMM initial parameters, Gaussian mixture regression GMR is used to obtain the corresponding predicted trajectory of the robot arm movement according to the requirements of different trajectory planning tasks.

[0013] The present invention also provides a robot arm trajectory learning device, comprising:

[0014] A selection module is used to obtain the optimal k value based on the historical trajectory data of the robot arm;

[0015] A processing module, used for obtaining the initial parameters of GMM according to the optimal k value;

[0016] The training module is used to train the initial parameters of GMM using the expectation maximization algorithm;

[0017] The prediction module is used to generate the expected trajectory of the robot arm based on the trained GMM initial parameters, so that the robot arm can complete the specific operation task.

[0018] Preferably, the processing module obtains the initial parameters of the GMM by using k-means clustering according to the optimal k value.

[0019] Preferably, the prediction module obtains the corresponding predicted trajectory of the robot arm movement according to the requirements of different trajectory planning tasks through Gaussian mixture regression GMR based on the trained GMM initial parameters.

[0020] An embodiment of the present invention further provides a robot arm trajectory learning system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a robot arm trajectory learning method when executed by the processor.

[0021] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program executes the robot arm trajectory learning method when running.

[0022] The present invention implements a robot trajectory learning method based on a Gaussian mixture model, and uses a k value selection algorithm to determine the optimal number of Gaussian kernels, thereby improving the accuracy of the final trajectory learning result. In addition, in order to overcome the situation that the elbow method may not be able to determine the optimal k value when applied to a specific data set, the exponential function characteristics, correction terms and weight adjustment are used to improve the accuracy of selecting the optimal k value. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0024] Figure 1 This is a flow chart of a robot arm trajectory learning method according to an embodiment of the present invention;

[0025] Figure 2 It is the line graph of the elbow method;

[0026] Figure 3 This is a line chart of the elbow method with poor results. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0029] Embodiment 1:

[0030] like Figure 1 As shown, an embodiment of the present invention provides a robot arm trajectory learning method, comprising:

[0031] Step S1, obtaining the optimal k value according to the historical trajectory data of the robot arm;

[0032] Step S2, according to the optimal k value, obtain the initial parameters of GMM by using k-means clustering;

[0033] Step S3, using the expectation maximization algorithm to train the GMM initial parameters;

[0034] Step S4: Generate the expected trajectory of the robot arm according to the trained GMM initial parameters so that the robot arm can complete the specific operation task; wherein, through Gaussian mixture regression GMR, the corresponding predicted trajectory of the robot arm movement is obtained according to the requirements of different trajectory planning tasks.

[0035] Furthermore, robot trajectory learning plays an important role in robotics. By imitating and learning the motion trajectories demonstrated by humans, the robot can autonomously perform various complex operation tasks. As an effective probabilistic model, Gaussian mixture model (GMM) can accurately learn and generate robot trajectory by modeling the probability distribution of demonstration trajectories, thus improving the performance of the robot in actual tasks.

[0036] Gaussian mixture model is a model based on probability density estimation, which is applicable to multimodal data. GMM assumes that the data consists of multiple Gaussian distributions, each of which describes a subset of the data. The probability density function of GMM is expressed as:

[0037]

[0038] Among them, π k is the weight of the kth Gaussian distribution, μ k and Σ k are the mean and covariance matrices respectively, and K is the number of Gaussian distributions.

[0039] In the GMM-based trajectory learning method, Gaussian mixture model initialization is one of the key steps. The initial parameters of GMM can be determined by performing preliminary clustering of historical trajectory data using the k-means clustering method. K-means clustering is used to divide the dataset into k different clusters, each represented by its mean (centroid). The algorithm is iteratively optimized so that the data points within the same cluster are as similar as possible, while the data points in different clusters are as different as possible. When applying k-means clustering, the number of initial centroids or Gaussian kernels is usually predefined. The number of Gaussian kernels (k value) can significantly affect the accuracy of GMM and trajectory learning. Therefore, before proceeding to the subsequent steps of robot trajectory learning, it is important to determine the optimal k value (K) of GMM. best ) is crucial and appropriate methods must be used to obtain K best To ensure the accuracy of the final generated trajectory. In summary, the embodiment of the present invention combines the Gaussian mixture model with the k value selection algorithm to achieve robot arm trajectory learning; the embodiment of the present invention achieves the optimal selection of the k value and the generation of the final trajectory by learning from historical trajectory data.

[0040] As an implementation method of an embodiment of the present invention, in step S1, the elbow method is a k-means clustering k-value selection algorithm based on the sum of squared errors (SSE). Specifically, when using the elbow method, first substitute different k values ​​into the k-means clustering algorithm to obtain the corresponding clustering results. Then calculate the SSE of the clustering results under each k value, and draw a line graph between the k value and the corresponding SSE. When k is less than the optimal number of clusters, increasing the k value will significantly improve the density of the clusters, and the SSE will drop sharply at this time; when k is greater than the optimal number of clusters, the effect of increasing the k value on the density of the clusters decreases rapidly, and the rate of decline of the SSE slows down significantly. Therefore, the relationship between k and SSE is a line graph similar to an "elbow", such as Figure 2 As shown, the k value corresponding to the inflection point ("elbow") is the optimal k value.

[0041] When using the elbow method, first calculate the distance from each sample object in each group to the center of each group, then square the distance and sum it to get the error sum of squares for each group. The purpose is to measure the degree of aggregation of each group. The SSE formula for the i-th group is as follows:

[0042]

[0043] Where p is group A i The sample object in a i is the sample center of the current group. Then, the total error sum of K groups can be obtained as follows:

[0044]

[0045] The SSE under different k values ​​is calculated repeatedly, and the optimal k value can be determined by drawing a line graph. Although the traditional elbow method has high computational efficiency, for some specific data sets, the inflection point may not be obvious, such as Figure 3 As shown, there will be a large deviation in the selection of k value at this time, which will affect the final result.

[0046] The evaluation criteria of the traditional elbow method is based on the total sum of squared errors, that is, the sum of the squared errors within each group. If the number of clusters is the same, grouping A has a cluster SSE of i The SSE of the other cluster is larger j Smaller, SSE of each cluster in grouping case B i If the total error sum of squares of cases A and B is similar, although it is generally believed that the grouping of B is better, it cannot be judged by SSE. Therefore, the traditional elbow method should be improved to make it more versatile and still have good results for the above situation.

[0047] Considering the exponential function e xIt is very sensitive to the positive value of the exponent, so the exponential function is introduced to modify the calculation process. x Applied to the error sum square calculation formula, the influence of groups with poor clustering effect on the sum formula can be increased. The modified formula is as follows:

[0048]

[0049] In order to further increase the proportion of groups with poor clustering effect, a correction term is added for adjustment. The value with the largest sum of squared errors among K groups is taken as the independent variable of the exponential function. The correction term formula is as follows:

[0050]

[0051] Combining equations (4) and (5), we can get the improved formula as follows:

[0052]

[0053] Where p is group A i The sample object in a i is the sample center of the current group, K is the number of cluster groups, is the sum of squared errors of the current group, and max means taking the largest sum of squared errors.

[0054] At the same time, considering that in actual situations, there may be a situation where a point is far from the center of its group, the introduction of the exponential function may cause an "exponential explosion" phenomenon, affecting the final k value selection and trajectory learning results. In order to reduce this impact, it is necessary to add a scaling weight θ to adjust formula (6). The final k value selection algorithm formula is as follows:

[0055]

[0056] As an implementation of the embodiment of the present invention, step S2 includes:

[0057] (1) Select k initial centroids: Randomly select k data points as the initial centroids, denoted by {μ1,μ2,…,μ k}, where k is the optimal k value.

[0058] (2) Assign data points: Assign each data point x i Assigned to the nearest centroid, that is:

[0059]

[0060] Among them, c i Represents data point x i The cluster label to which it belongs.

[0061] (3) Update the centroid: Recalculate the centroid of each cluster based on the allocation results:

[0062]

[0063] Among them, C j is the set of all member points of the jth cluster, |C j | represents the number of points in the jth cluster.

[0064] (4) Iteration: Repeat steps (2) and (3) until the centroid no longer changes significantly or the predetermined number of iterations is reached.

[0065] After k-means clustering is completed, the centroid of each cluster is used as the mean vector μ of the corresponding Gaussian distribution i , calculate the covariance matrix Σ according to the distribution of data points in each cluster i , the ratio of the number of data points in each cluster to the total number of data points is used as the mixing coefficient π i ; GMM initial parameters include: μ i ,Σ i , π i .

[0066] As an implementation method of an embodiment of the present invention, in step S3, the expectation maximization algorithm is a maximum likelihood estimation method for finding parameters of a probability model with hidden variables. The basic idea is to gradually improve the log-likelihood value of the parameter by iteratively executing the expectation step (E step) and the maximization step (M step). The specific contents of the E step and the M step are as follows:

[0067] Step E: Calculate each data point x i The posterior probability of belonging to the jth Gaussian distribution is:

[0068]

[0069] Step M: Re-estimate the parameters of GMM using the posterior probability:

[0070]

[0071] Repeat the E and M steps until the parameters converge or the predetermined number of iterations is reached to obtain the trained GMM parameters.

[0072] As an implementation of the embodiment of the present invention, step S4 specifically includes:

[0073] (1) Data decomposition: Assuming that the trajectory data can be divided into input variable X and output variable Y, the mean and covariance of each Gaussian component are decomposed as follows:

[0074]

[0075] in, and are the means of input and output respectively, and is the covariance matrix of the input and output.

[0076] (2) Conditional probability distribution: Given an input X, the conditional distribution of the output Y is a Gaussian distribution, with a mean and covariance of:

[0077]

[0078] Among them, h k (X) is the weight of the kth Gaussian component, which is expressed as:

[0079]

[0080] (3) Trajectory generation: The mean of the final output trajectory is the weighted sum of all Gaussian components, i.e., E[Y|X], which can be used as the predicted trajectory.

[0081] Embodiment 2:

[0082] The embodiment of the present invention further provides a robot arm trajectory learning device, comprising:

[0083] A selection module is used to obtain the optimal k value based on the historical trajectory data of the robot arm;

[0084] A processing module, used for obtaining the initial parameters of GMM according to the optimal k value;

[0085] The training module is used to train the initial parameters of GMM using the expectation maximization algorithm;

[0086] The prediction module is used to generate the expected trajectory of the robot arm based on the trained GMM initial parameters, so that the robot arm can complete the specific operation task.

[0087] As an implementation method of the embodiment of the present invention, the processing module obtains the GMM initial parameters by using k-means clustering according to the optimal k value.

[0088] As an implementation method of the present invention, the prediction module obtains the corresponding predicted trajectory of the robot movement according to the requirements of different trajectory planning tasks through Gaussian mixture regression GMR based on the trained GMM initial parameters.

[0089] Embodiment 3:

[0090] An embodiment of the present invention further provides a robot arm trajectory learning system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a robot arm trajectory learning method when executed by the processor.

[0091] Embodiment 4:

[0092] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program executes the robot arm trajectory learning method when running.

[0093] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A robot arm trajectory learning method, characterized in that: include: Step S1, obtaining the optimal k value according to the historical trajectory data of the robot arm; Step S2, obtaining the GMM initial parameters according to the optimal k value; Step S3, using the expectation maximization algorithm to train the GMM initial parameters; Step S4: Generate the expected trajectory of the robot arm according to the trained GMM initial parameters, so that the robot arm can complete the specific operation task.

2. The robot arm trajectory learning method according to claim 1, characterized in that: In step S2, the initial parameters of GMM are obtained by using k-means clustering according to the optimal k value.

3. The robot arm trajectory learning method according to claim 2, characterized in that: In step S4, according to the trained GMM initial parameters, Gaussian mixture regression GMR is used to obtain the corresponding predicted trajectory of the robot arm movement according to the requirements of different trajectory planning tasks.

4. A robot arm trajectory learning device, characterized in that: include: A selection module is used to obtain the optimal k value based on the historical trajectory data of the robot arm; A processing module, used for obtaining the initial parameters of GMM according to the optimal k value; The training module is used to train the initial parameters of GMM using the expectation maximization algorithm; The prediction module is used to generate the expected trajectory of the robot arm based on the trained GMM initial parameters, so that the robot arm can complete the specific operation task.

5. The robot arm trajectory learning device according to claim 4, characterized in that: The processing module obtains the initial parameters of GMM by using k-means clustering according to the optimal k value.

6. The robot arm trajectory learning device according to claim 5, characterized in that: The prediction module obtains the corresponding predicted trajectory of the robot arm motion according to the requirements of different trajectory planning tasks through Gaussian mixture regression GMR based on the trained GMM initial parameters.

7. A robot arm trajectory learning system, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the robot arm trajectory learning method according to any one of claims 1 to 3 is executed.

8. A storage medium, characterized in that: The storage medium stores a computer program, and the computer program executes the robot arm trajectory learning method according to any one of claims 1 to 3 when running.

Citation Information

Patent Citations

  • Robot Chinese character writing learning method based on track imitation

    CN105956601A

  • Mechanical arm grabbing trajectory planning method combining Gaussian mixture model with dynamic system

    CN111002302A

  • Power system frequency trajectory prediction method and device, medium and equipment

    CN116822360A