Robot simulation method, device, equipment and storage medium

By introducing joint module rotor simulation data into robot simulation, and combining it with linearization of dynamic equations and parameter identification, the problem of large discrepancies between simulation results and actual machines in existing technologies is solved, achieving higher simulation accuracy.

CN116394268BActive Publication Date: 2026-07-07SHENZHEN PENGXING INTELLIGENT RES CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN PENGXING INTELLIGENT RES CO LTD
Filing Date
2022-12-28
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In existing technologies, robot simulation ignores the influence of rotor torque in joint modules, resulting in differences between simulation results and actual machine performance. These differences are particularly significant when the motor reduction ratio is large, affecting the accuracy of the simulation.

Method used

By introducing simulation data of the joint module rotor into the simulation process, combined with the simulation data of the connecting rod, and using the linearization of the dynamic equation and parameter identification, the target dynamic equation is split into the dynamic equations of the connecting rod and the rotor. The rotor simulation torque is calculated and merged to improve the simulation accuracy.

Benefits of technology

This reduces the difference between simulation and actual machine, improves the accuracy of simulation results, and enhances the precision of the simulation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116394268B_ABST
    Figure CN116394268B_ABST
Patent Text Reader

Abstract

The application discloses a simulation method, device and equipment of a robot and a storage medium, which are used for introducing the influence of a motor rotor in a simulation process of the robot, and reducing the difference between simulation and a real machine. The method comprises the following steps: determining a current simulation mode of the robot; acquiring rotor simulation data of at least one joint module of the robot according to the simulation mode; and combining the rotor simulation data and link simulation data to obtain a simulation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot simulation, and more particularly to a robot simulation method, apparatus, device, and storage medium. Background Technology

[0002] Robot simulation refers to the technology of simulating physical robot systems using computers. It primarily simulates the kinematics and dynamics of the robot itself, such as the motion simulation of a mobile robot in a two-dimensional plane, and the motion simulation of the robot's joint modules and end effectors. Simulation is a crucial part of the robot development process; accurate simulation can significantly reduce the time required for algorithm deployment and debugging on real machines, improving development and testing efficiency.

[0003] In the existing technology, simulators that simulate robots (such as quadrupeds, bipeds, robotic arms, etc.) process the robot into joint modules and link models, that is, they abstract the robot into a link model, with each link connected to two joint module axes at both ends, and the link is treated as a rigid body for simulation.

[0004] However, using only the linkage model for simulation ignores the influence of the rotor torque of the joint module, resulting in a difference between the simulation and the actual machine. Furthermore, the larger the motor reduction ratio, the more obvious this difference will be, thus affecting the accuracy of the simulation results. Summary of the Invention

[0005] This application provides a robot simulation method, apparatus, device, and storage medium, which enables the introduction of the influence of the motor rotor during the robot simulation process, thereby reducing the difference between the simulation and the real machine.

[0006] The first aspect of this application provides a robot simulation method, comprising:

[0007] Determine the robot's current simulation mode;

[0008] According to the simulation mode, obtain rotor simulation data of at least one joint module of the robot;

[0009] The simulation results are obtained by combining the rotor simulation data with the connecting rod simulation data.

[0010] Optionally, obtaining rotor simulation data for at least one joint module of the robot according to the simulation mode includes:

[0011] The robot's dynamic equations are linearized to obtain the target dynamic equations;

[0012] The target dynamic equations are decomposed to obtain the rotor dynamic equations and the connecting rod dynamic equations;

[0013] Rotor simulation data for at least one joint module of the robot is obtained based on the simulation mode and the rotor dynamics equation.

[0014] Optionally, when the simulation mode is a position or velocity simulation mode, obtaining rotor simulation data for at least one joint module of the robot based on the simulation mode and the rotor dynamics equations includes:

[0015] Obtain the state of the input joint module to be simulated, the state of the input joint module includes the joint angle, angular velocity and angular acceleration of at least one joint module of the robot;

[0016] The rotor simulation torque is calculated based on the state of the input joint module to be simulated and the rotor dynamics equation.

[0017] The process of combining the rotor simulation data with the connecting rod simulation data to obtain the simulation results includes:

[0018] Based on the input joint module state, perform link dynamics simulation to obtain the link simulation torque;

[0019] The simulated torque of the connecting rod and the simulated torque of the rotor are combined to obtain the torque simulation result.

[0020] Optionally, when the simulation mode is a force-controlled simulation mode, obtaining the rotor simulation data of at least one joint module of the robot based on the simulation mode and the rotor dynamics equations includes:

[0021] The current running joint module status of the robot is obtained, and the running joint module status includes the joint angle, angular velocity and angular acceleration of at least one joint module of the robot;

[0022] Calculate the rotor simulation torque based on the running joint module status and the rotor dynamics equation;

[0023] The process of combining the rotor simulation data with the connecting rod simulation data to obtain the simulation results includes:

[0024] Obtain the input torque to be simulated;

