Search

CN-121973204-A - Robot track learning generation method and system based on improved k value selection algorithm

CN121973204ACN 121973204 ACN121973204 ACN 121973204ACN-121973204-A

Abstract

The invention discloses a robot track learning generation method and a system based on an improved k value selection algorithm, which belong to the technical field of robot control and track planning, and comprise the steps of acquiring original track data in the teaching process of a robot, preprocessing, and determining the optimal Gaussian kernel number by adopting the improved k value selection algorithm The method comprises the steps of determining the optimal k value of a robot, performing k-means clustering by using the optimal k value to obtain an initial mean value vector, a covariance matrix and weight parameters of the Gaussian mixture model, performing iterative computation on the Gaussian mixture model by using an expected maximization algorithm, obtaining posterior probability of each data point based on Gaussian distribution by the iterative computation, re-estimating parameters of the Gaussian mixture model by using the posterior probability by using M steps, and generating expected planning tracks of the robot by using the trained Gaussian mixture model parameters according to specific task requirements, so that the accuracy of robot track generation is improved.

Inventors

  • Dou Yahui
  • LIU YIYANG
  • LIU PU
  • CUI YU
  • WANG XINHUA

Assignees

  • 中国机械总院集团郑州机械研究所有限公司

Dates

Publication Date
20260505
Application Date
20260129

Claims (6)

  1. 1. The robot track learning generation method based on the improved k value selection algorithm is characterized by comprising the following steps of: S1, acquiring original track data in a robot teaching process, wherein the original track data comprises the position and the posture of the tail end of the robot, the speed and the acceleration of the tail end of the robot and time information corresponding to each point on the track of the robot; s2, adopting an improved k value selection algorithm to determine the optimal Gaussian kernel number The algorithm introduces the weight of clusters with poor clustering effect of characteristic amplification of an exponential function, introduces the weight of clusters with poor compactness of penalty term amplification, introduces a scaling factor to prevent exponential explosion phenomenon, and finally forms Calculating cluster evaluation indexes under different k values by an algorithm; S3, performing k-means clustering by utilizing the optimal k value determined in the S2 to obtain an initial mean vector, a covariance matrix and weight parameters of the Gaussian mixture model; s4, carrying out iterative computation on the Gaussian mixture model by adopting an expected maximization algorithm, wherein the iterative computation is based on the posterior probability of each data point based on Gaussian distribution obtained in the step E, and re-estimating parameters of the Gaussian mixture model by utilizing the posterior probability based on the step M; S5, generating an expected planning track of the robot through Gaussian mixture regression by utilizing trained Gaussian mixture model parameters according to specific task requirements.
  2. 2. The method for generating robot trajectory learning based on the improved k-value selection algorithm according to claim 1, wherein in S2, the specific process of determining the optimal k-value includes: Preliminarily selecting a k value range; Calculating the optimized evaluation corresponding to each k value ; Drawing k values Calculating the slope between different k values; selecting the k value with the largest adjacent slope difference as the optimal Gaussian kernel quantity 。
  3. 3. The method for generating robot trajectory learning based on the improved k-value selection algorithm according to claim 1, wherein in S4, the training process of the expectation maximization algorithm specifically includes: e, calculating posterior probability generated by a kth Gaussian kernel at each sampling point in the teaching track data set by using model parameter weights and a mean kernel covariance matrix of the current iteration step; The M step is that based on the posterior probability obtained by the calculation in the E step, the parameters of the Gaussian mixture model are estimated and updated again by a maximum likelihood estimation method so as to maximize the likelihood function of the observed data; And after each iteration is finished, calculating the log-likelihood function value of the complete data set under the Gaussian mixture model, and judging whether the change of the log-likelihood value between two adjacent iterations reaches a convergence condition or not.
  4. 4. The method for generating robot trajectory learning based on the improved k-value selection algorithm of claim 1, wherein in S5, the gaussian mixture regression process specifically comprises variable decomposition, calculation of activation weights, conditional expectation solution and smoothing trajectory synthesis.
  5. 5. The method for generating robot trajectory learning based on the improved k-value selection algorithm of claim 3, wherein S5 specifically comprises: using time t as a query input, using GMR algorithm from joint probability distribution Solving probability distribution in ; The GMR predicts an expected mean value and a corresponding covariance of the terminal pose of the robot at a given moment t by carrying out weighted combination on each Gaussian kernel; in combination with specific task requirements, such as setting a new starting position or target point, the GMR calculates a smooth continuous expected track which is highly coincident with the teaching track in motion form in real time.
  6. 6. A robot trajectory learning generation system based on an improved k-value selection algorithm, comprising: The expert teaching data acquisition module is used for acquiring original track data in the teaching process of the robot and preprocessing the original track data, wherein the original track data comprises the position and the posture of the tail end of the robot, the speed and the acceleration of the tail end of the robot and time information corresponding to each point on the track of the robot; An improved k-value selection module for determining an optimal gaussian kernel number using an improved k-value selection algorithm The algorithm introduces the weight of clusters with poor clustering effect of characteristic amplification of an exponential function, introduces the weight of clusters with poor compactness of penalty term amplification, introduces a scaling factor to prevent exponential explosion phenomenon, and finally forms Calculating cluster evaluation indexes under different k values by an algorithm; the Gaussian mixture model parameter initializing module is used for executing k-means clustering by utilizing the optimal k value determined by the S2 to obtain an initial mean value vector, a covariance matrix and weight parameters of the Gaussian mixture model; the Gaussian mixture model training module is used for carrying out iterative computation on the Gaussian mixture model by adopting an expected maximization algorithm, the iterative computation is based on the E step to obtain the posterior probability of each data point based on Gaussian distribution, and the parameters of the Gaussian mixture model are estimated again by using the posterior probability based on the M step; and the track generation module is used for generating an expected planning track of the robot by utilizing the trained Gaussian mixture model parameters through Gaussian mixture regression according to specific task requirements.

