A mechanical arm dynamics identification method based on neural network torque prediction
By using a torque prediction model based on LSTM and a genetic optimization algorithm, the problem of friction and noise interference in the dynamic identification of robotic arms by neural networks is solved, and higher accuracy torque prediction and identification results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEBEI UNIV OF TECH
- Filing Date
- 2023-05-19
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies using neural networks to identify the dynamic parameters of robotic arms are easily affected by nonlinear friction of joints and observation noise, resulting in large errors in joint torque fitting and making it difficult to obtain accurate torque information.
A torque prediction model based on LSTM mechanism is adopted, and the excitation trajectory is designed by combining the genetic optimization algorithm. The model is trained by PyTorch neural network architecture to establish a torque prediction model based on LSTM and fully connected network layers. The time state sequence of the robotic arm is processed to improve the prediction accuracy.
It improves the accuracy of torque prediction, reduces the influence of nonlinear factors such as friction, and improves the torque prediction effect by 4% and the identification accuracy by 6.1% compared with the least squares method. It also has good friction compensation characteristics.
Smart Images

Figure CN116352724B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial robot technology, and in particular to a method for identifying the dynamics of a robotic arm based on neural network torque prediction. Background Technology
[0002] With the advancement of new industrialization, improving the intelligence level of factories and increasing production efficiency has become an urgent task. Robotic arms are widely used in industrial production, and much research currently focuses on improving their control precision. Establishing an accurate dynamic model is a crucial prerequisite for achieving precise motion control and joint torque observation of robotic arms.
[0003] Currently, most methods for identifying the dynamic parameters of robotic arms require precise modeling of the dynamic model, using algorithms to optimize the excitation trajectory, and solving for the identification parameters using the least squares method, as seen in patents such as "A Dynamic Parameter Identification Method for SCARA Robotic Arms" and "A Dynamic Parameter Identification Method for Seven-DOF Robotic Arms." However, these traditional methods struggle to adapt to the complexity and variations of systems, and their accuracy is often insufficient. In recent years, neural network-based methods for identifying robot dynamic parameters have also gained attention. These methods possess strong approximation capabilities and can model highly nonlinear systems. Examples include Chinese patent ZL201911208932.4, which discloses a neural network-based method for identifying the dynamics of an industrial robot, and Chinese patent application number 202111654616.7, which discloses a neural network-based method for modeling the dynamics of a robotic arm optimized by a genetic algorithm. However, due to the nonlinear characteristics of neural networks, they are more sensitive to noise in the input data and can be affected by nonlinear joint friction and observation noise, leading to errors in joint torque fitting. Therefore, how to perform more accurate dynamic identification and obtain more accurate torque information under the premise of utilizing neural networks is a problem that other existing invention patents need to solve, and it is also the focus of this patent. Summary of the Invention
[0004] This invention aims to overcome the shortcomings of existing technologies by combining dynamics and PyTorch neural network architecture to propose a method for identifying the dynamics of a robotic arm based on neural network torque prediction.
[0005] The technical solution adopted by the present invention to solve the aforementioned technical problem is as follows:
[0006] A method for identifying the dynamics of a robotic arm based on neural network torque prediction includes the following:
[0007] Establish a torque prediction model based on the LSTM mechanism:
[0008] The torque prediction model based on the LSTM mechanism takes the position, velocity, and acceleration of each joint as input and outputs the predicted torque of each joint.
[0009] The torque prediction model based on the LSTM mechanism includes an LSTM layer, a fully connected network layer, and a dropout layer. The LSTM layer is used to process the time state sequence of the robotic arm and predict the torque sequence of the robotic arm. The fully connected network layer maps the output of the LSTM layer to the output space of the torque prediction to obtain the dynamic parameters of each joint.
[0010] The LSTM layer has a three-layer structure. The number of LSTM units in the first two layers is the same as the number of joints in the robotic arm. The number of LSTM units in the third layer is 1. In the first two layers, two LSTM units in the same row are connected in series, and all LSTM units in the same column are connected in series sequentially. The output of the last LSTM unit in the second layer is connected to the input of the LSTM unit in the third layer. The output of the LSTM unit in the third layer is connected to a fully connected network layer. The number of layers in the fully connected network layer is 15-30. The output of the fully connected network layer is passed through a dropout layer to obtain the final output of the torque prediction model based on the LSTM mechanism, which is used for the identification of the dynamic parameters of the robotic arm.
[0011] The identification method further includes:
[0012] Step 1: Establish and linearize the dynamic model of the robotic arm. The linearized dynamic model is given by formula (12).
[0013]
[0014] In the formula: P b Let J be an r×1 column vector representing the minimum inertia parameter after recombination; b Let J be the coefficient matrix corresponding to the inertial parameters after recombination; J is the inertial regression matrix; and P is a vector of dynamic parameters. These are the vectors of the robot arm joint angles, angular velocities, and angular accelerations in generalized coordinates, where n represents the dimension; τ∈R n×1 This represents the driving torque vector of the mechanical joint.
[0015] Step 2: Design the excitation trajectory: Select the fifth-order Fourier trajectory as the optimization trajectory, and use the principle of minimizing the condition number to reduce the impact of the ill-conditioned nature of the regression matrix on the identification of inertial parameters; use the Genetic Algorithm (GA) to optimize and obtain the optimal excitation trajectory; collect the data set of each joint using the optimal excitation trajectory; sample and filter the joint data, which includes joint torque, joint current, joint angular position and angular velocity, and angular acceleration;
[0016] A torque prediction model based on the LSTM mechanism was trained using the datasets of each joint to identify the dynamic parameters of the robotic arm.
[0017] Step 1: The robotic arm is a serial robotic arm. Based on the Newton-Euler method, the dynamic equation of the serial robotic arm is obtained. The Coulomb + viscous friction model is used to perform dynamic modeling of joint friction. The dynamic model is linearized according to the principle of minimum inertia parameter.
[0018] Step 2: Utilize a genetic optimization algorithm to optimize the trajectory parameters to be optimized. (The trajectory parameters to be optimized for the i-th joint). Setting the excitation trajectory can better train and test the torque prediction model based on the LSTM mechanism, and can more comprehensively explore the range of motion and behavior of the robotic arm, as well as its response under different working conditions. Such diversity helps to improve the model's generalization ability, enabling it to adapt to a wider range of working situations.
[0019] Compared with the prior art, the method of the present invention has the following advantages and beneficial effects:
[0020] 1. Building upon traditional inverse dynamics modeling, this invention introduces a neural network to identify robotic arm parameters and predict joint torques. It constructs a torque prediction model based on the LSTM mechanism. Using a BP neural network structure and incorporating the LSTM mechanism, the Long Short-Term Memory (LSTM) model allows the network to remember previous inputs and adjust the current output accordingly. This overcomes the limitation of ordinary recurrent neural networks in achieving low training accuracy when processing long-distance information, resulting in a neural network model with better torque prediction accuracy.
[0021] 2. This invention uses the root mean square error (RMS) of model prediction accuracy as the evaluation criterion. During verification, the torque prediction model based on the LSTM mechanism of this invention can be universally applied to various trajectories. An arbitrary verification trajectory was given to verify the effect. Verification shows that this invention significantly improves the smoothness of torque calculation and reduces the influence of nonlinear factors such as friction on parameter identification. Compared with the least squares method, the torque prediction effect of this invention is improved by 4%, and it has good friction compensation characteristics. Comparing the identification error results of each joint, compared with the least squares method, this invention improves the torque identification accuracy by 6.1%, ensuring the accuracy of parameter identification under noise. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating an embodiment of the robotic arm dynamics identification method based on neural network torque prediction according to the present invention.
[0023] Figure 2 This is a schematic diagram of the optimal excitation trajectory of the robotic arm in this invention.
[0024] Figure 3 This is a diagram of joint acceleration filtering in this invention, where (a) joint 1; (b) joint 2; (c) joint 3; (d) joint 4; (e) joint 5; and (f) joint 6.
[0025] Figure 4 This is a schematic diagram of a BP neural network structure.
[0026] Figure 5 The diagram shows the training status of the neural network with different hidden layers in this invention, where (a) hidden layer r = 5; (b) hidden layer r = 10; (c) hidden layer r = 20; and (d) hidden layer r = 40.
[0027] Figure 6 This is a schematic diagram of the torque prediction model based on the LSTM mechanism in this invention.
[0028] Figure 7 This is a comparison diagram of the predicted torque and error of each joint under the test trajectory in this invention, where (a) joint 1; (b) joint 2; (c) joint 3; (d) joint 4; (e) joint 5; and (f) joint 6. Detailed Implementation
[0029] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments, but this is not intended to limit the scope of protection of this application.
[0030] The specific steps of the robotic arm dynamics identification method based on neural network torque prediction of the present invention are as follows:
[0031] Step 1: Establish and linearize the dynamic model of the robotic arm. The robotic arm is a collaborative robotic arm; this embodiment uses a series robotic arm as an example. The dynamic equations of the series robotic arm under gravity alone, based on the Newton-Euler method, are as follows:
[0032]
[0033] in Let M(q) ∈ R be the vectors representing the joint angles, angular velocities, and angular accelerations of the robotic arm in generalized coordinates. n×n The inertia matrix; Let g(q) be the matrix of Coriolis force and centrifugal force, and g(q) be the gravity vector, τ∈R. n×1 This is the driving torque vector of the mechanical joint. n represents the dimension, which is the dimension of the vectors contained in the matrix. n*n means n rows and n columns.
[0034] The joints of the collaborative robotic arm mainly consist of servo motors and harmonic reducers. In the dynamic analysis, the motor transmission is calculated as a rigid transmission. The dynamic parameters of the serial robotic arm include mass parameters, inertia parameters, center position parameters, joint friction parameters, etc. The joint dynamic model is written as follows:
[0035]
[0036] In the formula: I is the moment of inertia of the motor, τ f Let τ be the joint friction torque. m N is the output torque of the servo motor, k is the transmission ratio coefficient, and A is the motor torque coefficient.
[0037] This invention employs a Coulomb + viscous friction model, and the joint friction torque is:
[0038]
[0039] In the formula: f c f is the Coulomb friction coefficient. v τ is the coefficient of viscous friction. f This is the frictional torque.
[0040] The dynamic equations of the robotic arm containing friction information are rewritten as follows:
[0041]
[0042] Linearize the dynamic equations into matrix form:
[0043]
[0044] in For the inertial regression matrix, Let n be a vector of dynamic parameters. p Let be the number of vectors containing the dynamic parameters. The dynamic parameters of each link consist of weight m, center of mass position r, moment of inertia I, and friction coefficient f, which can be represented as a parameter set as shown below:
[0045]
[0046] In the formula, P i This refers to the set of dynamic parameters for link i; m i r represents the mass of joint i. xi r yi r zi Indicates the position of the centroid of joint i, mr xi ,mr yi ,mr zi This represents the product of the centroid and mass of joint i. These are the inertial parameters of joint i, and the subscripts x, y, and z represent the three directions in the robot arm coordinate system, such as r. xi This represents the position of the centroid of the i-th link in the x-direction of the robot arm coordinate system. The position of the centroid of joint i is a three-dimensional vector including x, y, and z, where x is only one dimension.
[0047] By combining and organizing the forward and inverse dynamics derivations of the robotic arm, the force f at joint i is obtained. i and connecting rod driving torque τ i :
[0048]
[0049] In the formula in
[0050]
[0051] S(a) and D(a) have no actual meaning; they represent operators. The subscripts x, y, and z represent the three directions in the robot arm's coordinate system. This represents the transformation matrix from joint i to joint i+1. In dynamics, a coordinate system is established based on the joint connection order and method, with each joint corresponding to a coordinate system. ω represents the linear acceleration of the link. i Indicates the angular velocity of the connecting rod. Indicates the angular acceleration of the connecting rod. i r i+1 Let be the length vector of coordinate system i+1 in coordinate system i. Using forward dynamics, a transformation relationship between links and joints can be established. For joints, only joint angles, angular velocities, and accelerations are considered, and the input information is also similar. Therefore, the variables in the final model are all joint information, i.e., q.
[0052] The driving torque of the link in joint 1 is:
[0053]
[0054] In the formula, The driving torque of each link in a serial robotic arm can be derived using a recursive formula, and the driving torques of all links constitute the driving torque vector of the mechanical joint.
[0055] The linearized model of the robotic arm dynamics is as follows:
[0056]
[0057] Numerical methods based on QR decomposition and singular value decomposition (SVD) are used. P is a vector of dynamic parameters, and J is the inertia regression matrix, which has columns of all zeros and linearly correlated columns. The inertia regression matrix that is not full-rank will bring difficulties to the identification process, so equation (8) is rewritten as:
[0058]
[0059] J b There are r linearly independent columns, J d There are nr remaining linearly dependent columns and all-zero columns, where r is equivalent to a real number, and matrix J... d It can be written as J b Linear combination methods:
[0060] P d P is a column vector of (nr)×1; b and J b That is, the minimum set of inertial parameters.
[0061] J d =J b K d (11)
[0062] Where: K d Let J be a constant matrix. By eliminating linear dependence terms in the J matrix through QR decomposition, the minimum set of inertial parameters P is obtained. b and J b This eliminates the influence of irrelevant terms in the inertial parameters on identification, resulting in:
[0063]
[0064] In the formula: P b Let J be an r×1 column vector representing the minimum inertia parameter after recombination; b This is the coefficient matrix corresponding to the recombined inertial parameters. The recombined dynamic parameters (i.e., the minimum set of inertial parameters) are combinations of parameters from different joints. The result is not unique, but the optimized dynamic model is equivalent, and the combination of these terms can be calculated.
[0065] Step 2: Design the excitation trajectory. To facilitate the sampling process, a fifth-order Fourier trajectory was selected as the optimized trajectory for this experiment.
[0066]
[0067] In the formula: l represents the frequency term in the Fourier series, indicating the frequency of the corresponding sine and cosine functions, and its value ranges from 0 to N. i ω f If ω is the fundamental frequency of the Fourier series, then the trajectory period is T = 2π / ω. f qi0 Let be the initial displacement of the i-th joint. For the trajectory parameters to be optimized at the i-th joint, a fifth-order Fourier series is selected, i.e., N i =5, indicating the order of the Fourier series. The fundamental frequency w is selected. f =0.1Hz Construct a Fourier series.
[0068] To optimize data selection, the following methods are adopted: condition number cond(J) b ) and minimum singular value α min Construct the objective function:
[0069]
[0070] In the formula: k is a coefficient, and α is the minimum singular value. min The condition number of the matrix is determined, thus affecting the stability and error magnitude of the regression coefficients. A smaller G value indicates a larger motion space for the robotic arm, and that the trajectory's velocity and acceleration are continuous, resulting in higher parameter identification accuracy. The excitation trajectory optimization problem is transformed into a problem of minimizing the objective function G under constraints. For the optimization conditions, a genetic optimization algorithm (GA) is used for optimization, with a maximum of 1000 iterations. Python is used for optimization, primarily employing the NumPy, SciPy, and Matplotlib toolkits to execute the genetic algorithm. The basic process of the genetic algorithm optimization is as follows:
[0071] 1. Initialize the population: Randomly generate a set of initial excitation trajectories as the first generation population.
[0072] 2. Assess fitness: For each individual (i.e. a set of excitation trajectories), use the dynamic model of the robotic arm and the current values of the individual's dynamic parameters to simulate the motion of the robotic arm in the simulation environment and obtain the state (joint angles, pose) of the simulated robotic arm.
[0073] 3. Calculate the error between its motion state and the actual robotic arm motion state, and use the error as the fitness value to indicate the fitness level of the individual.
[0074] 4. Selection: Select individuals with better fitness values as the parents of the next generation.
[0075] 5. Crossover: Randomly combine and crossover the parent individuals to produce new offspring individuals.
[0076] 6. Mutation: Randomly mutate the resulting offspring individuals to introduce new genes in order to increase the diversity of the population.
[0077] 7. Generate a new population: Combine the parent and offspring individuals into a new population, and repeat steps 2-5 until the maximum number of iterations of 1000 is reached.
[0078] 8. Output the optimal solution: In the final population, find the individual with the smallest fitness value (smallest error), which is the optimal solution and corresponds to the optimal excitation trajectory.
[0079] After completing the excitation trajectory design, simulation was performed, and the optimal motion trajectory of the robotic arm was as follows: Figure 2 As shown.
[0080] Step 3: Sample and filter joint data. In neural network identification experiments, the more joint datasets trained, the stronger the generalization ability of the model and the higher the accuracy of the identification results. After determining the joint excitation trajectory, the predetermined trajectory is executed on the robotic arm and connected to the host computer via Ethernet. Each trajectory runs for 15 seconds, with joint speeds set at 2-3 rad / s and joint accelerations at 2-2.5 rad / s². The joint position, angular velocity, and current of the robotic arm are sampled at a frequency of 100Hz, resulting in 1500 joint datasets per trajectory cycle. A total of 50 sets of trajectory information were sampled, with 75,000 datasets per joint. An overall identification strategy was chosen in this identification. Since the UR5 robotic arm used in the experiment did not have torque sensors installed in the joints, the current measurement identification method was used to measure the joint torque. The actual measured torque was obtained by calculating the servo motor current in each joint. The measured torque τ of the robotic arm joints... m Write it as follows:
[0081] τ m =Tk e A (15)
[0082] In the formula: T is the accelerator gear ratio, k e Where A is the motor coefficient and A is the joint current;
[0083] The actual measured current value will fluctuate significantly, causing noise in the joint current of the robotic arm. Therefore, filtering of the joint current is necessary. Joint angular position and angular velocity can be acquired by the robotic arm encoder, but angular acceleration information cannot be directly measured. It needs to be obtained by center differential analysis of the angular velocity, and then processed by a filter to eliminate high-frequency noise. The angular acceleration of each joint is as follows: Figure 3 As shown.
[0084] Step 4: Establish a torque prediction model based on the LSTM mechanism. The torque prediction model based on the LSTM mechanism in this invention is based on a BP neural network structure. The LSTM-based torque prediction model takes the position, velocity, and acceleration of each joint as input, and outputs the predicted torque of each joint.
[0085] The torque prediction model based on the LSTM mechanism includes an LSTM layer, a fully connected network layer, and a dropout layer. The LSTM layer is used to process the time state sequence of the robotic arm and predict the torque sequence of the robotic arm. The fully connected network layer maps the output of the LSTM layer to the output space of the torque prediction to obtain the dynamic parameters of each joint.
[0086] The LSTM layer has a three-layer structure. The number of LSTM units in the first two layers is the same as the number of joints in the robotic arm. The number of LSTM units in the third layer is 1. In the first two layers, two LSTM units in the same row are connected in series, and all LSTM units in the same column are connected in series sequentially. The output of the last LSTM unit in the second layer is connected to the input of the LSTM unit in the third layer. The output of the LSTM unit in the third layer is connected to a fully connected network layer. The number of layers in the fully connected network layer is 15-30. The output of the fully connected network layer is dropped out to obtain the final output of the torque prediction model based on the LSTM mechanism, thus completing the dynamic identification.
[0087] In a backpropagation (BP) neural network, each weight is assigned a physical meaning, i.e., a dynamic parameter. The output layer contains one output node, representing the joint torque. The input layer contains the joint position, velocity, and acceleration. A 6-axis robotic arm receives 18 input parameters (position, velocity, and acceleration calculated by velocity difference for the six joints). In the BP neural network structure, the input is n-dimensional, where n is the same as the number of joints.
[0088] Input X = [X1, X2, ..., X n ] T Then there are two scalar coefficients for the n-dimensional weights, denoted as W and b. W = [W1, W2, ..., Wb] n ],b=[b1,b2,...,b n Both are 1*n dimensional matrices, and the output torque Y is the weighted sum of the inputs. The mathematical expression of the neuron model can be written as:
[0089] Y = f(W1X1 + W2X2 + ... + W n X n )+b (16)
[0090] This can be written in vector form as Y = f<W,X> + b. By adding multiple hidden-layer variables to the neural network, it can handle more complex nonlinear functional relationships. The results of each layer are passed layer by layer until the final output is generated. In this invention, the number of hidden layers is set to 20, at which point the BP neural network structure is as follows: Figure 4 As shown.
[0091] Because both the hidden layer and the output layer are fully connected, the hidden layer weight W will appear in the calculation. 1 and hidden layer bias b 1 and output layer weights W 2 and output layer bias b 2 X represents the input, H represents the number of hidden layers, and the output Y is calculated as follows.
[0092]
[0093] The relationships between most data in a robotic arm are non-linear, and linear operations cannot express the computational results. Activation functions can introduce non-linear relationships into convolutional neural networks, thereby improving the network's representation and learning capabilities. ReLU was chosen as the activation function for this training, as it omits exponential operations and has a faster computation speed. The model minimizes the loss function using gradient descent, adjusting the weights and other parameters in the network structure layer by layer in reverse. Through iterative training, the network's accuracy in identifying the target task is improved, resulting in a BP neural network formed by the optimal values of the weights W and biases b of each neuron after multiple iterations. The training loss calculation formula for the constructed BP neural network is as follows:
[0094]
[0095] Here, n represents the number of training epochs. The network model is optimized by continuously minimizing the loss.
[0096]
[0097] Where X is the input, Y is the output, W is the weight, and b is the bias.
[0098] The model is trained using the PyTorch development environment in Jupyter Notebook. Training is complete when the loss function no longer changes. The number of hidden layers (r) in the neural network affects the training results, such as... Figure 5 As shown, BP neural network models with 5, 10, 20, and 40 layers were trained respectively.
[0099] Introducing recurrent neural networks (RNNs), a network structure with recurrent connections in the model, allows for memorization of previous inputs and adjustment of the current output based on those inputs. Long Short-Term Memory (LSTM) is a variant of RNNs, suitable for time-series data, and can be incorporated into the constructed neural network structure. The neural network architecture of this invention is primarily based on PyTorch, a Python-based deep learning framework. The main modules used are the neural network module (nn.Module): PyTorch's neural network module provides a series of layers (such as fully connected layers, convolutional layers, pooling layers, recurrent neural networks, etc.) and loss functions (such as cross-entropy loss, mean squared error, etc.), facilitating the construction and training of deep learning models; and the Autograd module: PyTorch's autograding engine automatically calculates the gradient of tensors, making backpropagation of neural networks very easy. The autograding function allows developers to focus more on model design and debugging without having to manually derive gradient formulas.
[0100] Table 1. Pseudocode based on recurrent neural network architecture
[0101]
[0102] The position, velocity, and acceleration of the 6 joints constitute 18 input features. Each box represents an LSTM unit, which contains 32 neurons. The number of LSTM layers equals 3, which means that (information is retained by three neurons at the same time). In the LSTM layer, there are 3 LSTM units connected in series at each time step, and the output of each LSTM unit is used as the input of the next LSTM unit. Figure 6 The middle section contains two columns of LSTM units plus a single LSTM unit, for a total of 13 LSTM units. Each column has six LSTM units, representing the motion information of one joint. The last LSTM unit is a shared unit used as input to 20 fully connected layers. The dropout layer is placed after the fully connected layers, in the second to last column, to reduce overfitting between neurons in the fully connected layers. Finally, the torques of the six joints are predicted.
[0103] A longer time step in LSTM can extract more information, but excessively long time steps can lead to gradient minimization. Therefore, in this embodiment, the time step of the LSTM network is chosen to be t = 1s. Fully connected network layers obtain the output from the LSTM layers to help regress and fit the torque-joint torque prediction. In this model, the dropout coefficient is set to 0.5, the number of fully connected network layers remains r = 20, and the batch size is set to 50. After experimental parameter tuning, the training parameter structure of the entire model is shown in Table 2.
[0104] Table 2 Network Training Parameters
[0105]
[0106]
[0107] Step 5: Model validation and analysis.
[0108] To verify the accuracy of the proposed method, an executable verification trajectory is provided, and the robot follows the trajectory to collect relevant information. The prediction effect of torque is tested under the same trajectory. Three methods for joint torque results—torque identification using the least squares method, torque prediction using the neural network method of this invention, and torque measurement using the joint current method—are compared side-by-side. The results are as follows: Figure 7 As shown:
[0109] from Figure 7 It can be seen that the torque prediction model based on the LSTM mechanism has a better tracking effect on the actual torque, and has a better fitting effect on the poles during joint reversal motion compared to the least squares method. The dataset W = [W1, W2, ..., W...] identified by the neural network... n b = [b1, b2, ..., b] n As shown in Table 3, after eliminating the linearly correlated inertial parameters, there are a total of 48 dynamic parameters for this 6-axis robotic arm.
[0110] Table 3 Estimated Parameters of UR5 Robotic Arm
[0111]
[0112]
[0113] The performance of the torque prediction model based on the LSTM mechanism was verified, with the root mean square error (RMS) of the model prediction accuracy as the evaluation criterion.
[0114]
[0115] In the formula, N is the number of data points, and τ real,i The measured torque τ for joint i est,i The torque predicted by the joint i model; ε RMS This is the root mean square error.
[0116] The root mean square error of the experimental torque indicates that under conditions of abrupt acceleration changes such as start-up and stop, the torque predicted by the least squares method for the robotic arm joints exhibits abrupt oscillations. The torque prediction model based on the LSTM mechanism demonstrates good friction compensation characteristics, improving the torque prediction performance by 4%. Comparing the identification errors of each joint, the accuracy of the torque prediction model based on the LSTM mechanism is more than 6.1% higher than that of the least squares method. The results are shown in Table 4.
[0117] Table 4. Identification error of each joint
[0118]
[0119] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
[0120] Any aspects not covered in this invention are applicable to existing technologies.
Claims
1. A method for identifying the dynamics of a robotic arm based on neural network torque prediction, comprising the following: Establish a torque prediction model based on the LSTM mechanism: The torque prediction model based on the LSTM mechanism takes the position, velocity, and acceleration of each joint as input and outputs the predicted torque of each joint. The torque prediction model based on the LSTM mechanism includes an LSTM layer, a fully connected network layer, and a dropout layer. The LSTM layer is used to process the time state sequence of the robotic arm and predict the torque sequence of the robotic arm. The fully connected network layer maps the output of the LSTM layer to the output space of the torque prediction to obtain the dynamic parameters of each joint. The LSTM layer has a three-layer structure. The number of LSTM units in the first two layers is the same as the number of joints in the robotic arm. The number of LSTM units in the third layer is 1. In the first two layers, two LSTM units in the same row are connected in series, and all LSTM units in the same column are connected in series sequentially. The output of the last LSTM unit in the second layer is connected to the input of the LSTM unit in the third layer. The output of the LSTM unit in the third layer is connected to a fully connected network layer. The number of layers in the fully connected network layer is 15-30. The output of the fully connected network layer is passed through a dropout layer to obtain the final output of the torque prediction model based on the LSTM mechanism, which is used for the identification of the dynamic parameters of the robotic arm.
2. The robotic arm dynamics identification method based on neural network torque prediction according to claim 1, characterized in that, The identification method further includes: Step 1: Establish and linearize the dynamic model of the robotic arm. The linearized dynamic model is given by formula (12). In the formula: P b Let J be an r×1 column vector representing the minimum inertia parameter after recombination; b Let J be the coefficient matrix corresponding to the inertial parameters after recombination; J is the inertial regression matrix; and P is a vector of dynamic parameters. These are the vectors of the robot arm joint angles, angular velocities, and angular accelerations in generalized coordinates, where n represents the dimension; τ∈R n×1 This represents the driving torque vector of the mechanical joint. Step 2: Design the excitation trajectory: Select the fifth-order Fourier trajectory as the optimization trajectory, and use the principle of minimizing the condition number to reduce the impact of the ill-conditioned nature of the regression matrix on the identification of inertial parameters; use the genetic optimization algorithm to optimize and obtain the optimal excitation trajectory; collect the data set of each joint with the optimal excitation trajectory; sample and filter the joint data, which includes joint torque, joint current, joint angular position and angular velocity, and angular acceleration; A torque prediction model based on the LSTM mechanism was trained using the datasets of each joint to identify the dynamic parameters of the robotic arm.
3. The robotic arm dynamics identification method based on neural network torque prediction according to claim 1, characterized in that, Each LSTM unit contains 32 neurons. The robotic arm has six joints. The torque prediction model based on the LSTM mechanism has 18 input features and outputs the torques of the six joints. The stride of the LSTM layer is chosen to be t = 1s. The dropout factor is 0.5, and the batch size is set to 50.
4. The robotic arm dynamics identification method based on neural network torque prediction according to claim 1, characterized in that, The robotic arm is a collaborative robotic arm, which includes serial robotic arms and parallel robotic arms.
5. The robotic arm dynamics identification method based on neural network torque prediction according to claim 1, characterized in that, The torque prediction model based on the LSTM mechanism is validated and analyzed: Given a validation trajectory, test the prediction effect of torque under the validation trajectory. Normalize all input and output data, scale the data proportionally, and use the root mean square error of the model prediction accuracy as the evaluation criterion. In the formula, N is the number of data points, and τ real,i Let τ be the measured torque of joint i. est,i The torque predicted by the joint i model; ε RMS This is the root mean square error.
Citation Information
Patent Citations
A neural network-based method for identifying the dynamics of industrial robots
CN110941183B
Neural network mechanical arm dynamics modeling method based on genetic algorithm optimization
CN114417711A
Modeling method for robot joint fluctuating friction torque
CN109702745A
Six-axes robot kinetic parameter identification method based on neural network
CN109773794A