[0025] The connecting rod torque is determined based on the input torque to be simulated and the rotor simulation torque, and simulation is performed based on the connecting rod torque to obtain the motion simulation result of the joint module. The connecting rod torque is the difference between the input torque to be simulated and the rotor simulation torque.

[0026] The linearization of the robot's dynamic equations to obtain the target dynamic equations includes:

[0027] Linearize the robot's dynamic equations;

[0028] The excitation data of each joint module of the robot is acquired, and the target dynamic parameters are obtained by parameter identification through the excitation data.

[0029] The target dynamic equation is established based on the target dynamic parameters.

[0030] Optionally, the target dynamic equation is:

[0031] τ = Yπ;

[0032] Where τ represents the overall torque, Y is the coefficient matrix corresponding to the target dynamic parameters, and π is the target dynamic parameters.

[0033] Optionally, the target dynamic parameters include connecting rod dynamic parameters and rotor dynamic parameters, and the step of decomposing the target dynamic equation to obtain the rotor dynamic equation includes:

[0034] The target dynamic equation is reorganized based on the connecting rod dynamic parameters and the rotor dynamic parameters to obtain the reorganized target dynamic equation.

[0035] The recombined target dynamic equations are split into connecting rod dynamic equations and rotor dynamic equations.

[0036] Optionally, the recombined target dynamic equation is:

[0037]

[0038] The rotor dynamics equation is:

[0039] τ2=Y2π2;

[0040] Where Y1 and Y2 are the coefficient matrices corresponding to the connecting rod dynamics and rotor dynamics parameters, respectively, and π1 and π2 are the connecting rod dynamics parameters and rotor dynamics parameters, respectively.

[0041] A second aspect of this application provides a robot simulation device, comprising:

[0042] The mode determination unit is used to determine the current simulation mode of the robot;

[0043] The data acquisition unit is used to acquire rotor simulation data of at least one joint module of the robot according to the simulation mode;

[0044] The simulation processing unit is used to combine the rotor simulation data with the connecting rod simulation data to obtain simulation results.

[0045] Optionally, the data acquisition unit is specifically used to: linearize the robot's dynamic equations to obtain the target dynamic equations;

[0046] The target dynamic equations are decomposed to obtain the rotor dynamic equations and the connecting rod dynamic equations;

[0047] Rotor simulation data for at least one joint module of the robot is obtained based on the simulation mode and the rotor dynamics equation.

[0048] Optionally, when the simulation mode is a position or velocity simulation mode, the data acquisition unit is specifically used for:

[0049] Obtain the state of the input joint module to be simulated, the state of the input joint module includes the joint angle, angular velocity and angular acceleration of at least one joint module of the robot;

[0050] The rotor simulation torque is calculated based on the state of the input joint module to be simulated and the rotor dynamics equation.

[0051] The simulation processing unit is specifically used for:

[0052] Based on the input joint module state, perform link dynamics simulation to obtain the link simulation torque;

[0053] The simulated torque of the connecting rod and the simulated torque of the rotor are combined to obtain the torque simulation result.

[0054] Optionally, when the simulation mode is force control simulation mode, the data acquisition unit is specifically used for:

[0055] The current running joint module status of the robot is obtained, and the running joint module status includes the joint angle, angular velocity and angular acceleration of at least one joint module of the robot;

[0056] Calculate the rotor simulation torque based on the running joint module status and the rotor dynamics equation;

[0057] The simulation processing unit is specifically used for:

[0058] Obtain the input torque to be simulated;

[0059] The connecting rod torque is determined based on the input torque to be simulated and the rotor simulation torque, and simulation is performed based on the connecting rod torque to obtain the motion simulation result of the joint module. The connecting rod torque is the difference between the input torque to be simulated and the rotor simulation torque.

[0060] Optionally, the data acquisition unit is further configured to:

[0061] Linearize the robot's dynamic equations;

[0062] The excitation data of each joint module of the robot is acquired, and the target dynamic parameters are obtained by parameter identification through the excitation data.

[0063] The target dynamic equation is established based on the target dynamic parameters.

[0064] Optionally, the target dynamic equation is:

[0065] τ = Yπ;

[0066] Where τ represents the overall torque, Y is the coefficient matrix corresponding to the target dynamic parameters, and π is the target dynamic parameters.

[0067] Optionally, the data acquisition unit is further configured to:

[0068] The target dynamic equation is reorganized based on the connecting rod dynamic parameters and the rotor dynamic parameters to obtain the reorganized target dynamic equation.

[0069] The recombined target dynamic equations are split into connecting rod dynamic equations and rotor dynamic equations.

[0070] Optionally, the recombined target dynamic equation is:

[0071]

[0072] The rotor dynamics equation is:

[0073] τ2=Y2π2;

[0074] Where Y1 and Y2 are the coefficient matrices corresponding to the connecting rod dynamics and rotor dynamics parameters, respectively, and π1 and π2 are the connecting rod dynamics parameters and rotor dynamics parameters, respectively.

[0075] A third aspect of this application provides a robot simulation device, the device comprising:

[0076] Processor, memory, input / output units, and bus;

[0077] The processor is connected to the memory, the input / output unit, and the bus;

