A robot motion control model training method and a robot motion control method

By generating control instructions and hidden variables for multiple frames in the future, it predicts and updates the parameters of the robot motion control model, solving the problem of unstable robot motion and improving the stability and accuracy of control.

CN118466232BActive Publication Date: 2024-10-29BEIJING HUMANOID ROBOTICS INNOVATION CENTER CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410942347.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-10-29
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

Existing robot motion control methods do not move smoothly enough when faced with model changes, and the control methods based on reinforcement learning produce more random movements and the control is not accurate enough.

Method used

By training the robot state based on the current moment, the motion control model to be trained is used to generate control instructions and hidden variables for multiple frames in the future, predict the future robot state, and update the model parameters based on the predicted state and actual state to improve the model's prediction of the future state. accuracy.

Benefits of technology

It improves the stability and accuracy of robot motion control, makes subsequent control instructions more precise, and improves the stability of robot control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118466232B_ABST
    Figure CN118466232B_ABST
Patent Text Reader

Abstract

The present invention discloses a robot motion control model training method and a robot motion control method, which are applied to the field of intelligent control technology, including: based on the training robot state at the current moment, using the motion control model to be trained, obtaining the training control instructions and training hidden variables of the future preset number of frames; based on the training hidden variables, using the motion control model to be trained to predict and obtain the robot predicted state at the future preset moment; using a simulation engine to sequentially execute the training control instructions of the preset number of frames to obtain the actual state of the robot; according to the robot predicted state at the preset moment and the robot actual state, updating the parameters of the motion control model to be trained to obtain a trained motion control model. During training, the present application updates the model parameters according to the robot predicted state and the robot actual state, so that the model's prediction of the future robot state is closer to the actual robot state, thereby improving the stability of subsequent robot control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent control technology, and in particular to a robot motion control model training method and a robot motion control method. Background Art

[0002] At present, the motion control of robots is mainly based on the dynamic model method. This method is based on the robot model and the environment model for calculation. In addition, the underlying high-frequency control makes the execution of actions in a certain environment relatively stable and accurate, but it cannot cope well with changes in the robot model and the environment model. The reinforcement learning model method can make the generated motion control strategy able to cope with model changes by randomizing the robot model and the environment model during training. However, the control method based on reinforcement learning directly generates the underlying joint control instructions at the current moment, and the generated actions are often more random and more violent.

[0003] Therefore, the current method for controlling the movement of the robot has the technical problem that the robot movement is not stable enough. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a robot motion control model training method and a robot motion control method, which solve the technical problem that the robot motion is not stable enough in the prior art.

[0005] In order to solve the above technical problems, the present invention provides a robot motion control model training method, comprising:

[0006] Based on the training robot state at the current moment, the training control instructions and training hidden variables of the future preset number of frames are obtained by using the motion control model to be trained; wherein the preset number of frames is greater than 1, and the training hidden variables are unobservable random variables;

[0007] Based on the training latent variables, the motion control model to be trained is used to make predictions to obtain the predicted state of the robot at a preset time in the future; wherein the preset time is determined according to the parameter update cycle of the motion control model to be trained;

[0008] Utilizing the simulation engine to sequentially execute the training control instructions of the preset number of frames to obtain the actual state of the robot;

[0009] According to the predicted state of the robot at the preset moment and the actual state of the robot, the parameters of the motion control model to be trained are updated to obtain a trained motion control model.

[0010] Optionally, the relationship between the training control instruction of the preset number of frames and the preset time includes:

[0011] When the preset number of frames is n, the n moments corresponding to the n-frame training control instructions are respectively , ... , is the preset time; wherein, t is the current moment, is the parameter update period of the motion control model to be trained.

[0012] Optionally, updating the parameters of the motion control model to be trained according to the predicted state of the robot at the preset moment and the actual state of the robot includes:

[0013] Determine a state prediction reward according to the predicted state of the robot at the preset time and the corresponding actual state of the robot at the preset time;

[0014] Determine a task reward according to the actual state of the robot and the state of the environment obtained by the simulation engine;

[0015] The parameters of the motion control model to be trained are updated according to the state prediction reward and the task reward.

[0016] Optionally, the robot predicted state at the preset time and its corresponding preset time

[0017] The actual state of the robot at that moment determines the state prediction reward, including:

[0018] The predicted state of the robot at the preset moment is compared with the actual state of the robot at the preset moment to determine the state prediction reward; wherein, the closer the predicted state of the robot at the preset moment is to the actual state of the robot at the preset moment, the closer the state prediction reward is to 1, otherwise the state prediction reward is closer to 0.

[0019] Optionally, the state prediction reward is determined using the following formula:

