A method for constructing a robotic arm control model based on deep reinforcement learning

Through the deep reinforcement learning model based on the DDPG algorithm, combined with the data optimization training of real and simulated robotic arms, the problem of insufficient precise control capabilities of the robotic arms in multi-objectives is solved, rapid convergence and high-precision control are achieved, and it has strong anti-interference and automatic control capabilities. Adaptability.

CN112528552BActive Publication Date: 2024-09-06SHENYANG YINXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011149361.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-23
Publication Date
2024-09-06
Estimated Expiration
2040-10-23

AI Technical Summary

Technical Problem

Existing deep reinforcement learning has weak ability to accurately control multiple targets in robotic arm control, and cannot take into account both convergence speed and control accuracy.

Method used

Using a deep reinforcement learning model based on the DDPG algorithm, by constructing real and simulated robotic arms, setting multiple target points, recording the real result parameters and comparing them with the simulation result parameters, correcting the reward data, optimizing the training process of the deep reinforcement learning algorithm, using Soft update method is used to transmit parameters and generate high-precision control strategies.

Benefits of technology

A robotic arm control model with fast convergence speed, high control accuracy, anti-interference and adaptive capabilities is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112528552B
    Figure CN112528552B
Patent Text Reader

Abstract

A method for constructing a robot arm control model based on deep reinforcement learning includes: constructing a simulated robot arm based on a real robot arm, wherein both the real robot arm and the simulated robot arm include several joints; setting multiple target points, and controlling the end of the real robot arm to move toward the target points, and recording the real result parameters of the real robot arm, wherein the real result parameters include actual joint parameters and end position parameters; constructing a selected deep reinforcement learning algorithm based on the simulated robot arm; generating a control strategy in the deep reinforcement learning algorithm; training the deep reinforcement learning algorithm based on the target points; and outputting the control strategy in the trained deep reinforcement learning algorithm as a control model. The present invention provides a method for constructing a robot arm control model based on deep reinforcement learning, which has a fast convergence speed and a generated control model with high control accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic control technology, and specifically to a method for constructing a robotic arm control model based on deep reinforcement learning. Background Art

[0002] At present, with the increasing demand for the use of large-scale equipment in the industrial field, hydraulic robotic arms are widely used in tasks such as transportation and loading and unloading of heavy workpieces and equipment. However, due to the complex internal structure, heavy mass and large size of hydraulic robotic arms, their control is easily affected by various factors such as inertia and friction. Therefore, the problem of precise control of hydraulic robotic arms needs to be solved urgently.

[0003] Due to its adaptive learning characteristics, many researchers are currently conducting research on robotic arm control based on deep reinforcement learning. Guo Xian et al. proposed a robotic arm control strategy based on the Deep Q Learning (DQN) algorithm in the article "Guo Xian. Research on robotic arm control strategy based on DQN [D]. Beijing Jiaotong University, 2018.". They adopted the control strategy of the guided DQN algorithm. To improve the algorithm training efficiency, they trained the robot in a low-precision grasping task. Bu Lingzheng et al. proposed designing a composite reward function based on the DDPG algorithm to promote algorithm convergence in the article "Bu Lingzheng. Research on robotic arm control based on deep reinforcement learning [D]. China University of Mining and Technology, 2019.". They improved the accuracy of the robot grasping at fixed target points. However, the disadvantage is that each target point needs to be trained separately. Gu et al. proposed "Gu S, Holly E, Lillicrap T, et al. Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates [C] / / 2017 IEEE international conference on robotics and In the paper "Integrated Robotics and Automation (ICRA). IEEE, 2017: 3389-3396," a Normalized Advantage Function (NAF) algorithm was proposed for training a robotic arm in a door-opening task to improve the accuracy of the robotic arm reaching the door handle. However, this algorithm requires multiple robotic arms to work together to promote algorithm convergence. In the paper "Mahmood AR, Korenkevych D, Komer BJ, et al. Setting up a reinforcement learning task with a real-world robot [C] / / 2018 IEEE / RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2018: 4635-4640," Mahmood et al. proposed using the Trust Region Policy Optimization (TRPO) algorithm to train the UR5 robotic arm to reach the target point. The training achieved a certain end-point control accuracy, but no further exploration was made. In complex environments, current deep reinforcement learning robotic arm control methods have weak ability to accurately control multiple targets and cannot balance convergence speed and control accuracy. Summary of the Invention

