Robot motion control method and system based on deep reinforcement learning and CPG
Through the combination of deep reinforcement learning and CPG models, the problem of insufficient adaptability of traditional quadruped robot control methods in complex environments is solved, and efficient terrain adaptation and stable movement of quadruped robots are achieved.
Patent Information
- Application Number
- CN202211012992.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional quadruped robot control methods require a large amount of calculations, lack the ability to adapt to complex environments, and cannot meet the control needs in complex environments.
A robot motion control method based on deep reinforcement learning and CPG is used to build a CPG model through Hopf oscillator for Trot gait planning. The pre-trained DDPG model is used as a feedback adjustment module to adjust the robot's foot posture to improve terrain adaptability and Learning efficiency.
It enhances the terrain adaptability and movement stability of the quadruped robot, and improves the learning efficiency and movement performance of the quadruped robot.
Smart Images

Figure CN115291619B
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of robot motion control, and in particular, relates to a robot motion control method and system based on deep reinforcement learning and CPG. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] With the rapid development of robotics and artificial intelligence technology, the motion control research of mobile robots has become a research hotspot in the field of robotics. Common mobile robots include legged robots, tracked robots and wheeled robots. Legged robots mainly include bipedal, quadrupedal and multi-legged robots. From the perspective of structure and characteristics, quadrupedal robots have stronger stability and maneuverability than bipedal and multi-legged robots. The inventors found that the traditional quadrupedal robot control method has a large amount of calculation, and researchers need to design parameters and debug separately for each terrain. It lacks the ability to adapt to complex environments and cannot meet the control requirements of four groups of robots in complex environments. Summary of the invention
[0004] In order to solve the above problems, the present disclosure provides a robot motion control method and system based on deep reinforcement learning and CPG. The scheme builds a CPG model through a Hopf oscillator, uses the model to perform Trot gait planning, uses the planned gait as the initial guiding gait, and designs a DDPG-based deep reinforcement learning controller from the aspects of exploring noise selection, state space and action space, reward function, termination condition and deep network structure. The controller is used as a feedback adjustment module to improve the robot's motion performance and enhance the terrain adaptability of the quadruped robot. At the same time, the learning efficiency of the quadruped robot and the stability of the robot's motion are improved.
[0005] According to a first aspect of an embodiment of the present disclosure, a robot motion control method based on deep reinforcement learning and CPG is provided, comprising:
[0006] Acquire the robot's state information in real time; wherein the state information is based on a pre-constructed state space and is obtained through sensors provided on the robot body;
[0007] Based on the state information, using a pre-trained DDPG model, obtain the corresponding action under the current state information of the robot;
[0008] The action is used as a feedback adjustment amount to adjust the foot posture on the reference trajectory output by the pre-built CPG model, and the reference trajectory output is applied to the motors of each joint of the robot to achieve the motion control of the robot.
[0009] Furthermore, the pre-trained DDPG model and the pre-built CPG model constitute the robot motion controller, which specifically includes an open-loop part and a feedback adjustment part, wherein the open-loop part adopts a classic gait control method and provides a reference trajectory through the CPG model; the feedback adjustment part is composed of the DDPG model, and the foot posture on the reference trajectory is adjusted based on the output of the DDPG model.
[0010] Furthermore, the output of the motion controller is specifically expressed as follows:
[0011] a=a c +μa p
[0012] Among them, a c represents the output of the open loop part, which is the reference trajectory curve of the hip and knee joints, a p It is the output of the feedback adjustment part, which is used as the feedback adjustment amount to adjust the reference trajectory. μ is the control parameter used to adjust the size of the reinforcement learning output.
[0013] Furthermore, the CPG model is constructed through a Hopf oscillator, and Trot gait planning is performed based on the CPG model.
[0014] Furthermore, the state space is the environmental information obtained by the intelligent agent, including the state information composed of the motor rotation angle of each joint, the position and posture information of the fuselage, and the angular velocity of the fuselage.
[0015] Furthermore, the action is obtained based on a pre-constructed action space, and the action space is represented by the angle values of the motors of each joint of the robot foot.
[0016] Furthermore, the DDPG model includes an Online Actor network, a Target Actor network, an Online Critic network and a Target Critic network, all of which are composed of independent deep neural networks.
[0017] According to a second aspect of an embodiment of the present disclosure, a robot motion control system based on deep reinforcement learning and CPG is provided, including:
[0018] A data acquisition unit, which is used to acquire the status information of the robot in real time; wherein the status information is obtained based on a pre-constructed state space through sensors provided on the robot body;
[0019] A feedback adjustment amount acquisition unit, which is used to obtain the corresponding action of the robot under the current state information based on the state information and using a pre-trained DDPG model;
[0020] A motion control unit is used to use the action as a feedback adjustment amount to adjust the foot posture on the reference trajectory output by the pre-built CPG model, and output the reference trajectory to act on the motors of each joint of the robot to achieve motion control of the robot.
[0021] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored and running on the memory, wherein when the processor executes the program, the robot motion control method based on deep reinforcement learning and CPG is implemented.
[0022] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the robot motion control method based on deep reinforcement learning and CPG is implemented.
[0023] Compared with the prior art, the beneficial effects of the present invention are:
[0024] The present disclosure provides a robot motion control method and system based on deep reinforcement learning and CPG. The scheme builds a CPG model through a Hopf oscillator, uses the model to perform Trot gait planning, uses the planned gait as the initial guiding gait, and designs a DDPG-based deep reinforcement learning controller from the aspects of exploring noise selection, state space and action space, reward function, termination condition and deep network structure. The controller is used as a feedback adjustment module to improve the robot's motion performance and enhance the terrain adaptability of the quadruped robot. At the same time, the learning efficiency of the quadruped robot and the stability of the robot's motion are improved.
[0025] Advantages of additional aspects of the present disclosure will be given in part in the following description and in part will become apparent from the following description or will be learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.
[0027] Figure 1 It is a schematic diagram of the overall framework of trajectory guidance of the robot motion control method based on deep reinforcement learning and CPG described in the embodiment of the present disclosure;
[0028] Figure 2 It is a schematic diagram of the CPG model described in the embodiment of the present disclosure;
[0029] Figure 3 is a schematic diagram of a reference trajectory output curve described in an embodiment of the present disclosure;
[0030] Figure 4 is a flow chart of the DDPG model algorithm described in the embodiments of the present disclosure;
[0031] Figure 5 This is a schematic diagram of a hill climbing training scenario described in an embodiment of the present disclosure;
[0032] Figure 6 (a) to Figure 6 (h) is a schematic diagram of the climbing process of the robot at different times described in the embodiment of the present disclosure;
[0033] Figure 7 It is a schematic diagram of the round reward curve described in the embodiment of the present disclosure;
[0034] Figure 8 It is a schematic diagram of the three-dimensional displacement of the center of mass of the robot body described in the embodiment of the present disclosure;
[0035] Fig. 9 It is a schematic diagram of the change curve of the roll angle, pitch angle and yaw angle of the robot body when the robot described in the embodiment of the present disclosure is in a steady state;
[0036] Fig.10 Schematic diagram of actual output curves of the hip joint and knee joint of the right front leg of the quadruped robot described in the embodiment of the present disclosure;
[0037] Fig.11 It is a schematic diagram of the change curve of the roll angle, pitch angle and yaw angle of the robot body when the control coefficient μ described in the embodiment of the present disclosure is 0. DETAILED DESCRIPTION
[0038] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0039] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0040] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0041] In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other.
[0042] Embodiment 1:
[0043] The purpose of this embodiment is to provide a robot motion control method based on deep reinforcement learning and CPG.
[0044] A robot motion control method based on deep reinforcement learning and CPG, comprising:
[0045] Acquire the robot's state information in real time; wherein the state information is based on a pre-constructed state space and is obtained through sensors provided on the robot body;
[0046] Based on the state information, using a pre-trained DDPG model, obtain the corresponding action under the current state information of the robot;
[0047] The action is used as a feedback adjustment amount to adjust the foot posture on the reference trajectory output by the pre-built CPG model, and the reference trajectory output is applied to the motors of each joint of the robot to achieve the motion control of the robot.
[0048] Furthermore, the pre-trained DDPG model and the pre-built CPG model constitute the robot motion controller, which specifically includes an open-loop part and a feedback adjustment part, wherein the open-loop part adopts a classic gait control method and provides a reference trajectory through the CPG model; the feedback adjustment part is composed of the DDPG model, and the foot posture on the reference trajectory is adjusted based on the output of the DDPG model.
[0049] Furthermore, the output of the motion controller is specifically expressed as follows:
[0050] a=a c +μa p
[0051] Among them, a c represents the output of the open loop part, which is the reference trajectory curve of the hip and knee joints, a p It is the output of the feedback adjustment part, which is used as the feedback adjustment amount to adjust the reference trajectory. μ is the control parameter used to adjust the size of the reinforcement learning output.
[0052] Furthermore, the CPG model is constructed through a Hopf oscillator, and Trot gait planning is performed based on the CPG model.
[0053] Furthermore, the state space is the environmental information obtained by the intelligent agent, including the state information composed of the motor rotation angle of each joint, the position and posture information of the fuselage, and the angular velocity of the fuselage.
[0054] Furthermore, the action is obtained based on a pre-constructed action space, and the action space is represented by the angle values of the motors of each joint of the robot foot.
[0055] Furthermore, the DDPG model includes an Online Actor network, a Target Actor network, an Online Critic network and a Target Critic network, all of which are composed of independent deep neural networks.
[0056] Specifically, for ease of understanding, the solution described in this embodiment is described in detail below with reference to the accompanying drawings:
[0057] This embodiment proposes a robot motion control method based on deep reinforcement learning and CPG for the problem of quadruped robot motion control. The reinforcement learning method is used to enhance the terrain adaptability of the quadruped robot, and the traditional method is combined to improve the learning efficiency of the quadruped robot and the stability of the robot motion. The main control idea of the method described in this embodiment is: to generate a guiding trajectory through the CPG model, and to use the reinforcement learning controller as a feedback adjustment module to improve the robot's learning ability and adaptive ability. Trot gait is one of the most common gaits of quadruped animals when moving. In this gait, the quadruped robot has a stable body and a high moving speed. Trot gait is used as the guiding gait of the quadruped robot.
[0058] Furthermore, the motion controller design for the robot in this embodiment is divided into two parallel parts: one is an open-loop part, which uses the classic gait control method to provide a reference trajectory; the other is a feedback adjustment part, which is composed of a reinforcement learning network. The leg posture on the reference trajectory is adjusted according to the observation results of the robot sensor. The overall expression is as follows:
[0059] a=a c +μa p (1)
[0060] Among them, a c represents the output of the open loop part, which is the reference trajectory curve of the hip and knee joints, a p is the output of the reinforcement learning network. As a feedback adjustment, it can adjust the reference trajectory. μ is a control parameter that can adjust the size of the reinforcement learning output. When μ=0, the controller output becomes the reference trajectory output, and the controller no longer has learning ability. The reference trajectory is output by the CPG network, and the feedback adjustment is learned by the DDPG network. The overall design framework is as follows: Figure 1 shown.
[0061] Furthermore, the construction of the trajectory generator in this embodiment is as follows:
[0062] To build a CPG model, we must first build a CPG neuron oscillator to generate a rhythmic control signal for a single leg. To build a CPG network model based on a Hopf oscillator, the mathematical expression of a single Hopf oscillator is as follows:
[0063]
[0064] Among them, x and y are the state variables of the Hopf oscillator, which are used to describe the output curve of the oscillator; α>0 is a constant that determines the convergence speed of the state variables; μ is the bifurcation parameter. When μ>0, the oscillator oscillates and determines the output amplitude of the oscillator. r 2 =x 2 +y 2 ω represents the oscillation frequency of the oscillator. The CPG model consists of four Hopf oscillators, each of which controls the periodic motion of one leg. The CPG model is as follows: Figure 2 As shown in the figure, the oscillator output signal x controls the swing of the hip joint, and the transformed output signal y controls the swing of the knee joint. By improving the CPG network, the complexity of the model is reduced and the computational efficiency is improved.
[0065] The overall mathematical expression of the CPG model is as follows:
[0066]
[0067] Among them, i=1,2,3,4, θ hi is the pitch hip joint angle control signal of the i-th leg; θ ki A is the pitch knee joint angle control signal of the i-th leg; k , A h are the swing amplitudes of the knee joint and hip joint, respectively, where μ = A h 2 sgn(ψ) is a symbolic function, where ψ represents the joint type, and its expression is as follows:
[0068]
[0069] Setting A k =0.17rad, A h =0.21rad,β,α,a,ω sw To realize the Trot gait learning of the quadruped robot, the diagonal legs have the same foot end reference trajectory, the phase difference between different diagonal legs is 0.5T, and some parameters of the CPG network are set to β=0.5,α=100,a=1000,ω sw = 0.8π, the reference trajectory will output a diagonal gait. The reference trajectory output curve of the hip and knee joints is as follows: Figure 3 shown.
[0070] Furthermore, the design of the reinforcement learning controller of the solution described in this embodiment is as follows:
[0071] The design of the reinforcement learning controller based on DDPG mainly includes state space and action space, reward function, termination condition and deep network structure. The Deep Deterministic Policy Gradient (DDPG) algorithm is a model-free deep reinforcement learning algorithm based on policy gradient proposed by Lillicrap et al. based on the idea of DQN. It can effectively solve the sequential decision-making problem in continuous action space. The DDPG algorithm consists of four networks, including two Actor networks and two Critic networks, namely Online Actor network, Target Actor network, Online Critic network and Target Critic network, all of which are composed of independent deep neural networks. The addition of experience replay reduces the correlation between data, and the soft update method is adopted for the parameter update of Target Actor network and Target Critic network to make the learning process more stable. The flow chart of the DDPG algorithm is shown in Figure 4.
[0072] The state space contains the environmental information obtained by the agent, including the motor rotation angle of each joint, the position and posture information of the fuselage, and the angular velocity of the fuselage. 16-dimensional state information is selected as the state space, and its specific composition and the sensors used are shown in Table 1.
[0073] Table 1 State space
[0074]
[0075]
[0076] The above status information is continuous value, which can be represented by a vector of 16 elements:
[0077] S=[s1,s2,s3,s4,s5,s6,s7,s8,s9,s 10 ,s 12 ,s 12 ,s 13 ,s 14 ,s 15 ,s 16 ] (5)
[0078] The action space is the strategy learned by the agent through interaction with the environment, which includes all the action sets of the agent. The choice of action space must include all the functions that can complete the task. The robot uses the angle control method, that is, the strategy finally outputs the angle value of each joint motor, and selects 8-dimensional action information as the action space. The specific action space is shown in Table 2.
[0079] Table 2 Composition of action space
[0080]
[0081] The above action spaces are all continuous values, represented by vectors of 8 elements:
[0082] A=[a1,a2,a3,a4,a5,a6,a7,a8] (6)
[0083] The agent needs to interact with the environment continuously and maximize the cumulative reward through trial and error to learn the optimal strategy. The reward function directly affects the update direction of the network parameters. In the robot's gait learning, the learning goal is that the robot can move forward and reach the target point. A positive incentive is applied to the behavior that can learn the forward movement in the target direction. The greater the distance moved toward the target point in each time step, the higher the reward value obtained. The reward definition of this part is as follows:
[0084] r1=k1(p t -p t-1 ) (7)
[0085] Among them, p t and p t-1 They are the distances the robot moves forward from the initial position in the target direction at the current moment and the previous moment respectively. The greater the forward movement distance of the robot in one time step, the higher the reward value. k1 is a reward coefficient greater than zero.
[0086]
[0087] Among them, θ t is the robot's orientation at the current moment, θ target is the robot's desired target direction. The robot will get the maximum reward when moving in the desired direction. The reward will decay when the robot deviates from the desired target direction. k2 is the reward coefficient greater than zero. The more stable the robot is during forward motion, the greater the reward value it gets. The reward definition for this part is as follows:
[0088] r3=k3(r 31 +r 32 ) (9)
[0089]
[0090] Among them, r 31 and r 32 are the reward functions for judging stability based on the changes in the robot's roll angle and pitch angle, Δθ roll and Δθ pitch They represent the changes in the roll angle and pitch angle of the robot in one time step. The smaller the change, the more stable the body and the greater the reward value. k3 is a reward coefficient greater than zero. The reward function for quadruped robot gait learning consists of the following three parts:
[0091]
[0092] Among them, r1 gives motion incentives to guide the robot to generate motion behaviors; r2 gives target position guidance incentives to guide the robot to move in the target direction; r3 gives stability incentives to guide the robot to keep its body stable. The reinforcement learning process requires continuous and repeated interactions with the environment, and the termination conditions are designed as follows:
[0093]
[0094] Among them, t e When the control strategy directly or indirectly causes the robot to enter an unstable or unrecoverable state, the early termination condition is designed as follows:
[0095]
[0096] Among them, θ roll ,θ pitch The roll angle and pitch angle of the robot are expressed in radians. center is the height of the robot's center of mass from the ground, in meters. The termination condition with target task guidance is designed as follows:
[0097]
[0098] Among them, θ d Indicates the angle at which the robot deviates from the target route, in radians. The robot also terminates when it completes the mission goal.
[0099] The parameters of the DDPG controller include the policy network learning rate α actor , value network learning rate α critic , attenuation factor γ, soft update coefficient τ, batch sample number m, maximum number of iterations M, experience pool capacity N, the final parameter settings are shown in Table 3.
[0100] Table 3 DDPG algorithm parameter design
[0101]
[0102] Furthermore, the training process of the controller in the solution described in this embodiment is as follows:
[0103] (1) The robot starts from the initial position (the origin of the world coordinate system) and sends the 16-dimensional state information obtained by the sensor to the reinforcement learning controller as the state input of the DDPG network.
[0104] (2) The DDPG network interacts with the environment and stores the state s, action a, and reward r as an experience pair in the experience pool, which serves as the basis for updating the strategy learned by DDPG.
[0105] (3) The strategy learned by DDPG outputs action a based on the state information s.
[0106] (4) The DDPG network output is combined with the reference trajectory provided by the CPG network, and the final output result is applied to the motors of each joint of the robot, so that the motors perform the desired actions.
[0107] (5) Determine whether the round has ended during the forward movement. In order to balance the efficiency and performance of reinforcement learning, the end of the round is determined as follows: the robot's forward (x-axis) movement distance reaches the set value; the termination judgment condition is triggered (the upper limit of the round step length, the body is in a bad state, and the body offset target point exceeds the threshold). At the end of the round, the robot model is reset to the initial state and the robot returns to the initial position.
[0108] (6) Repeat steps 1-5 until the round reward becomes stable and the robot learns a good control strategy.
[0109] Furthermore, in order to prove the effectiveness of the solution described in this embodiment, the following corresponding experiments are carried out to prove:
[0110] The robot's learning task is to walk on a slope of 3m. The climbing control strategy training scenario is as follows: Figure 5 As shown in the figure, the scene parameters are set as follows: the length of the slope is 3.5m, the width is 5m, the inclination angle of the slope is 8°, and the robot's center of mass is 0.3m away from the slope at the initial moment.
[0111] After training for a period of time, the machine tends to learn a stable and fast Trot gait climbing strategy. The climbing process under the learned strategy is shown as follows: Figure 6 shown.
[0112] The robot is trained for 3000 rounds and gets the cumulative rewards of each round, which reflects the robot's learning status and movement effect. The round rewards are as follows: Figure 7 shown.
[0113] From the sliding average reward curve, we can see that the reward value shows a steady upward trend from 0 to 800 rounds, and after 1000 rounds, the reward value stabilizes at around 680. It can be seen that the control scheme based on trajectory guidance can learn a good climbing strategy.
[0114] At the end of the training, the robot walking related data is collected, and the curve of the robot body center of mass position changing with time is as follows: Figure 8 The change curves of the robot's body roll angle, pitch angle, and yaw angle are as follows: Fig. 9 .
[0115] Taking the right front leg as an example, the actual output curves of the hip and knee joints of the quadruped robot at the end of training are as follows: Fig.10 shown.
[0116] from Figure 8 It can be seen that the strategy learned by the robot at the end of the training can complete the established task objectives, the fuselage can maintain a stable climbing, the forward speed along the slope is calculated to be 0.174m / s, the center of mass of the fuselage rises steadily, and the robot does not move sideways when it moves 3m forward along the slope, and the robot basically keeps walking in a straight line. Fig. 9 It can be seen that when the robot is in a steady state, the roll angle of the robot body fluctuates within the range of -0.12 to 0.04 rad, and the pitch angle fluctuates within the range of -0.14 to 0.03 rad. The body can remain stable and always faces the target direction. Fig.10 It can be seen from the joint angle output curve of the robot that the swing range of the hip joint is maintained at -0.12 to 0.31 rad, and the swing range of the knee joint is maintained at -0.11 to 0.18 rad.
[0117] When the control coefficient μ is set to 0, the change curves of the robot's roll angle, pitch angle, and yaw angle are as follows: Fig.11 .
[0118] from Fig.11 It can be seen that under the reference trajectory, the robot's roll angle is kept within the range of -0.22 to -0.10 rad, the pitch angle fluctuates within the range of -0.13 to 0.15 rad, and a certain yaw angle occurs when the fuselage moves forward. Fig.11 It can be seen that after adding the feedback adjustment part of reinforcement learning, the robot will not have lateral displacement. From the fluctuation range of the roll angle and pitch angle, it can be seen that the overall stability of the robot has been greatly improved.
[0119] In summary, the scheme described in this embodiment builds a CPG model through a Hopf oscillator, uses the model to perform Trot gait planning, uses the planned gait as the initial guiding gait, and designs a DDPG deep reinforcement learning controller from the aspects of exploring noise selection, state space and action space, reward function, termination condition and deep network structure, which is used as a feedback adjustment module to improve the robot's motion performance. To verify the effectiveness of the proposed control method, simulation experiments were carried out in flat and slope scenarios. Through experimental analysis, it is proved that the proposed method has good adaptability and robustness.
[0120] Embodiment 2:
[0121] The purpose of this embodiment is to provide a robot motion control system based on deep reinforcement learning and CPG.
[0122] A robot motion control system based on deep reinforcement learning and CPG, including:
[0123] A data acquisition unit, which is used to acquire the status information of the robot in real time; wherein the status information is obtained based on a pre-constructed state space through sensors provided on the robot body;
[0124] A feedback adjustment amount acquisition unit, which is used to obtain the corresponding action of the robot under the current state information based on the state information using a pre-trained DDPG model;
[0125] A motion control unit is used to use the action as a feedback adjustment amount to adjust the foot posture on the reference trajectory output by the pre-built CPG model, and output the reference trajectory to act on the motors of each joint of the robot to achieve motion control of the robot.
[0126] Furthermore, the system described in this embodiment corresponds to the method described in Embodiment 1, and its technical details have been described in detail in Embodiment 1, so they will not be repeated here.
[0127] In further embodiments, there is also provided:
[0128] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, no further description is given here.
[0129] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0130] The memory 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 a non-volatile random access memory. For example, the memory may also store information about the device type.
[0131] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the method described in embodiment 1 is completed.
[0132] The method in the first embodiment can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0133] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in the present embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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 this disclosure.
[0134] The robot motion control method and system based on deep reinforcement learning and CPG provided in the above embodiment can be implemented and have broad application prospects.
[0135] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A robot motion control method based on deep reinforcement learning and CPG, It is characterized in that include: Acquire the robot's state information in real time; wherein the state information is based on a pre-constructed state space and is obtained through sensors provided on the robot body; Based on the state information, using a pre-trained DDPG model, obtain the corresponding action under the current state information of the robot; The action is used as a feedback adjustment amount to adjust the foot posture on the reference trajectory output by the pre-built CPG model, and the reference trajectory output is applied to the motors of each joint of the robot to realize the motion control of the robot; The overall mathematical expression of the CPG model is as follows: Where x and y are the state variables of the Hopf oscillator, i = 1, 2, 3, 4, α>0 is a constant that determines the convergence speed of the state variables, ω represents the oscillation frequency of the oscillator, and θ hi is the pitch hip joint angle control signal of the i-th leg, θ ki is the pitch knee joint angle control signal of the i-th leg, A k , A h are the swing amplitudes of the knee and hip joints, μ=A h 2 , sgn(ψ) is a sign function, where ψ represents the joint type; The pre-trained DDPG model and the pre-built CPG model constitute the robot motion controller, which specifically includes an open-loop part and a feedback adjustment part, wherein the open-loop part adopts a classic gait control method and provides a reference trajectory through the CPG model; the feedback adjustment part is composed of the DDPG model and adjusts the foot posture on the reference trajectory based on the output of the DDPG model; The output of the robot motion controller is specifically expressed as follows: a=a c +μa p Among them, a c represents the output of the open loop part, which is the reference trajectory curve of the hip and knee joints, a p is the output of the feedback adjustment part, which is used as the feedback adjustment amount to adjust the reference trajectory. μ is the control parameter used to adjust the size of the reinforcement learning output. The reward function for quadruped robot gait learning consists of the following three parts: Among them, r 1 Give motion incentives to guide the robot to generate motion behaviors; 2 Give the target position guidance incentive to guide the robot to move towards the target direction; 3 Give stability incentives to guide the robot to keep its body stable; t and p t-1 are the distances of the robot from the initial position in the target direction at the current moment and the previous moment, respectively, 1 is a reward coefficient greater than zero; θ t is the robot's orientation at the current moment, θ target is the desired target direction of the robot, k 2 is a reward coefficient greater than zero; r 31 and r 32 They are the reward functions for judging stability based on the changes in the robot's roll angle and pitch angle, and k 3 is a reward coefficient greater than zero.
2. A robot motion control method based on deep reinforcement learning and CPG as claimed in claim 1, It is characterized in that The CPG model is constructed by a Hopf oscillator, and Trot gait planning is performed based on the CPG model.
3. A robot motion control method based on deep reinforcement learning and CPG as claimed in claim 1, It is characterized in that The state space is the environmental information obtained by the intelligent agent, including the state information composed of the motor rotation angle of each joint, the position and posture information of the fuselage, and the angular velocity of the fuselage.
4. A robot motion control method based on deep reinforcement learning and CPG as claimed in claim 1, It is characterized in that The action is obtained based on a pre-constructed action space, and the action space is represented by the angle values of the motors of each joint of the robot foot.
5. A robot motion control method based on deep reinforcement learning and CPG as claimed in claim 1, It is characterized in that The DDPG model includes an Online Actor network, a Target Actor network, an Online Critic network and a Target Critic network, all of which are composed of independent deep neural networks.
6. A robot motion control system based on deep reinforcement learning and CPG, It is characterized in that include: A data acquisition unit, which is used to acquire the status information of the robot in real time; wherein the status information is obtained based on a pre-constructed state space through sensors provided on the robot body; A feedback adjustment amount acquisition unit, which is used to obtain the corresponding action of the robot under the current state information based on the state information and using a pre-trained DDPG model; A motion control unit, which is used to use the action as a feedback adjustment amount to adjust the foot posture on the reference trajectory output by the pre-built CPG model, and output the reference trajectory to act on the motors of each joint of the robot to achieve motion control of the robot; The overall mathematical expression of the CPG model is as follows: Where x and y are the state variables of the Hopf oscillator, i = 1, 2, 3, 4, α>0 is a constant that determines the convergence speed of the state variables, ω represents the oscillation frequency of the oscillator, and θ hi is the pitch hip joint angle control signal of the i-th leg, θ ki is the pitch knee joint angle control signal of the i-th leg, A k , A h are the swing amplitudes of the knee and hip joints, μ=A h 2 , sgn(ψ) is a sign function, where ψ represents the joint type; The pre-trained DDPG model and the pre-built CPG model constitute the robot motion controller, which specifically includes an open-loop part and a feedback adjustment part, wherein the open-loop part adopts a classic gait control method and provides a reference trajectory through the CPG model; the feedback adjustment part is composed of the DDPG model and adjusts the foot posture on the reference trajectory based on the output of the DDPG model; The output of the robot motion controller is specifically expressed as follows: a=a c +μa p Among them, a c represents the output of the open loop part, which is the reference trajectory curve of the hip and knee joints, a p is the output of the feedback adjustment part, which is used as the feedback adjustment amount to adjust the reference trajectory. μ is the control parameter used to adjust the size of the reinforcement learning output. The reward function for quadruped robot gait learning consists of the following three parts: Among them, r 1 Give motion incentives to guide the robot to generate motion behaviors; 2 Give the target position guidance incentive to guide the robot to move towards the target direction; 3 Give stability incentives to guide the robot to keep its body stable; t and p t-1 are the distances of the robot from the initial position in the target direction at the current moment and the previous moment, respectively, 1 is a reward coefficient greater than zero; θ t is the robot's orientation at the current moment, θ target is the desired target direction of the robot, k 2 is a reward coefficient greater than zero; r 31 and r 32 They are the reward functions for judging stability based on the changes in the robot's roll angle and pitch angle, and k 3 is a reward coefficient greater than zero.
7. An electronic device comprising a memory, a processor and a computer program stored and running on the memory, It is characterized in that When the processor executes the program, it implements a robot motion control method based on deep reinforcement learning and CPG as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, a robot motion control method based on deep reinforcement learning and CPG as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Multi-sensor robot navigation method based on virtual environment and reinforcement learning
CN109855616A
Biped robot adaptive walking control method based on deep reinforcement learning
CN110262511A
Quadruped robot gait control method based on reinforcement learning and CPG controller
CN111208822A
Robot motion control method and system based on deep reinforcement learning
CN113093779A
Intelligent mechanical arm control method based on direction reward
CN113967909A
