Neural Network-Based Robot Drag Teaching Method, Device, Equipment and Medium
By combining dynamic model and neural network model, using neural networks to identify dynamic model parameters, the problems of high sensor costs and difficult parameter identification in the existing technology are solved, and more efficient and accurate robot drag teaching is achieved.
Patent Information
- Application Number
- CN202210830194.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-07-15
AI Technical Summary
In the existing drag teaching technology, the sensor costs are high, the accuracy is greatly affected, and the dynamic model parameters are difficult to identify, resulting in motion control errors.
A robot drag teaching method based on neural network is adopted. Through the combination of dynamic model and neural network model, the neural network model is used to identify dynamic model parameters, thereby realizing robot drag teaching.
The problem of difficulty in identifying parameters of traditional dynamic model has been overcome, the application value of robot drag teaching has been improved, the impact of environmental factors on robot control has been reduced, and the accuracy of servo motor torque value has been improved.
Smart Images

Figure CN115107031B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial robot drag teaching, and particularly relates to a robot drag teaching method, device, system, equipment and medium based on a neural network. Background Art
[0002] Nowadays, industrial robots are more and more widely used. At the same time, new requirements are also put forward for many aspects such as the intelligence, networking, openness and human-machine friendliness of industrial robots. Therefore, for industrial robots, the development of teaching technology undoubtedly needs to be put at the top.
[0003] Drag teaching is a new type of teaching technology. The operator can directly drag the joints of the robot, control the robot to move to an ideal posture and record it. Due to the many advantages of drag teaching such as simplicity, efficiency, etc., the research on drag teaching related technologies has quickly become a new research hotspot.
[0004] There are mainly two types of solutions for the existing drag teaching technology:
[0005] (1) Drag teaching based on a torque sensor, that is, drag teaching realized by installing a sensor at the end. According to the end torque sensor, the forces in all directions in the Cartesian space can be calculated, and then corresponding control can be carried out according to the force values. Although this method is relatively simple to implement, there are problems such as high sensor cost, large influence by sensor accuracy, and inability to sense the forces on the manipulator body.
[0006] (2) Drag teaching based on torque compensation, that is, establishing a dynamic model of the robot, considering the influence of various dynamic factors such as gravity, friction, inertia force, Coriolis force, etc. during the movement of the robot, and further calculating the control scheme of the manipulator. This method realizes drag teaching without a torque sensor, with flexible teaching and low cost. However, in the process of establishing the dynamic model, it is difficult to identify the parameters of the model. As the number of factors to be considered increases, the establishment of the model will become more complex, further increasing the difficulty of parameter identification, and ultimately leading to motion control errors. Summary of the Invention
[0007] In view of this, the first object of the present invention is to propose a robot drag teaching method based on a neural network. By combining a dynamic model and a neural network model, the neural network model is used to identify the parameters of the dynamic model, and then robot drag teaching is realized.
[0008] Based on the same inventive concept, the second object of the present invention is to propose a robot drag teaching device based on a neural network.
[0009] Based on the same inventive concept, the third object of the present invention is to provide a computer device.
[0010] Based on the same inventive concept, the fourth object of the present invention is to provide a storage medium.
[0011] The first object of the present invention can be achieved by adopting the following technical solutions:
[0012] A robot drag teaching method based on a neural network, comprising the following steps:
[0013] Establish a robot dynamics model;
[0014] Construct and train a neural network model according to the robot dynamics model;
[0015] Obtain the dynamic state of the robot, input the dynamic state of the robot into the trained neural network model, and obtain the torque value output of the robot;
[0016] Control the robot to complete the teaching movement according to the torque value output of the robot.
[0017] Further, establish a robot dynamics model, and the model is represented by the following formula:
[0018]
[0019] Wherein, q, respectively represent the rotation angle matrix, angular velocity matrix, and angular acceleration matrix of the robot joints; τ represents the torque matrix driven by the joint motors; τ ext represents the torque matrix applied to the ends of the 6 joint motors by the external environment; represents the Coriolis centrifugal force model matrix; G(q) represents the gravity model matrix; represents the friction model matrix, where is Coulomb friction, is viscous friction.
[0020] Further, replace the output torque τ m of the motor with the current value of the servo motor, and the specific formula is as follows:
[0021] τ m = K t i
[0022] Wherein, K t is the torque constant of the servo motor;
[0023] The output torque of the servo motor is amplified by the speed reducer, and the inertia moments of the rotor and the speed reducer are ignored to obtain the driving torque acting on the joint:
[0024] τa = nτ m
[0025] where n is the reduction ratio of the speed reducer.
[0026] Furthermore, according to the robot dynamics model, a neural network model is constructed; the neural network model selects a BP neural network model, including an input layer, a hidden layer, and an output layer. The input of the input layer is the motion parameters of the robot joints, and the output of the output layer is the current value of the servo motor.
[0027] Furthermore, the input layer of the neural network model inputs the motion parameters of all robot joints, and the output layer neurons correspond one-to-one with the outputs of the robot joint motors.
[0028] Furthermore, the motion parameters of the robot joints input by the input layer include the rotation angle, angular velocity, and angular acceleration of the robot joints, and also include the sine values, sign transformation values, and their combinations of the rotation angle, angular velocity, and angular acceleration of the robot joints. Each input of the motion parameters of a robot joint includes 12 parameter value inputs.
[0029] Furthermore, the neurons in the hidden layer not only perform linear operations but also go through ReLU activation; in the training, the squared value of the network error is used as the objective function, and the gradient descent method is used to continuously adjust the neuron parameters to minimize the objective function to complete the training of the BP neural network.
[0030] The second objective of the present invention can be achieved by adopting the following technical solutions:
[0031] A robot drag teaching device based on a neural network, the device includes:
[0032] A model construction unit for establishing a robot dynamics model;
[0033] A neural network unit for constructing and training a neural network model according to the robot dynamics model, and using the trained neural network model for calculation;
[0034] A data acquisition unit for acquiring the dynamic state of the robot and inputting it into the neural network model;
[0035] A motion control unit for receiving the torque value output of the neural network model and controlling the robot to complete the teaching motion.
[0036] The third objective of the present invention can be achieved by adopting the following technical solutions:
[0037] A computer device includes a processor and a memory for storing programs executable by the processor. When the processor executes the programs stored in the memory, the above-mentioned robot drag teaching method based on neural network is implemented.
[0038] The fourth object of the present invention can be achieved by adopting the following technical solutions:
[0039] A storage medium stores a program, and when the program is executed by a processor, the above-mentioned robot drag teaching method based on neural network is implemented.
[0040] The present invention has the following beneficial effects compared with the prior art:
[0041] (1) The present invention uses the method of constructing a neural network based on a dynamic model, overcomes the problem of difficult parameter identification of traditional dynamic models in the drag teaching process, and improves the application value of the robot drag teaching method.
[0042] (2) The present invention improves the method of constructing a dynamic model commonly used in the prior art drag teaching process, introduces new environmental parameters into the dynamic model, realizes the adaptation and adjustment of the robot to the environment, and effectively reduces the uncertain influence of environmental factors on robot control.
[0043] (3) The present invention expands the parameters in the dynamic model as the input of the BP neural network, which can make the BP neural network perform better in fitting the nonlinear dynamic model, and makes the finally obtained servo motor torque value more accurate. Description of the Drawings
[0044] Figure 1 It is a flowchart of Embodiment 1 of the present invention.
[0045] Figure 2 It is a schematic diagram of the device of Embodiment 2 of the present invention.
[0046] Figure 3 It is a schematic diagram of the computer device of Embodiment 3 of the present invention. Detailed Embodiments
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0048] Embodiment 1:
[0049] AsFigure 1 As shown in the figure, this embodiment provides a robot dragging teaching method based on a neural network for 6-axis robot dragging teaching, including the following steps:
[0050] S10. Establish a robot dynamics model, specifically including:
[0051] S11. Considering the torque compensation of the Coriolis force, gravity, and friction that have a greater impact on the robot's movement, establish a dynamics model, which is expressed by the following formula:
[0052]
[0053] Among them, respectively represent the rotation angle matrix, angular velocity matrix, and angular acceleration matrix of the robot joints; τ represents the torque matrix driven by the joint motors; τ ext represents the torque matrix applied to the ends of the 6 joint motors by the external environment; represents the Coriolis centrifugal force model matrix; G(q) represents the gravity model matrix; represents the friction model matrix, where is the Coulomb friction, is the viscous friction.
[0054] S12. Replace the output torque τ m of the motor with the current value of the servo motor. The specific formula is as follows:
[0055] τ m =K t i
[0056] Among them, K t is the torque constant of the servo motor;
[0057] The output torque of the servo motor is amplified by the reducer. Ignoring the inertia moments of the rotor and the reducer, the driving torque acting on the joint is obtained:
[0058] τ a =nτ m
[0059] Among them, n is the reduction ratio of the reducer.
[0060] S20. According to the robot dynamics model, construct and train a neural network model, including the following steps:
[0061] S21. Obtain the motion data set of the robot, including the rotation angle, angular velocity, and angular acceleration.
[0062] S22. Expand the motion parameters of the robot, calculate the sine value of the rotation angle of the robot joint, the sine value of the angular velocity, the sine value of the angular acceleration, the sign transformation value and their combinations, that is, the combinations of the sine value of the rotation angle, the sine value of the angular velocity, and the sine value of the angular acceleration with the sign change value, to obtain the input of the neural network model. The motion parameter input of each robot joint includes 12 parameter value inputs. In this embodiment, the input layer of the neural network model is set to 72 neurons.
[0063] S23. Set the output of the neural network model as the current value of the servo motor. In this embodiment, the input layer of the neural network model is set to 6 neurons, and each output layer neuron corresponds one-to-one with the output of the robot joint servo motor.
[0064] S24. Use the obtained motion data set of the robot to train the neural network model. The neurons in the hidden layer not only perform linear operations but also go through ReLU activation; in the training, the squared value of the network error is used as the objective function, and the gradient descent method is used to continuously adjust the neuron parameters to minimize the objective function to complete the training of the BP neural network.
[0065] S30. Obtain the dynamic state of the robot, input the dynamic state of the robot into the trained neural network model to obtain the output of the robot's servo motor, and further obtain the torque value output;
[0066] S40. Control the robot to complete the teaching motion according to the torque value output of the robot.
[0067] In this embodiment, after training the network, the neural network is written into the upper computer in the form of C language, and the torque value is output in real time according to the state of the robot during the teaching by dragging. Then, it is transmitted to the servo controller through the bus command superposition for execution.
[0068] It can be seen that this embodiment adopts a method of constructing a neural network based on a dynamic model, overcomes the problem of difficult parameter identification of the traditional dynamic model during the teaching by dragging, and improves the application value of the robot teaching by dragging method. At the same time, this embodiment improves the method of constructing a dynamic model commonly used in the prior art during the teaching by dragging, introduces new environmental parameters into the dynamic model, realizes the adaptation and adjustment of the robot to the environment, and effectively reduces the uncertain influence of environmental factors on the robot control. In dealing with the fitting problem of neural network training, this embodiment expands the parameters in the dynamic model as the input of the BP neural network, which can make the BP neural network perform better in fitting the non-linear dynamic model, and make the finally obtained servo motor torque value more accurate.
[0069] Embodiment 2:
[0070] As Figure 2 shown, this embodiment provides a robot drag teaching device based on a neural network. The device includes a model construction unit 201, a neural network unit 202, a data acquisition unit 203, and a motion control unit 204. The specific functions of each unit are as follows:
[0071] The model construction unit 201 is used to establish a robot dynamics model;
[0072] The neural network unit 202 is used to construct and train a neural network model according to the robot dynamics model, and perform calculations using the trained neural network model;
[0073] The data acquisition unit 203 is used to acquire the dynamic state of the robot and input it into the neural network model;
[0074] The motion control unit 204 is used to receive the torque value output of the neural network model and control the robot to complete the teaching motion.
[0075] The above units of this embodiment are respectively used to implement the corresponding steps of Embodiment 1. For the detailed implementation process, refer to Embodiment 1 and will not be elaborated here.
[0076] Embodiment 3:
[0077] As Figure 3 shown, this embodiment provides a computer device. The computer device includes a processor 302, a memory, an input device 303, a display device 304, and a network interface 305 connected through a system bus 301. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium 306 and an internal memory 307. The non-volatile storage medium 306 stores an operating system, a computer program, and a database. The internal memory 307 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the processor 302 executes the computer program stored in the memory, it implements the robot drag teaching method based on a neural network in the above Embodiment 1, specifically as follows:
[0078] Establish a robot dynamics model;
[0079] Construct and train a neural network model according to the robot dynamics model;
[0080] Acquire the dynamic state of the robot, input the dynamic state of the robot into the trained neural network model, and obtain the torque value output of the robot;
[0081] Control the robot to complete the teaching motion according to the torque value output of the robot.
[0082] Embodiment 4:
[0083] This embodiment provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the robot drag teaching method based on a neural network in the above-mentioned Embodiment 1 is implemented as follows:
[0084] Establish a robot dynamics model;
[0085] Construct and train a neural network model according to the robot dynamics model;
[0086] Obtain the dynamic state of the robot, and input the dynamic state of the robot into the trained neural network model to obtain the torque value output of the robot;
[0087] Control the robot to complete the teaching movement according to the torque value output of the robot.
[0088] It should be noted that the computer-readable storage medium in this embodiment can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0089] In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. And in this embodiment, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable storage medium other than the computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0090] The above computer-readable storage medium can be written in one or more programming languages or combinations thereof for executing the computer program of this embodiment. The above programming languages include object-oriented programming languages such as Java, Python, C++, and also include conventional procedural programming languages such as C language or similar programming languages. The program can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0091] As described above, only the preferred embodiments of this invention patent are provided, but the protection scope of this invention patent is not limited thereto. Any person skilled in the art within the scope disclosed by this invention patent, according to the technical solution and inventive concept of this invention patent, makes equivalent substitutions or changes, all belong to the protection scope of this invention patent.
Claims
1. A robot drag teaching method based on a neural network, characterized in that, it includes the following steps: Establish a robot dynamics model; According to the robot dynamics model, construct and train a neural network model; Obtain the dynamic state of the robot, input the dynamic state of the robot into the trained neural network model, and obtain the torque value output of the robot; According to the torque value output of the robot, control the robot to complete the teaching movement; Establish a robot dynamics model, and the model is represented by the following formula: where q, respectively represent the rotation angle matrix and angular velocity matrix of the robot joints; τ represents the torque matrix driven by the joint motors; τ ext represents the torque matrix applied to the ends of the six joint motors by the external environment; represents the Coriolis and centrifugal force model matrix; G(q) represents the gravity model matrix; represents the friction model matrix, where is the Coulomb friction, is the viscous friction; Replace the output torque τ of the motor m with the current value of the servo motor. The specific formula is as follows: τ m = K t i where K t is the torque constant of the servo motor; The output torque of the servo motor is amplified by the reducer, and the inertia moments of the rotor and the reducer are ignored to obtain the driving torque acting on the joint: τ a = nτ m where n is the reduction ratio of the reducer; According to the robot dynamics model, construct a neural network model; the neural network model selects a BP neural network model, including an input layer, a hidden layer, and an output layer, where the input of the input layer is the motion parameters of the robot joints, and the output of the output layer is the current value of the servo motor.
2. The robot drag teaching method based on a neural network according to claim 1, characterized in that, The input layer of the neural network model inputs the motion parameters of all robot joints, and the output layer neurons correspond one-to-one with the outputs of the robot joint motors.
3. The robot drag teaching method based on a neural network according to claim 2, characterized in that, The motion parameters of the robot joints input by the input layer include the rotation angle, angular velocity, and angular acceleration of the robot joints, and also include the sine value of the rotation angle of the robot joints, the sine value of the angular velocity, the sine value of the angular acceleration, and the sign transformation value, as well as the combination of the sine value of the rotation angle, the sine value of the angular velocity, and the sine value of the angular acceleration with the sign change value respectively.
4. The robot drag teaching method based on a neural network according to claim 3, characterized in that, The neurons in the hidden layer not only perform linear operations but also go through ReLU activation; during training, the squared value of the network error is used as the objective function, and the gradient descent method is used to continuously adjust the neuron parameters to minimize the objective function to complete the training of the BP neural network.
5. A computer device, including a processor and a memory for storing programs executable by the processor, characterized in that, When the processor executes the program stored in the memory, it implements the robot drag teaching method based on a neural network according to any one of claims 1-4.
6. A storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the robot drag teaching method based on a neural network according to any one of claims 1-4.
Citation Information
Patent Citations
Sensorless robot dragging teaching method and system
CN113601516A
Torque-sensor-free dragging teaching method for robot
CN114310851A