Robot joint torque control method based on long short-term memory network

By predicting and updating the robot joint torque through the long-term memory network, it solves the problems of poor anti-interference and low control accuracy in the existing technology, achieves high-precision torque control, and is suitable for changeable industrial environments.

CN115284276BActive Publication Date: 2024-10-01JIANGNAN UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202210330184.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2024-10-01
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

The existing technology has the problems of poor anti-interference, high training difficulty, and poor control accuracy in robot torque control, especially in force-position hybrid control under dynamic model uncertainty and environmental variability.

Method used

The robot joint torque control method based on long short-term memory network is used to obtain the actual parameters and expected parameters of the robot during operation and input them into the trained long-short-term memory network to predict the joint torque and end contact force, and update the network weights in real time. to achieve continuous control.

Benefits of technology

It achieves high-precision joint torque prediction, simplifies dynamic modeling, overcomes dynamic model complexity and parameter uncertainty, improves control stability and accuracy, reduces dependence on force sensors, and is suitable for various tasks. environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115284276B_ABST
    Figure CN115284276B_ABST
Patent Text Reader

Abstract

The present invention discloses a robot joint torque control method based on a long short-term memory network, and belongs to the field of robot control technology. The method comprises: collecting parameters such as the actual joint state and the expected joint state of the robot during operation, and inputting the parameters into a trained long short-term memory network, wherein the long short-term memory network predicts and compensates for the robot joint torque and the end contact force; a force position controller controls the operation of the robot according to the predicted joint torque and the end contact force; collecting the actual joint torque and the end contact force of the robot operation, and comparing them with the predicted joint torque and the end contact force, and updating the weight of the long short-term memory network according to the comparison result. The present invention compensates for the modeling error caused by the uncertainty of the dynamic model and the environmental model of the robot by the predicted value based on the long short-term memory network, and predicts the contact force at the end of the robot, so as to achieve the purpose of high-precision force position control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a robot joint torque control method based on a long short-term memory network, and belongs to the technical field of robot control. Background Art

[0002] Robots have become one of the most widely used equipment in the field of engineering machinery manufacturing due to their flexibility, versatility, high precision and low cost. The robot can be divided into free movement and force movement during the movement process. In force movement, the robot needs to take into account the interaction with the environment (that is, the robot contacts the environment while moving, resulting in the robot receiving contact force from the environment). It is necessary to track the force and position of the robot at the same time. It is generally used in grinding, handling, assembly and drilling. For example, in the installation and calibration of elevator guide rails, if the robot does not control the end contact force during the movement, it will affect the calibration accuracy of the guide rails and even cause damage to the site, resulting in mission failure. Therefore, in-depth research on force-position hybrid control of robot arms has become a hot topic.

[0003] In the research of force-position hybrid control of manipulators, a common method is to combine the inner position control loop with the outer force control loop. However, in the actual application process, the following three problems still exist: First, the inner position control loop adopts the method of robot calculation torque feedforward control, and the robot calculation torque feedforward control relies on the dynamic modeling of the manipulator. However, in the actual design process, the dynamic model of the robot is difficult to accurately obtain. By directly using the parameters calculated theoretically to establish the dynamic model, the control effect will be poor. Second, the outer loop adopts impedance control, but most impedance control studies use force sensors to measure and feedback the contact force between the robot end and the contact surface, and feed the contact force back to the impedance control system to achieve the purpose of force control. However, force sensors are generally expensive, low in rigidity, and easy to damage. In actual industrial applications, if there is high temperature, high corrosion, and strong interference, they cannot be used. Third, impedance control also relies on the robot environment dynamic model, but in the actual application process, due to the variability and uncertainty of the environment, it is difficult to obtain an accurate environmental dynamic model. Therefore, it is necessary to provide an improved technical solution for the above-mentioned deficiencies in the prior art.

[0004] Patent CN112809666A discloses a 5-DOF manipulator force and position tracking algorithm based on neural network. It uses RBF neural network to fit the parameters of the dynamic equation except the inertia matrix, and gives a neural network adaptive force and position control method with time-varying output constraint state. Although this method can solve the problem that traditional force / position hybrid control cannot overcome the influence of unknown models, it still needs to introduce a torque sensor at the end of the manipulator, which has problems such as long control cycle and poor anti-interference.

