CN-116352724-B - Mechanical arm dynamics identification method based on neural network moment prediction
Abstract
The invention relates to a mechanical arm dynamics identification method based on neural network moment prediction, which comprises the following steps of establishing a moment prediction model based on an LSTM mechanism, wherein the position, the speed and the acceleration of each joint are taken as input, the output is the predicted moment of each joint, the moment prediction model based on the LSTM mechanism comprises an LSTM layer, a fully-connected network layer and a dropout layer, the LSTM layer is provided with a three-layer structure, two LSTM units in the same row in the first two layers are connected in series, all LSTM units in the same column are sequentially connected in series, the output of the last LSTM unit in the second layer is connected with the input of the LSTM unit in the third layer, the output of the LSTM unit in the third layer is connected with the fully-connected network layer, and the output of the fully-connected network layer is subjected to the dropout layer to obtain the final output of the moment prediction model based on the LSTM mechanism, and the final output is used for mechanical arm dynamics parameter identification. The method and the device obviously improve the smoothness of moment calculation and reduce the influence of nonlinear factors such as friction on parameter identification.
Inventors
- LIU XUAN
- ZHANG MINGCHAO
- LIU CHENGWEN
- WANG QING
- ZHANG MINGLU
Assignees
- 河北工业大学
Dates
- Publication Date
- 20260508
- Application Date
- 20230519
Claims (5)
- 1. A mechanical arm dynamics identification method based on neural network moment prediction comprises the following steps: establishing a moment prediction model based on an LSTM mechanism: The moment prediction model based on the LSTM mechanism takes the position, the speed and the acceleration of each joint as input and outputs the position, the speed and the acceleration as predicted moment of each joint; the moment prediction model based on the LSTM mechanism comprises an LSTM layer, a full-connection network layer and a dropout layer, wherein the LSTM layer is used for processing a time state sequence of the mechanical arm and predicting a moment sequence of the mechanical arm; 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 of the mechanical arm, the number of LSTM units in the third layer is 1, two LSTM units in the same row in the first two layers are connected in series, all LSTM units in the same row are connected in series in sequence, the output of the last LSTM unit in the second layer is connected with the input of the LSTM unit in the third layer, the output of the LSTM unit in the third layer is connected with a fully-connected network layer, the number of layers of the fully-connected network layer is 15-30, and the output of the fully-connected network layer is subjected to a dropout layer to obtain the final output of a moment prediction model based on an LSTM mechanism and is used for mechanical arm dynamics parameter identification.
- 2. The mechanical arm dynamics recognition method based on neural network moment prediction according to claim 1, wherein the recognition method further comprises: Step 1, establishing a mechanical arm dynamics model and linearizing, wherein the linearized dynamics model is a formula (12) Wherein P b is a column vector of r×1, which represents the minimum inertial parameter after recombination, J b is a coefficient matrix corresponding to the inertial parameter after recombination of J, J is an inertial regression matrix, P is a vector of kinetic parameters, Respectively representing the joint angle, the angular velocity and the angular acceleration vector of the mechanical arm under the generalized coordinates, wherein n represents the dimension; Step 2, designing an excitation track, namely selecting a fifth-order Fourier track as an optimization track, reducing the influence of the pathogenicity of a regression matrix on inertial parameter identification by utilizing a condition number minimum principle, optimizing by utilizing a genetic optimization algorithm to obtain an optimal excitation track, acquiring each joint data set by utilizing the optimal excitation track, sampling joint data and filtering, wherein the joint data comprise joint moment, joint current, joint angle position, angular velocity and angular acceleration; And training a moment prediction model based on an LSTM mechanism by using each joint data set for identifying dynamic parameters of the mechanical arm.
- 3. The mechanical arm dynamics identification method based on the neural network moment prediction according to claim 1 is characterized in that each LSTM unit comprises 32 neurons, the mechanical arm is provided with six joints, the input characteristic quantity of a moment prediction model based on an LSTM mechanism is 18, the output is 6 joint moments, the step size of an LSTM layer is selected to be t=1s, the dropout coefficient is 0.5, and the batch size is set to be 50.
- 4. The mechanical arm dynamics identification method based on neural network moment prediction according to claim 1, wherein the mechanical arm is a cooperative mechanical arm, and the cooperative mechanical arm comprises a serial mechanical arm and a parallel mechanical arm.
- 5. The method for identifying mechanical arm dynamics based on neural network moment prediction according to claim 1, wherein, And verifying and analyzing a moment prediction model based on an LSTM mechanism: giving a verification track, testing the prediction effect of the moment under the verification track, carrying out normalization processing on all input and output data, carrying out equal ratio scaling on the data, and taking the root mean square error of the model prediction precision as a judgment standard; Where N is the data number, τ real,i is the measured moment of joint i, τ est,i is the moment predicted by the joint i model, ε RMS is the root mean square error.
Description
Mechanical arm dynamics identification method based on neural network moment prediction Technical Field The invention relates to the technical field of industrial robots, in particular to a mechanical arm dynamics identification method based on neural network moment prediction. Background Along with the promotion of new industrialization, how to improve the intelligent degree of factories and the production efficiency has become urgent. Mechanical arms are widely used in industrial production, and many researches are focused on improving the control precision. The establishment of an accurate dynamic model is an important precondition for realizing the accurate motion control and joint moment observation of the mechanical arm. At present, most of mechanical arm kinetic parameter identification needs to accurately model a kinetic model, an excitation track is optimized by adopting an algorithm, and identification parameters are solved by using a least square method, such as a dynamic parameter identification method for a SCARA mechanical arm and a seven-degree-of-freedom mechanical arm kinetic parameter identification method, which are difficult to adapt to complexity and change of a system and have difficulty in reaching a certain level in precision, in recent years, a mechanical parameter identification method based on a neural network also has certain attention, has stronger approximation capability and can model a highly nonlinear system, such as an industrial mechanical parameter identification method based on the neural network disclosed in Chinese patent ZL201911208932.4 and a mechanical arm kinetic modeling method based on genetic algorithm optimization disclosed in Chinese patent application No. 202111654616.7, but is more sensitive to noise of input data due to nonlinear characteristics of the neural network, and can be interfered by joint nonlinear friction and observation noise, so that joint moment fitting has certain error. Therefore, on the premise of utilizing the neural network, how to perform more accurate dynamic identification to obtain more accurate moment information is a problem to be solved by other existing invention patents, and is also a focusing point of the patent. Disclosure of Invention The invention provides a mechanical arm dynamics identification method based on neural network moment prediction, which aims to overcome the defects of the prior art and combines dynamics with Pytorch neural network architecture. The technical scheme adopted for solving the technical problems is as follows: a mechanical arm dynamics identification method based on neural network moment prediction comprises the following steps: establishing a moment prediction model based on an LSTM mechanism: The moment prediction model based on the LSTM mechanism takes the position, the speed and the acceleration of each joint as input and outputs the position, the speed and the acceleration as predicted moment of each joint; the moment prediction model based on the LSTM mechanism comprises an LSTM layer, a full-connection network layer and a dropout layer, wherein the LSTM layer is used for processing a time state sequence of the mechanical arm and predicting a moment sequence of the mechanical arm; 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 of the mechanical arm, the number of LSTM units in the third layer is 1, two LSTM units in the same row in the first two layers are connected in series, all LSTM units in the same row are connected in series in sequence, the output of the last LSTM unit in the second layer is connected with the input of the LSTM unit in the third layer, the output of the LSTM unit in the third layer is connected with a fully-connected network layer, the number of layers of the fully-connected network layer is 15-30, and the output of the fully-connected network layer is subjected to a dropout layer to obtain the final output of a moment prediction model based on an LSTM mechanism and is used for mechanical arm dynamics parameter identification. The identification method further comprises the following steps: Step 1, establishing a mechanical arm dynamics model and linearizing, wherein the linearized dynamics model is a formula (12) Wherein P b is a column vector of r×1, which represents the minimum inertial parameter after recombination, J b is a coefficient matrix corresponding to the inertial parameter after recombination of J, J is an inertial regression matrix, P is a vector of kinetic parameters,Respectively representing the joint angle, the angular velocity and the angular acceleration vector of the mechanical arm under the generalized coordinates, wherein n represents the dimension; Step 2, designing an excitation track, namely selecting a fifth-order Fourier track as an optimization track, reducing the influence of the pathogenicity of a regression matrix on inertial parameter identification by usi