Robot joint control method, electronic equipment and storage medium

By building the controller model and objective function, the covariance matrix adaptive evolution algorithm is used to automatically adjust the PD controller parameters, which solves the problem of low accuracy in adjusting the parameter of the robot joint controller and achieves more efficient robot joint control.

CN120335280AActive Publication Date: 2025-07-18人形机器人(上海)有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510384709.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-18
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

In the prior art, the parameter adjustment of robot joint controllers is greatly affected by humans, resulting in low parameter adjustment accuracy, which in turn affects the accuracy of robot joint control.

Method used

By building controller models and objective functions, the gain parameter values are calculated using covariance matrix adaptive evolution algorithms (such as CMA-ES algorithm), and the PD controller parameters are automatically adjusted to reduce manual intervention.

Benefits of technology

The parameter adjustment efficiency of robot joint controllers is improved, the impact of manual intervention is reduced, and the control performance improvement is accelerated in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335280A_ABST
    Figure CN120335280A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a robot joint control method, electronic equipment and a storage medium, and relates to the technical field of robots. The method comprises the following steps: respectively obtaining a controller model and a target function; the controller model is used for representing a relationship between a preset gain parameter combination and a control parameter; taking the target function as an input parameter of a covariance matrix adaptive evolutionary algorithm, and calculating to obtain a gain parameter value corresponding to a preset gain parameter combination; taking the gain parameter value as an input parameter of a controller model, and calculating to obtain an initial control parameter; and joints of the robot are controlled to execute tasks according to the initial control parameters, and execution results are obtained. The method is used for achieving the effect of improving the robot joint control accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of robotics, and particularly to a robot joint control method, an electronic device, and a storage medium. Background Art

[0002] Currently, in a robot joint control system, a PD controller (Proportional-Differential controller) is widely used for the motion control of joints. By combining two control links, namely proportional (P) and differential (D), the PD controller can effectively adjust the motion trajectory of a robot joint, reduce overshoot, and improve the response speed. In an operating robot joint motor control system, one or more PD controllers are used to ensure that some physical quantities (such as joint angle or torque) remain constant or within a given range. Since these quantities may be naturally related and affect each other, the controllers are usually coupled, so it is necessary to adjust the parameters of the PD controller.

[0003] In the prior art, the method of manual parameter tuning is adopted, that is, a control engineer with knowledge and experience manually adjusts the controller parameters in a single controller system or multiple but decoupled controller systems using simple empirical rules (such as the Ziegler-Nichols rule).

[0004] Therefore, the inventor found that the following technical problems exist in the prior art: due to the manual parameter tuning operation, the parameter adjustment process of the robot controller is greatly affected by humans, resulting in low accuracy of parameter adjustment, and further leading to low accuracy of robot joint control. Summary of the Invention

[0005] Embodiments of this application provide a robot joint control method, an electronic device, and a storage medium, so as to reduce the manual intervention in the parameter adjustment process of the robot controller, and further improve the accuracy of robot joint control.

[0006] In a first aspect, embodiments of this application provide a robot joint control method, including the steps of:

[0007] Obtain a controller model and an objective function respectively; the controller model is used to represent the relationship between a preset gain parameter combination and control parameters;

[0008] Use the objective function as an input parameter of the covariance matrix adaptation evolution algorithm, and calculate a gain parameter value corresponding to the preset gain parameter combination;

[0009] Use the gain parameter value as an input parameter of the controller model, and calculate an initial control parameter; control the joints of the robot to execute tasks according to the initial control parameter, and obtain an execution result.

[0010] In a possible implementation manner, the obtaining of the controller model includes: constructing a controller model according to a first relational expression, the preset gain parameter combination, and the control parameter; the first relational expression is used to characterize the relationship between the current joint position, the target joint position, and the first input parameter of the robot joint.

[0011] In a possible implementation manner, the preset gain parameter combination includes a proportional gain and a derivative gain; in the first relational expression, the control parameter is equal to the sum of a first product and a second product; the first product is the product between the first input parameter and the proportional gain; the second product is the product between the result obtained by performing differential solution on the first input parameter and the derivative gain.

[0012] In a possible implementation manner, the using the objective function as an input parameter of the covariance matrix adaptation evolution algorithm to calculate a gain parameter value corresponding to the preset gain parameter combination includes: when the current iteration number exceeds a preset ratio of the total iteration number, determining an adjusted mean vector based on the mean vector generated in the current iteration round and the current optimal solution; the total iteration number is an input parameter of the covariance matrix adaptation evolution algorithm; performing the next iteration round based on the adjusted mean vector; until the iteration number reaches the total iteration number, obtaining the gain parameter value.

[0013] In a possible implementation manner, the determining an adjusted mean vector based on the mean vector generated in the current iteration round and the current optimal solution includes: adding the mean vector weighted by a first factor and the current optimal solution weighted by a second factor to obtain the adjusted mean vector; the first factor is greater than the second factor.