[0005] Patent CN109794935A discloses a force and torque prediction system and method for the assembly process based on neural network analysis. By establishing an accurate mathematical model and then solving the parameters through the collected data, the data pairs collected under different conditions are used to train the neural network model and establish their mapping relationship, and finally achieve accurate prediction of force and torque. However, since this method uses a BP neural network, the prediction effect is poor when facing a force and torque data set with time series characteristics, and the training difficulty is high. In addition, this method does not consider the impact of the assembly force on the end position of the robot, which will make the robot's position control accuracy poor. Summary of the invention

[0006] In order to solve the problems of poor anti-interference, high training difficulty and poor control accuracy in the current solution of using neural network to control the torque of the robot, the present invention provides a robot joint torque control method based on long short-term memory network, the method comprising:

[0007] Step 1: Obtain the actual joint angle, actual angular velocity, actual angular acceleration, expected joint angle, expected angular velocity, expected angular acceleration, correction errors of each joint output by impedance control, joint torque feedback, and end contact force obtained by mathematical model when the robot is operating;

[0008] Step 2: Input the parameters obtained in step 1 into the trained long short-term memory network, and the long short-term memory network obtains the predicted joint torque and the predicted end contact force through prediction;

[0009] Step 3: The force position controller controls the operation of the robot according to the predicted joint torque and the predicted end contact force;

[0010] Step 4: collecting the actual joint torque and actual end contact force of the robot operation, comparing them with the predicted joint torque and the predicted end contact force, retraining the long short-term memory network according to the comparison results, and updating the weights of the long short-term memory network;

[0011] Step 5: Repeat steps 1-4 to achieve continuous control of the robot joint torque.

[0012] The actual joint angle, actual angular velocity, and actual angular acceleration of the robot during operation are obtained through the encoder of the robot joint servo motor. The expected joint angle, expected angular velocity, and expected angular acceleration of the robot during operation are the motion planning parameters of the robot during force position control motion, which can be obtained through the controller. The correction error of each joint output by impedance control and the end contact force obtained through the mathematical model can also be directly obtained through the robot's force position controller after calculation, and the joint torque feedback is calculated through the current signal fed back by the robot joint driver.

[0013] Optionally, the robot dynamics model is:

[0014]

[0015] D(q) is the inertia matrix, represents the centrifugal moment and the Coriolis moment, G(q) represents the gravitational moment, q,

[0016] Respectively represent joint angle, joint angular velocity, and joint acceleration; B is the viscous friction term, is the dynamic friction term; τ is the calculated joint torque of the robot.

[0017] Since the viscous friction term and the dynamic friction term will be affected by the robot's operating state and actual working conditions, they are uncertain terms in the robot's dynamics model and cannot be accurately identified. The long short-term memory network model designed by the present invention can accurately predict the robot's joint torque, thereby compensating for the uncertainty.

[0018] Optionally, the force position controller includes:

[0019] The inner loop builds a calculated torque controller based on the position loop. Using the calculated torque controller, the input of the robot system is:

[0020]

[0021] Among them, K v , K p 、e、 They are differential coefficient, proportional coefficient, joint angle error, and joint angular velocity error respectively; according to adjustment experience, the differential coefficient K v and proportionality factor K p The adjustment ranges are: [0,50] and [0,300] respectively. During the robot debugging phase, K p and K v Adjust to a suitable value to ensure position tracking accuracy; D(q) is the inertia matrix, represents the centrifugal moment and the Coriolis moment, G(q) represents the gravitational moment, q,

[0022] Represent the joint angle, joint angular velocity, and joint acceleration respectively; τ is the calculated joint torque of the robot; D(q), G(q) and These are the nominal variables with known parameters when the robot leaves the factory; joint angle error e and joint angular velocity error Obtained through the motor encoder feedback of the robot joint servo motors.

[0023] The outer loop builds an impedance controller, and the impedance control equation of the robot is:

[0024]

[0025] Among them, m d , b d , k d , x, x d 、f d 、f e They are inertia parameter, damping parameter, stiffness parameter, desired acceleration at the end, actual acceleration at the end, actual velocity at the end, desired velocity at the end, actual position at the end, desired position at the end, desired contact force at the end, actual contact force at the end, and actual contact force at the end f. e Obtained through the robot environment dynamics model.