[0004] In order to address the deficiencies in the prior art, the present invention provides a method for constructing a robotic arm control model based on deep reinforcement learning, which has a fast convergence speed and generates a control model with high control accuracy.

[0005] To achieve the above objectives, the present invention adopts a specific solution: a method for constructing a robotic arm control model based on deep reinforcement learning, comprising the following steps:

[0006] S1. Build a simulated robotic arm based on a real robotic arm. Both the real robotic arm and the simulated robotic arm include several joints.

[0007] S2. Set multiple target points and control the end of the real robot arm to move toward the target points, and record the real result parameters of the real robot arm. The real result parameters include actual joint parameters and end position parameters;

[0008] S3. Build the selected deep reinforcement learning algorithm based on the simulated robotic arm;

[0009] S4. Generate control strategies in deep reinforcement learning algorithms;

[0010] S5, randomly select a new target point;

[0011] S6. Control the simulated robotic arm according to the control strategy to obtain simulation result parameters of the simulated robotic arm;

[0012] S7, comparing the actual result parameters with the simulation result parameters to determine whether the simulation result parameters meet the accuracy requirements, if so, executing S8, if not, correcting the simulation result parameters according to the actual result parameters to generate reward data and executing S9;

[0013] S8. If there is a target point that has not been selected, return to S5, otherwise execute S11;

[0014] S9, inputting the simulation result parameters and reward data into the deep reinforcement learning algorithm;

[0015] S10. Train the deep reinforcement learning algorithm. During the training process, the deep reinforcement learning algorithm updates the control strategy, and returns to S6.

[0016] S11. Output the control strategy in the trained deep reinforcement learning algorithm as a control model.

[0017] As a further optimization of the above-mentioned method for constructing a robotic arm control model based on deep reinforcement learning: in S3, the deep reinforcement learning algorithm includes a DDPG (deep deterministic policy gradient) agent, and the DDPG agent includes a replay experience pool, a current action network, a target action network, a current evaluation network, and a target evaluation network. The current action network and the target action network are used to generate control strategies, and the current evaluation network and the target evaluation network are used to generate evaluation values. Parameters are transmitted between the current action network and the target action network, as well as between the current evaluation network and the target evaluation network, through soft updates.

[0018] As a further optimization of the above-mentioned method for building a robotic arm control model based on deep reinforcement learning: In S4, the specific method for generating a control strategy is as follows:

[0019] S4.1、Define the state of the simulated robot arm s=[x1,y1,z1,x2,y2,z2,a1,a2,…,a λ ], where (x1, y1, z1) is the coordinate of the end of the simulation robot arm, (x2, y2, z2) is the coordinate of the target point, (a1, a2, ..., a λ ) are the joint parameters of the simulated manipulator, λ is the number of joints of the real manipulator and the simulated manipulator, and 1≤λ≤6;

[0020] S4.2. Current action network generates control strategy a t =u(s t |θ u )+N, where s t is the current state of the simulated robot arm, θ u is the action internal parameter of the current action network, u(*) is the control action function of the current action network, and N is random noise;

[0021] S4.3. The current action network outputs the control strategy to the simulated robotic arm to control the simulated robotic arm.

[0022] As a further optimization of the above-mentioned method for constructing a robot control model based on deep reinforcement learning: In S6, the simulation result parameters include the end state quantity s of the simulated robot t+1 , end state quantity s t+1 It is the state quantity after the simulation robot arm moves according to the control strategy.

[0023] As a further optimization of the above-mentioned method for building a robotic arm control model based on deep reinforcement learning: In S7, the reward data is calculated as follows:

[0024] S7.1, according to the current target point, inverse solve the joint parameters (b1, b2, ..., b λ );

[0025] S7.2. Calculate the first error value of the current joint parameters of the simulated robot arm relative to the inverse joint parameters

[0026] S7.3, calculate the current joint parameters of the simulated robot arm relative to the actual robot arm joint parameters (c1, c2, ..., c λ )'s second error value

[0027] S7.4. Calculate the distance between the end of the simulated robotic arm and the target point

[0028] S7.5. Calculating Reward Data

[0029]

[0030] As a further optimization of the above-mentioned method for building a robotic arm control model based on deep reinforcement learning: the specific method of S9 is:

[0031] S9.1. Construct small sample experience data, which includes simulation result parameters and reward data;

[0032] S9.2. Randomly store the small sample experience data into the replay experience pool;