[0014] In a possible implementation manner, the using the objective function as an input parameter of the covariance matrix adaptation evolution algorithm to calculate a gain parameter value corresponding to the preset gain parameter combination includes: when the current iteration number exceeds a preset ratio of the total iteration number and the difference between the mean vector obtained in the current iteration round and the expected torque is greater than a preset threshold, obtaining the task object of the robot in the current task scenario; the total iteration number is an input parameter of the covariance matrix adaptation evolution algorithm; obtaining the torque execution interval corresponding to the task object; the expected torque is within the torque execution interval; screening the mean vector obtained in the current iteration round according to the torque execution interval to obtain a screened mean vector; performing the next iteration round based on the screened mean vector; until the iteration number reaches the total iteration number, obtaining the gain parameter value.

[0015] In a possible implementation, the method further includes the steps of: when the initial control parameters do not meet the expected control parameters, and / or the execution result does not meet the expected result, adjusting the evolutionary parameter values of the covariance matrix adaptation evolution algorithm to obtain adjusted evolutionary parameter values; using the adjusted evolutionary parameter values and the objective function as the input parameters of the covariance matrix adaptation evolution algorithm, calculating to obtain adjusted gain parameter values; using the adjusted gain parameter values as the input parameters of the controller model, calculating to obtain adjusted control parameters, and controlling the joints of the robot again according to the adjusted control parameters.

[0016] In a possible implementation, the adjusting the evolutionary parameter values of the covariance matrix adaptation evolution algorithm to obtain adjusted evolutionary parameter values includes: obtaining the task time limit information corresponding to the current task scenario of the robot and the single-round iteration duration of the covariance matrix adaptation evolution algorithm; determining the adjusted total number of iterations according to the task time limit information and the single-round iteration duration; the adjusted evolutionary parameter values include the adjusted total number of iterations.

[0017] In a second aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0018] The memory stores computer-executable instructions;

[0019] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the first aspect and / or various possible implementations of the first aspect as above.

[0020] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the first aspect and / or various possible implementations of the first aspect as above are implemented.

[0021] A robot joint control method, an electronic device, and a storage medium provided by an embodiment of the present application. The method first transforms the adjustment of the controller parameters into solving an objective function by using a controller model and an objective function. Then, a covariance self-adaptive evolution algorithm is used to calculate the corresponding gain parameter values, and the gain parameter values are used as the input parameters of the controller model to calculate the initial controller parameters. Finally, the joints of the robot are controlled according to the initial control parameters to obtain an execution result. The entire process of adjusting the robot controller parameters improves the efficiency of adjusting the parameters of the joint controller, and reduces or even eliminates the interference of manual parameter adjustment. Especially in complex multi-body motion and contact scenarios, the influence of manual intervention is reduced, so that the robot controller can obtain better control performance in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0023] Figure 1 Schematic diagram of the application scenario of the robot joint control method provided by an embodiment of the present application;

[0024] Figure 2 Schematic flowchart of the robot joint control method provided by an embodiment of the present application;

[0025] Figure 3 Schematic flowchart of the robot joint control method provided by another embodiment of the present application;

[0026] Figure 4 Schematic flowchart of the robot joint control method provided by another embodiment of the present application;

[0027] Figure 5 Schematic diagram of the structure of the electronic device provided by an embodiment of the present application.

[0028] Through the above drawings, specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0030] In the prior art, the parameter adjustment problems that have been solved can also be used as a guide, and the problem of adjusting the parameters of the PD controller is proposed. The inventors also found that there are methods such as the Ziegler-Nichols rule, Cohen-Coon rule, gradient descent method, and particle swarm optimization. However, the inventors found that these methods are sensitive to the initial values and are prone to falling into local optimal solutions, resulting in the failure of the final parameter adjustment and inaccurate parameter adjustment results. Especially when faced with a complex or unique coupled controller system, the complexity of the task makes it difficult for even experienced control engineers to solve. Therefore, manual parameter adjustment usually requires continuous trial and adjustment, consuming a large amount of manual time and being easily restricted by experience and intuition, resulting in a slow tuning process and low accuracy of the parameter adjustment structure.

[0031] In view of the above technical problems, the present invention proposes the following technical concept: by using the input and output of the robot controller to construct a task objective function, and based on this task objective function, using an adaptive solution algorithm to solve the global optimal controller parameter solution or a controller parameter solution close to the global optimal of the task objective function as the parameter adjustment result of the PD controller, and finally adjusting the parameters of the PD controller according to the parameter adjustment result to achieve the purpose of realizing more accurate control of the robot through the PD controller.

[0032] The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. These specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0033] Figure 1 It is a schematic diagram of the application scenario of the robot joint control method provided by the embodiment of the present application. As Figure 1 shown, the application scenario includes: a robot 101 and a target 102 to be grasped. Among them, a server and a scanning device for collecting task scenario information of the environment around the robot 102 are installed on the robot 101, and the scanning device can be a radar sensor or a depth camera. In one embodiment, the single arm or leg of the robot 101 may have seven joints, and the seven joints respectively correspond to different motors, and it is necessary to calculate and determine the control parameters of each joint controller, that is, the control parameters of the motor controller. The robot joint control method provided by the embodiment of the present application is used to determine the relevant parameters of each joint controller to control the robot joints to perform corresponding tasks. In this embodiment, the server can, according to the task scenario information, sequentially execute the relevant steps of the robot joint control method, and finally make the robot controller control the robot to output a control amount according to the adjusted control parameters.