[0078] The memory stores a program that the processor invokes to execute the first aspect and any optional robot simulation method in the first aspect.

[0079] The fourth aspect of this application provides a computer-readable storage medium storing a program that, when executed on a computer, performs the simulation method of the robot of the first aspect and any optional method of the first aspect.

[0080] As can be seen from the above technical solutions, this application has the following advantages:

[0081] When simulating a robot, the current simulation mode is first determined, then the corresponding rotor simulation data is obtained based on the simulation mode, and finally the simulation results are obtained by combining the rotor simulation data and the link simulation data. This allows the influence of the motor rotor to be introduced into the simulation process, reducing the difference between the simulation and the real machine and improving the accuracy of the simulation results. Attached Figure Description

[0082] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0083] Figure 1 A schematic diagram of the hardware structure of the robot provided in this application;

[0084] Figure 2 A schematic diagram of the mechanical structure of the robot provided in this application;

[0085] Figure 3 A schematic flowchart of an embodiment of the robot simulation method provided in this application;

[0086] Figure 4 A schematic flowchart of another embodiment of the robot simulation method provided in this application;

[0087] Figure 5 A schematic diagram of the decomposition of dynamic equations in the simulation method for the robot provided in this application;

[0088] Figure 6-1 and Figure 6-2 A schematic diagram of the simulation process for the position and velocity simulation modes in the robot simulation method provided in this application;

[0089] Figure 7-1 and Figure 7-2 A schematic diagram of the simulation process for the force control simulation mode in the robot simulation method provided in this application;

[0090] Figure 8 A schematic diagram of an embodiment of the robot simulation device provided in this application;

[0091] Figure 9 A schematic diagram of an embodiment of the robot simulation device provided in this application. Detailed Implementation

[0092] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0093] In the following description, the use of suffixes such as "module," "component," or "unit" to denote parts is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "component," or "unit" may be used interchangeably.

[0094] Please see Figure 1 , Figure 1 This is a schematic diagram of the hardware structure of a robot 100 (hereinafter referred to as robot 100) according to one embodiment of the present invention. Figure 1 In the illustrated embodiment, robot 100 includes a mechanical unit 101, a communication unit 102, a sensing unit 103, an interface unit 104, a storage unit 105, a control module 110, and a power supply 111. The various components of robot 100 can be connected in any way, including wired or wireless connections. Those skilled in the art will understand that... Figure 1 The specific structure of the robot 100 shown does not constitute a limitation on the robot 100. The robot 100 may include more or fewer parts than shown. Some parts are not essential components of the robot 100 and may be omitted or combined as needed without changing the nature of the invention.

[0095] The following is combined Figure 1 A detailed introduction to each component of Robot 100:

[0096] Mechanical unit 101 is the hardware of robot 100. For example... Figure 1 As shown, the mechanical unit 101 may include a drive board 1011, a motor 1012, and a mechanical structure 1013, such as... Figure 2 As shown, the mechanical structure 1013 may include a main body 1014, extendable legs 1015, and feet 1016. In this application, the mechanical structure 1013 may also include an extendable robotic arm (not shown), a rotatable head structure 1017, a rocking tail structure 1018, a cargo-carrying structure 1019, a saddle structure 1020, a camera structure 1021, etc. It should be noted that the various component modules of the mechanical unit 101 can be one or multiple, depending on the specific situation. For example, there may be four legs 1015, and each leg 1015 may be equipped with three motors 1012, resulting in a total of twelve motors 1012.

[0097] The communication unit 102 can be used for receiving and sending signals, and can also communicate with networks and other devices. For example, it can receive instructions from a remote control or other robot 100 to move in a specific direction at a specific speed according to a specific gait, and then transmit these instructions to the control module 110 for processing. The communication unit 102 includes modules such as WiFi, 4G, 5G, Bluetooth, and infrared modules.

[0098] The sensing unit 103 is used to acquire information data about the environment surrounding the robot 100 and to monitor parameter data of various components inside the robot 100, and then sends this data to the control module 110. The sensing unit 103 includes various sensors, such as sensors for acquiring information about the surrounding environment: lidar (for remote object detection, distance determination, and / or velocity determination), millimeter-wave radar (for short-range object detection, distance determination, and / or velocity determination), cameras, infrared cameras, and Global Navigation Satellite System (GNSS). Sensors for monitoring various components inside the robot 100 include: an inertial measurement unit (IMU) (for measuring velocity, acceleration, and angular velocity values), foot sensors (for monitoring the position of the foot's contact point, foot posture, magnitude and direction of the contact force), and temperature sensors (for detecting component temperature). Other sensors that can be configured on the robot 100, such as load sensors, touch sensors, motor angle sensors, and torque sensors, are not detailed here.

[0099] The interface unit 104 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within the robot 100, or it can be used to output to external devices (e.g., data, power, etc.). The interface unit 104 may include a power port, a data port (such as a USB port), a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, etc.

[0100] Storage unit 105 is used to store software programs and various data. Storage unit 105 may mainly include a program storage area and a data storage area. The program storage area may store operating system programs, motion control programs, application programs (such as text editors), etc.; the data storage area may store data generated by the robot 100 during use (such as various sensor data acquired by the sensing unit 103, log file data, etc.). Furthermore, storage unit 105 may include high-speed random access memory, and may also include non-volatile memory, such as disk storage, flash memory, or other volatile solid-state memory.

[0101] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0102] Input unit 107 can be used to receive input numerical or character information. Specifically, input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as touch screen, can collect user touch operations (such as operations performed by the user using their palm, fingers, or suitable accessories on or near touch panel 1071) and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: touch detection device 1073 and touch controller 1074. Touch detection device 1073 detects the user's touch position and the signal generated by the touch operation, and transmits the signal to touch controller 1074; touch controller 1074 receives touch information from touch detection device 1073, converts it into touch point coordinates, and sends it to control module 110, and can also receive and execute commands from control module 110. In addition to touch panel 1071, input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, one or more of the following: remote control handles, etc., without any specific limitation here.