[0033] S9.3. When the amount of small sample experience data in the replay experience pool exceeds a set threshold, the replay experience pool is divided into multiple regions, each corresponding to a target point;

[0034] S9.4. Store the small sample experience data into the corresponding area according to the target point.

[0035] As a further optimization of the above-mentioned method for building a robotic arm control model based on deep reinforcement learning: the specific method of S10 is:

[0036] S10.1, the target action network and the target evaluation network both extract a set of small sample experience data from the replay experience pool;

[0037] S10.2, target evaluation network generates a t+1 And calculate the target evaluation value y j =R j +γQ'(s j+1 ,u'(s j+1 |θ u' )|θ Q '),s j+1 is the end state parameter of the simulation robot, and 1≤j≤n, γ is the attenuation factor, θ u'is the action internal parameter of the target action network, u'(*) is the control action function of the target action network and is used to generate a t+1 ,θ Q' is the internal evaluation parameter of the target evaluation network, Q'(*) is the target evaluation operator of the target evaluation network;

[0038] S10.3, the current evaluation network according to the control strategy a t Calculate the current evaluation value Q;

[0039] S10.4、y j And Q are input into the loss function to calculate the evaluation loss value Where n is the number of iterative training, 1≤j≤n, Q(*) is the current evaluation operator of the current evaluation network and is used to generate the current evaluation value Q, θ Q is the internal evaluation parameter of the current evaluation network, s j is the current state parameter, a j is the control strategy parameter;

[0040] S10.5. The current evaluation network uses the Adam algorithm to update the evaluation value gradient;

[0041] S10.6. The current evaluation network feeds the updated evaluation value gradient into the current action network.

[0042] S10.7. The current action network calculates the policy gradient based on the evaluation value gradient Where n is the number of iterative training, 1≤j≤n, is the evaluation value gradient, is the action gradient, s=s j is the current state parameter, u(*) is the control action function of the current action network, a is the strategy action parameter under the current state, θ u is the action internal parameter of the current action network;

[0043] S10.8. The current action network updates the policy gradient using the Adam algorithm.

[0044] Beneficial effects: The present invention has fast convergence speed, strong anti-interference ability and self-adaptation ability, and the generated control model has high control accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a schematic diagram of the deep reinforcement learning algorithm in the present invention;

[0046] Figure 2 Schematic diagram of the physical structure of the CITIC robotic arm used in the specific implementation;

[0047] Figure 3This is a schematic diagram of the structure of a simulation robot arm based on the CITIC robot arm in a specific implementation manner;

[0048] Figure 4 is the training curve graph in the instance;

[0049] Figure 5 It is the training curve graph after smoothing;

[0050] Figure 6 It is a curve chart of single point repeatability test results;

[0051] Figure 7 It is a curve chart of multi-point error test results. DETAILED DESCRIPTION

[0052] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.

[0053] See also Figure 1 , a method for constructing a robotic arm control model based on deep reinforcement learning, including S1 to S8.

[0054] S1. Build a simulated robotic arm based on a real robotic arm. Both the real and simulated robotic arms include several joints. In this embodiment, the real robotic arm is a six-joint robotic arm. The six joints are: a swing joint for the upper arm, a pitch joint for the upper arm, a telescopic joint for the upper arm, a swing joint for the lower arm, a roll joint for the lower arm, and a pitch joint for the distal end. This is a common robotic arm, and its structure is not described in detail here. The simulation environment can use ROS (Robot Operating System).

[0055] S2. Set multiple target points, and control the end of the real robotic arm to move toward the target point, and record the real result parameters of the real robotic arm. The real result parameters include actual joint parameters and end position parameters. S2. Set multiple target points, and control the end of the real robotic arm to move toward the target point, and record the real result parameters of the real robotic arm. The real result parameters include actual joint parameters and end position parameters. The coordinates of the target points are expressed in three-dimensional coordinates. The number of target points can be determined according to the control generalization requirements. The higher the control generalization requirements, the more target points there are, but this will correspondingly increase the complexity and time consumption. Therefore, it is necessary to flexibly select according to the actual situation. For example, in this embodiment, the number of target points is set to 5000.