[0026] Determine m based on adjustment experience d The adjustment range is [1,20], b d The adjustment range of k is [200,500], d The adjustment range is [40,1000]. According to the changes of the force-position tracking curve during adjustment, the control parameters of the robot force-position controller are preliminarily selected.

[0027] Expected contact force at the end f d These are the default parameters given by the controller during motion planning.

[0028] and x are obtained through the motor encoder feedback of the robot joint servo motor. The actual contact force f e Obtained through the robot environment dynamics model.

[0029] and x d and

[0030] Subtract x from the impedance control output parameters: the correction error x of each joint e Used to output to the position loop to correct the motion trajectory.

[0031] Optionally, the joint torque feedback is:

[0032] T O =K T Iηn

[0033] Among them, K T is the torque constant of the motor, in Nm / A; I is the working current of the motor, in A; η is the transmission efficiency of the reducer; n is the reduction ratio of the reducer.

[0034] Optionally, the end contact force obtained by the mathematical model is:

[0035] F=T O (J T (q)) -1

[0036] Among them, (J T (q)) -1 is the inverse of the transposed Jacobian matrix.

[0037] Optionally, the training process of the long short-term memory network includes:

[0038] S1: Build a long short-term memory network model and initialize the network weights;

[0039] S2: Generate the trajectory of the robot during force and position operation, and collect the actual joint angle, actual angular velocity, actual angular acceleration, expected joint angle, expected angular velocity, expected angular acceleration, correction error of each joint output by impedance control, end contact force obtained by mathematical model, joint torque feedback actual joint torque and actual end contact force of the robot during movement;

[0040] S3: normalize the parameters obtained in S2 to construct a training set, a validation set and a test set;

[0041] S4: using the training set to train the long short-term memory network, taking the set loss function as a target, and iteratively optimizing the network parameters;

[0042] S5: Use the test set to test whether the predicted joint torque and predicted end contact force output by the long short-term memory network meet the control requirements, evaluate the compensation effect, and determine whether to retrain the long short-term memory network based on the compensation effect.

[0043] Optionally, the input parameters of the long short-term memory network input layer are: actual joint angle, actual angular velocity, actual angular acceleration, expected joint angle, expected angular velocity, expected angular acceleration, correction errors of each joint output by impedance control, joint torque feedback and end contact force obtained by mathematical model;

[0044] The output parameters of the output layer are: predicted joint torque and predicted end contact force.

[0045] Optionally, the number of neurons in the hidden layer of the long short-term memory network is:

[0046]

[0047] Among them, N hid is the estimated number of neurons in the hidden layer, N in is the number of neurons in the input layer, N outis the number of neurons in the output layer, r is a constant ranging from [1,10].

[0048] Optionally, the actual end contact force may be obtained through a robot environment dynamics model or may be first obtained through a sensor according to specific accuracy requirements. The robot environment dynamics model is:

[0049]

[0050] Among them, F ext It represents the interaction force between the robot end gripper and the workpiece in the environment; K e is an n×n dimensional diagonal matrix, which represents the damping and stiffness parameters in each direction of the environment; Z and Z e They are both n×1 dimensional vectors, representing the actual position of the robot end gripper and the position of the environment surface respectively.

[0051] Optionally, the normalization process in S3 includes:

[0052]

[0053] Among them, z is the parameter before normalization, z min is the minimum value of the parameter, z max is the maximum value of the parameter, and z' is the normalized parameter.

[0054] Optionally, the loss function of the long short-term memory network is:

[0055]

[0056] Wherein, f(x) is the predicted joint torque and predicted end contact force output by the long short-term memory network model; y is the actual joint torque and actual end contact force; n is the number of samples. Using the training set and taking the expected MSE as the target, the adaptive gradient optimization algorithm is used to update the weights and biases of the long short-term memory network.

[0057] The beneficial effects of the present invention are:

[0058] 1. The present invention compensates the dynamic model by fitting the uncertainty function of the dynamic equation through the long short-term memory network, thus simplifying the steps of dynamic modeling. Since the robot model itself is inaccurate and is subject to various interferences, it is often difficult to obtain satisfactory control effects by using traditional calculated torque control. The present invention uses a trained long short-term memory network model to predict the uncertainty of the dynamic model, which can predict and compensate the calculated torque in real time, overcoming the complexity of dynamic modeling and the problem of parameter uncertainty in the actual dynamic model, and achieving high-precision control.

[0059] 2. The present invention collects the time series information of the robot's motion parameters and trains the long short-term memory network to achieve the prediction of continuous joint torques, and avoids sudden changes in the prediction of joint torques, thus ensuring the stability of control.

[0060] 3. The present invention can continuously improve the prediction accuracy of the robot during operation. The controller collects and feeds back the motion parameters of each joint of the robot, and updates the weight parameters of the long short-term memory network in real time. The weight coefficients of the long short-term memory network are generally fixed after training, and the prediction accuracy cannot be improved in real time. The present invention can continuously train the long short-term memory network in the controller, compare the training accuracy with the prediction accuracy, discard the weight coefficients with poor accuracy, and update the weight parameters of the long short-term memory network in real time, thereby continuously improving the prediction accuracy of the network.

[0061] 4. The present invention simplifies the robot force position control process, and the robot end effector provides high-precision contact force. By establishing a mathematical model of the robot end contact force and the robot joint torque and an impedance controller, and using a long short-term memory network to compensate for the uncertainty of the mathematical model, the robot force position control process is simplified. When the robot performs a force position control task, a force sensor is often installed at the end. The established mathematical model and the long short-term memory network with high prediction accuracy can replace the use of force sensors after network training and provide the desired contact force, avoiding the problems of long control cycle and poor anti-interference caused by the use of force sensors.

[0062] 5. The present invention has wide applicability and strong flexibility. It can be applied to various robots that need to perform force and position control tasks and adapt to various working environments. By establishing a controller model that can accurately control and adapt to the environment, the controller can be applied to robots of different models. The present invention does not need to model uncertain models such as the Coulomb friction model in the dynamic equation, and the operation process is simple and easy to operate. By utilizing the self-learning ability of the long short-term memory network, it can be adapted to various working environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0064] Figure 1 It is a schematic diagram of the steps of an embodiment of the present invention.

[0065] Figure 2 Shown is a robot control framework diagram of an embodiment of the present invention.

[0066] Figure 3 Shown is a long short-term memory network adaptive iteration flow chart of an embodiment of the present invention.

[0067] Figure 4 Shown is a diagram showing the effect of a position tracking experiment according to an embodiment of the present invention.

[0068] Figure 5 Shown is a diagram showing the effect of a force tracking experiment according to an embodiment of the present invention. DETAILED DESCRIPTION

[0069] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0070] Embodiment 1:

[0071] The embodiment of the present invention provides a robot joint torque control method based on long short-term memory network, such as Figure 1 As shown, it is a flow chart of a robot joint torque control method based on a long short-term memory network according to an embodiment of the present invention. The method may include the following steps:

[0072] Step 1: Ignore the viscous friction term and the dynamic friction term and establish the dynamic model of the robot: Where D(q) is the inertia matrix, represents the centrifugal moment and the Coriolis moment, G(q) represents the gravitational moment, q,

[0073] They represent joint angle, joint angular velocity, and joint acceleration respectively, and τ is the joint torque calculated by the robot.

[0074] The inertia matrix, centrifugal moment, Coriolis moment and gravity moment in the dynamic model of the robot are nominal variables with known parameters when the robot leaves the factory. The joint angle, joint angular velocity and joint acceleration can be obtained from the encoder of the robot's joint servo motor. The viscous friction term and dynamic friction term will be affected by factors such as the robot's operating temperature and joint wear. In the design process of the robot controller, they cannot be accurately identified, so they are ignored first and compensated by the long short-term memory network after the long short-term memory network training is completed.

[0075] Step 2: Design the force position controller of the robot. The force position control of the robot adopts an impedance control system based on the position loop. Design and calculate the torque controller as the controller of the robot position loop. At this time, the control equation of the torque of each joint of the robot is: Where K v , K p 、e、 They are differential coefficient, proportional coefficient, joint angle error, and joint angular velocity error respectively.