[0103] Furthermore, the touch panel 1071 can cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the control module 110 to determine the type of touch event. Subsequently, the control module 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components that implement input and output functions respectively. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to implement input and output functions. The specific implementation is not limited here.

[0104] The control module 110 is the control center of the robot 100. It connects all the components of the robot 100 through various interfaces and lines. It controls the robot 100 as a whole by running or executing the software program stored in the storage unit 105 and calling the data stored in the storage unit 105.

[0105] Power supply 111 supplies power to various components. Power supply 111 may include a battery and a power control board. The power control board controls battery charging, discharging, and power consumption management. Figure 1 In the illustrated embodiment, power supply 111 is electrically connected to control module 110. In other embodiments, power supply 111 may also be electrically connected to sensing unit 103 (such as camera, radar, speaker, etc.) and motor 1012. It should be noted that each component may be connected to a different power supply 111, or may be powered by the same power supply 111.

[0106] Based on the above embodiments, specifically, in some embodiments, a terminal device can be used to communicate with the robot 100. When the terminal device communicates with the robot 100, it can send instruction information to the robot 100. The robot 100 can receive the instruction information through the communication unit 102 and, upon receiving the instruction information, can transmit it to the control module 110, so that the control module 110 can process the instruction information to obtain the target speed value. The terminal device includes, but is not limited to, mobile phones, tablets, servers, personal computers, wearable smart devices, and other electrical appliances with image capture capabilities.

[0107] The instruction information can be determined based on preset conditions. In one embodiment, the robot 100 may include a sensing unit 103, which can generate instruction information based on the current environment of the robot 100. The control module 110 can determine whether the current speed value of the robot 100 meets the corresponding preset conditions based on the instruction information. If it does, the robot 100 will maintain its current speed value and current gait; if it does not, the control module 110 will determine a target speed value and a corresponding target gait based on the corresponding preset conditions, thereby controlling the robot 100 to move at the target speed value and the corresponding target gait. Environmental sensors may include temperature sensors, air pressure sensors, vision sensors, and sound sensors. Instruction information may include temperature information, air pressure information, image information, and sound information. The communication method between the environmental sensors and the control module 110 can be wired or wireless. Wireless communication methods include, but are not limited to: wireless networks, mobile communication networks (3G, 4G, 5G, etc.), Bluetooth, and infrared.

[0108] The hardware and mechanical structures of the robot provided in this application have been described above. The simulation method for the robot provided in this application will now be described below. This application provides a robot simulation method that allows the influence of the motor rotor to be introduced during the simulation process, reducing the difference between the simulation and the actual robot, and improving the accuracy of the simulation results. Please refer to [link / reference]. Figure 3 , Figure 3An embodiment of the robot simulation method provided in this application includes:

[0109] 301. Determine the robot's current simulation mode;

[0110] Simulation is one of the most important tools in robot learning and research, effectively improving development and testing efficiency in complex robotic projects. In this application, robot simulation specifically refers to simulating the kinematics and dynamics of the robot body, such as the motion of a mobile robot in a two-dimensional plane, and the motion of the joints and end effector of a robotic arm. Generally, simulating "robot motion" requires first modeling the robot to obtain kinematic and dynamic models, then using these models in conjunction with given inputs, such as forces and torques, to determine the expected motion behavior of the robot in real-world scenarios.

[0111] Before simulating a robot, the terminal device first needs to determine the current simulation mode based on the given input. Kinematic simulation of a robot mainly focuses on the mathematical relationships between the joint angles and end-effector poses, while dynamic simulation focuses on the relationships between joint angles, angular velocities, angular accelerations, and joint torques. In this application, for the dynamic simulation of the robot, at least two different simulation modes can be provided: one is force-controlled simulation, where the given input is torque, and the forces acting on the links can be calculated, thereby simulating the joint angles, angular velocities, and angular accelerations of each joint; the other is position or velocity simulation, where the given input is the joint angles, angular velocities, and angular accelerations of the joints, and the torques required to be applied to each joint are simulated.

[0112] 302. Obtain rotor simulation data for at least one joint module of the robot according to the simulation mode;