[0056] S3: Build a selected reinforcement learning algorithm based on the simulated robotic arm. In S3, the deep reinforcement learning algorithm includes a DDPG (deep deterministic policy gradient) agent. The DDPG agent includes a replay experience pool, a current action network, a target action network, a current evaluation network, and a target evaluation network. The current action network and the target action network are used to generate control policies, while the current evaluation network and the target evaluation network are used to generate evaluation values. Parameters are transferred between the current action network and the target action network, and between the current evaluation network and the target evaluation network, via soft updates.

[0057] S4. Generate a control strategy within the deep reinforcement learning algorithm. The control strategy includes control action increments for each joint. These increments are the movement amounts of the joints. By moving each joint of the robotic arm according to these increments, the robotic arm can be moved as a whole, achieving control of the robotic arm. In S4, the specific methods for generating the control strategy are S4.1 to S4.3.

[0058] S4.1、Define the state of the simulated robot arm s=[x1,y1,z1,x2,y2,z2,a1,a2,…,a λ ], where (x1, y1, z1) is the coordinate of the end of the simulation robot arm, (x2, y2, z2) is the coordinate of the target point, (a1, a2, ..., a λ ) are the joint parameters of the simulated robot arm, λ is the number of joints of the real robot arm and the simulated robot arm, and 1≤λ≤6.

[0059] S4.2. Current action network generates control strategy a t =u(s t |θ u )+N, where s t is the current state of the simulated robot arm, θ u is the action internal parameter of the current action network, u(*) is the control action function of the current action network, and N is random noise.

[0060] S4.3. The current action network outputs the control strategy to the simulated robotic arm to control the simulated robotic arm.

[0061] S5. Randomly select a new target point. It should be noted that in the present invention, multiple target points are set to improve the accuracy of the training model. The deep reinforcement learning algorithm needs to be trained and optimized based on all target points. Therefore, the target point selected each time needs to be different. Here, the new target point refers to a target point that has not been selected.

[0062] S6. Control the simulated manipulator according to the control strategy to obtain the simulation result parameters of the simulated manipulator. The simulation result parameters include the end state quantity s of the simulated manipulator. t+1 , end state quantity st+1 It is the state quantity after the simulation robot arm moves according to the control strategy.

[0063] S7. Compare the actual result parameters with the simulation result parameters to determine whether the simulation result parameters meet the accuracy requirements. If they do, execute S8. If they do not, modify the simulation result parameters based on the actual result parameters to generate reward data and execute S9. It should be noted that when training based on a portion of target points, the simulation result parameters may still not meet the accuracy requirements after a long period of training. If training is continued, the algorithm will converge slowly. To avoid this, a threshold for the number of training times can be set. When the number of training times based on a certain target point reaches the threshold and the simulation result parameters still do not meet the accuracy requirements, ignore the target point and return to S5.

[0064] In S7, the calculation method of the reward data is S7.1 to S7.5.

[0065] S7.1, according to the current target point, inverse solve the joint parameters (b1, b2, ..., b λ ).

[0066] S7.2. Calculate the first error value of the current joint parameters of the simulated robot arm relative to the inverse joint parameters

[0067] S7.3, calculate the current joint parameters of the simulated robot arm relative to the actual robot arm joint parameters (c1, c2, ..., c λ )'s second error value

[0068] S7.4. Calculate the distance between the end of the simulated robotic arm and the target point

[0069] S7.5. Calculating Reward Data

[0070]

[0071] The present invention uses a three-layer reward method when generating reward data. The first layer of rewards is used to guide the robot arm to move within the target point range. When the distance value d is greater than or equal to 0.1m, the inverse of the absolute value difference between the current joint value and the inverse joint value is used as the reward; the second layer of rewards uses the inverse of the distance d between the end of the robot arm and the target point as the distance reward, and the inverse of the absolute value difference between the current joint value and the actual joint value as the joint reward. When the distance d is between 0.006m and 0.1m, a combination of distance rewards and joint rewards is performed, and a log function expression is introduced as a nonlinear reward; the third layer of rewards is an accuracy reward. When the distance value d is less than 0.006m, the current reward data is added by 3 to improve the accuracy. Through the three-layer reward data, the convergence speed of the deep reinforcement learning algorithm and the accuracy of the robot arm control can be effectively improved.

[0072] S8. If there is a target point that has not been selected, return to S5; otherwise, execute S11. To further ensure the accuracy of the control strategy, the present invention refers to the training process for one target point as a training round. After a round of control strategy training is completed, a new target point is selected for further training, thereby continuously training the deep reinforcement learning algorithm. At the same time, to avoid the one-sidedness of the deep reinforcement learning algorithm caused by the excessive concentration of target points, the present invention skips the current target point after a training round and randomly selects one of the remaining target points for the next training round. When all target points have been trained, the training process ends, i.e., jumps to S10.