[0020] , where j is the state prediction reward, is the actual state of the robot at the preset time, The robot is predicted to be in a state at the preset moment.

[0021] Optionally, updating the parameters of the motion control model to be trained according to the state prediction reward and the task reward includes:

[0022] The state prediction reward and the task reward are summed as a training reward;

[0023] According to the training reward, the parameters of the motion control model to be trained are updated.

[0024] Optionally, the training control instructions and training hidden variables of a preset number of frames in the future are obtained based on the training robot state at the current moment and using the motion control model to be trained, including:

[0025] Based on the training robot state at the current moment, using the strategy network in the motion control model to be trained, obtaining the training control instructions of the preset number of frames and the training latent variables;

[0026] Accordingly, the prediction based on the training latent variables and using the to-be-trained motion control model to obtain the predicted state of the robot at a preset time in the future includes:

[0027] Based on the training latent variables, the predicted state of the robot at the preset moment is obtained by utilizing the decoding network in the motion control model to be trained.

[0028] Optionally, the structure of the policy network is a multi-layer perceptron network structure, the input layer dimension of the policy network includes the actual state of the robot, and the output layer dimension of the policy network includes the robot control instructions and hidden variables;

[0029] The structure of the decoding network is the multi-layer perceptron network structure, the input layer dimension of the decoding network includes latent variables, and the output layer dimension of the decoding network includes the predicted state of the robot.

[0030] Optionally, the training latent variables include at least one of environmental characteristics, historical behavior patterns of the robot, and load capacity of the robot.

[0031] Optionally, the training robot state includes at least one of the position of each joint of the robot, the speed of each joint of the robot, and data fed back by an inertial sensor of the robot.

[0032] The present application also provides a robot motion control method, comprising:

[0033] Get the current robot status;

[0034] Based on the current robot state, a trained motion control model is used to obtain control instructions for a preset number of frames in the future; wherein the motion control model is the trained motion control model mentioned above;

[0035] Select a preset frame control instruction from the control instructions of the preset frame number to control the robot.

[0036] The present application also provides a robot motion control model training device, comprising:

[0037] A determination module is used to obtain the training control instructions and training hidden variables of a preset number of frames in the future based on the training robot state at the current moment and using the motion control model to be trained; wherein the preset number of frames is greater than 1, and the training hidden variables are unobservable random variables;

[0038] A prediction module, used to make predictions based on the training latent variables and using the motion control model to be trained to obtain a predicted state of the robot at a preset time in the future; wherein the preset time is determined according to a parameter update cycle of the motion control model to be trained;

[0039] An execution module, used to use a simulation engine to sequentially execute the training control instructions of the preset number of frames to obtain the actual state of the robot;

[0040] The updating module is used to update the parameters of the motion control model to be trained according to the predicted state of the robot at the preset moment and the actual state of the robot to obtain a trained motion control model.

[0041] The present application also provides a robot motion control device, comprising:

[0042] The status acquisition module is used to obtain the current robot status;

[0043] An instruction generation module, used to obtain control instructions for a preset number of future frames based on the current robot state using a trained motion control model; wherein the motion control model is the trained motion control model mentioned above;

[0044] The instruction selection module is used to select a preset frame control instruction from the control instructions of the preset frame number, so as to control the robot.

[0045] The present application also provides an electronic device, including:

[0046] Memory for storing computer programs;

[0047] A processor is used to execute the computer program to implement the steps of the above method.

[0048] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0049] The present application also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0050] The beneficial effects of the present invention are as follows: the robot motion control model outputs control instructions and hidden variables for multiple frames in the future during the training process, predicts the future robot state based on the hidden variables, and updates the model parameters according to the predicted robot state and the actual robot state, so that the model's prediction of the future robot state is closer to the actual robot state, and the subsequent control instructions generated based on the model are more accurate, thereby improving the stability of subsequent robot control.

[0051] In addition, the present invention also provides a robot motion control model training device, equipment and computer-readable storage medium, as well as a motion control method, device, equipment and computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] 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.

[0053] Figure 1 A flowchart of a robot motion control model training method provided by an embodiment of the present invention;

[0054] Figure 2 A flowchart of a robot motion control model training method provided by an embodiment of the present invention;

[0055] Figure 3 A structural framework diagram of a robot motion control model training method provided by an embodiment of the present invention;

[0056] Figure 4 A flowchart of a robot motion control method provided by an embodiment of the present invention;

[0057] Figure 5 A flowchart of a robot motion control method provided by an embodiment of the present invention;

[0058] Figure 6 A structural framework diagram of a robot motion control method provided by an embodiment of the present invention;