[0113] The robot simulation method provided in this embodiment is applied to robots containing multiple joint modules, i.e., robots composed of multiple joint modules and multiple links, such as multi-axis robotic arms, exoskeleton robots, bipedal robots, quadrupedal robots, surgical robots, etc. Specifically, a robot joint module refers to an integrated modular component that connects and integrates multiple core robot joint components, including servo motors, encoders, and reducers. The robot's joint module is connected between two links, allowing relative movement between the links. The joint module is one of the most important basic components of a robot and also the core component for its motion.

[0114] The actuation of robot joints relies heavily on motors. The more joints a robot has, the higher its flexibility and precision, and the more motors are required. Specifically, a robot motor consists of a stator and a rotor. The stator is the fixed part of the motor, while the rotor refers to the armature core and armature windings. Rotor torque is the magnitude of the "torque" generated by the rotor. In existing technologies, robot simulations treat the robot as a model of joints and links, neglecting the rotor torque within the joints. However, rotor torque actually affects the robot's dynamic characteristics. Therefore, in this embodiment, to incorporate the influence of rotor torque into the simulation process, the terminal device needs to acquire corresponding rotor simulation data according to different simulation modes.

[0115] 303. Combine the rotor simulation data with the connecting rod simulation data to obtain the simulation results.

[0116] The robot also needs to obtain the linkage simulation data based on the simulation mode and given input, and then combine the rotor simulation data and linkage simulation data to obtain the simulation result. That is, the rotor simulation is added on the basis of the linkage simulation part, so as to realize the simulation of the robot including rotor dynamics.

[0117] In this embodiment, when simulating the robot, the current simulation mode is first determined, then the corresponding rotor simulation data is obtained based on the simulation mode, and finally the simulation results are obtained by combining the rotor simulation data and the link simulation data. This allows the influence of the motor rotor to be introduced into the simulation process, reducing the difference between the simulation and the real machine and improving the simulation accuracy.

[0118] The following section provides a detailed explanation of how the rotor simulation data is acquired in the robot simulation method provided in this application. Please refer to [link / reference needed]. Figure 4 Another embodiment of the robot simulation method provided in this application includes:

[0119] 401. Determine the robot's current simulation mode;

[0120] In this embodiment, step 401 is similar to step 101 in the previous embodiment, and will not be described again here.

[0121] 402. Linearize the robot's dynamic equations to obtain the target dynamic equations;

[0122] In this embodiment, the terminal device linearizes the robot's dynamic equations to establish the robot's target dynamic equations. Specifically, the process of establishing the target dynamic equations is as follows:

[0123] 1) Linearize the robot's dynamic equations;

[0124] The dynamic equations of a robot describe the relationship between its forces and motions. The calculation of robot dynamics can be performed using the Newton-Euler method or the Lagrange method. By linearizing the dynamic equations, linear expressions for torques and dynamic parameters can be obtained.

[0125] τ=Yπ

[0126] Where τ represents the overall torque, Y is the coefficient matrix corresponding to the target dynamic parameters, Y is related to the joint angle, angular velocity and angular acceleration of the robot joint module, and π represents the target dynamic parameters, including the link dynamic parameters and the rotor dynamic parameters.

[0127] 2) Obtain the excitation data of each joint module of the robot, and identify the parameters through the excitation data to obtain the target dynamic parameters;

[0128] Parameter identification refers to the process of obtaining robot dynamic parameters by setting excitation trajectories, i.e., acquiring excitation data for each joint module of the robot. For example, by first identifying the friction parameters (including linear and nonlinear friction) and gravity parameters (mass * distance from center of gravity to axis of rotation) of each link through individual uniform motion of each joint at different rotational speeds in both clockwise and counterclockwise directions, the friction parameters and gravity parameters of each link can be identified. Based on the measured friction and gravity parameters, other dynamic parameters such as the link inertia tensor can be identified through complex excitation trajectories. In other words, through various identification methods, the target dynamic parameters, i.e., the dynamic parameters of the links and rotor, can be obtained, including parameters such as mass, center of gravity position, moment of inertia, and even joint friction. The parameter identification process is similar to solving π.

[0129] π=inv(Y)τ

[0130] Wherein inv(Y) is the inverse or pseudo-inverse of the Y matrix. Through parameter identification, target dynamic parameters that are closer to the real machine can be obtained. These target dynamic parameters include connecting rod dynamic parameters and rotor dynamic parameters, thereby making the parameters between the simulation and the real machine closer and reducing simulation errors.

[0131] 3) Establish the target dynamic equation based on the target dynamic parameters.

[0132] After obtaining the target dynamic parameters, the terminal device establishes the target dynamic equation of the robot based on these parameters. This target dynamic equation is linearized, which serves two purposes: first, it enables parameter identification, thereby obtaining more accurate dynamic parameters; second, it facilitates the decomposition and recombination of dynamic parameters, separating the link part and the rotor part in the dynamic equation to achieve the simulation of the rotor part.

[0133] 403. The target dynamic equations are decomposed to obtain the rotor dynamic equations and connecting rod dynamic equations;

