A Collision Detection Method for Collaborative Robots Based on Decision Trees
By using a decision tree-based machine learning algorithm to perform collision detection for collaborative robots using robot speed, acceleration, and torque derivatives, the problem of collision detection being susceptible to environmental influences in existing technologies is solved, achieving more efficient and accurate collision protection.
Patent Information
- Application Number
- CN202111577040.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2041-12-22
AI Technical Summary
Existing collision protection detection for collaborative robots is susceptible to temperature changes and operating speed, leading to a decrease in collision effectiveness and potential failure after prolonged operation at high temperatures.
A decision tree-based machine learning algorithm is adopted, using robot speed, acceleration, real-time torque and torque derivative as input parameters, and a vector machine is used to classify in high-dimensional space to achieve collision detection in complex environments.
It improves the accuracy and sensitivity of collision detection, reduces the amount of computation, and the results are more consistent with reality.
Smart Images

Figure CN116330259B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of collaborative robot automation control, specifically a collision detection method for collaborative robots based on decision trees. Background Technology
[0002] In today's era of human-robot collaboration, collaborative robots are gradually being integrated into various stages of automated production lines. Collision prevention and safe execution of actions are fundamental issues in the design of redundant robotic arm control systems. Collaborative robots can not only be taught to perform tasks like traditional robots, but also work in tandem with humans to complete tasks. Articulated collaborative robots, due to their design philosophy, allow for decoupling analysis of each joint and can achieve collision protection functions using technologies such as actuator torque control. Their low cost, flexibility, and ease of deployment have led to their increasing acceptance by users.
[0003] Current collision protection detection methods for collaborative robots typically compare the current joint torque with the calculated theoretical dynamic torque. A collision response is triggered when the difference exceeds a collision threshold. It is essential to prevent the robotic arm from colliding with potential obstacles in the environment and to avoid critical states. Transitioning to a critical state could damage the robotic arm. The control system is designed to prevent redundant robotic arms from damaging themselves, thus avoiding critical states or collisions with other objects. Existing collision protection methods are susceptible to temperature changes and robot operating speed. After prolonged operation at high temperatures, the collision effectiveness drops sharply, leading to collision failure. Summary of the Invention
[0004] The purpose of this invention is to develop a collision detection method for collaborative robots based on decision trees. This method achieves intelligent collision detection based on robot learning, thereby enabling collision protection in complex environments and protecting the robot from its external environment. Compared to simply detecting the difference in collision torque, this method uses robot speed, acceleration, tracking number, torque, and the reciprocal of the torque as input parameters, and employs a vector machine to classify these parameters in high-dimensional space to achieve collision detection.
[0005] The technical solution adopted by the present invention to achieve the above objectives is as follows:
[0006] A collision detection method for collaborative robots based on decision trees includes the following steps:
[0007] For robots, construct kinematic models;
[0008] Singularity analysis is performed on the kinematic model to eliminate cases where the robot is located at singular points;
[0009] Based on the kinematic gravity compensation theory, the theoretical torque of the robot is obtained;
[0010] The decision tree model is trained using robot actuator data and the robot's theoretical torque.
[0011] By inputting real-time robot actuator data and theoretical torque into a trained decision tree model, it can be determined whether the robot has collided at the current moment.
[0012] The construction of the kinematic model specifically involves: the robot having six degrees of freedom, including shoulder rotation, shoulder swing, elbow rotation, elbow swing, elbow rotation, and hand swing; and establishing the transformation relationship between the coordinates of each motion axis based on the MDH coordinate transfer matrix.
[0013]
[0014] Its overall kinematic solution is:
[0015]
[0016]
[0017]
[0018]
[0019] in, This represents the joint transfer matrix, where i = 1 to 6 represents the robot joint number; (n x n y n z () represents the coordinates of the robot's pose N, where the superscript indicates the base coordinates and the subscript indicates the robot's end effector coordinates; (o x o y o z (a) represents the coordinates of the robot's pose O, where the superscript indicates the base coordinates and the subscript indicates the robot's end effector coordinates; x a y a z () represents the coordinates of robot pose A, where the superscript indicates the base coordinates and the subscript indicates the robot end effector coordinates; (p x p y p z ) represents the coordinates of the robot's position, with the superscript representing the base coordinates and the subscript representing the robot's end effector coordinates; tcp represents the tool end effector; c represents cosine, s represents sinine, and the following number represents the i-th joint θi; D represents the link length, and the following number represents the i-th link.
[0020] The singularity analysis of the kinematic model specifically involves:
[0021] (1) Expression for the singular position of the shoulder: when p x 2+(pz -D1) 2 -(D4) 2 When θ = 0, the end reference point O6 is located in the plane formed by the z-axis z1 of the first joint and the x-axis x2 of the second joint. θ1 cannot be solved, causing the robot to lose control.
[0022] (2) Expression for singular elbow position: When A 2 +B 2 -C 2 When x = 0, θ2 cannot be calculated, causing the machine to malfunction. Axis axes x2, x3, and x4 are coplanar; where:
[0023]
[0024] (3) Expression for the singular position of the wrist: When s5 = 0, that is, when θ5 = 0 or θ5 = π, the axes x4 and x6 are parallel, and θ6 cannot be calculated, which leads to the machine going out of control.
[0025] The kinematic gravity compensation theory includes two parts: outward iteration and inward iteration. Outward iteration applies the Newton-Euler equations to each link, calculating the velocity and acceleration of the link from link 1 to link n. Inward iteration calculates the interaction forces and torques between links and the joint driving torque from link n to link 1.
[0026] The driver data includes robot speed, acceleration, and real-time torque, all obtained from the robot driver.
[0027] The process of training the decision tree model using robot actuator data and the robot's theoretical torque specifically involves:
[0028] The robot's velocity, acceleration, and real-time torque obtained from the robot actuator, the theoretical torque obtained from kinematic gravity compensation, and the derivative of the real-time torque are used as inputs to the decision tree model. The result of whether a collision occurs at the corresponding moment is used as the output of the decision tree model to train the decision tree model.
[0029] The present invention has the following beneficial effects and advantages:
[0030] 1. This invention trains on actual collision data samples, rather than through human control, resulting in results that are more consistent with actual conditions.
[0031] 2. The machine learning algorithm based on decision trees in this invention uses speed, acceleration, real-time torque, theoretical torque, and the derivative of real-time torque as the basis for judgment, which considers the data more comprehensively and accurately. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of the robot joint of the present invention;
[0033] Figure 2 This is a flowchart of the method of the present invention. Detailed Implementation
[0034] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0035] In machine learning, a decision tree is a predictive model that represents a mapping between object attributes and object values. Decision tree classifiers have been successfully applied in many different fields, such as radar signal classification, character recognition, remote sensing, medical diagnosis, expert systems, and speech recognition. A collaborative robot collision detection method based on decision trees is characterized by: using machine learning decision trees as an analysis tool, comprehensively considering factors such as robot speed, acceleration, tracking difference, and the derivative of torque to determine whether a collision has occurred. This method features high accuracy, high sensitivity, and low computational cost. A decision tree is a tree-like structure where each internal node represents a test on an attribute, each branch represents a test output, and each leaf node represents a category. This allows for the classification of changing trends into different categories. A major drawback is the need for massive amounts of training data. The most important characteristic of decision trees is their ability to decompose a complex decision-making process into a set of simpler decisions, thus providing a solution that is often easier to interpret.
[0036] A decision tree-based intelligent collision detection method for collaborative robots enables accurate collision detection during operation, thereby protecting the robot and its external environment. The system collects joint torques via a bus and compares them with theoretical torques based on dynamics to calculate the torque difference. Employing a vector machine-based intelligent algorithm, it takes the torque difference, torque, torque derivative, velocity, and acceleration as inputs and outputs the collision detection results.
[0037] The decision tree-based robot collision detection method includes the following modules:
[0038] like Figure 2 As shown, kinematics is the fundamental module of robot motion and a prerequisite for robot collision detection, because collision detection is only meaningful when it occurs during robot motion. Robot dynamics is the core of collision detection; the dynamic calculation calculates torque + friction force = actual robot current. From an engineering perspective, this formula is considered valid during robot motion. The dynamic value mainly calculates the torque required by the robot under the current acceleration and velocity conditions. The theoretical friction model is unusable in practice, so a decision tree algorithm is used to indirectly calculate whether a collision has occurred during the robot's current motion. The input values of the decision tree are relevant data during robot motion, and the output value is whether a collision has occurred. These processes are analyzed in detail below.
[0039] I. Kinematic Modeling
[0040] The manipulator arm of this mobile robot is a humanoid robotic arm with a simplified structural diagram of six degrees of freedom: shoulder rotation, shoulder swing, elbow rotation, elbow swing, elbow rotation, and hand swing. The initial position and coordinate system of each joint are shown in the diagram. Figure 1 As shown:
[0041] Kinematics and workspace analysis are fundamental to robot motion planning and control. Specifically, based on the MDH coordinate transfer matrix, the transformation relationships between the coordinates of each motion axis are established, as shown below.
[0042]
[0043] Where θ i Let represent the angle caused by the rotation of the i-th joint (Axisi). The collaborative robot has 6 degrees of freedom. Its global kinematic solution is:
[0044]
[0045]
[0046]
[0047]
[0048] In the formula, "\" represents a newline character.
[0049] II. Singularity Analysis
[0050] When the robot is at a singular point, the inverse kinematics expression has no solution. It is impossible to convert the end effector Cartesian coordinate system into the angle of the joint motor axis through inverse kinematics calculation. Moreover, a tiny change in the Cartesian coordinate system will cause a drastic change in the axis angle. Therefore, it is necessary to obtain an intuitive expression of the singular point position to avoid the robot from going out of control.
[0051] (1) Expression for the singular position of the shoulder. When At this time, the mechanism is singular, and the end reference point O6 is located in the plane formed by axes z1 and x2. θ1 cannot be solved, leading to the mechanism going out of control.
[0052] (2) Expression for singular elbow position. When A 2 +B 2 -C 2 When θ = 0, θ2 cannot be calculated, leading to loss of control of the mechanism, and the axes x2, x3, and x4 are coplanar.
[0053] (3) Expression for the singular position of the wrist. When s5 = 0, that is, when θ5 = 0 or θ5 = π, the axes x4 and x6 are parallel, and θ6 cannot be calculated, resulting in the loss of control of the mechanism.
[0054] III. Theoretical Value of Dynamic Gravity Compensation
[0055] Newton-Euler dynamics calculations include outward iteration and inward iteration components:
[0056] The first part applies the Newton-Euler equations to each link, iteratively calculating the velocity and acceleration of the links from link 1 to link n outwards. The second part iteratively calculates the interaction forces and torques between the links and the joint driving torque from link n to link 1 inwards.
[0057] (1) Newton-Euler extrapolation method: extrapolation i: 0-5;
[0058]
[0059]
[0060] (2) Newton-Euler extrapolation method: Extrapolation i: 6-1
[0061]
[0062] The theoretical value of gravity compensation can be given through the gravity term of the dynamic model.
[0063] in Let represent the angular velocity caused by the rotation of the i-th joint. For a serial robot, i ω i yes and the previous joint speed i ω i-1 The synthesis of. It is a 3×3 attitude matrix, which is the attitude matrix of coordinate system {i} relative to coordinate system {i+1}. It is the representation of the acceleration at the origin of coordinate system {i+1} in coordinate system {i+1}. It is the representation of the acceleration of the (i+1)th link's center of mass in the coordinate system {i+1}. i+1 F i+1 It is the representation of the force caused by acceleration at the center of mass of the (i+1)th link in the coordinate system {i+1}. i+1 This represents the mass of the (i+1)th link. It is the inertia matrix of the (i+1)th link relative to the (i+1)th centroid coordinate system. i f i It is the force acting at the i-th center of mass, which is the resultant of the force generated by acceleration and the force transmitted by the next link. i n i τ represents the torque at the origin of the coordinate system {i}, and is a 3×1 dimensional torque. i yes i n iThe component in the Z-axis direction is also the torque value required at joint i.
[0064] IV. Friction Parameter Identification
[0065] The detected torque value τ ci Decomposed into dynamic τ i +Friction force T. The dynamic value is given by the theory above. Therefore, the friction torque value is:
[0066] T = τ ci -τ i (9)
[0067] Friction identification requires acquiring the torque curve of the actuator. Methods such as least squares fitting using quadratic functions or parabolic curves are commonly employed. For the friction term, only sliding and static friction are considered. Depending on the situation, if the influence is significant, data is used for identification. The identification method employs a decoupled identification approach between the friction and dynamic terms. Decision trees can be used to directly analyze the friction curve, replacing the previous decoupled identification method.
[0068] V. Decision Tree-Based Detection Module
[0069] Decision trees are a machine learning method characterized by using a tree structure for decision-making, mimicking the tree-like process of human judgment of concepts. The task is to learn a numerical model from a given training set D to classify new examples. The goal is to generate a decision tree with strong generalization ability, i.e., strong ability to handle unseen examples. The framework of the decision tree-based detection module is shown below.
[0070] First, training samples are generated. This is done by collecting actuator data, calculating theoretical joint torque values, and collision results. The input data for the training set includes: velocity, acceleration, real-time torque, theoretical torque, and the derivative of the real-time torque. The training set result indicates whether a collision occurred.
[0071] Model training involves inputting training samples as data into the training module to train the model and generate a decision tree model for practical use.
[0072] The decision tree algorithm, in actual collision detection, uses a pre-trained decision tree model to classify the real-time collected input data (velocity, acceleration, real-time torque, theoretical torque, and derivative of real-time torque) and distinguish whether a collision has occurred.
[0073] When a robot has multiple manipulators, or when humans and robots work in coordination, identifying and preventing dangerous manipulator movements becomes quite difficult. The control system collects torque data from each joint via CANopen, filtering it to obtain a stable torque signal. The collected torque signal is combined with theoretical dynamic data calculated by the dynamics module and friction compensation data to obtain theoretical joint torque information for each joint. Using theoretical joint torque data, actual torque values, joint velocities, joint accelerations, and actual torque derivatives as inputs to a decision tree, the data is categorized to determine whether collision detection has occurred. Input data (theoretical joint torque data, actual torque values, joint velocities, joint accelerations, and actual torque derivatives) and results collected under different conditions are used as training samples to train the decision tree model for use in collision detection. One method to avoid robot collisions is to divide the workspace so that the trajectories of collaborative robots do not intersect. Since collaborative manipulators work in a unified workspace, the space division is nominally achieved by defining no-go zones for each manipulator. This method is implemented using software tools. The workspace is divided into two subspaces, where each robot can operate without direct contact with the other. This workspace partitioning method solves the problem under consideration, but it limits the capabilities of the control system. An extension of this method is to consider the online dynamic adjustment of the workspace partition boundaries based on the robot's current position.
[0074] This invention uses Newton-Euler dynamics to calculate dynamic terms, which is convenient and fast, and reduces the amount of calculation.
[0075] This invention employs a decision tree-based approach combined with various collected data for collision detection and classification, resulting in more comprehensive, accurate, and highly sensitive results.
[0076] This invention uses training samples to train a decision tree-based model, which is more objective than manually setting samples.
Claims
1. A method for collision detection in a collaborative robot based on a decision tree, characterized by, The method comprises the following steps: A kinematic model is constructed for the robot; Singularity point analysis is performed on the kinematic model to remove the case where the robot is at a singularity point; Theoretical torque of the robot is obtained according to the kinematic gravity compensation theory; The decision tree model is trained using the robot driver data and the theoretical torque of the robot; Real-time robot driver data and the theoretical torque are input into the trained decision tree model to obtain whether the robot collides at the current time; The kinematic model is constructed, and the robot has six degrees of freedom including shoulder rotation, shoulder swing, elbow rotation, elbow swing, elbow rotation and hand swing; the conversion relationship between the coordinates of the movement axes is established according to the MDH coordinate transmission matrix: ; The overall kinematic solution is: ; ; ; ; wherein, T represents the joint transmission matrix, i = 1 ~ 6 represents the robot joint number; ( , , ) represents the coordinates of the robot pose N, the upper index represents the base coordinates, and the lower index represents the robot end coordinates; ( , , ) represents the coordinates of the robot pose O, the upper index represents the base coordinates, and the lower index represents the robot end coordinates; ( , , ) represents the coordinates of the robot pose A, the upper index represents the base coordinates, and the lower index represents the robot end coordinates; ( , , ) represents the coordinates of the robot position, the upper index represents the base coordinates, and the lower index represents the robot end coordinates; tcp represents the tool end; c represents cos, s represents sin, and the following number represents the i th joint ; D represents the link length, and the following number represents the i th link; The singularity point analysis of the kinematic model is performed, and the robot has six degrees of freedom including shoulder rotation, shoulder swing, elbow rotation, elbow swing, elbow rotation and hand swing; the conversion relationship between the coordinates of the movement axes is established according to the MDH coordinate transmission matrix: (1) Shoulder singular position expression: when , the end reference point is located in the plane composed of the z-axis of the first joint of the axis and the x-axis of the second joint , It cannot be solved, resulting in robot out of control; (2) Expression for singular elbow position: when At that time, it was impossible to find the answer. This caused the machine to malfunction and the axis to break down. , , Coplanar; of which: ; (3) The wrist singular position expression: when , i.e. or , the axis and are parallel, and cannot be solved, resulting in machine out-of-control; The theoretical torque of the robot is obtained according to the kinematic gravity compensation theory, which includes two parts of outward iteration and inward iteration; the outward iteration is to apply Newton-Euler equation to each link, and the velocity and acceleration of the link are calculated by outward iteration from link 1 to link n; the inward iteration is to calculate the interaction force and torque between the links and the joint driving torque by inward iteration from link n to link 1; The driver data includes robot speed, acceleration, real-time torque, which are obtained by the robot driver; The decision tree model is trained using the robot driver data and the theoretical torque of the robot, and the training is performed in the following way: The robot speed, acceleration and real-time torque obtained by the robot driver, the theoretical torque of the robot obtained by the kinematic gravity compensation, and the derivative of the real-time torque are used as the input of the decision tree model, and the result of whether the collision occurs at the corresponding time is used as the output of the decision tree model, and the decision tree model is trained.
Citation Information
Patent Citations
Electric current force control system and method for flexible multi-joint robot
CN109202889A
Singularity treatment method for six-degree-of-freedom articulated robot
CN110802600A