[0073] S9. Input the simulation result parameters and reward data into the deep reinforcement learning algorithm. In S9, the specific method for storing the small sample experience data into the replay experience pool is S9.1 to S9.3.

[0074] S9.1. Construct small sample experience data, which includes simulation result parameters and reward data. The small sample experience data also includes control strategies.

[0075] S9.2. Randomly store the small sample experience data into the replay experience pool.

[0076] S9.3. When the amount of small sample experience data in the replay experience pool exceeds a set threshold, the replay experience pool is divided into multiple areas, each area corresponding to a target point.

[0077] S9.4. Store the small sample experience data into the corresponding area according to the target point.

[0078] In the early stages of training a deep reinforcement learning algorithm, to increase data diversity, small sample experience data is randomly stored in a replay experience pool. Accordingly, the deep reinforcement learning algorithm uses random sampling when extracting small sample experience data from the replay experience pool. When the replay experience pool reaches a certain amount of data, the real-time data is stored in a region centered around the target point of the current training round, increasing the sampling probability of data in that region during the current training round. In the next training round, the target point is changed, and the data is re-stored centered around the target point of the next training round. This data storage and sampling method reduces ineffective sampling by the robot arm and improves sampling efficiency.

[0079] S10: Train the deep reinforcement learning algorithm. During the training process, the deep reinforcement learning algorithm updates the control strategy, and the process returns to S6. The specific method of S10 is S10.1 to S10.8.

[0080] S10.1, the target action network and the target evaluation network both extract a set of small sample experience data from the replay experience pool.

[0081] S10.2, target evaluation network generates a t+1 And calculate the target evaluation value y j =R j +γQ'(s j+1 ,u'(s j+1 |θ u' )|θ Q '),s j+1 is the end state parameter of the simulation robot, and 1≤j≤n, γ is the attenuation factor, θ u' is the action internal parameter of the target action network, u'(*) is the control action function of the target action network and is used to generate a t+1 ,θ Q' is the internal evaluation parameter of the target evaluation network, and Q'(*) is the target evaluation operator of the target evaluation network. It should be noted that the control action function generates a based on small sample experience data. t+1 .

[0082] S10.3, the current evaluation network according to the control strategy a t Calculate the current evaluation value Q.

[0083] S10.4、y j And Q are input into the loss function to calculate the evaluation loss value Where n is the number of iterative training, 1≤j≤n, Q(*) is the current evaluation operator of the current evaluation network and is used to generate the current evaluation value Q, θ Q is the internal evaluation parameter of the current evaluation network, s j is the current state parameter, aj is the control strategy parameter. It should be noted that the evaluation value gradient can be obtained from the evaluation loss value M.

[0084] S10.5. The current evaluation network uses the Adam algorithm to update the evaluation value gradient.

[0085] S10.6. The current evaluation network sends the updated evaluation value gradient to the current action network.

[0086] S10.7. The current action network calculates the policy gradient based on the evaluation value gradient Where n is the number of iterative training, 1≤j≤n, is the evaluation value gradient, is the action gradient, s=s j is the current state parameter, u(*) is the control action function of the current action network, a is the strategy action parameter under the current state, θ u is the action internal parameter of the current action network.

[0087] S10.8. The current action network updates the policy gradient using the Adam algorithm.

[0088] S11. Output the control strategy from the trained deep reinforcement learning algorithm as a control model. After training all target points, a deep reinforcement learning algorithm control model is generated. The deep reinforcement learning algorithm control model can accurately control the simulated robotic arm under external interference. In engineering practice, the control model can be used to control a real robotic arm.

[0089] The present invention is verified by an example below.

[0090] In this example, the CITIC Heavy Industries robot arm is selected as the real robot arm, and its physical structure is as follows Figure 2 As shown in the figure, correspondingly, in the real result parameters, the actual joint parameters are obtained by the absolute encoder, and the end position parameters of the robot arm are obtained by the total station. The simulation robot arm constructed based on the real robot arm is shown in the figure. Figure 3 As shown in the figure, the robotic arm data can be directly obtained from the simulation environment, and the simulation environment selected is ROS-Kinetic Gazebo-7.16.