Description

Robot track learning generation method and system based on improved k value selection algorithm Technical Field The invention relates to the technical field of robot control and track planning, in particular to a robot track learning generation method and system based on an improved k value selection algorithm. Background With the development of robot technology, robots have been widely used in the fields of industry, medical treatment, service, and the like. Trajectory simulation learning (Trajectory Imitation Learning) has become a key technology in order to enable robots to adapt to complex work environments and to provide greater flexibility. Through imitative learning, the robot can learn a complex motion mode from the human expert teaching motion trail and adjust and optimize according to specific task requirements. In the existing track learning method, GMM is widely adopted due to its strong track encoding capability. GMM is capable of efficiently processing multi-modal data and capturing complex trajectory features, typically in combination with gaussian mixture regression (Gaussian Mixture Regression, GMR) to generate the final learning trajectory. When modeling by using the GMM, the original expert data is generally clustered preliminarily by using a k-means clustering method to determine the initialization parameters of the GMM. However, the existing imitative learning method has the following obvious defects when track learning is performed: Blindness of 1.k value determination the k-means clustering algorithm requires a pre-given number of gaussian kernels, i.e. k values. The choice of k-value in the prior art methods relies on random assignment or empirical estimation. An improper k value may cause inaccuracy in the initialization parameters of the model and thus affect the accuracy of the trajectory generated by the final learning. 2. Failure of the traditional "elbow method" to determine the optimal k-value, existing algorithms often employ an "elbow method" (Elbow Method) based on the sum of squares error (Sum of Squared Errors, SSE). According to the method, a relation curve of a k value and SSE is drawn, and an elbow point with a sharp and slow descending rate of the curve is searched to be used as the k value. However, when processing portions of the trajectory data, the graph of k-value versus SSE may not find an obvious "elbow" point. 3. Limitations of the evaluation index the conventional "elbow method" only calculates the sum of squares of the errors in the cluster (Total SSE). Such algorithms cannot distinguish between extreme cases, e.g., where the SSE of a cluster is very large in a clustering method and the SSE of other clusters is very small, the sum of which may be quite similar to the SSE uniformity scheme of each cluster in another clustering method, but the clustering method of the SSE uniformity scheme is generally considered to be better, which can lead to failure of the traditional "elbow method" in such cases. Ultimately resulting in affecting the quality of GMM initialization. In summary, the lack of a method for accurately and robustly automatically selecting the k value according to the complex track data in the prior art limits further improvement of the track learning accuracy of the mechanical arm. Therefore, there is a need for an improved k-value selection strategy to optimize the initialization process of the GMM, thereby improving the accuracy of the robot trajectory generation. Disclosure of Invention The invention provides a robot track learning generation method and system based on an improved k value selection algorithm, which are used for solving the technical problems that in the prior art, in the existing robot imitation learning technology, k value selection is difficult, the traditional elbow method is fuzzy at an elbow point under a specific data set, so that selection deviation is caused, and model complexity and fitting degree balance capability are insufficient. In order to achieve the above purpose, the invention adopts the following technical scheme: The invention provides a robot track learning generation method based on an improved k value selection algorithm, which comprises the following steps: S1, acquiring original track data in a robot teaching process, wherein the original track data comprises the position and the posture of the tail end of the robot, the speed and the acceleration of the tail end of the robot and time information corresponding to each point on the track of the robot; s2, adopting an improved k value selection algorithm to determine the optimal Gaussian kernel number The algorithm introduces the weight of clusters with poor clustering effect of characteristic amplification of an exponential function, introduces the weight of clusters with poor compactness of penalty term amplification, introduces a scaling factor to prevent exponential explosion phenomenon, and finally formsCalculating cluster evaluation indexes under di