[0134] Please see Figure 5 , Figure 5 A schematic diagram of the target dynamic equation decomposition shows that, since joint torques are linearly related to dynamic parameters, by reorganizing the dynamic parameters—that is, decomposing the target dynamic parameters into connecting rod dynamic parameters and rotor dynamic parameters—the dynamic equation can be decomposed into connecting rod and rotor parts:

[0135]

[0136] Where Y1 and Y2 are the coefficient matrices corresponding to the dynamic parameters of the connecting rod and rotor, respectively. π1 and π2 represent the dynamic parameters of the connecting rod and rotor, respectively. Therefore, the dynamic equations for the connecting rod are:

[0137] τ1=Y1π1

[0138] The dynamic equations of the rotor section are as follows:

[0139] τ2=Y2π2

[0140] The target dynamic parameters have been obtained through parameter identification, so the connecting rod torque τ1 and rotor torque τ2 can be calculated by reading the joint angle, angular velocity, and angular acceleration.

[0141] 404. Obtain rotor simulation data for at least one joint module of the robot based on the simulation mode and rotor dynamics equations;

[0142] After obtaining the rotor dynamics equation, the terminal device can calculate the rotor simulation data based on the rotor dynamics equation according to different simulation modes and specific given inputs, and obtain the rotor simulation data of at least one joint module of the robot.

[0143] 405. Combine the rotor simulation data with the connecting rod simulation data to obtain the simulation results.

[0144] In this embodiment, step 405 is similar to step 303 in the previous embodiment, and will not be described again here.

[0145] It should be noted that the linkage simulation data of the robot can be obtained directly through existing simulators, such as pybullet, gazebo, vrep, and webots.

[0146] In this embodiment, the dynamic equations are linearized to facilitate the decomposition and recombination of dynamic parameters, separating the connecting rod and rotor components from the dynamic equations to extract the rotor dynamic equations. These rotor dynamic equations are used to calculate rotor simulation data, and finally, the simulation results of the entire machine are obtained by combining the rotor simulation data and the connecting rod simulation data. This application incorporates motor rotor simulation into existing simulators, allowing the influence of the motor rotor to be introduced into the robot simulation process, reducing the difference between the simulation and the actual machine, and improving the accuracy of the simulation results.

[0147] In this application, robot simulation can be divided into two modes: position or velocity simulation and force control simulation. The specific simulation process differs for these two different simulation modes, which will be explained below:

[0148] I. Position or velocity simulation mode:

[0149] Please see Figure 6-1 and Figure 6-2 , Figure 6-1 One embodiment of the robot simulation method provided in this application, which simulates position or velocity, includes:

[0150] 601. Determine whether the robot's current simulation mode is position or velocity simulation mode;

[0151] In this embodiment, the simulation process is mainly described in the simulation mode of position or velocity simulation, that is, the terminal device determines that the current simulation mode of the robot is position or velocity simulation mode. In position or velocity simulation mode, the terminal device predicts the torque that needs to be applied to the at least one joint module based on the joint angle q, angular velocity dq and angular acceleration ddq of the robot's at least one joint module, that is, the motion performance of the robot's at least one joint module.

[0152] 602. Obtain the state of the input joint module to be simulated. The state of the input joint module includes the joint angle, angular velocity and angular acceleration of at least one joint module of the robot.

[0153] In position or velocity simulation mode, the given input is the joint angle q, angular velocity dq, and angular acceleration ddq of at least one joint module of the robot, which is the input joint module state to be simulated in this embodiment. It should be noted that the joint angle refers not only to the angular position of the joint, but also to the angular position of the rotor in the joint module.

[0154] 603. Calculate the rotor simulation torque based on the input joint module state and rotor dynamics equations to be simulated;

[0155] Regarding the rotor dynamics simulation, since the joint angle q, angular velocity dq, and angular acceleration ddq of the joint module are proportional to the rotor angle q', angular velocity dq', and angular acceleration ddq' within the joint module, and numerically equal to the joint reduction ratio, the simulation is performed by multiplying the read input joint module state by the reduction ratio, and then... Figure 4 The rotor dynamics equation obtained in the corresponding embodiment is: τ2=Y2π2. Substituting it into the equation, the rotor simulation torque τ2 can be calculated, which is the rotor torque required to drive the joint movement.

[0156] 604. Perform link dynamics simulation based on the input joint module state to obtain the link simulation torque;

[0157] Regarding the linkage dynamics simulation, the terminal device uses an existing simulator to perform simulation based on the acquired input joint module state, and obtains the linkage simulation torque.

[0158] 605. Combine the simulated torque of the connecting rod and the simulated torque of the rotor to obtain the torque simulation results.

[0159] Please see Figure 6-2 The terminal device merges the rotor simulation torque and the link simulation torque, and determines the merged result as the final torque simulation result, thereby realizing the combination of rotor simulation data and link simulation data, and thus realizing the simulation of robot position or velocity including rotor dynamics.

[0160] II. Force Control Simulation Mode:

[0161] Please see Figure 7-1 and Figure 7-2 , Figure 7-1 One embodiment of the force control simulation in the robot simulation method provided in this application includes:

[0162] 701. Determine that the robot's current simulation mode is force control simulation mode;

[0163] In this embodiment, the simulation process is mainly described in the force-controlled simulation mode, where the terminal device determines that the robot's current simulation mode is force-controlled simulation mode. In force-controlled simulation mode, the terminal device predicts the joint angle, angular velocity, and angular acceleration of at least one joint module of the robot based on the input force or torque, that is, predicts the robot's motion performance.

[0164] 702. Obtain the current running joint module status of the robot. The running joint module status includes the joint angle, angular velocity, and angular acceleration of at least one joint module of the robot.

[0165] In force control simulation mode, the terminal device needs to read the current running joint module status of the robot from the simulator, that is, read the joint angle q, angular velocity dq and angular acceleration ddq of at least one joint module of the robot from the simulator. It should be noted that the joint angle includes the angular position of the rotor in the joint module.

[0166] 703. Calculate the rotor simulation torque based on the running joint module status and rotor dynamics equations;

[0167] Since the joint angle q, angular velocity dq, and angular acceleration ddq of the joint module are in a fixed proportional relationship with the rotor angle q', angular velocity dq', and angular acceleration ddq' within the joint module, and are numerically equal to the joint reduction ratio, the reading of the running joint module status is multiplied by the reduction ratio, and then... Figure 4 The rotor dynamics equation obtained in the corresponding embodiment is: τ2=Y2π2, which can be used to calculate the rotor simulation torque τ2 of at least one joint module of the current robot.

[0168] 704. Obtain the input torque to be simulated;

[0169] In force control simulation mode, the given input is the driving torque of the joint, which is the input torque to be simulated in this embodiment. The terminal device obtains the input torque to be simulated.

[0170] 705. Determine the connecting rod torque based on the input torque to be simulated and the rotor simulation torque, and perform simulation based on the connecting rod torque to obtain the motion simulation results of the joint module.

[0171] Please see Figure 7-2 The terminal device subtracts the rotor simulation torque from the input torque to be simulated to obtain the link torque. This link torque is then input into an existing simulator for simulation, yielding the motion simulation results of the joint module and thus predicting its motion performance. By calculating the input torque and subtracting the rotor simulation torque to obtain the link torque, force control simulation is performed. In this force control simulation mode, the influence of the motor rotor torque is introduced, adding rotor dynamics to the existing simulator to simulate the overall machine simulation effect with rotor dynamics. This reduces the difference between the simulation and the actual machine, improving the accuracy of the simulation results.

[0172] Please see Figure 8 , Figure 8 One embodiment of the robot simulation device provided in this application includes:

[0173] The mode determination unit 801 is used to determine the current simulation mode of the robot;

[0174] The data acquisition unit 802 is used to acquire rotor simulation data of at least one joint module of the robot according to the simulation mode.

[0175] The simulation processing unit 803 is used to combine rotor simulation data with connecting rod simulation data to obtain simulation results.

[0176] Optionally, the data acquisition unit 802 is specifically used to: linearize the robot's dynamic equations to obtain the target dynamic equations;

[0177] The target dynamics equations are decomposed to obtain the rotor dynamics equations and the connecting rod dynamics equations;

[0178] Rotor simulation data for at least one joint module of the robot is obtained based on the simulation mode and rotor dynamics equations.

[0179] Optionally, when the simulation mode is a position or velocity simulation mode, the data acquisition unit 802 is specifically used for:

[0180] Obtain the state of the input joint module to be simulated. The state of the input joint module includes the joint angle, angular velocity and angular acceleration of at least one joint module of the robot.

[0181] The rotor simulation torque is calculated based on the input joint module state and rotor dynamics equations to be simulated.

[0182] The simulation processing unit 803 is specifically used for:

[0183] Based on the input joint module state, perform link dynamics simulation to obtain the link simulation torque;

[0184] The simulated torques of the connecting rod and the rotor are combined to obtain the torque simulation results.

[0185] Optionally, when the simulation mode is force-controlled simulation mode, the data acquisition unit 802 is specifically used for:

[0186] Obtain the current running joint module status of the robot. The running joint module status includes the joint angle, angular velocity, and angular acceleration of at least one joint module of the robot.

[0187] Calculate the rotor simulation torque based on the operating joint module status and rotor dynamics equations;

[0188] The simulation processing unit 803 is specifically used for:

[0189] Obtain the input torque to be simulated;

[0190] The connecting rod torque is determined based on the input torque to be simulated and the rotor simulation torque, and simulation is performed based on the connecting rod torque to obtain the motion simulation results of the joint module. The connecting rod torque is the difference between the input torque to be simulated and the rotor simulation torque.

[0191] Optionally, the data acquisition unit 802 is also specifically used for:

[0192] Linearize the robot's dynamic equations;

[0193] The excitation data of each joint module of the robot is acquired, and the parameters are identified through the excitation data to obtain the target dynamic parameters;

[0194] Establish the target dynamic equation based on the target dynamic parameters.