[0091] Taking the traditional DDPG (Deep Deterministic Policy Gradient) algorithm as a comparison, under the same training round conditions, the training comparison is carried out with the robot end control accuracy as the indicator. The training experimental curve is as follows Figure 4 As shown, the dotted line represents the traditional DDPG algorithm, the solid line represents the present invention, the horizontal axis represents the number of training rounds, and the vertical axis represents the terminal control accuracy. The larger the vertical axis value, the higher the accuracy.

[0092] For the general Figure 4 The curve is clearly represented intuitively, and the training data is smoothed. The smoothed training curve is as follows Figure 5 As shown. Figure 5 It can be seen that the traditional DDPG algorithm converges in about 3920 rounds, while the present invention converges in about 3350 rounds, and the convergence speed is improved by 16%.

[0093] In order to verify the precise control ability of the present invention on the robotic arm, the end position control accuracy requirement is set to ±6mm, and disturbance noise is added to the robotic arm. The disturbance noise is random noise added at the end of the robotic arm, and the noise range is -0.005m~0.005m. Single-point repeatability error tests and multi-point error tests are carried out respectively.

[0094] In order to verify the single-point repeatability control performance of the control model and simulate the actual working conditions of the robot arm, 25 single-point repeatability error test experiments were conducted under the conditions of disturbance and no disturbance of the simulated robot arm. The test results are as follows Figure 6 As shown in the figure, the horizontal axis is the number of repeated tests, the vertical axis is the size of the end position control error, the solid line in the figure is the single-point test effect without disturbance, and the dotted line is the single-point test effect after disturbance. The corresponding single-point test results are shown in Table 1.

[0095] Table 1 Single point repeatability test results

[0096]

[0097] Experiments show that the control model generated by the present invention has good anti-interference ability. When no disturbance is added, the maximum control error of the terminal is 5.335mm, the minimum error is 4.616mm, and the average error is 4.924mm. After disturbance is added, the maximum control error of the terminal is 6.146mm, the minimum error is 4.780mm, and the average error is 5.411mm.

[0098] In order to verify the multi-point control performance of the control model, 50 groups of target points were selected and tested in the non-disturbance and disturbance environments respectively. The test phenomena are as follows: Figure 7 As shown in the figure, the solid line is the multi-point test effect without disturbance, the dotted line is the multi-point test effect after disturbance, the horizontal axis is the number of target points tested, and the vertical axis is the size of the terminal control error.

[0099] The results of multi-point error tests show that the control model generated by the present invention has a maximum control error of 7.55 mm, a minimum error of 4.78 mm, and an average error of 5.517 mm for the end of the robotic arm without disturbance; after disturbance, the maximum control error of the end of the robotic arm is 8.52 mm, the minimum error is 5.08 mm, and the average error is 6.103 mm.

[0100] To verify the stability of the model, 50 random target point data were used as a group for testing, and a total of 6 groups were tested. The test results are shown in Table 2. A control error within 6 mm was considered successful, and the completion rate was the ratio of the number of successes to the number of tests.

[0101] Table 2 Task completion rate test

[0102]

[0103] Experiments show that in a multi-point stability test, the task completion rate of the present invention is maintained above 80%, and reaches a maximum of 90%.

[0104] In summary, the present invention has fast convergence speed, strong anti-interference ability and self-adaptation ability, and the generated control model has high control accuracy.

[0105] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for constructing a robot arm control model based on deep reinforcement learning, characterized in that: The steps include: S1. constructing a simulated robotic arm based on a real robotic arm, wherein both the real robotic arm and the simulated robotic arm include a number of joints; S2. Set multiple target points, control the end of the real robot arm to move toward the target points, and record the real result parameters of the real robot arm, which include actual joint parameters and end position parameters; S3, constructing a selected deep reinforcement learning algorithm based on a simulated robotic arm; in S3, the deep reinforcement learning algorithm includes a DDPG (deep deterministic policy gradient) agent, and the DDPG agent includes a replay experience pool, a current action network, a target action network, a current evaluation network, and a target evaluation network, wherein the current action network and the target action network are used to generate a control strategy, the current evaluation network and the target evaluation network are used to generate an evaluation value, and parameters are transmitted between the current action network and the target action network, and between the current evaluation network and the target evaluation network by soft updating; S4. Generate a control strategy in a deep reinforcement learning algorithm. In S4, the specific method for generating the control strategy is: S4.