[0059] Figure 7 A schematic diagram of the structure of a robot motion control model training device provided by an embodiment of the present invention;

[0060] Figure 8 A schematic diagram of the structure of a robot motion control device provided by an embodiment of the present invention;

[0061] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0063] Please refer to Figure 1 , Figure 1 A flowchart of a robot motion control model training method provided by an embodiment of the present invention. The method may include:

[0064] S101, based on the training robot state at the current moment, using the motion control model to be trained, obtain the training control instructions and training latent variables of the future preset frame number; wherein the preset frame number is greater than 1, and the training latent variables are unobservable random variables.

[0065] The execution subject of this embodiment is an electronic device. For example, the electronic device in this embodiment can be a computer or the like.

[0066] This embodiment does not limit the specific type of the specific motion control model to be trained. For example, the motion control model to be trained in this embodiment can be a reinforcement learning model, such as Q-Learning (a reinforcement learning method based on value function, which learns the expected utility of taking a specific action in a given state, i.e., Q value), SARSA (an algorithm similar to Q-Learning, the difference is that it uses the actual next state and reward to update the current Q value, rather than using the method of maximizing future rewards). Since the reinforcement learning model has strong adaptability and flexibility, the adaptability and flexibility of the motion control model are improved.

[0067] The robot state in this embodiment may include at least one of the position of each joint of the robot, the speed of each joint of the robot, and the feedback data of the robot inertial sensor, and the feedback data of the robot inertial sensor includes parameters such as acceleration, angular velocity, and posture. These data are crucial for the motion control of the robot. Through high-precision measurement and data processing, the robot can accurately perceive its own motion state in space. It can be understood that by giving the state related to the joints related to the robot, the subsequent accurate control of the robot movement can be achieved.

[0068] In this embodiment, the control instructions of the preset frame number are control instructions for the next n frames, where n can be 5, 6, 8, 10, etc. The control instructions are expected position instructions for each joint of the robot.

[0069] The hidden variables in this embodiment include predictions of future states. Hidden variables can represent factors that are not directly observed by the robot, such as the potential state of the environment. By introducing these variables, the model can express problems more richly, thereby having a deeper understanding of complex scenarios. By abstracting some unobservable factors, the model is not only limited to specific observation data, but can also make inferences and decisions. This generalization ability is the key to dealing with unknown environments.

[0070] It should be further explained that the above-mentioned hidden variables may include at least one of environmental characteristics, historical behavior patterns of the robot, and the load capacity of the robot. The environmental characteristics in this embodiment are the environment in which the current robot is located, the historical behavior patterns of the robot in this embodiment refer to the historical robot operating state, and the load capacity of the robot in this embodiment refers to the maximum load mass that the robot can handle when performing a task. It can be understood that hidden variables refer to those random variables that cannot be directly observed but play an important role in the prediction and decision-making of the model. For robot behavior, these hidden variables can include multiple factors, such as environmental characteristics, historical behavior patterns of the robot, and physical and operational properties of the robot, such as load capacity. By comprehensively considering these factors, the model can better understand and predict the behavior and performance of the robot in a specific environment.

[0071] It should be further explained that, in order to improve the adaptability of the motion control model, the above training control instructions and training hidden variables for the future preset number of frames are obtained based on the current training robot state and the motion control model to be trained, which may include:

[0072] Based on the current state of the training robot, the policy network in the motion control model to be trained is used to obtain the training control instructions and training latent variables of the preset number of frames.

[0073] This embodiment does not limit the specific type of the policy network. For example, the policy network in this embodiment may be a convolutional neural network (CNN); or the policy network in this embodiment may also be a recurrent neural network. The structure of the policy network in this embodiment may be a multi-layer perceptron network structure (MLP), the input layer dimension of the policy network includes the actual state of the robot, the output layer dimension of the policy network includes the robot control instructions and hidden variables, and the multi-layer perceptron network structure can learn complex feature representations through multi-layer nonlinear transformations, and is suitable for processing decision problems in high-dimensional state space.

[0074] S102, based on the training latent variables, using the motion control model to be trained to make predictions, and obtain the predicted state of the robot at a preset time in the future; wherein the preset time is determined according to the parameter update cycle of the motion control model to be trained.

[0075] In this embodiment, the hidden variables are used as the input of the motion control model to be trained to obtain the predicted state of the robot at the preset time. When the preset number of frames is n, the n moments corresponding to the n-frame training control instructions are , ... , is the preset time; t For the current moment, is the parameter update period of the motion control model to be trained.

[0076] It should be further explained that, in order to improve the adaptability of the motion control model, the above-mentioned prediction based on the training hidden variables and using the motion control model to be trained to obtain the predicted state of the robot at a preset time in the future may include:

[0077] Based on the training latent variables, the predicted state of the robot at the preset moment is obtained by utilizing the decoding network in the motion control model to be trained.

[0078] This embodiment does not limit the specific type of the decoding network. For example, the decoding network in this embodiment may be a recursive neural network (RNN); or the decoding network in this embodiment may also be a convolutional neural network (CNN). The structure of the decoding network in this embodiment may be a multi-layer perceptron network structure (MLP), the input layer dimension of the decoding network includes hidden variables, and the output layer dimension of the decoding network includes the robot prediction state.

[0079] S103, using the simulation engine to sequentially execute the training control instructions of a preset number of frames to obtain the actual state of the robot.

[0080] The actual state of the robot obtained by using the simulation engine can be used as the above-mentioned training robot state.

[0081] The simulation engine is used to execute the preset number of frames of training control instructions in sequence, and in addition to obtaining the actual state of the robot, the state of the environment is also obtained.

[0082] This embodiment does not limit the specific execution order of steps S103 and S102. For example, steps S103 and S102 may be executed simultaneously; or step S103 may be executed first and then step S102; or step S102 may be executed first and then step S103.

[0083] S104, updating the parameters of the motion control model to be trained according to the predicted state of the robot at a preset moment and the actual state of the robot, to obtain a trained motion control model.

[0084] It should be further explained that the above-mentioned updating of the parameters of the motion control model to be trained according to the predicted state of the robot at the preset moment and the actual state of the robot may include:

[0085] According to the predicted state of the robot at the preset moment and the actual state of the robot, the parameters of the policy network and the decoding network of the motion control model to be trained are updated.

[0086] This embodiment does not limit the specific process of updating the parameters of the motion control model to be trained according to the robot's predicted state at a preset moment and the robot's actual state. For example, this embodiment can determine the accuracy of the prediction by comparing the robot's predicted state at a preset moment with the robot's actual state at a preset moment, and obtain a state prediction reward, thereby using the state prediction reward to update the parameters of the motion control model to be trained, and obtain a trained motion control model. Or this embodiment can use the state prediction reward and the task reward to add and process as a total reward to update the parameters of the motion control model to be trained.

[0087] It should be further explained that, in order to improve the stability and reliability of the motion control model, the above-mentioned updating of the parameters of the motion control model to be trained according to the predicted state of the robot at the preset moment and the actual state of the robot may include:

[0088] S1041, determining a state prediction reward according to the predicted state of the robot at a preset time and its corresponding actual state of the robot at the preset time;

[0089] S1042, determining a task reward according to the actual state of the robot and the state of the environment obtained by the simulation engine;

[0090] S1043, updating the parameters of the motion control model to be trained according to the state prediction reward and the task reward.

[0091] When performing model reward processing, the embodiment of the present invention uses state prediction rewards and task rewards together to perform model reward processing, thereby improving the generalization ability, stability and reliability of the motion control model.

[0092] It should be further explained that, in order to improve the stability of the motion control model, the above-mentioned determination of the state prediction reward based on the predicted state of the robot at the preset moment and the corresponding actual state of the robot at the preset moment may include:

[0093] The predicted state of the robot at the preset moment is compared with the actual state of the robot at the preset moment to determine the state prediction reward; wherein, the closer the predicted state of the robot at the preset moment is to the actual state of the robot at the preset moment, the closer the state prediction reward is to 1, otherwise the state prediction reward is closer to 0.

[0094] The state prediction reward in this embodiment can be determined using the following formula: , where j is the state prediction reward, is the actual state of the robot at the preset time, Predict the robot's state at a preset time.

[0095] It should be further explained that, in order to improve the accuracy of the reward, the above-mentioned updating of the parameters of the motion control model to be trained according to the state prediction reward and the task reward may include: summing the state prediction reward and the task reward as the training reward; and updating the parameters of the motion control model to be trained according to the training reward. The embodiment of the present invention obtains the total training reward by adding the state prediction reward and the task reward, thereby updating the parameters of the motion control model to be trained according to the total training reward, thereby improving the accuracy of rewarding the model.

[0096] By using the robot motion control model training method provided by the embodiment of the present invention, the trained robot motion control model is essentially a predictive reinforcement learning model.

[0097] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2 A flowchart of a robot motion control model training method provided by an embodiment of the present invention may specifically include:

[0098] S201, according to the actual state of the current robot obtained by the simulation engine, the policy network in the predictive reinforcement learning model to be trained is used to obtain the control instructions and hidden variables of the future preset frame number.