[0076] The differential coefficient K in the robot's calculated torque controller v and proportionality factor K p The adjustment ranges are: [0,50] and [0,300] respectively. During the robot debugging phase, K p and K v Adjust to a suitable value to ensure position tracking accuracy.

[0077] Step 3: Design an impedance controller as the controller of the robot's force and position control outer loop.

[0078] First, establish the robot environment dynamics model: Among them, F ext It represents the interaction force between the tool (robot end gripper) and the environment (workpiece) when they come into contact; K e is an n×n dimensional diagonal matrix, which represents the damping and stiffness parameters in each direction of the environment; Z and Z e They are all n×1-dimensional vectors, representing the actual position of the tool (robot end gripper) and the position of the surface of the environment (workpiece) respectively.

[0079] Finally, the impedance control equation of the robot is established: Where m d , b d , k d , x, x d 、f d 、f e They are inertia parameter, damping parameter, stiffness parameter, desired acceleration at the end, actual acceleration at the end, actual velocity at the end, desired velocity at the end, actual position at the end, desired position at the end, desired contact force at the end, and actual contact force at the end.

[0080] The K e It can be obtained according to the actual environmental parameters. The F obtained by the environmental dynamics model ext As the actual contact force at the end e .

[0081] The m d The adjustment range is [1,20], b d The adjustment range of k is [200,500], d The adjustment range is [40,1000]. According to the changes of the force-position tracking curve during adjustment, the control parameters of the robot force-position controller are preliminarily selected.

[0082] The desired end force f d These are the default parameters given by the controller during motion planning.

[0083] and x are obtained through the motor encoder feedback of the robot joint servo motor. The actual contact force f e It is obtained in the early stage through the environmental dynamics model, and after the network training is completed, it is predicted through the long short-term memory network.

[0084] and x d and

[0085] Subtract x from the impedance control output parameters: the correction error x of each joint e Used to output to the position loop to correct the motion trajectory.

[0086] Step 4: Build a long short-term memory network model and initialize the network model parameters. The network model structure includes an input layer, multiple hidden layers and an output layer.

[0087] The input parameters of the long short-term memory network input layer are the actual output joint state (angle, angular velocity and angular acceleration), the expected joint state (angle, angular velocity and angular acceleration), the correction error of each joint output by impedance control, the joint torque feedback, and the end contact force obtained by the mathematical model. The output parameters of the long short-term memory network output layer are set to: predicted joint torque and predicted end contact force.

[0088] The number of neurons in the hidden layer is based on the formula: Where N hid is the estimated number of neurons in the hidden layer, N in is the number of neurons in the input layer, N out is the number of neurons in the output layer, r is a constant ranging from [1,10]. The optimal number of neurons in the hidden layer is selected based on the training effect.

[0089] The learning rate LR is set to 0.001, the maximum number of training rounds MaxEpochs is set to 1000, and the learning rate is set to decrease by 0.5 times after every 250 training rounds to prevent the model from overfitting. The network model parameters can be adjusted according to the actual performance of the network.

[0090] According to the above steps, we built Figure 2 The robot control framework shown.

[0091] Shown Figure 2In the process, the expected joint state input (angle, angular velocity and angular acceleration) and the actual joint state input (angle, angular velocity and angular acceleration) of the robot motion planning are first input into the robot's force position controller and long short-term memory network model respectively. Then, the end expected force, the actual joint torque feedback and the end contact force obtained by the mathematical model are given as the input of the built impedance controller. At the same time, the joint torque feedback, the end contact force obtained by the mathematical model and the output of the impedance control are used to correct the error x of each joint. e It is also used as the input parameter of the long short-term memory network model. Finally, the predicted joint torque is output by the long short-term memory network as the input of the robot force controller, and the predicted end contact force is used as the input of the impedance controller to achieve the purpose of force control of the robot.

[0092] Step 5: This embodiment takes the installation and calibration of elevator guide rails by a robot as an example, and generates a trajectory of the robot when it clamps and moves the guide rails when performing force and position control operations.