[0195] Optionally, the target dynamic equation is:

[0196] τ = Yπ;

[0197] Where τ represents the overall torque, Y is the coefficient matrix corresponding to the target dynamic parameters, and π is the target dynamic parameter.

[0198] Optionally, the data acquisition unit 802 is also specifically used for:

[0199] The target dynamic equation is reorganized based on the connecting rod dynamic parameters and the rotor dynamic parameters to obtain the reorganized target dynamic equation.

[0200] The recombined target dynamic equations are split into connecting rod dynamic equations and rotor dynamic equations.

[0201] Optionally, the recombined target dynamic equation is:

[0202]

[0203] The rotor dynamics equation is:

[0204] τ2=Y2π2;

[0205] Where Y1 and Y2 are the coefficient matrices corresponding to the connecting rod dynamics and rotor dynamics parameters, respectively, and π1 and π2 are the connecting rod dynamics parameters and rotor dynamics parameters, respectively.

[0206] In this embodiment, the functions of each unit are the same as described above. Figure 3 , 4 The steps in the method embodiments shown in 6-1 and 7-1 correspond to those in the following examples and will not be repeated here.

[0207] This application also provides a robot simulation device; please refer to [link / reference]. Figure 9 , Figure 9 One embodiment of the robot simulation device provided in this application includes:

[0208] Processor 901, memory 902, input / output unit 903, bus 904;

[0209] The processor 901 is connected to the memory 902, the input / output unit 903, and the bus 904;

[0210] The memory 902 stores the program, and the processor 901 calls the program to execute the simulation method of any of the robots described above.

[0211] This application also relates to a computer-readable storage medium storing a program, characterized in that, when the program is run on a computer, it causes the computer to execute the simulation method of any of the robots described above.

[0212] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0213] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0214] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0215] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0216] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A robot simulation method, characterized in that, The simulation method includes: Determine the robot's current simulation mode; According to the simulation mode, obtain rotor simulation data of at least one joint module of the robot; The rotor simulation data is combined with the connecting rod simulation data to obtain the simulation results; The step of obtaining rotor simulation data for at least one joint module of the robot according to the simulation mode includes: The robot's dynamic equations are linearized to obtain the target dynamic equations; The target dynamic equations are decomposed to obtain the rotor dynamic equations and the connecting rod dynamic equations; Based on the simulation mode and the rotor dynamics equations, obtain rotor simulation data for at least one joint module of the robot; When the simulation mode is force control simulation mode, obtaining rotor simulation data for at least one joint module of the robot based on the simulation mode and the rotor dynamics equations includes: The current running joint module status of the robot is obtained, and the running joint module status includes the joint angle, angular velocity and angular acceleration of at least one joint module of the robot; Calculate the rotor simulation torque based on the running joint module status and the rotor dynamics equation; The process of combining the rotor simulation data with the connecting rod simulation data to obtain the simulation results includes: Obtain the input torque to be simulated; The connecting rod torque is determined based on the input torque to be simulated and the rotor simulation torque, and simulation is performed based on the connecting rod torque to obtain the motion simulation result of the joint module. The connecting rod torque is the difference between the input torque to be simulated and the rotor simulation torque.

2. The simulation method according to claim 1, characterized in that, The linearization of the robot's dynamic equations to obtain the target dynamic equations includes: Linearize the robot's dynamic equations; The excitation data of each joint module of the robot is acquired, and the target dynamic parameters are obtained by parameter identification through the excitation data. The target dynamic equation is established based on the target dynamic parameters.

3. The method according to claim 2, characterized in that, The target dynamic equation is: ; in, Y represents the overall torque, and Y is the coefficient matrix corresponding to the target dynamic parameters. The target dynamic parameters are given.

4. The simulation method according to claim 2, characterized in that, The target dynamic parameters include connecting rod dynamic parameters and rotor dynamic parameters, and the decomposition of the target dynamic equation to obtain the rotor dynamic equation includes: The target dynamic equation is reorganized based on the connecting rod dynamic parameters and the rotor dynamic parameters to obtain the reorganized target dynamic equation. The recombined target dynamic equations are split into connecting rod dynamic equations and rotor dynamic equations.

5. The simulation method according to claim 4, characterized in that, The recombined target dynamic equation is: ; The rotor dynamics equation is: ; in, , These are the coefficient matrices corresponding to the connecting rod dynamics and rotor dynamics parameters, respectively. , These are the connecting rod dynamic parameters and the rotor dynamic parameters, respectively. This is the rotor torque.

6. A robot simulation device, characterized in that, The simulation device is used to execute the simulation method as described in claim 1, and the simulation device includes: The mode determination unit is used to determine the current simulation mode of the robot; The data acquisition unit is used to acquire rotor simulation data of at least one joint module of the robot according to the simulation mode; The simulation processing unit is used to combine the rotor simulation data with the connecting rod simulation data to obtain simulation results.

7. A robot simulation device, characterized in that, The simulation equipment includes: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, which the processor invokes to perform the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a program stored thereon, the program performing the method as described in any one of claims 1 to 5 when executed on a computer.