[0099] The framework diagram corresponding to this embodiment is as follows Figure 3 shown.

[0100] In this embodiment, the robot state includes the position of each joint of the robot, speed feedback and feedback from the robot inertial sensor, and the control instruction is the expected position instruction for each joint of the robot.

[0101] In this embodiment, the policy network is a multi-layer perceptron network structure (MLP), the input layer dimension is the dimension m of the robot state, and the output layer dimension is s+l, where s is the dimension of the robot control instruction and l is the dimension of the hidden variable (which can be selected by yourself).

[0102] The output of the strategy network in this embodiment includes control instructions and hidden variables for the next n frames; the hidden variables are the control instructions for the next n frames. The variable used to predict the robot state at the moment, t is the current moment, is the model parameter update cycle during training; the control instructions for the next n frames correspond to the future , ... There are n time control instructions in total.

[0103] S202, according to the latent variables, using the decoding network in the predictive reinforcement learning model to be trained, to obtain the predicted state of the robot at a preset time in the future.

[0104] In this embodiment, the latent variables are generated through a decoding network. Prediction of the robot state at time instant.

[0105] In this embodiment, the decoding network is also a multi-layer perceptron network structure (MLP), the input layer dimension is the dimension l of the latent variable, and the output layer dimension is the dimension m of the robot state.

[0106] S203, using the simulation engine to sequentially execute each control instruction in the preset frame number of control instructions to obtain the actual state of the robot and the state of the environment.

[0107] In this embodiment, the simulation engine The simulation cycle executes the control instructions at n moments in sequence to obtain the actual state of the robot and the environment state at each moment.

[0108] S204, comparing the predicted state of the robot at a preset time with the actual state of the robot at the preset time, and determining a state prediction reward.

[0109] In this embodiment, the prediction accuracy is evaluated by comparing the actual state of the robot with the predicted state of the robot, and the state prediction reward is obtained. The specific form is ,in, for The actual status of the robot at the moment, for The robot’s predicted state at the moment. It can be seen that the closer the robot’s predicted state is to the robot’s actual state, the closer the state prediction reward is to 1, and the greater the deviation between the robot’s predicted state and the robot’s actual state, the closer the state prediction reward is to 0.

[0110] S205, determining a total training reward according to the task reward and the state prediction reward, and updating the parameters of the policy network and the decoding network in the predictive reinforcement learning model to be trained according to the total training reward, to obtain a trained motion control model.

[0111] In this embodiment, the task reward can be determined according to the actual state of the robot, the state of the environment and the expected state. The task reward needs to be designed by the user for the training task.

[0112] In this embodiment, the state prediction reward and the task reward are added together as the total training reward to simultaneously update the network parameters of the policy network and the decoding network. The network update algorithm can adopt a proximal policy update algorithm.

[0113] By adopting the robot motion control model training method provided by the embodiment of the present invention, the motion control model outputs control instructions and hidden variables for multiple frames in the future during the training process, predicts the future robot state based on the hidden variables, and updates the model parameters according to the predicted robot state and the actual robot state, so that the model's prediction of the future robot state is closer to the actual robot state, and the subsequent control instructions generated based on the model are more accurate, thereby improving the stability of subsequent robot control.

[0114] Please refer to Figure 4 , Figure 4 A flowchart of a robot motion control method provided by an embodiment of the present invention. The method may include:

[0115] S301, obtaining the current robot status.

[0116] The execution subject of this embodiment is an electronic device, specifically a control device of a robot.

[0117] S302, based on the current robot state, using the trained motion control model to obtain control instructions for a preset number of frames in the future; wherein the motion control model is the trained motion control model mentioned above.

[0118] S303, selecting a preset frame control instruction from the control instructions of the preset frame number, for controlling the robot.

[0119] In this embodiment, the preset frame may be the first frame.

[0120] After the robot is controlled according to the preset frame control instruction, this embodiment can obtain an up-to-date current robot state, thereby obtaining the control instruction based on the up-to-date current robot state.

[0121] For example, when the application scenario is path planning, before the task starts, global path planning is performed based on known environmental information to determine the basic route of the robot from the starting point to the end point. During the execution process, local path adjustments can be made based on the real-time robot status and preset frame control instructions to cope with changes and uncertainties in the actual environment.

[0122] The motion control model of the embodiment of the present invention outputs control instructions for multiple frames in the future. The robot only needs to execute the first frame of instructions each time to obtain the latest robot state corresponding to the instruction, and then regenerate the latest future multi-frame control instructions based on the latest robot state corresponding to the instruction to achieve control of the robot.