[0034] It should be noted that Figure 1 The application scenario of the shown robot joint control method only represents one application scenario, namely the grasping scenario. The robot joint control method proposed in this embodiment can also be applied to other application scenarios such as the handling scenario, the clamping scenario, and the picking scenario, etc. This embodiment does not limit this here.

[0035] Figure 2 is a schematic flowchart of the robot joint control method provided by this application. The execution subject of this method can be Figure 1 the server in the shown robot 101, or other computer-related devices, chips, controllers or processors that can perform rescue positioning and data processing functions. This embodiment does not limit this here. As Figure 2 shown, the robot joint control method includes:

[0036] S201: Obtain the controller model and the objective function respectively; the controller model is used to represent the relationship between the preset gain parameter combination and the control parameter.

[0037] In this embodiment, the controller model can be the joint PD controller model of a humanoid robot, and this controller model represents the input-output relationship of the joint PD controller. The preset gain parameter combination can be the gain parameters for the joint PD controller to calculate the joint output. The objective function can be a function F(t) to be solved, and this objective function is used to continuously iterate and update to obtain the gain parameters that make the output of the controller model quickly converge to the target value during the iteration process.

[0038] S202: Use the objective function as the input parameter of the covariance matrix adaptation evolution algorithm, and calculate the gain parameter value corresponding to the preset gain parameter combination.

[0039] In this embodiment, the covariance matrix adaptation evolution algorithm can be the CMA-ES algorithm. According to the covariance matrix adaptation evolution algorithm, set the total number of iterations and initialize a set of initial solutions corresponding to the preset gain parameter combination in advance to perform the iterative calculation process. The finally obtained gain parameter value corresponding to the preset gain parameter combination can be used for the controller model.

[0040] In this embodiment, using the CMA-ES algorithm to calculate the gain parameter value corresponding to the preset gain parameter combination can adjust the gain parameter value through the adaptive covariance matrix. Especially for a robot with multiple joints, when there are more parameters to be adjusted, this embodiment can more quickly evaluate the performance of all candidate gain parameter values in parallel or serially, improving the adjustment efficiency while also improving the accuracy of robot joint control.

[0041] In some alternative embodiments, the calculation results of the covariance matrix adaptation evolution algorithm can be obtained by conducting simulation experiments using a pre-built simulation environment. The pre-built simulation environment can be a physics engine applied in the fields of robotics, physical simulation, and reinforcement learning. This physics engine uses numerical integration methods and can handle the interactions of a large number of joints and objects. For example, the pre-built simulation environment is MuJoCo. In this embodiment, the simulation data can be the data obtained during the execution of the simulation operation in the pre-built simulation environment, such as the simulation end time, the simulation start time, the error of the robot joints at a certain moment during the simulation, etc.

[0042] Utilizing the pre-built simulation environment has significant advantages in terms of simulation speed. Compared with conducting experiments using a physical robot to calculate and solve the gain parameter values, the iterative efficiency is higher. Especially in complex multi-body motion and contact models, it can handle the interactions of a large number of joints and objects more quickly.

[0043] In an alternative embodiment of the present application, the objective function is:

[0044]

[0045] In the formula, n is the total number of joints to be controlled by the robot controller among the robot controller parameters to be adjusted. For example, it can be the number of joints of the arm or the number of joints of the leg. n is a natural number greater than 0. T is the end moment of each round of iteration in the iterative solution process. t0 is the start moment of each round of iteration in the iterative solution process. Generally, t0 = 0. The difference between T and t0 is the duration of a single round of iteration. Among them, the duration of each round of iteration is the same, that is, the difference between T and t0 in each round of iteration is the same. e i (τ) is the error between the current joint position and the target joint position of the i-th joint at moment τ, where i ∈ [0, n], and T is a positive number greater than 0.

[0046] In an alternative embodiment of the present application, step S202 can be to first initialize a gain parameter matrix corresponding to the preset gain parameter combination of the controller.

[0047] Exemplarily, assume the gain parameter matrix is PD ∈ R 7×2 as follows:

[0048] PD = [[P1, D1], [K2, D2], [K3, D3], [K4, D4], [K5, D5], [K6, D6], [K7, D7]]

[0049] Among them, Pi and Di are respectively the proportional gain and derivative gain of the robot controller of the i-th joint, and i is a natural number between 1 and 7.

[0050] It should be noted that the gain parameter matrix of the robot controller can be adjusted empirically according to the actual requirements of joint control and the dynamic characteristics of the system to obtain a set of approximate values \(PD(0)\in R\). 7×2 As the gain parameter matrix, subsequent parameter adjustments are then carried out based on this gain parameter matrix to determine better PD gain values. These gain parameter matrices can be used as subsequent reference bases, providing a reasonable initial gain parameter matrix \(PD(0)\) for the subsequent robot controller parameter adjustment process. For example, \(PD(0)\) can be set as follows:

