Robot collision detection method based on VAE-LSTM
By applying the VAE-LSTM hybrid model in robot collision detection, the characteristics of joint torque change are extracted and captured, and the problems of high cost, low accuracy and poor robustness in traditional methods are solved, and efficient and accurate collision detection is achieved.
Patent Information
- Application Number
- CN202510177231.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-05-27
AI Technical Summary
Traditional robot collision detection methods have problems such as high cost, low detection accuracy and poor robustness, especially in the case of scarce data and dynamic environments.
The robot collision detection method based on VAE-LSTM is adopted to collect the running data of robot joints in real time, construct the VAE-LSTM hybrid model, and use the VAE model to extract the local characteristics of torque changes. The LSTM model captures the correlation in long time series and performs collision detection.
It realizes low-cost, high-precision and robust collision detection, adapts to the needs of modern industrial production environments, and can accurately determine whether a robot has collided without relying on additional sensors.
Smart Images

Figure CN120038745A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot collision detection. Specifically, it relates to a robot collision detection method based on VAE-LSTM. Background Art
[0002] In high-speed production activities, industrial robots are widely used in various production links, and their safety is of crucial importance. In order to avoid collisions between robots and the surrounding environment or personnel, effective collision detection technology is particularly important. Traditional collision detection methods mainly rely on external sensors or accurate dynamic models, but these methods have some limitations.
[0003] Collision detection methods based on external sensors: They can effectively avoid collisions, but require additional detection devices, such as joint torque sensors or skin sensors, which increases costs and reduces the robustness of the system. For example, using joint torque sensors to detect collisions requires integrating torque sensors at each joint of the robot. Although the detection accuracy is improved, the cost and integration difficulty are greatly increased. Arranging skin sensors on the surface of the robot body can detect and isolate collisions, but its coverage is limited, and there are problems such as complex installation and high false alarm rates.
[0004] Collision detection methods based on dynamic models: Automatically detect collisions by calculating the corresponding calculated torque and obtaining the torque deviation value. However, the detection performance of these methods highly depends on the accuracy of the model. Due to the friction inside the reducer, the joint torque becomes complex, and the model cannot be very precise, resulting in low detection accuracy.
[0005] Collision detection methods based on fuzzy logic and neural networks: Try to reduce the dependence on dynamic models, but these methods often require a large amount of training data and do not perform well in the case of scarce data, and cannot respond in real time to sudden situations in a dynamic environment. Summary of the Invention
[0006] The purpose of the present invention is to provide a robot collision detection method based on VAE-LSTM, which can overcome the shortcomings of traditional collision detection methods, has characteristics such as low cost, high precision, and high robustness, and meets the requirements of modern industrial production environments.
[0007] To solve the above problems, the present invention provides a robot collision detection method based on VAE-LSTM, including the following steps:
[0008] Step 1): Collect the running data of the joints during the movement of the robot in real time and perform data preprocessing. The preprocessed running data includes the measured torque, position, speed, and acceleration of the joints. Based on the preprocessed running data, obtain the calculated torque of the joints and the joint torque deviation value;
[0009] Step 2): Construct a collision detection model to be trained. The collision detection model to be trained includes a VAE model to be trained and an LSTM model to be trained. Set the length of the input time window of the joint torque to L. Take r window sequences of length L from the joint torque deviation values as the training set. Each time, extract one from the training set as the current training sample. Input the original window features of the current training sample into the VAE model to be trained for encoding to obtain the original embedding features of the current training sample. Input the original embedding features of the current training sample into the LSTM model to be trained to obtain the predicted embedding features of the next training sample. Input the predicted embedding features of the next training sample into the VAE model to be trained for decoding to obtain the reconstructed window features of the next training sample;
[0010] Step 3): Define the loss function of the collision detection model to be trained. Use the original window features of the current training sample, the original embedding features of the current training sample, the predicted embedding features of the next training sample, and the reconstructed window features of the next training sample, as well as the values of the deviation distribution, standard normal distribution, and KL divergence function corresponding to the calculated torque. Update the VAE model to be trained and the LSTM model to be trained respectively through the backpropagation algorithm. After the training is completed, obtain the trained VAE model and the trained LSTM model, which are defined as the VAE-LSTM hybrid model;
[0011] Step 4): Take the subsequent obtained joint torque deviation values as detection samples and form a detection set. Input S detection samples into the VAE-LSTM hybrid model to obtain the original window features and the reconstructed window features of the detection set. Construct a scoring module. Input the original window features and the reconstructed window features of the detection set into the scoring module to obtain the model prediction result score d of the detection sample t , where, is the reconstructed window feature of the s-th detection sample, w s is the original window feature of the s-th detection sample, 1 ≤ s ≤ S. Compare d t with a preset threshold. If d t exceeds the threshold, it is determined that a collision has occurred, and then output a signal to stop the movement of the robot. Otherwise, it is determined that there is no collision and no operation is performed.
[0012] Compared with the prior art, the beneficial effects of the present invention are as follows: The robot collision detection method based on VAE-LSTM of the present invention does not require additional external sensors, and only uses the operation time series data collected by the robot itself for training and detection, effectively reducing the system cost. The working principle of this method is as follows: The joint torque deviation value is taken as sample data and input into the VAE-LSTM hybrid model one by one. By using the encoding and decoding capabilities of the VAE model and the prediction ability of the LSTM model, the reconstructed window feature of the next sample is predicted through the original window feature of the current sample. Furthermore, the original window feature and the reconstructed window feature of the sample data are input into the scoring module to obtain the model prediction result score of the sample data. Finally, it is judged whether the robot has collided by comparing the model prediction result score with the threshold. This method can learn the complex patterns of joint torque changes, use VAE to extract local features of torque changes, and use the LSTM model to capture the correlations in long time series, thereby improving the accuracy of collision detection and the robustness of the system.
[0013] Further, the specific process of obtaining the calculated torque and joint torque deviation value of the joint in step 1) is as follows:
[0014] Step 1-1: Input the position, velocity, and acceleration data of the joint into the Newton-Euler recursive model for dynamic calculation to obtain the calculated torque of the joint, τ j =NewtonEuler(θ j , v j , α j ), where τ j is the calculated torque of joint j, θ j is the position of joint j, v j is the velocity of joint j, α j is the acceleration of joint j, and NewtonEuler(·) is the formula of the Newton-Euler recursive model;
[0015] Step 1-2: Input the velocity of the joint into the Coulomb viscous friction model to calculate the friction compensation value of the joint, F jf =sign(v j )·F c0 +B·v j , where F jf is the friction compensation value of joint j, sign(v j ) is the sign function of the velocity direction of joint j, F c0 is the Coulomb friction coefficient, B is the viscous friction coefficient, and v j is the velocity of joint j;
[0016] Step 1-3: Based on the calculated torque and friction compensation value of the joint, through the formula τ jc =τ j+F jf The compensated computed torque, where τ jc is the compensated computed torque of joint j, τ j is the computed torque of joint j, and F jf is the friction compensation value of joint j;
[0017] Steps 1 - 4: Take the difference between the compensated computed torque and the measured torque of the joint to obtain the joint torque deviation value, △τ j = τ jm - τ jc , where △τ j is the joint torque deviation value of joint j, τ jm is the measured torque of joint j, and τ jc is the compensated computed torque of joint j.
[0018] This method calculates the computed torque of the joint through the Newton - Euler recursive model, and combines the Coulomb and viscous mixed friction model to compensate for the friction of the joint movement, so as to obtain a more accurate computed torque. Finally, the accuracy of the joint torque deviation value is improved. This method uses the Newton - Euler equation to directly calculate the computed torque of each joint based on Newton's second law, and establishes the dynamic model of the manipulator, which has the characteristics of high calculation efficiency. At the same time, through the Coulomb and viscous mixed friction model, the friction of the joint movement is compensated, the accuracy of the joint movement control is improved, and the accuracy of the collision detection is enhanced.
[0019] Furthermore, the specific process of step 2) is as follows:
[0020] Step 2 - 1: Take r window sequences of length L of the joint torque deviation value as the training set, X = {x 1 , x 2 ,..., x k ,..., x r}, X is the training set, and x k is the k - th training sample, and the value range of k is from 1 to r;
[0021] Step 2 - 2: Extract the k - th training sample from the training set X, and record its original window feature as w k , input w k into the VAE model to be trained for encoding, and generate the original embedded feature of the k - th training sample, denoted as e k ;
[0022] Step 2 - 3: Input e k into the LSTM model to be trained for prediction, and obtain the predicted embedded feature of the (k + 1) - th training sample, denoted as
[0023] Step 2-4: Input the VAE model to be trained for decoding to obtain the reconstructed window features of the (k + 1)-th training sample, denoted as k+1 .
[0024] By combining the VAE model and the LSTM model, this method can effectively extract the local features of sample data and capture the correlations in long time series, forming a robust representation of the input data, thereby improving the accuracy of collision detection and the robustness of the system. Specifically, the VAE model is used to extract the local features of sample data, which can capture the dynamic changes within a short time window and form a robust representation of the input data, while the LSTM model further processes the features inferred by the VAE model to capture the correlations in long time series, so as to better identify abnormal situations. This combination can effectively leverage the advantages of both models and improve the overall performance of collision detection.
[0025] Furthermore, the specific process of step 3) is as follows:
[0026] Step 3-1: Define the loss function of the collision detection model to be trained as where α, β, γ, and δ are hyperparameters, is the reconstruction loss of VAE, is the KL divergence loss of VAE, is the embedding prediction error, is the torque prediction error, where w k-i is the original window feature of the (k - i)-th training sample, is the reconstructed window feature of the (k - i)-th training sample, q(z|w) is the deviation distribution for calculating torque, p(z) is the standard normal distribution for calculating torque, D KL (·) is the KL divergence function for calculating torque, is the predicted embedding feature of the k-th training sample, e k is the original embedding feature of the k-th training sample, is the reconstructed window feature of the k-th training sample, w k is the original window feature of the k-th training sample;
[0027] Step 3-2: Set the maximum number of iterations. According to the loss function, use the backpropagation algorithm to optimize the VAE model to be trained and the LSTM model to be trained iteratively until the set maximum number of iterations is reached, then stop the iterative process to obtain the trained VAE model and the trained LSTM model.
[0028] By defining a loss function and using the backpropagation algorithm to optimize the VAE model and the LSTM model, this method minimizes the model prediction error and improves the generalization ability and stability of the model. Specifically, this method comprehensively considers the reconstruction error of the VAE model, the KL divergence loss, and the prediction error of the LSTM model, and balances the influence of different loss terms by setting hyperparameters. This method can effectively optimize the model parameters, enabling it to better identify abnormal situations, thereby improving the accuracy of collision detection and the robustness of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a relationship diagram of the measured joint torque and the dynamic threshold when the robot of the present invention collides. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the accompanying drawings.
[0031] In this example, the robot collision detection method based on VAE-LSTM includes the following steps:
[0032] Step 1): Real-time collect the operation data of the joints during the movement of the robot and perform data preprocessing. The preprocessed operation data includes the measured torque, position, speed, and acceleration of the joints, and obtain the calculated torque and the joint torque deviation value of the joints based on the preprocessed operation data;
[0033] Step 2): Construct a collision detection model to be trained. The collision detection model to be trained includes a VAE model to be trained and an LSTM model to be trained. Set the length of the input time window of the joint torque to L, and take r window sequences of length L of the joint torque deviation value as the training set. Each time, extract one from the training set as the current training sample. Input the original window features of the current training sample into the VAE model to be trained for encoding to obtain the original embedded features of the current training sample. Input the original embedded features of the current training sample into the LSTM model to obtain the predicted embedded features of the next training sample. Input the predicted embedded features of the next training sample into the VAE model to be trained for decoding to obtain the reconstructed window features of the next training sample;
[0034] Step 3): Define the loss function of the collision detection model to be trained. Using the original window features of the current training sample, the original embedding features of the current training sample, the predicted embedding features of the next training sample, and the reconstructed window features of the next training sample, as well as calculating the values of the deviation distribution, standard normal distribution, and KL divergence function corresponding to the torque, update the VAE model to be trained and the LSTM model to be trained respectively through the backpropagation algorithm. After the training is completed, obtain the trained VAE model and the trained LSTM model, which are defined as the VAE-LSTM hybrid model;
[0035] Step 4): Use the subsequent obtained joint torque deviation values as detection samples to form a detection set. Input the S detection samples into the VAE-LSTM hybrid model to obtain the original window features of the detection set and the reconstructed window features of the detection set. Construct a scoring module, input the original window features of the detection set and the reconstructed window features of the detection set into the scoring module, and obtain the model prediction result score d of the detection sample t , where, is the reconstructed window feature of the s-th detection sample, w s is the original window feature of the s-th detection sample, 1 ≤ s ≤ S. Compare d t with a preset threshold. If d t exceeds the threshold, it is determined that a collision has occurred, and then a robot stop motion signal is output. Otherwise, it is determined that there is no collision and no operation is performed.
[0036] In this embodiment, the robot collision detection method based on VAE-LSTM does not require additional external sensors, and only uses the running time series data collected by the robot itself for training and detection, effectively reducing the system cost. The working principle of this method is: take the joint torque deviation value as sample data and input it into the VAE-LSTM hybrid model one by one. Utilize the encoding and decoding capabilities of the VAE model and the prediction ability of the LSTM model to predict the reconstructed window features of the next sample through the original window features of the current sample. Then, input the original window features and reconstructed window features of the sample data into the scoring module to obtain the model prediction result score of the sample data. Finally, judge whether the robot has collided by comparing the model prediction result score with the threshold. This method can learn the complex patterns of joint torque changes, use VAE to extract local features of torque changes, and use the LSTM model to capture the correlations in long time series, thereby improving the accuracy of collision detection and the robustness of the system.
[0037] Furthermore, the specific process of obtaining the calculated torque and joint torque deviation value of the joint in step 1) is as follows:
[0038] Step 1-1: Input the position, velocity, and acceleration data of the joint into the Newton-Euler recursive model for dynamic calculation to obtain the calculated torque of the joint, τ j = NewtonEuler(θ j , v j , α j ), where τ j is the calculated torque of joint j, θ j is the position of joint j, v j is the velocity of joint j, α j is the acceleration of joint j, and NewtonEuler(·) is the formula of the Newton-Euler recursive model;
[0039] Step 1-2: Input the velocity of the joint into the Coulomb viscous friction model to calculate the friction compensation value of the joint, F jf = sign(v j )·F c0 + B·v j , where F jf is the friction compensation value of joint j, sign(v j ) is the sign function of the velocity direction of joint j, F c0 is the Coulomb friction coefficient, B is the viscous friction coefficient, and v j is the velocity of joint j;
[0040] Step 1-3: Based on the calculated torque and friction compensation value of the joint, obtain the compensated calculated torque through the formula τ jc = τ j + F jf , where τ jc is the compensated calculated torque of joint j, τ j is the calculated torque of joint j, and F jf is the friction compensation value of joint j;
[0041] Step 1-4: Perform a difference operation on the compensated calculated torque and the measured torque of the joint to obtain the joint torque deviation value, △τ j = τ jm - τ jc , where △τ j is the joint torque deviation value of joint j, τ jm is the measured torque of joint j, and τ jc is the compensated calculated torque of joint j.
[0042] This method calculates the calculated torque of the joint through the Newton-Euler recursive model, and combines the Coulomb and viscous mixed friction models to compensate for the friction of the joint movement, so as to obtain a more accurate calculated torque, and ultimately improve the accuracy of the joint torque deviation value. This method uses the Newton-Euler equation directly based on Newton's second law, and recursively calculates the calculated torque of each joint to establish the dynamic model of the robot arm. It has the characteristics of high computational efficiency. At the same time, through the Coulomb and viscous mixed friction models, friction compensation is performed on the joint movement, which improves the accuracy of joint motion control, thereby enhancing the accuracy of collision detection.
[0043] Furthermore, the specific process of step 2) is as follows:
[0044] Step 2-1: Take r window sequences of length L for the joint torque deviation values as the training set, X = {x 1 ,x 2 ,...,x k ,...,x r}, X is the training set, x k is the kth training sample, and the value of k ranges from 1 to r;
[0045] Step 2-2: Extract the kth training sample from the training set X and record its original window feature as w k , w k Input the VAE model to be trained for encoding and generate the original embedding features of the kth training sample, denoted as e k ;
[0046] Step 2-3: Place e k Input the LSTM model to be trained for prediction and obtain the prediction embedding feature of the k+1th training sample, recorded as
[0047] Step 2-4: Input the VAE model to be trained for decoding, and obtain the reconstruction window features of the k+1th training sample, denoted as w k+1 .
[0048] By combining the VAE model and the LSTM model, this method can effectively extract the local features of sample data and capture the correlations in long time series, forming a robust representation of the input data, thereby improving the accuracy of collision detection and the robustness of the system. Specifically, the VAE model is used to extract the local features of sample data, which can capture the dynamic changes within a short time window and form a robust representation of the input data. The LSTM model then further processes the features inferred by the VAE model to capture the correlations in long time series, thus better identifying abnormal situations. This combination can effectively leverage the advantages of both models and improve the overall performance of collision detection.
[0049] Furthermore, the specific process of step 3) is as follows:
[0050] Step 3-1: Define the loss function of the collision detection model to be trained as where α, β, γ, and δ are hyperparameters, is the reconstruction loss of the VAE, is the KL divergence loss of the VAE, is the embedding prediction error, is the torque prediction error, where w k-i is the original window feature of the (k - i)-th training sample, is the reconstructed window feature of the (k - i)-th training sample, q(z|w) is the deviation distribution for calculating the torque, p(z) is the standard normal distribution for calculating the torque, and D KL (·) is the KL divergence function for calculating the torque, is the predicted embedding feature of the k-th training sample, and e k is the original embedding feature of the k-th training sample, is the reconstructed window feature of the k-th training sample, and w k is the original window feature of the k-th training sample;
[0051] Step 3-2: Set the maximum number of iterations. According to the loss function, use the backpropagation algorithm to iteratively optimize the VAE model to be trained and the LSTM model to be trained until the set maximum number of iterations is reached, then stop the iteration process to obtain the trained VAE model and the trained LSTM model.
[0052] This method defines a loss function and uses the backpropagation algorithm to optimize the VAE model and the LSTM model, minimizing the model prediction error to the greatest extent and improving the generalization ability and stability of the model. Specifically, this method comprehensively considers the reconstruction error of the VAE model, the KL divergence loss, and the prediction error of the LSTM model, and balances the influence of different loss terms by setting hyperparameters. This method can effectively optimize the model parameters, enabling it to better identify abnormal situations, thereby improving the accuracy of collision detection and the robustness of the system.
[0053] As Figure 1 shown, where the ordinate represents the joint torque deviation value, the abscissa represents the timestamp, and t1, t2, t3, t4, t5, t6, and t7 are 7 time points with large fluctuations. The dotted line below the time points marks the actual collision of the robot, and the bar blocks below the time points mark the collision detected by the VAE-LSTM hybrid model. As Figure 1 can be seen, the VAE-LSTM hybrid model detected that the robot collided only at three time points, t2, t5, and t6, which is consistent with the actual collision time points of the robot, indicating that the VAE-LSTM hybrid model has high accuracy and robustness in detecting collision events.
[0054] When a collision occurs to the robot, the threshold of the VAE-LSTM hybrid model is set to 500. When the model prediction score exceeds this threshold, it is judged as a collision; otherwise, it is judged as no collision.
[0055] The following shows the detection results of the VAE-LSTM hybrid model in identifying robot collision situations through Table 1:
[0056] Table 1
[0057] Time window Timestamp Model prediction score Detect collision Actual collision t1 2404 162 No No t2 3398 2458 Yes Yes t3 3726 330 No No t4 8194 199 No No t5 9612 689 Yes Yes t6 10224 576 Yes Yes t7 11342 260 No No
[0058] According to the data in Table 1, the VAE-LSTM hybrid model only had prediction scores exceeding 500 in the time windows t2, t5, and t6 and successfully predicted the collision events in these three time windows, while the prediction scores in other time windows were all lower than the threshold, indicating that the VAE-LSTM hybrid model correctly identified the situations where no collision occurred. In addition, the VAE-LSTM hybrid model did not misidentify joint deflection as a collision, avoiding false alarms, which shows that the VAE-LSTM hybrid model has high accuracy and robustness in detecting collision events.
[0059] The following shows the collision detection performance of the VAE-LSTM hybrid model in different scenarios through Table 2:
[0060] Table 2
[0061] Test scenario <![CDATA[F 1 value]]> Accuracy Recall False positive rate Normal operation scenario 0.918 0.918 0.918 0.918 Minor collision scenario 0.923 0.923 0.923 0.923 Complex collision scenario 0.845 0.960 0.899 0.117 Vibration and noise interference 0.872 0.955 0.912 0.093 Overall average 0.8605 0.938 0.863 0.067
[0062] As shown in Table 2, the VAE-LSTM model performs excellently in normal operation scenarios and minor collision scenarios. The F 1 value, accuracy, and recall rate are all close to 0.92, indicating that the model can effectively identify collision events in these scenarios, and the false alarm rate is also low. In complex collision scenarios and vibration noise interference scenarios, the performance of the model slightly decreases, but the F 1 value still exceeds 0.8, indicating that the model has a certain degree of adaptability and robustness. The overall performance of the model is good, which proves that the VAE-LSTM model can effectively detect robot collision events in operation environments with different levels of complexity.
[0063] Although the present disclosure is disclosed as above, the scope of protection of the present disclosure is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present disclosure, and these changes and modifications will all fall within the protection scope of the present invention.
Claims
1. A robot collision detection method based on VAE-LSTM, characterized in that: The steps include: Step 1): collect the operation data of the joints during the robot movement in real time and perform data preprocessing. The preprocessed operation data includes the measured torque, position, speed and acceleration of the joints. The calculated torque of the joints and the joint torque deviation value are obtained based on the preprocessed operation data. Step 2): construct a collision detection model to be trained, the collision detection model to be trained includes a VAE model to be trained and an LSTM model to be trained, set the length of the joint torque input time window to be L, take r window sequences of length L for the joint torque deviation value as a training set, extract one from the training set each time as the current training sample, input the original window feature of the current training sample into the VAE model to be trained for encoding to obtain the original embedded feature of the current training sample, input the original embedded feature of the current training sample into the LSTM model to be trained to obtain the predicted embedded feature of the next training sample, input the predicted embedded feature of the next training sample into the VAE model to be trained for decoding to obtain the reconstructed window feature of the next training sample; Step 3): Define the loss function of the collision detection model to be trained, use the original window features of the current training sample, the original embedded features of the current training sample, the predicted embedded features of the next training sample, and the reconstructed window features of the next training sample, as well as the deviation distribution, standard normal distribution, and KL divergence function values corresponding to the calculated moment, and update the VAE model to be trained and the LSTM model to be trained respectively through the back propagation algorithm. After the training is completed, the trained VAE model and the trained LSTM model are obtained, which are defined as a VAE-LSTM hybrid model; Step 4): The joint torque deviation values obtained subsequently are used as detection samples to form a detection set. The detection samples S are input into the VAE-LSTM hybrid model to obtain the original window features of the detection set and the reconstructed window features of the detection set. A scoring module is constructed. The original window features of the detection set and the reconstructed window features of the detection set are input into the scoring module to obtain the model prediction result score d of the detection sample. t , in, is the reconstruction window feature of the sth detection sample, w s is the original window feature of the sth detection sample, 1≤s≤S, and d t Compare with the preset threshold. If d t If the threshold is exceeded, a collision is determined to have occurred, and a signal for the robot to stop moving is output; otherwise, no collision is determined and no operation is performed.
2. The robot collision detection method based on VAE-LSTM according to claim 1 is characterized in that The specific process of obtaining the calculated moment of the joint and the joint moment deviation value in step 1) is as follows: Step 1-1: Input the position, velocity and acceleration data of the joint into the Newton-Euler recursion model for dynamic calculation to obtain the calculated torque of the joint, τ j =NewtonEuler(θ j ,v j ,α j ), where τ j is the calculated torque of joint j, θ j is the position of joint j, v j is the velocity of joint j, α j is the acceleration of joint j, NewtonEuler(·) is the Newton-Euler recursive model formula; Step 1-2: Input the joint velocity into the Coulomb viscous friction model and calculate the friction compensation value of the joint, F jf =sign(v j )·F c0 +B·v j , where F jf is the friction compensation value of joint j, sign(v j ) is the sign function of the velocity direction of joint j, F c0 is the Coulomb friction coefficient, B is the viscous friction coefficient, v j is the velocity of joint j; Step 1-3: Based on the calculated torque and friction compensation value of the joint, the formula τ jc =τ j +F jf The calculated torque after compensation is obtained, where τ jc is the calculated torque after compensation of joint j, τ j is the calculated torque of joint j, F jf is the friction compensation value of joint j; Step 1-4: Perform difference processing on the calculated torque after compensation and the measured torque of the joint to obtain the joint torque deviation value, △τ j =τ jm -τ jc , where △τ j is the joint torque deviation value of joint j, τ jm is the measured torque of joint j, τ jc is the calculated torque of joint j after compensation.
3. The robot collision detection method based on VAE-LSTM according to claim 1 is characterized in that The specific process of step 2) is as follows: Step 2-1: Take r window sequences of length L for the joint torque deviation values as the training set, X = {x1, x2, ..., x k ,...,x r }, X is the training set, x k is the kth training sample, and the value of k ranges from 1 to r; Step 2-2: Extract the kth training sample from the training set X and record its original window feature as w k , w k Input the VAE model to be trained for encoding and generate the original embedding features of the kth training sample, denoted as e k ; Step 2-3: Place e k Input the LSTM model to be trained for prediction and obtain the prediction embedding feature of the k+1th training sample, recorded as Step 2-4: Input the VAE model to be trained for decoding, and obtain the reconstruction window features of the k+1th training sample, denoted as w k+1 .
4. The robot collision detection method based on VAE-LSTM according to claim 1 is characterized in that The specific process of step 3) is as follows: Step 3-1: Define the loss function of the collision detection model to be trained as Among them, α, β, γ and δ are hyperparameters. is the reconstruction loss of VAE, is the KL divergence loss of VAE, is the embedding prediction error, is the torque prediction error, Among them, w k-i is the original window feature of the kith training sample, is the reconstruction window feature of the ki-th training sample, q(z|w) is the deviation distribution of the calculated moment, p(z) is the standard normal distribution of the calculated moment, D KL (·) is the KL divergence function for calculating the moment, The predicted embedding feature of the kth training sample, e k is the original embedding feature of the kth training sample, is the reconstruction window feature of the kth training sample, w k is the original window feature of the kth training sample; Step 3-2: Set the maximum number of iterations, and use the back propagation algorithm to iteratively optimize the VAE model to be trained and the LSTM model to be trained according to the loss function until the maximum number of iterations is reached. Stop the iteration process and obtain the trained VAE model and the trained LSTM model.
Citation Information
Patent Citations
Industrial robot collision detection method
CN104985598A
Robot collision detection method and device, computer equipment and storage medium
CN114603599A
Robot collision detection method, device, equipment and medium
CN116330280A
Collaborative robot collision detection method of support vector machine based on supervised learning
CN116330344A
Method and device for establishing robot flexible collision detection model
CN116968020A