[0093] Step 6: Collect and record the motion parameters of the robot in the motion trajectory: actual output joint state (angle, angular velocity and angular acceleration), expected joint state (angle, angular velocity and angular acceleration), output correction error of each joint controlled by impedance, end contact force obtained by mathematical model, joint torque feedback, actual joint torque and actual end contact force.

[0094] The obtained joint torque feedback is passed through the mathematical model: F = T O (J T (q)) -1 The end contact force obtained by the mathematical model is converted into the formula: O is the joint torque feedback, (J T (q)) -1 is the inverse of the transposed Jacobian matrix.

[0095] The joint torque feedback can be calculated according to the formula: T O =K T Iηn is calculated, where: K T is the torque constant of the motor, which can be obtained from the user manual of the servo motor, in Nm / A; I is the working current of the motor, in A; η is the transmission efficiency of the reducer, generally between 0.95 and 0.99; n is the reduction ratio of the reducer.

[0096] Step 7: Construct the motion parameters of the robot in the motion trajectory as sample data, and use the formula: Normalization is performed, where z is the parameter before normalization, z min is the minimum value of the parameter, z max is the maximum value of the parameter, and z' is the normalized parameter.

[0097] Step 8: Randomly divide the sample data and use 70% of the sample data as training samples, 15% of the sample data as validation samples, and 15% of the sample data as test samples.

[0098] like Figure 3 As shown, adaptive iterative training of long short-term memory network is performed.

[0099] Step 9: Use mean square error (MSE) as the loss function:

[0100]

[0101] Where: f(x) is the joint torque and end contact force predicted by the network model; y is the actual joint torque and actual end contact force; n is the number of samples.

[0102] Using the training set and taking the expected MSE as the target, the adaptive gradient optimization algorithm Adam is used to update the weights and biases of the long short-term memory network.

[0103] The test set is used to verify whether the MSE of the long short-term memory network reaches the expected target. If it does not reach the expected target, the network is retrained.

[0104] Step 10: When the trained LSTM network is applied to the force controller of the robot, the controller can input the motion parameters of the robot in the motion trajectory into the LSTM network, make a prediction first, and compare the predicted joint torque results with the joint torque feedback, so as to retrain the network and update the weights.

[0105] In order to verify the effectiveness of the proposed method, a force and position control experiment was carried out on a five-degree-of-freedom elevator guide rail installation and calibration robot, in which the maximum number of long short-term memory network training times was 1000 times.

[0106] Take the first joint as an example. Figure 4 As shown in FIG. 1 , the joint torque control of the robot by the method of the present invention effectively improves the joint tracking accuracy of the robot, and the convergence speed is increased by 83% compared with the method without compensation, and the tracking accuracy when stable is increased by 85%. Figure 5 As shown, the desired end force in the horizontal direction is set to 200N, and the force tracking error using this method can be controlled within 2%.

[0107] In summary, this embodiment can significantly improve the accuracy of robot joint torque control, has strong anti-interference ability, and can achieve continuous and stable control.

[0108] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.