[0123] In order to make the present invention easier to understand, please refer to Figure 5 , Figure 5 An example flow chart of a robot motion control method provided by an embodiment of the present invention may specifically include:

[0124] S401, obtaining the current robot status.

[0125] The framework diagram corresponding to this embodiment is as follows: Figure 6 shown.

[0126] S402, determining the control instructions and hidden variables for a preset number of future frames using the policy network in the predictive reinforcement learning model according to the current robot state; wherein the predictive reinforcement learning model is the trained motion control model mentioned above.

[0127] S403, sending the first frame control instruction among the preset frame control instructions to the robot, without performing any processing on the remaining frame control instructions and hidden variables.

[0128] In this embodiment, when the network is deployed, the calculation period of the policy network is , the policy network receives the current robot state and outputs the control instructions and hidden variables for the next n frames. Only the first frame, i.e. The control command at the moment will be sent to the robot for execution, and the control commands and hidden variables at other moments do not participate in the control. Using the predictive reinforcement learning model, the control frequency at deployment is , which is n times the training frequency, obtains a higher control frequency than general reinforcement learning deployment and achieves better control effects.

[0129] The following is an introduction to a robot motion control model training device provided by an embodiment of the present invention. The robot motion control model training device described below and the robot motion control model training method described above can be referenced to each other.

[0130] Please refer to Figure 7 , Figure 7 A schematic diagram of the structure of a robot motion control model training device provided by an embodiment of the present invention may include:

[0131] The determination module 100 is used to obtain the training control instructions and training latent variables of the future preset number of frames based on the training robot state at the current moment and using the motion control model to be trained; wherein the preset number of frames is greater than 1, and the training latent variables are unobservable random variables;

[0132] A prediction module 200 is used to predict the robot state at a preset time in the future based on the training latent variables and using the motion control model to be trained; wherein the preset time is determined according to the parameter update cycle of the motion control model to be trained;

[0133] An execution module 300 is used to use a simulation engine to sequentially execute the training control instructions of the preset number of frames to obtain the actual state of the robot;

[0134] The updating module 400 is used to update the parameters of the motion control model to be trained according to the predicted state of the robot at the preset moment and the actual state of the robot to obtain a trained motion control model.

[0135] Further, based on the above embodiment, the relationship between the above-mentioned training control instruction of the preset number of frames and the preset time may include:

[0136] When the preset number of frames is n, the n moments corresponding to the n-frame training control instructions are respectively , ... , is the preset time; wherein, t is the current moment, is the parameter update period of the motion control model to be trained.

[0137] Further, based on any of the above embodiments, the update module 400 may include:

[0138] A first reward determination unit, configured to determine a state prediction reward according to the predicted state of the robot at the preset moment and the corresponding actual state of the robot at the preset moment;

[0139] A second reward determination unit, used to determine a task reward according to the actual state of the robot and the environment state obtained by the simulation engine;

[0140] An updating unit is used to update the parameters of the motion control model to be trained according to the state prediction reward and the task reward.

[0141] Further, based on the above embodiment, the above-mentioned first reward determination unit is specifically used to compare the predicted state of the robot at the preset moment with the actual state of the robot at the preset moment to determine the state prediction reward; wherein, the closer the predicted state of the robot at the preset moment and the actual state of the robot at the preset moment are, the closer the state prediction reward is to 1, otherwise the state prediction reward is closer to 0.

[0142] Further, based on the above embodiment, the state prediction reward is determined using the following formula:

[0143] , where j is the state prediction reward, is the actual state of the robot at the preset time, The robot is predicted to be in a state at the preset moment.

[0144] Further, based on any of the above embodiments, the above updating unit may include:

[0145] A summing subunit, used for summing the state prediction reward and the task reward as a training reward;

[0146] An updating subunit is used to update the parameters of the motion control model to be trained according to the training reward.

[0147] Further, based on any of the above embodiments, the above determination module 100 is specifically used to obtain the training control instructions and the training latent variables of the preset number of frames based on the training robot state at the current moment and using the strategy network in the motion control model to be trained;

[0148] Correspondingly, the prediction module 200 is specifically used to obtain the predicted state of the robot at the preset moment based on the training latent variables and using the decoding network in the motion control model to be trained.

[0149] Further, based on the above embodiment, the structure of the policy network is a multi-layer perceptron network structure, the input layer dimension of the policy network includes the actual state of the robot, and the output layer dimension of the policy network includes robot control instructions and hidden variables; the structure of the decoding network is the multi-layer perceptron network structure, the input layer dimension of the decoding network includes hidden variables, and the output layer dimension of the decoding network includes the predicted state of the robot.