[0051] \(PD =\)

[0052] [[600,10],[600,10],[600,10],[400,8],[400,8],[200,4],[200,4]].

[0053] In addition, it is also necessary to set the initial evolution parameters for the covariance matrix adaptive evolution algorithm, specifically including setting the initial step size, population size, parent size, iterative selection strategy, and termination conditions.

[0054] In this embodiment, the CMA - ES algorithm uses a global step size \(\sigma\) to control the variation range of the solutions obtained in each iteration process, and the global step size is dynamically adjusted. In the search process of each iteration of the CMA - ES algorithm, the global step size is adjusted according to historical information such as the distribution of solutions and the directions of successful solutions. In this embodiment, the initial step size can be a preset fixed value or generated in response to relevant parameter generation instructions. For example: the initial step size \(\sigma_0 = 1.2\).

[0055] In this embodiment, the population size refers to the number of candidate solutions generated by the CMA - ES algorithm in each generation. The parent size determines the number of the best individuals used to generate the next generation. Specifically, the population size and the parent size can be calculated through the population calculation formula. The calculation formula for the population size is: \(\lambda=4+(3\times\log(d))\), where \(d\) is the preset dimension \(d\) of the solution vector and is a natural number, and \(\lambda\) represents the population size. The calculation formula for the parent size is: \(\mu = (\lambda / 2)\), where \(\mu\) represents the parent size. For example: in this embodiment, \(d = 14\), then the population size \(\lambda = 12\) and \(\mu = 6\) can be calculated.

[0056] In this embodiment, the iterative selection strategy can be a selection strategy that retains the best - performing individual in each generation during the iteration process as the successful solution. In this embodiment, the iterative selection strategy can be an elite selection strategy. When using the elite selection strategy, when generating a new population, not only the individuals of the current - generation population are used, but also the best - performing individual in the previous generation is retained to ensure that the optimal solution will not be lost during the iteration process, increasing the probability of the finally obtained target solution.

[0057] In this embodiment, the termination conditions may include that the number of iterations reaches the total number of iterations (i.e., the maximum number of iterations) in the target configuration data, and that the reduction value of the objective value of the function to be solved in the population of consecutive preset values does not reach the preset lower limit value. For example, the maximum number of iterations k = 10000, the preset value may be 10, and the preset lower limit value may be 0.5.

[0058] S203: Use the gain parameter value as the input parameter of the controller model to calculate the initial control parameter.

[0059] In this embodiment, the gain parameter value obtained by iteratively solving the objective function is substituted into the controller model to obtain a target controller model that can be used to calculate the specific numerical value of the control amount of the humanoid robot. Then, use this target controller to use parameters such as the input target joint position as the input quantity of the controller model, and the output quantity of the final controller model is the control amount to be executed by the object controlled by the robot controller. For example, the initial control parameter may be parameters related to control attributes such as the torque range of the joint, the movement range of the joint, and the maximum movement speed. In this embodiment, the above initial control parameter is the joint torque.

[0060] S204: Control the joints of the robot to execute tasks according to the initial control parameters to obtain an execution result.

[0061] In this embodiment, the initial control parameter can be transformed into a corresponding control instruction via the robot controller to control the joints of the robot to execute the corresponding task to obtain an execution result. This task is the task corresponding to the current task scenario. The above execution result may be data or information such as the final actual movement range, actual execution torque, and actual movement speed of the robot joints that can reflect the completion of the robot's task execution. The execution result can also be success or failure.

[0062] In summary, the robot joint control method provided by the embodiment of the present application first transforms the adjustment of the controller parameter into solving the objective function by using the controller model and the objective function. And use the covariance self-adaptive evolutionary algorithm to calculate the corresponding gain parameter value, and then use the gain parameter value as the input parameter of the controller model to calculate the initial controller parameter, and finally control the joints of the robot to execute tasks according to the initial control parameter to obtain an execution result. The entire process of adjusting the robot controller parameters improves the efficiency of adjusting the parameters of the joint controller, and reduces or even eliminates the interference of manual parameter adjustment. Especially in complex multi-body motion and contact scenarios, it reduces the influence of manual intervention, enabling the robot controller to obtain better control performance in a shorter time.

[0063] Based on the above embodiments, in an alternative embodiment of the present application, in step S201, obtaining the controller model includes: constructing the controller model according to the first relationship, the preset gain parameter combination, and the control parameter; the first relationship is used to characterize the relationship between the current joint position, the target joint position, and the first input parameter of the robot joint.

[0064] In this embodiment, the first relationship may be a formula representing the input-output relationship of the robot controller. The current joint position of the robot joint refers to the actual joint position of the robot at present, and the target joint position refers to the position that the joint of the robot is to be controlled to reach, which characterizes the target joint angle. The first input parameter may be the target joint position in a sine shape and the time coefficient.

[0065] Based on the above embodiments, as an alternative embodiment of the present application, the preset gain parameter combination includes the proportional gain and the derivative gain; in the first relationship, the control parameter is equal to the sum of the first product and the second product; the first product is the product between the first input parameter and the proportional gain; the second product is the product between the result obtained by differentiating the first input parameter and the derivative gain.

