A robotic arm force control method and system based on deep learning
Through a method based on deep learning, the neural network is used to convert the joint current value of the robotic arm into a torque, which solves the problem of excessive force caused by position control errors in the force interaction task of the robotic arm, achieves high-precision force control, and reduces Reduce costs and avoid the use of force sensors.
Patent Information
- Application Number
- CN202211011130.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-08-23
AI Technical Summary
Excessive force due to position control errors in existing manipulators during force interaction tasks causes environmental damage. Traditional force control methods are costly or have low accuracy, and the force sensors are easily damaged and occupy a large load.
A method based on deep learning is used to convert the joint current value of the manipulator into a torque through a neural network. The graph neural network and adaptive network are used for feature fusion to achieve high-precision torque fitting and adjust the motion trajectory to improve the force control effect.
Without using a force sensor, high-precision torque fitting is achieved, which improves the force control effect, reduces control costs, and meets the fitting accuracy requirement of 0.1 Newton.
Smart Images

Figure CN115256397B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robot arm interaction force detection, and specifically relates to a robot arm force control method and system based on deep learning. Background Art
[0002] Industrial robots and collaborative robots usually operate through robotic arms. When the robotic arms complete some tasks that involve force interaction with the environment, using simple position control will cause excessive force due to position error, causing damage to the environment. Position control usually refers to the robotic arm reaching a specified joint angle in the joint space, which corresponds to a specified spatial posture in Cartesian space. When the robotic arm encounters obstacles or is disturbed by external forces such as friction on the path to the specified position, the robotic arm will increase its output until it exceeds the limit because position control requires it to reach the specified position. Therefore, when the robotic arm moves in a restricted environment, it is often used in conjunction with force control.
[0003] There are two main ways of force control in terms of interactive force detection. One is to read the current loop and convert the value of the current loop into the torque of each joint through a mathematical formula. This method is low-cost, but the accuracy is not high, so the effect of force control is often not ideal. Another method is to install a six-axis or three-axis force sensor at the end of the robot arm. This detection method has high accuracy and good force control effect, but the force sensor is expensive and easy to damage, and it also occupies the load capacity of the robot arm. Summary of the invention
[0004] Technical purpose: In response to the above technical problems, the present invention provides a robotic arm force control method based on deep learning, which improves the traditional current loop processing method and uses a neural network to convert the numerical value of the current loop into torque. Without using a force sensor, it can obtain high-precision torque fitting results, thereby improving the force control effect while controlling costs.
[0005] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution:
[0006] A mechanical arm force control method based on deep learning, comprising the steps of:
[0007] Obtain the real-time joint features and current influence features of each joint of the robot arm. The real-time joint features include the current posture and moment of inertia of each joint, and the current influence features include the current value and torque current coefficient.
[0008] Inputting the acquired real-time joint features and current influence features into a pre-designed and trained neural network, the neural network outputting the fitting torque of the end joint of the robotic arm;
[0009] According to the fitting torque, the motion trajectory of the robotic arm is adjusted.
[0010] Preferably, the neural network is obtained by the following steps:
[0011] Construct training set: Based on the relationship between the robot arm posture and torque, design data construction rules to obtain the required target features;
[0012] Design an adaptive network parameter matrix: used to weight the acquired target features;
[0013] Design a multi-head feature fusion framework: Based on the graph neural network GAT, build a multi-head input network structure to fuse features from multiple heads;
[0014] Data fitting: Based on the structure of the graph neural network GAT, a fully connected network is used to fit the output node joints and current characteristics separately.
[0015] Preferably, the neural network includes an adaptive network Adanet, a first graph neural network GAT, a second graph neural network GAT, a fully connected network FCN and an output module, and also includes an input 1 Input1 and an input 2 Input2, wherein:
[0016] The input 1 is input from the input end of the adaptive network Adanet, and is processed by the adaptive network Adanet and the first graph neural network GAT in sequence to obtain an intermediate value;
[0017] The intermediate value and input 2 are input into the input end of the second graph neural network GAT, and are processed by the second graph neural network GAT and the fully connected network FCN in sequence to output the fitting torque.
[0018] Preferably, the input of the input 1 is the target feature, that is, the joint feature v i , v i =[q T ,p T ], where p T is the matrix representing the moment of inertia of each joint, q T is a matrix representing the posture information of each joint;
[0019] The joint feature obtained after weighted processing of the target feature is V i =v i *W, where W is the coefficient matrix trained by the adaptive network Adanet.
[0020] Preferably, when performing feature fusion on the head, each joint of the robotic arm is taken as a node, and the node neighbor matrix u is designed;
[0021]
[0022] where u ij Indicates that the i-th node is adjacent to the j-th node;
[0023] in,
[0024] Adaptive parameter network AdaNet: V i =v i *W
[0025] First graph neural network GAT:
[0026] V i 、V j Respectively represent the weighted i-th joint feature and j-th joint feature, o ij represents the influence of the i-th node on the j-th node, N represents the number of nodes, and concat represents vector concatenation.
[0027] Preferably, the input 2 includes a current value l T With coefficient k T , Input 2 is processed the same as Input 1 ij As the input of the second graph neural network GAT,
[0028] in,
[0029] Second graph neural network GAT:
[0030] Among them, s is the current influence characteristic.
[0031] Preferably, the relationship between the position and torque of the robot arm is as follows: the robot arm is provided with N end joints, represented by i 1 ~i N , where the i k Changes in joint torque and i k+1 ~i 6 Each joint posture is related to i 1 ~i k-1 The joint pose is independent, k <N。
[0032] A deep learning-based robotic arm force control system, comprising:
[0033] A data acquisition module is used to obtain the real-time joint characteristics and current influence characteristics of each joint of the robot arm. The real-time joint characteristics include the current posture and moment of inertia of each joint, and the current influence characteristics include the current value and torque current coefficient;
[0034] A neural network is used to input the acquired real-time joint and current influence characteristics, and output the fitting torque of the end joint of the robot arm after being processed by the neural network;
[0035] The adjustment module adjusts the motion trajectory of the robot arm according to the fitting torque.
[0036] Preferably, the neural network includes an adaptive network Adanet, a first graph neural network GAT, a second graph neural network GAT, a fully connected network FCN and an output module, and also includes an input 1 Input1 and an input 2 Input2, wherein:
[0037] The input 1 is input from the input end of the adaptive network Adanet, and is processed by the adaptive network Adanet and the first graph neural network GAT in sequence to obtain an intermediate value;
[0038] The intermediate value and input 2 are input into the input end of the second graph neural network, and are processed by the second graph neural network GAT and the fully connected network FCN in sequence to output the fitting torque.
[0039] Beneficial effects: Due to the adoption of the above technical solution, the present invention has the following beneficial effects:
[0040] The robot arm force control method of the present invention efficiently converts the current values of each joint of the robot arm into the torque value of the end of the robot arm in an end-to-end manner, thereby improving the fitting accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of a mechanical arm force control method based on deep learning proposed by the present invention;
[0042] Figure 2 It is a flowchart for building a neural network;
[0043] Figure 3 is a structural diagram of the entire neural network constructed in the method of the present invention;
[0044] Figure 4 yes Figure 3 Schematic diagram of neural network training and testing in
[0045] Figure 5 yes Figure 3 Schematic diagram of the processing method of the adaptive network;
[0046] Figure 6 This is a schematic diagram of the first Input1 output process during multi-head feature fusion;
[0047] Figure 7 This is a schematic diagram of the processing method of the second Input2 output process when multi-head feature fusion is performed;
[0048] Figure 8 is a schematic diagram of data fitting;
[0049] Fig. 9 yes Figure 8 Schematic diagram of the processing method for the fully connected network. DETAILED DESCRIPTION
[0050] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0051] The present invention provides a robot arm force control method based on deep learning, which mainly includes the steps of data construction, adaptive parameter network design, multi-head feature fusion, and data fitting. This method can efficiently convert the current values of each joint of the robot arm into the torque value of the end of the robot arm in an end-to-end manner, improve the fitting accuracy, and the final fitting accuracy error can meet 0.1 Newton control.
[0052] Embodiment 1
[0053] like Figure 1 As shown, this embodiment proposes a robot arm force control method based on deep learning, comprising the steps of:
[0054] Obtain the real-time joint features and current influence features of each joint of the robot arm. The real-time joint features include the current posture and moment of inertia of each joint, and the current influence features include the current value and torque current coefficient.
[0055] Inputting the acquired real-time joint features and current influence features into a pre-designed and trained neural network, the neural network outputting the fitting torque of the end joint of the robotic arm;
[0056] According to the fitting torque, the motion trajectory of the end of the robotic arm is adjusted.
[0057] Among them, the neural network is obtained through the following steps:
[0058] Construct training set: Based on the relationship between the robot arm posture and torque, design data construction rules to obtain the required target features;
[0059] Design an adaptive network parameter matrix: used to weight the acquired target features;
[0060] Design a multi-head feature fusion framework: Based on the graph neural network GAT, build a multi-head input network structure to fuse features from multiple heads;
[0061] Data fitting: Based on the structure of the graph neural network GAT, a fully connected network with a small number of parameters is used to fit the output node joints and current characteristics separately.
[0062] The multi-head feature fusion framework of the preferred neural network includes a connected adaptive network Adanet, a first graph neural network GAT, a second graph neural network GAT, a fully connected network FCN and an output module, a multi-head input 1 Input1 and an input 2 Input2, wherein the input 1 Input1 is input from the input end of the adaptive network Adanet, and is processed by the adaptive network Adanet and the first graph neural network GAT in sequence to obtain an intermediate value;
[0063] The intermediate value and input 2 are input into the input end of the second graph neural network GAT, and are processed by the second graph neural network GAT and the fully connected network FCN in sequence to output the fitting torque.
[0064] like Figure 2 Taking the neural network structure shown as an example, the main processing flow of the neural network proposed in the present invention is described in detail. The neural network mainly includes an adaptive parameter network AdaNet (Adaptive network), a graph neural network GAT, and a fully connected network FCN.
[0065] Step (a) Design data construction rules: Based on the relationship between the robot arm posture and torque, design data construction rules to obtain the required target features.
[0066] Statistical analysis of the factors affecting the change of the robot arm torque. When a single joint rotates a quantitative angle, the robot base to the end joint is represented by i 1 ~i 6 , i-th k Changes in joint torque and i k+1 ~i 6 Each joint posture is related to i 1 ~i k-1 The joint posture is irrelevant, so the current posture of the joint needs to be taken as a feature q T , taking a 6-joint robotic arm as an example, q T It is a 6×6 matrix, and each row represents the pose information (x, y, z, rx, ry, rz) of the kth joint.
[0067] The robot arm also needs a certain torque to maintain its own weight, so the moment of inertia of each joint of the robot arm is used as a feature p T ; Let joint feature v = [q T ,p T ].
[0068] To calculate the torque through the current value, we need the torque-current coefficient k of each joint. T , the current value of each joint is l T , let joint current influence characteristic s=[k T ,l T ].
[0069] Assume that the external force is F T , the current joint Jacobian matrix is J, and during the data collection process, F is obtained through the six-dimensional force sensor. At this time, the six-dimensional force can be decomposed into each joint, where the torque of each joint is expressed as τ = J T F T . The entire training set has inputs v and s and a label of F. The T in the upper right corner represents the transpose of a matrix or vector. The present invention directly fits the end torque from the input features in an end-to-end manner, and the training set label of the neural network is defined as the end torque F directly obtained by the six-dimensional force sensor.
[0070] The above end displacement x and each joint posture q T , the current value of each joint is l T , reported directly by the robot arm; the moment of inertia of each joint arm p T , is a fixed value given by the robot manufacturer; the external force F T , measured by the six-dimensional sensor installed at the end of the robot in the training set; the joint Jacobian matrix is J, which is composed of the end displacement x and the joint posture q T Directly obtained through the formula.
[0071] Step (ii), designing adaptive network parameters: Considering the redundancy of the influence of the constructed data on the current loop value, an adaptive network parameter matrix is designed to weight the constructed data and reduce the influence of redundancy.
[0072] Considering the parameter q T With parameter p T There may be implicit associations in the information, so the design uses the coefficient matrix W to weight the joint features v, and its output expression is:
[0073] V i =v i *W
[0074] For the coefficient matrix W, consider designing it to be adaptive, so the adaptive network AdaNet is designed to train the adaptive weighted coefficient matrix W. The goal of adaptive network design is to optimize the final fitting result. In the network model, the design basis is to make the weights close to the ideal value so that the weight estimation error is minimized:
[0075] The test results show that the adaptive coefficient matrix W can improve the representation ability of information and improve the final fitting accuracy. Compared with the model without using the coefficient matrix W, its fitting accuracy is improved by about 2 percentage points.
[0076] Step (three), multi-head feature fusion and framework construction: Combining the traditional method of calculating the current loop value, based on the graph neural network GAT, a multi-head input network structure is built, and multiple heads are used for feature fusion to enhance data representation capabilities.
[0077] The traditional method of calculating the end force based on the current loop is to first calculate the end force based on the current of each joint and the torque-current coefficient k T Calculate the torque τ of each joint, and then calculate the torque τ of each joint according to the end displacement x and the joint posture q T The Jacobian matrix J is obtained, and the end force is synthesized by the Jacobian matrix J and the torque τ of each joint. Therefore, the present invention simulates this input mode and designs the network to have two inputs, Input 1 and Input 2. Figure 5 , where the input-input1 output process is (taking 6 joints as an example):
[0078] In the present invention, the industrial robot arm and the collaborative robot arm usually have multiple joints. The last joint of the multi-joint robot arm can be called the terminal joint. All joints on the robot arm are represented by a joint node graph. Based on the analysis of step (i), the previous joint does not affect the torque change of the next joint. Therefore, its joint node graph structure is a directed graph with the direction from the end to the base. Its node neighbor matrix can be expressed as
[0079]
[0080] where u ij Represents the i-th adjacent node to the j-th node in the node neighbor matrix.
[0081] AdaNet: V i =v i *W
[0082] First graph neural network GAT:
[0083] Where W is the adaptive weight matrix of the adaptive network Adanet, that is, the coefficient matrix; V i 、V j Respectively represent the weighted i-th joint feature and j-th joint feature, o ij represents the influence of the i-th node on the j-th node, N is the number of nodes, ReLU represents the ReLU function, and concat represents vector concatenation.
[0084] Input 2 is the same as Input 1. ij As the input of the second graph neural network GAT:
[0085] Second graph neural network GAT:
[0086] Among them, s is the current influence characteristic, M ij It is the matrix calculated and output by the second graph neural network GAT, which is the result of graph convolution.
[0087] Step (IV), data fitting: Based on the structure of graph neural network, the fully connected network FCN with a small number of parameters is used to fit the output node features. Each joint is fitted separately to avoid the influence of shared weights. Figures 8 to 9 shown.
[0088] Considering the result of step (iii), each node i in the output O contains other related node information. Therefore, when fitting the data, each node is fitted separately. The fitting is performed using a 256-dimensional single-layer fully connected network. For example, if a 6-joint robotic arm is used, the number of fully connected layer nodes is 6*256=1536. The entire training network is small in size, and the speed meets the requirements while meeting the fitting accuracy. The data fitting is performed using a fully connected neural network FCN, and the fitting calculation formula is:
[0089] FCN: OUT = M ij w
[0090] w represents the coefficient matrix of the fully connected network, M ij , is the output of the second graph neural network GAT, and OUT is the fitting torque output by the neural network.
[0091] The neural network is trained by inputting the training set. The data in the training set includes: the position and posture of each joint q T , moment of inertia p T , current value l T , and torque current coefficient k T In addition, the target torque measured by the six-dimensional force sensor is also input. When the neural network is applied, only the position and posture q of each joint needs to be input. T , moment of inertia p T , current value l T , and torque-current coefficient k T , each joint posture already includes the end displacement x.
[0092] The present invention aims to improve the conversion accuracy of the current to torque of the manipulator. The traditional conversion is directly converted through the torque-current coefficient and then synthesized through the Jacobian matrix, and its conversion accuracy is low. The factors affecting the conversion accuracy of current to torque include the posture and load of each joint of the manipulator, and the relationship between these parameters and the final real torque is difficult to calculate accurately, so it is considered to use a deep neural network for fitting.
[0093] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A robot arm force control method based on deep learning, characterized in that: Includes steps: Obtain the real-time joint features and current influence features of each joint of the robot arm. The real-time joint features include the current posture and moment of inertia of each joint, and the current influence features include the current value and torque current coefficient. Inputting the acquired real-time joint features and current influence features into a pre-designed and trained neural network, the neural network outputting the fitting torque of the end joint of the robotic arm; According to the fitting torque, adjusting the motion trajectory of the robotic arm; The neural network is obtained by the following steps: Construct training set: Based on the relationship between the robot arm posture and torque, design data construction rules to obtain the required target features; Design an adaptive network parameter matrix: used to weight the acquired target features; Design a multi-head feature fusion framework: Based on the graph attention neural network, build a multi-head input network structure to fuse features from multiple heads; Data fitting: Based on the structure of the graph attention neural network, the output node joints and current features are fitted separately using a fully connected network; The neural network includes a connected adaptive network, a first graph attention neural network, a second graph attention neural network, a fully connected network and an output module, and also includes an input one and an input two, wherein: The input 1 is input from the input end of the adaptive network, and is processed by the adaptive network and the first graph attention neural network in sequence to obtain an intermediate value; The intermediate value and input two are input into the input end of the second graph attention neural network, and are processed by the second graph attention neural network and the fully connected network in turn to output the fitting moment.
2. The method for controlling a robot arm force based on deep learning according to claim 1, characterized in that: The input of the input 1 is the target feature, i.e., the joint feature v i , v i =[q T ,p T ], where p T The matrix representing the moment of inertia of each joint, q T A matrix representing the pose information of each joint; The joint feature obtained after weighted processing of the target feature is V i =v i *W, where W is the adaptive weight matrix of the adaptive network.
3. A robot arm force control method based on deep learning according to claim 2, characterized in that: When performing feature fusion on the head, design the node neighbor matrix u; where u ij Indicates the i-th adjacent to the j-th node; in, Adaptive parameter network: V i =v i *W First image attention neural network: V i 、V j Respectively represent the weighted i-th joint feature and j-th joint feature, o ij represents the influence of the i-th node on the j-th node, N represents the number of nodes, and concat represents vector concatenation.
4. The method for controlling the mechanical arm force based on deep learning according to claim 3, characterized in that: Input 2 includes current value l T With coefficient k T , the processing result of input 2 is the same as input 1 ij As the input of the second graph attention neural network, in, Second picture attention neural network: Where s is the current influence characteristic; M ij is the output of the second graph attention neural network.
5. The method for controlling a robot arm force based on deep learning according to claim 1, characterized in that: The relationship between the robot arm posture and torque is: The robot arm is provided with N end joints, represented by i1~i N , where the i k Changes in joint torque and i k+1 ~i6 are related to the postures of each joint and are related to i1~i k-1 The joint pose is independent, k <N。 6. A robot arm force control system based on deep learning, characterized in that: include: A data acquisition module is used to obtain the real-time joint characteristics and current influence characteristics of each joint of the robot arm. The real-time joint characteristics include the current posture and moment of inertia of each joint, and the current influence characteristics include the current value and torque current coefficient; A neural network is used to input the acquired real-time joint and current influence characteristics, and output the fitting torque of the end joint of the robot arm after being processed by the neural network; An adjustment module, which adjusts the motion trajectory of the robotic arm according to the fitting torque; The neural network includes a connected adaptive network, a first graph attention neural network, a second graph attention neural network, a fully connected network and an output module, and also includes an input one and an input two, wherein: The input 1 is input from the input end of the adaptive network, and is processed by the adaptive network and the first graph attention neural network in sequence to obtain an intermediate value; The intermediate value and input 2 are input to the input end of the second graph attention neural network, and are processed by the second graph attention neural network and the fully connected network in turn to output the fitting moment; The neural network is obtained by the following steps: Construct training set: Based on the relationship between the robot arm posture and torque, design data construction rules to obtain the required target features; Design an adaptive network parameter matrix: used to weight the acquired target features; Design a multi-head feature fusion framework: Based on the graph attention neural network, build a multi-head input network structure to fuse features from multiple heads; Data fitting: Based on the structure of the graph attention neural network, a fully connected network is used to fit the output node joints and current features separately.
Citation Information
Patent Citations
Friction stir welding device and friction stir welding method
CN107427957A
Intelligent detection method based on graph neural network
CN110415215A