[0150] Further, based on any of the above embodiments, the above training latent variables include at least one of environmental characteristics, historical behavior patterns of the robot and the load capacity of the robot.

[0151] Further, based on any of the above embodiments, the above training robot state includes at least one of the positions of each joint of the robot, the speed of each joint of the robot, and data fed back by an inertial sensor of the robot.

[0152] It should be noted that the order of the modules and units in the above-mentioned robot motion control model training device can be changed without affecting the logic.

[0153] Please refer to Figure 8 , Figure 8 A schematic diagram of the structure of a robot motion control device provided by an embodiment of the present invention may include:

[0154] A state acquisition module 500 is used to obtain the current state of the robot;

[0155] The instruction generation module 600 is used to obtain the control instructions of the preset number of future frames based on the current robot state by using the trained motion control model; wherein the motion control model is the trained motion control model mentioned above;

[0156] The instruction selection module 700 is used to select a preset frame control instruction from the control instructions of the preset frame number, so as to control the robot.

[0157] It should be noted that the order of the modules and units in the above robot motion control device can be changed without affecting the logic.

[0158] An electronic device provided by an embodiment of the present invention is introduced below. The electronic device described below and the robot motion control model training method and motion control method described above can be referenced to each other.

[0159] Please refer to Fig. 9 , Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention may include:

[0160] A memory 10, used for storing computer programs;

[0161] The processor 20 is used to execute a computer program to implement the above-mentioned robot motion control model training method and / or motion control method.

[0162] The memory 10 , the processor 20 , and the communication interface 30 all communicate with each other via a communication bus 40 .

[0163] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:

[0164] Based on the current state of the training robot, the training control instructions and training latent variables of the future preset number of frames are obtained by using the motion control model to be trained; wherein the preset number of frames is greater than 1, and the training latent variables are unobservable random variables;

[0165] Based on the training latent variables, the motion control model to be trained is used to make predictions to obtain the predicted state of the robot at a preset time in the future; wherein the preset time is determined according to the parameter update cycle of the motion control model to be trained;

[0166] The simulation engine is used to sequentially execute the training control instructions of the preset number of frames to obtain the actual state of the robot;

[0167] According to the predicted state of the robot at a preset moment and the actual state of the robot, the parameters of the motion control model to be trained are updated to obtain a trained motion control model.

[0168] Or a program that:

[0169] Get the current robot status;

[0170] Based on the current robot state, the trained motion control model is used to obtain control instructions for a preset number of frames in the future; wherein the motion control model is the trained motion control model mentioned above;

[0171] Select a preset frame control instruction from the control instructions of the preset frame number to control the robot.

[0172] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0173] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.

[0174] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .

[0175] The communication interface 30 may be an interface of a communication module, and is used to connect to other devices or systems.

[0176] Of course, it should be noted that Fig. 9 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present invention. In actual applications, the electronic device may include Fig. 9 More or fewer components than shown, or combinations of certain components.

[0177] The computer-readable storage medium provided in an embodiment of the present invention is introduced below. The computer-readable storage medium described below and the robot motion control model training method and / or motion control method described above can be referenced to each other.

[0178] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the robot motion control model training method and / or motion control method described above are implemented. The computer-readable storage medium may include: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0179] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0180] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0181] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0182] The above is a detailed introduction to a robot motion control model training method and a robot motion control method provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A robot motion control model training method, characterized in that: include: Based on the training robot state at the current moment, the training control instructions and training hidden variables of the future preset number of frames are obtained by using the motion control model to be trained; wherein the preset number of frames is greater than 1, and the training hidden variables are unobservable random variables; Based on the training latent variables, the motion control model to be trained is used to make predictions to obtain the predicted state of the robot at a preset time in the future; wherein the preset time is determined according to the parameter update cycle of the motion control model to be trained; Utilizing the simulation engine to sequentially execute the training control instructions of the preset number of frames to obtain the actual state of the robot and the state of the environment; According to the predicted state of the robot at the preset moment and the actual state of the robot, as well as the environmental state, the parameters of the motion control model to be trained are updated to obtain a trained motion control model; Wherein, updating the parameters of the motion control model to be trained according to the predicted state of the robot at the preset moment, the actual state of the robot, and the environmental state to obtain the trained motion control model includes: According to the robot's predicted state at the preset time and its corresponding actual state of the robot at the preset time, the state prediction reward is determined; the formula of the state prediction reward is: , where j is the state prediction reward, is the actual state of the robot at the preset time, Predict the robot's state at a preset moment; Determining a task reward according to the actual state of the robot and the state of the environment obtained by the simulation engine; The parameters of the motion control model to be trained are updated according to the state prediction reward and the task reward.