[0109] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A robot joint torque control method based on long short-term memory network, characterized in that: The method comprises: Step 1: Obtain the actual joint angle, actual angular velocity, actual angular acceleration, expected joint angle, expected angular velocity, expected angular acceleration, correction errors of each joint output by impedance control, joint torque feedback, and end contact force obtained by mathematical model when the robot is operating; The joint torque feedback is: T O =K T Iηn Among them, K T is the torque constant of the motor, in Nm / A; I is the working current of the motor, in A; η is the transmission efficiency of the reducer; n is the reduction ratio of the reducer; The end contact force obtained by the mathematical model is: F=T O (J T (q)) -1 Among them, T O is the joint torque feedback, (J T (q)) -1 is the inverse matrix of the transposed Jacobian matrix; Step 2: Input the parameters obtained in step 1 into the trained long short-term memory network, and the long short-term memory network obtains the predicted joint torque and the predicted end contact force through prediction; Step 3: The force position controller controls the operation of the robot according to the predicted joint torque and the predicted end contact force; Step 4: collecting the actual joint torque and actual end contact force of the robot operation, comparing them with the predicted joint torque and the predicted end contact force, retraining the long short-term memory network according to the comparison results, and updating the weights of the long short-term memory network; Step 5: Repeat steps 1-4 to achieve continuous control of the robot joint torque; The force position controller includes: a calculation torque controller and an impedance controller; The inner loop of the controller builds the calculated torque controller based on the position loop, and outputs the calculated joint torque of the robot to the robot control system for position control of the robot. At this time, the input of the robot control system is: Among them, K v , K p 、e、 It is differential coefficient, proportional coefficient, joint angle error, joint angular velocity error, D(q) is an inertia matrix, Represents centrifugal moment and coschy moment, G(q) represents gravity moment, q, They represent joint angle, joint angular velocity, and joint acceleration respectively; τ is the calculated joint torque of the robot; The outer loop of the controller builds an impedance controller, and the impedance control equation of the robot is: Among them, m d 、b d , k d , x, x d 、f d 、f e They are inertia parameter, damping parameter, stiffness parameter, terminal expected acceleration, terminal actual acceleration, terminal actual velocity, terminal expected velocity, terminal actual position, terminal expected position, terminal expected contact force, terminal actual contact force; terminal actual contact force f e Obtained through the robot environment dynamics model; Predicting joint torque and end contact force by long short-term memory network, wherein the predicted joint torque is used as input of computational torque controller, and the predicted end contact force is used as input of impedance controller; The training process of the long short-term memory network includes: S1: Build a long short-term memory network model and initialize network parameters; S2: Generate the trajectory of the robot during force and position operation, and obtain the actual joint angle, actual angular velocity, actual angular acceleration, expected joint angle, expected angular velocity, expected angular acceleration, correction error of each joint output by impedance control, end contact force obtained by mathematical model, joint torque feedback, actual joint torque and actual end contact force of the robot during movement; S3: normalize the parameters obtained in S2 to construct a training set, a validation set and a test set; S4: using the training set to train the long short-term memory network, taking the loss function as a target, and iteratively optimizing the network parameters; S5: using a test set to test whether the predicted joint torque and predicted end contact force output by the long short-term memory network meet the control requirements, evaluating the compensation effect, and determining whether to retrain the long short-term memory network according to the compensation effect; The robot environment dynamics model is: Among them, F ext Indicates the interaction force when the robot end clamp contacts the environmental workpiece; K e It is a positive diagonal matrix of n×n dimensions, which represents the damping and stiffness parameters in each direction of the environment; Z and Z e They are all n×1-dimensional vectors, which represent the actual position of the robot end clamp and the position of the environmental surface respectively; The F obtained by the robot environment dynamics model ext As the actual contact force f e .

2. The robot joint torque control method according to claim 1, characterized in that: The input parameters of the LSTM input layer are: actual joint angle, actual angular velocity, actual angular acceleration, expected joint angle, expected angular velocity, expected angular acceleration, output correction error of each joint of impedance control, joint torque feedback and end contact force obtained by mathematical model; The output parameters of the output layer are: predicted joint torque and predicted end contact force.

3. The robot joint torque control method according to claim 2, characterized in that The number of neurons in the hidden layer of the long short-term memory network is: Among them, N hid is the estimated number of neurons in the hidden layer, N in is the number of neurons in the input layer, N out is the number of neurons in the output layer, r is a constant ranging from [1,10].

4. The robot joint torque control method according to claim 1, characterized in that The normalization process in S3 includes: Among them, z is the parameter before normalization, z min is the minimum value of the parameter, z max is the maximum value of the parameter, and z' is the normalized parameter.

5. The robot joint torque control method according to claim 1, characterized in that The loss function of the long short-term memory network is: Among them, f(x) is the predicted joint torque and predicted end contact force output by the long short-term memory network; y is the actual joint torque and actual end contact force; n is the number of samples. Using the training set and taking the expected MSE as the goal, the weights and biases of the long short-term memory network are updated using an adaptive gradient optimization algorithm.

Citation Information

Patent Citations

  • System and method for predicting force and torque in assembling process based on neural network analysis

    CN109794935A

  • 5-DOF mechanical arm force position tracking algorithm based on neural network

    CN112809666A

  • Robot jumping landing detection method

    CN113987961A

  • Robot force-position synchronous teleoperation control method and device based on myoelectricity interface

    CN114055461A

  • Collision detection method and device, computer readable storage medium and robot

    CN114211491A