[0066] In this embodiment, the first relationship may be:

[0067]

[0068] In the formula, C(t) represents the output result of the robot joint controller, e(t) represents the first input parameter of the robot joint controller, P represents the proportional gain of the robot joint controller, D represents the derivative gain of the robot joint controller, and t represents the current calculation time.

[0069] The calculation formula of the above first input parameter may be:

[0070] e(t) = |actual(t) - action(t)|

[0071] In the formula, e(t) represents the first input parameter, actual(t) represents the current joint position of the robot joint, and action(t) is the target joint position of the robot joint.

[0072] In this embodiment, by formulating the parameter adjustment problem of the robot joint control, the influence of human factors during manual adjustment is eliminated or significantly reduced, thereby improving the accuracy of the robot joint control.

[0073] Based on the above Figure 2 corresponding embodiment, in an alternative embodiment of the present application, as Figure 3 shown, step S202 includes:

[0074] S202a: When the current iteration number exceeds a preset proportion of the total iteration number, determine an adjusted mean vector based on the mean vector generated in the current iteration round and the current optimal solution. The total iteration number is an input parameter of the covariance matrix adaptation evolution algorithm. Exemplarily, this preset proportion can be 0.7.

[0075] In this embodiment, the total iteration number is the preset number of algorithm loop iterations. The total iteration number is preset in the server as an input parameter of the covariance adaptation evolution algorithm. When the covariance adaptation evolution algorithm performs iterative solution, it executes at most the total iteration number. For example, the total iteration number can be 10,000 times. The role of the mean vector generated in the current round of iteration is to define the start and direction of the search in the covariance matrix adaptation evolution algorithm. The adjusted mean vector can be a vector obtained by adjusting the weight ratio.

[0076] In an alternative embodiment of the present application, the mean vector can be calculated based on the gain parameter matrix in the above embodiment and a preset scaling coefficient.

[0077] In this embodiment, the preset scaling coefficient includes a proportional scaling coefficient and a derivative scaling coefficient. The proportional scaling coefficient and the derivative scaling coefficient are used to adjust the proportional gain and derivative gain in the gain parameter matrix within the same scale range. The scaled gain parameter matrix is the scaled mean vector. Similarly, the initial scaled gain parameter matrix is the initial mean vector.

[0078] For example: the scaling coefficient β = (β P , β D ), where β P is the proportional scaling coefficient and β D is the derivative scaling coefficient. The scaled gain parameter matrix can improve the convergence and optimization efficiency of the CMA-ES algorithm in the parameter search process. Combining the content of the above embodiment, the mean vector obtained after scaling is:

[0079] m = ((β P K P1 , β D K D1 ), (β P K P2 , β D K D2 ), (β P K P3 , β D K D3 ), (β P K P4 , β D K D4 ),

[0080] (β P K P5 ,β D K D5 ),(β P K P6 ,β D K D6 ),(β P K P7 ,β D K D7 ))

[0081] Assume that in this embodiment, the scaling factor β = (β P , β D ) = (0.1, 5).

[0082] Correspondingly, the initial mean vector is:

[0083] m0 = ((60, 50), (60, 50), (60, 50), (40, 40), (40, 40), (20, 20), (20, 20))

[0084] As can be seen from the above formula, the mean vector m0 obtained in the first iteration in the CMA-ES algorithm is obtained by scaling the gain parameter matrix K PD (0) by the scaling factor β = (β P , β D ).

[0085] In this embodiment, the main function of the mean vector m0 is to define the search starting point and search direction in the next-round iteration process of the CMA-ES algorithm.

[0086] S202b: Based on the adjusted mean vector, perform the next-round iteration.

[0087] In this embodiment, both the search direction and search starting point of the next-round iteration are defined by the adjusted mean vector obtained after the completion of the current round of adjustment. The next-round iteration refers to the next-generation iteration process of the current iteration round.

[0088] S202c: Until the number of iterations reaches the total number of iterations, obtain the gain parameter value.

[0089] In this embodiment, when the number of iterations reaches the total number of iterations, it indicates that the solution process of the objective function is completely finished. At this time, the obtained gain parameter value can be used as the parameter finally transferred to the real machine control process. Since if the mean vector is adjusted alone, the convergence efficiency may be relatively low, that is, the convergence is slow. If the current optimal solution is used alone to adjust the mean vector, it may lead to falling into the local optimum and the solution quality is poor. Therefore, this embodiment can take into account both the convergence efficiency and the accuracy of the solution result. While improving the convergence efficiency, it avoids falling into the local optimum and ensures the accuracy of the solution result.

[0090] Based on the above embodiment, in an alternative embodiment of the present application, in step S202a, to determine the adjusted mean vector based on the mean vector generated in the current iteration round and the current optimal solution, it specifically includes: adding the mean vector weighted by the first factor and the current optimal solution weighted by the second factor to obtain the adjusted mean vector; the first factor is greater than the second factor.