1. Define the state quantity of the simulated robot arm s = [x1, y1, z1, x2, y2, z2, a1, a2, ..., a λ ], where (x1, y1, z1) are the coordinates of the end of the simulated robot arm, (x2, y2, z2) are the coordinates of the target point, (a1, a2, ..., a λ ) is the joint parameter of the simulated robot arm, λ is the number of joints of the real robot arm and the simulated robot arm, and 1≤λ≤6; S4.

2. Current action network generates control strategy a t =u(s t |θ u )+N, where s t is the current state of the simulated robot arm, θ u is the action internal parameter of the current action network, u(*) is the control action function of the current action network, and N is random noise; S4.3, the current action network outputs the control strategy to the simulated robotic arm to control the simulated robotic arm; S5, randomly select a new target point; in S6, the simulation result parameters include the end state quantity s of the simulation robot arm t+1 , the end state quantity s t+1 It is the state quantity after the simulation robot arm moves according to the control strategy; S6. Control the simulated robotic arm according to the control strategy to obtain simulation result parameters of the simulated robotic arm; S7, comparing the real result parameters with the simulation result parameters to determine whether the simulation result parameters meet the accuracy requirements, if they meet, executing S8, if not, correcting the simulation result parameters according to the real result parameters to generate reward data and executing S9; In S7, the calculation method of reward data is: S7.

1. Inversely solve the joint parameters (b1, b2, ..., b λ ); S7.

2. Calculate the first error value of the current joint parameters of the simulated robot arm relative to the inverse joint parameters S7.3, calculate the current joint parameters of the simulated robot arm relative to the actual robot arm joint parameters (c1, c2, ..., c λ ) S7.

4. Calculate the distance between the end of the simulated robot arm and the target point S7.

5. Calculation of reward data S8, if there is a target point that has not been selected, return to S5, otherwise execute S11; S9, inputting the simulation result parameters and reward data into the deep reinforcement learning algorithm; S10, training the deep reinforcement learning algorithm, during which the deep reinforcement learning algorithm updates the control strategy, and returns to S6; S11. Output the control strategy in the trained deep reinforcement learning algorithm as a control model.

2. A method for constructing a robot arm control model based on deep reinforcement learning as claimed in claim 1, characterized in that: The specific method of S9 is: S9.

1. Construct small sample experience data, which includes simulation result parameters and reward data; S9.2, randomly storing the small sample experience data into the playback experience pool; S9.3, when the amount of small sample experience data in the playback experience pool exceeds a set threshold, the playback experience pool is divided into multiple areas, each area corresponding to a target point; S9.

4. Store the small sample experience data into the corresponding area according to the target point.

3. A method for constructing a robot arm control model based on deep reinforcement learning as claimed in claim 1, characterized in that: The specific method of S10 is: S10.1, the target action network and the target evaluation network both extract a set of small sample experience data from the playback experience pool; S10.2, target evaluation network generates a t+1 And calculate the target evaluation value y j =R j +γQ'(s j+1 ,u'(s j+1 |θ u' )|θ Q' ), s j+1 is the end state parameter of the simulation robot, and 1≤j≤n, γ is the attenuation factor, θ u' is the action internal parameter of the target action network, u'(*) is the control action function of the target action network and is used to generate a t+1 ,θ Q' is the internal evaluation parameter of the target evaluation network, Q'(*) is the target evaluation operator of the target evaluation network; S10.3, the current evaluation network is based on the control strategy a t Calculate the current evaluation value Q; S10.4, y j And Q are input into the loss function to calculate the evaluation loss value Where n is the number of iterative training, 1≤j≤n, Q(*) is the current evaluation operator of the current evaluation network and is used to generate the current evaluation value Q, θ Q is the internal evaluation parameter of the current evaluation network, s j is the current state parameter, a j is the control strategy parameter; S10.5, the current evaluation network uses the Adam algorithm to update the evaluation value gradient; S10.6, the current evaluation network sends the updated evaluation value gradient to the current action network; S10.

7. The current action network calculates the policy gradient based on the evaluation value gradient Where n is the number of iterative training, 1≤j≤n, is the evaluation value gradient, is the action gradient, s = s j is the current state parameter, u(*) is the control action function of the current action network, a is the strategy action parameter under the current state, θ u is the action internal parameter of the current action network; S10.

8. The current action network updates the policy gradient through the Adam algorithm.