2. The robot motion control model training method according to claim 1, wherein The feature is that the relationship between the training control instruction of the preset number of frames and the preset time includes: When the preset number of frames is n, the n moments corresponding to the n-frame training control instructions are respectively , ... , is the preset time; wherein, t is the current moment, is the parameter update period of the motion control model to be trained.

3. The robot motion control model training method according to claim 1, characterized in that: The determining of the state prediction reward according to the predicted state of the robot at the preset moment and the corresponding actual state of the robot at the preset moment includes: The predicted state of the robot at the preset moment is compared with the actual state of the robot at the preset moment to determine the state prediction reward; wherein, the closer the predicted state of the robot at the preset moment is to the actual state of the robot at the preset moment, the closer the state prediction reward is to 1, otherwise the state prediction reward is closer to 0.

4. The robot motion control model training method according to claim 1, characterized in that: The updating of the parameters of the motion control model to be trained according to the state prediction reward and the task reward includes: The state prediction reward and the task reward are summed as a training reward; According to the training reward, the parameters of the motion control model to be trained are updated.

5. The robot motion control model training method according to any one of claims 1 to 4, characterized in that: The training robot state at the current moment is based on the motion control model to be trained to obtain the training control instructions and training hidden variables of the future preset frame number, including: Based on the training robot state at the current moment, using the strategy network in the motion control model to be trained, obtaining the training control instructions of the preset number of frames and the training latent variables; Accordingly, the prediction based on the training latent variables and using the to-be-trained motion control model to obtain the predicted state of the robot at a preset time in the future includes: Based on the training latent variables, the predicted state of the robot at the preset moment is obtained by utilizing the decoding network in the motion control model to be trained.

6. The robot motion control model training method according to claim 5, characterized in that: The structure of the strategy network is a multi-layer perceptron network structure, the input layer dimension of the strategy network includes the actual state of the robot, and the output layer dimension of the strategy network includes the robot control instructions and hidden variables; The structure of the decoding network is the multi-layer perceptron network structure, the input layer dimension of the decoding network includes latent variables, and the output layer dimension of the decoding network includes the predicted state of the robot.

7. The robot motion control model training method according to any one of claims 1 to 4, characterized in that: The training latent variables include at least one of environmental characteristics, historical behavior patterns of the robot, and the load capacity of the robot.

8. The robot motion control model training method according to any one of claims 1 to 4, characterized in that: The training robot state includes at least one of the position of each joint of the robot, the speed of each joint of the robot, and data fed back by an inertial sensor of the robot.

9. A robot motion control method, characterized in that: include: Get the current robot status; Based on the current robot state, a trained motion control model is used to obtain control instructions for a preset number of frames in the future; wherein the motion control model is a trained motion control model according to any one of claims 1 to 8; Select a preset frame control instruction from the control instructions of the preset frame number to control the robot.

10. A robot motion control model training device, characterized in that: include: A determination module is used to obtain the training control instructions and training hidden variables of a preset number of frames in the future based on the training robot state at the current moment and using the motion control model to be trained; wherein the preset number of frames is greater than 1, and the training hidden variables are unobservable random variables; A prediction module, used to make predictions based on the training latent variables and using the motion control model to be trained to obtain a predicted state of the robot at a preset time in the future; wherein the preset time is determined according to a parameter update cycle of the motion control model to be trained; An execution module, used to use a simulation engine to sequentially execute the training control instructions of the preset number of frames to obtain the actual state of the robot and the state of the environment; An updating module, used for updating the parameters of the motion control model to be trained according to the predicted state of the robot at the preset moment and the actual state of the robot, so as to obtain a trained motion control model; Among them, the update module includes: The state prediction reward determination unit is used to determine the state prediction reward according to the robot prediction state at the preset time and the corresponding actual state of the robot at the preset time; the formula of the state prediction reward is: , where j is the state prediction reward, is the actual state of the robot at the preset time, Predict the robot's state at a preset moment; A task reward determination unit, used to determine a task reward according to the actual state of the robot and the state of the environment obtained by the simulation engine; A parameter updating unit is used to update the parameters of the motion control model to be trained according to the state prediction reward and the task reward.

11. A robot motion control device, characterized in that: include: The status acquisition module is used to obtain the current robot status; An instruction generation module, used to obtain control instructions for a preset number of future frames based on the current robot state using a trained motion control model; wherein the motion control model is a trained motion control model according to any one of claims 1 to 8; The instruction selection module is used to select a preset frame control instruction from the control instructions of the preset frame number, so as to control the robot.

12. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the method according to any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Robot control parameter adjustment method and device, electronic equipment and storage medium

    CN118219248A