[0091] In this embodiment, determining the adjusted mean vector based on the mean vector generated in the current iteration round and the local optimal solution means adding the mean vector weighted by the first factor and the current optimal solution weighted by the second factor to obtain the adjusted mean vector, where the first factor is greater than the second factor. For example: the first factor is 0.8 and the second factor is 0.2, and it can be 0.8 times the mean vector plus 0.2 times the optimal solution of this round.

[0092] Based on the first factor being greater than the second factor in this embodiment, the mean vector in the solution process can be better adjusted, taking into account both the convergence efficiency and the accuracy of the solution result. While improving the convergence efficiency, it avoids falling into the local optimum and obtains the global optimal solution.

[0093] In the above Figure 2 On the basis of the corresponding embodiment, as an alternative embodiment of the present application, as Figure 4 shown, step S202 includes:

[0094] S202d: When the current number of iterations exceeds a preset ratio of the total number of iterations and the difference between the mean vector obtained in the current iteration round and the expected torque is greater than a preset threshold, obtain the task object of the robot in the current task scenario; the total number of iterations is an input parameter of the covariance matrix adaptation evolution algorithm.

[0095] In this embodiment, the difference from step S202d is that when the difference between the mean vector obtained in the current iteration round and the expected torque is greater than a preset threshold, it indicates that the solution corresponding to the controller parameters obtained in this iteration needs to be corrected and fine-tuned. At this time, the task object of the robot in the current task scenario is obtained for subsequent operations. The preset threshold refers to a preset fixed value. When the difference is less than this fixed value, there is no need to adjust the controller parameters corresponding to the current iteration round.

[0096] S202e: Obtain the torque execution interval corresponding to the task object; the expected torque is within the torque execution interval.

[0097] In this embodiment, obtaining the torque execution interval corresponding to the task object can be based on the task object in the current scenario of the current scene, and retrieve the corresponding relationship between the task object and the torque execution interval determined or set in advance through experiments, and retrieve the corresponding torque execution interval. The expected torque execution interval, as the target execution torque interval, should be set to any value in the retrieved torque execution interval.

[0098] S202f: Screen the mean vector obtained in the current iteration round according to the torque execution interval to obtain the screened mean vector.

[0099] In this embodiment, since the correlation between the mean vector and the calculation result of the torque is relatively high, therefore, the mean vector obtained in the current iteration round can be screened by the torque execution interval obtained through the above steps, so as to ensure the accuracy of the joint torque obtained by solving while accelerating the convergence.

[0100] S202g: Based on the screened mean vector, perform the next iteration round.

[0101] S202h: Until the number of iterations reaches the total number of iterations, obtain the gain parameter value.

[0102] In this embodiment, the principles of steps S202g and S202h are similar to those of steps S202b and S202c in the above embodiment, so they will not be elaborated here. It should be noted that the difference from the above embodiment is that in step S202d, when the current number of iterations exceeds a preset ratio of the total number of iterations and the difference between the mean vector obtained in the current iteration round and the expected torque is greater than the preset threshold, based on the torque execution interval corresponding to the current task object, the mean vector in the iteration process can be guided, and then the accuracy of the joint torque output by the algorithm can be guided, realizing both the convergence efficiency and the accuracy of the solution result. While improving the convergence efficiency, it avoids falling into local optimality and ensures the accuracy of the solution torque result.

[0103] Based on any of the above embodiments, in an optional embodiment of the present application, the robot joint control method further includes the steps:

[0104] Step A: When the initial control parameters do not meet the expected control parameters and / or the execution result does not meet the expected result, adjust the evolution parameter value of the covariance matrix adaptation evolution algorithm to obtain the adjusted evolution parameter value.

[0105] In this embodiment, the situation where the initial control parameters do not meet the expected control parameters may be, for example, that the solved joint torque is not within the preset torque range. The situation where the execution result does not meet the expected result may be, for example, that the task execution fails, while the expected result is successful execution.

[0106] In this embodiment, when the initial control parameters do not meet the expected control parameters and the execution result does not meet the expected result, when the initial control parameters do not meet the expected control parameters or the execution result does not meet the expected result, it means that the evolution parameters of the covariance matrix adaptation evolution algorithm need to be fine-tuned so that the adjusted control parameters obtained by solving the objective function subsequently can better meet the task requirements.

[0107] Exemplarily, the adjusted evolution parameter value may be, for example, the total number of evolution generations. And the adjusted total number of evolution generations is less than the total number of evolution generations before adjustment. For example, on the one hand, if the total number of evolution generations is large, it will lead to a long running time of the algorithm and cannot meet the timeliness requirements of the task; on the other hand, since only the parameters are fine-tuned, a large total number of evolution generations is not required. On the one hand, this embodiment can improve the accuracy of the solution result, and on the other hand, it can better consider the real-time task requirements, such as the timeliness requirements of the task, and better meet the task timeliness, that is, it takes into account both the accuracy of the solution result and the task timeliness.

[0108] Step B: Take the adjusted evolution parameter value and the objective function as the input parameters of the covariance matrix adaptation evolution algorithm, and calculate the adjusted gain parameter value.

[0109] In this embodiment, the adjusted evolution parameter value and the objective function are used as the input parameters of the covariance matrix adaptation algorithm, and after iterative calculation by the calculation tool pre-stored in the server, the adjusted gain parameter value can be output. The iterative calculation process of the covariance matrix adaptation algorithm is similar to the implementation principle of step S202 in the above embodiment, so it will not be elaborated here in this embodiment.

[0110] Step C: Take the adjusted gain parameter value as the input parameter of the controller model, calculate the adjusted control parameter, and control the joints of the robot again according to the adjusted control parameter.

[0111] In this embodiment, the process of calculating the adjusted control parameters in step C and controlling the key points of the robot is similar to the principle of step S204 in the above embodiment, so it will not be elaborated here in this embodiment.

[0112] Based on the above embodiment, as an optional embodiment of the present application, in step A, the evolution parameter value of the covariance matrix adaptive evolution algorithm is adjusted to obtain the adjusted evolution parameter value, including:

[0113] Step A1: Obtain the task time limit information corresponding to the current task scenario of the robot and the single-round iteration duration of the covariance matrix adaptive evolution algorithm.

[0114] In this embodiment, the task time limit information corresponding to the current task scenario can be calculated based on the robot scanning the current task scenario through path planning and the moving speed of the robot, or retrieved from the pre-set correspondence between each task scenario and the task time limit. The single-round iteration duration can be the duration required for a single simulation in the pre-built simulation environment, and one iteration corresponds to one simulation.

[0115] Step A2: Determine the adjusted total number of iterations according to the task time limit information and the single-round iteration duration; the adjusted evolution parameter value includes the adjusted total number of iterations.

[0116] In this embodiment, the condition needs to be met: the product operation result of the adjusted total number of iterations and the single-round iteration duration needs to be less than or equal to the above task time limit.

[0117] Specifically, since it is considered that many tasks have high requirements for time limits. For example, a task of grasping a water bottle requires completion within 5 seconds, and if the first task execution fails, then during the fine-tuning process of the algorithm parameters, it is necessary to comprehensively consider the task time limit information and the single-round iteration duration of the algorithm. This can enable the calculation of the adjusted parameters within the task time limit, and also improve the accuracy of the joint controller parameters, achieving both the accuracy of the joint control parameters and better meeting the task requirements.

[0118] In summary, the robot joint control method provided by the embodiments of the present application can also more quickly and accurately find the optimal solution as the target solution by fine-tuning the evolution parameters in the covariance matrix adaptive evolution algorithm, achieving both the accuracy of the solution result and better meeting the task requirements.

[0119] In another embodiment, for step A2 above, the adjusted total number of iterations can also be determined in combination with the level of accuracy requirements for the joint control parameters to be solved. For example, the first total number of iterations can be calculated based on the task time limit information and the duration of a single iteration, and then the corresponding adjustment factor can be determined according to the level of accuracy requirements for the joint control parameters to be solved. The product of the adjustment factor and the first total number of iterations is used as the adjusted total number of iterations. The above adjustment factor can be determined according to the level of accuracy requirements for the joint control parameters to be solved and a preset corresponding relationship. And the higher the level of accuracy requirements for the joint control parameters to be solved, the larger the adjustment factor. Conversely, the smaller the adjustment factor. This can further improve the accuracy of the calculation results while taking into account the convergence efficiency, and better balance the accuracy of the solution results and meeting the task requirements.

[0120] In another embodiment, based on the above Figure 2 corresponding embodiment, the steps may further include:

[0121] When it is detected that the task scenario of the robot has changed, obtain the current task information of the robot.

[0122] Adjust the total number of generations of evolution according to the current task information of the robot. For example, a mapping relationship can be preset for matching to obtain the adjusted total number of generations of evolution.

[0123] Specifically, since different tasks have different accuracy requirements for the solution results, such as the task of grasping a water bottle and the task of carrying heavy objects. When carrying heavy objects, the accuracy requirements for the joint force application points do not need to be too high. Therefore, the total number of generations of evolution can be appropriately reduced.

[0124] Figure 5 FIG. is a schematic structural diagram of the electronic device provided by the present application. As Figure 5 shown, the electronic device provided in this embodiment includes: at least one processor 301 and a memory 302. Optionally, the device further includes a communication component 303. Among them, the processor 301, the memory 302, and the communication component 303 are connected through a bus 304.

[0125] In the specific implementation process, at least one processor 301 executes the computer execution instructions stored in the memory 302, so that at least one processor 301 executes the above method.

[0126] The specific implementation process of the processor 301 can refer to the above method embodiment, and its implementation principle and technical effect are similar, and will not be elaborated here in this embodiment.

[0127] An embodiment of the present application further provides a humanoid robot, including a robot body, a camera disposed on the robot body, and an electronic device as described in the above embodiment disposed inside the robot body.

[0128] In this embodiment, being disposed on the robot body and being disposed inside the robot body can both be achieved by means of a hardware connection structure such as bolt connection, screw connection, etc.

[0129] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the above method is implemented.

[0130] An embodiment of the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0131] In the above embodiment, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, abbreviated: CPU), and may also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated: DSP), application specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0132] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0133] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0134] The present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0135] The present application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above method.

[0136] The above-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk or an optical disk. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.

[0137] An exemplary readable storage medium is coupled to the processor so that the processor can read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.

[0138] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0139] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0141] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes of various kinds.

[0142] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: ROMs, RAMs, magnetic disks, or optical discs, etc., which can store program codes of various kinds.

[0143] Finally, it should be noted that: After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily think of other embodiments of the present invention. The present invention is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.

Claims

1. A robot joint control method, characterized in that, Including: Obtaining a controller model and an objective function respectively; The controller model is used to characterize the relationship between a preset gain parameter combination and a control parameter; Taking the objective function as an input parameter of the covariance matrix adaptive evolution algorithm, and calculating a gain parameter value corresponding to the preset gain parameter combination; Taking the gain parameter value as an input parameter of the controller model, and calculating an initial control parameter; Controlling the joints of the robot to execute a task according to the initial control parameter, and obtaining an execution result.

2. The method according to claim 1, wherein The obtaining of the controller model includes: Constructing a controller model according to a first relational expression, the preset gain parameter combination, and the control parameter; the first relational expression is used to characterize the relationship between the current joint position, the target joint position, and a first input parameter of the robot joint.

3. The method according to claim 2, wherein The preset gain parameter combination includes a proportional gain and a derivative gain; In the first relational expression, the control parameter is equal to the sum of a first product and a second product; the first product is the product between the first input parameter and the proportional gain; The second product is the product between the result obtained by performing a differential solution on the first input parameter and the derivative gain.

4. The robot joint control method according to any one of claims 1 to 3, characterized in that, The taking the objective function as an input parameter of the covariance matrix adaptive evolution algorithm, and calculating a gain parameter value corresponding to the preset gain parameter combination includes: In the case where the current iteration number exceeds a preset ratio of the total iteration number, determining an adjusted mean vector based on the mean vector generated in the current iteration round and the current optimal solution; the total iteration number is an input parameter of the covariance matrix adaptive evolution algorithm; Performing the next iteration round based on the adjusted mean vector; Until the iteration number reaches the total iteration number, obtaining the gain parameter value.

5. The robot joint control method according to claim 4, characterized in that The determining of the adjusted mean vector based on the mean vector generated in the current iteration round and the current optimal solution includes: Adding the mean vector weighted by a first factor and the current optimal solution weighted by a second factor to obtain an adjusted mean vector; the first factor is greater than the second factor.

6. The robot joint control method according to any one of claims 1 to 3, characterized in that, The taking the objective function as an input parameter of the covariance matrix adaptive evolution algorithm, and calculating a gain parameter value corresponding to the preset gain parameter combination includes: In the case where the current iteration number exceeds a preset ratio of the total iteration number and the difference between the mean vector obtained in the current iteration round and the expected torque is greater than a preset threshold, obtaining a task object of the robot in the current task scenario; the total iteration number is an input parameter of the covariance matrix adaptive evolution algorithm; Obtaining a torque execution interval corresponding to the task object; the expected torque is within the torque execution interval; Screening the mean vector obtained in the current iteration round according to the torque execution interval to obtain a screened mean vector; Performing the next iteration round based on the screened mean vector; Until the iteration number reaches the total iteration number, obtaining the gain parameter value.

7. The robot joint control method according to any one of claims 1 to 3, characterized in that, The method further includes the steps: In the case that the initial control parameters do not meet the expected control parameters, and / or the execution result does not meet the expected result, adjust the evolutionary parameter values of the covariance matrix adaptation evolution algorithm to obtain the adjusted evolutionary parameter values; Use the adjusted evolutionary parameter values and the objective function as the input parameters of the covariance matrix adaptation evolution algorithm, and calculate the adjusted gain parameter values; Use the adjusted gain parameter values as the input parameters of the controller model, calculate the adjusted control parameters, and control the joints of the robot again according to the adjusted control parameters.

8. The robot joint control method according to claim 7, wherein, The adjusting the evolutionary parameter values of the covariance matrix adaptation evolution algorithm to obtain the adjusted evolutionary parameter values includes: Obtain the task time limit information corresponding to the current task scenario of the robot and the single-round iteration duration of the covariance matrix adaptation evolution algorithm; Determine the adjusted total number of iterations according to the task time limit information and the single-round iteration duration; the adjusted evolutionary parameter values include the adjusted total number of iterations.

9. An electronic device, characterized in that, Includes: A memory, a processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the robot joint control method according to any one of claims 1 to 8.

10. A computer-readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the robot joint control method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Optimized particle-based particle filter target tracking method

    CN106127797A

  • Robot device controller, robot device arrangement and method for controlling a robot device

    CN112045675A

  • Mechanical arm control method, system, equipment and medium

    CN117644513A

  • Method of supporting adjustment of parameter set of robot, a non-transitory computer-readable storage medium, and information processing device

    US20220126440A1

  • Autonomous robust assembly planning

    US20230173673A1