Robot collision detection method and system based on dynamic model residual compensation considering frequency distribution differences
By decoupling joint torques through the Newton-Euler method and constructing a high-frequency separation adaptive filtering framework, the XGBoost algorithm is used to train high- and low-frequency residual prediction models. This solves the problem of low collision detection accuracy caused by inaccurate dynamic models, achieves higher detection accuracy and reliability, and is suitable for automated production lines and medical robots.
Patent Information
- Application Number
- CN202411894019.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-20
AI Technical Summary
In existing robot collision detection methods, the inaccurate dynamic model leads to low accuracy in estimating joint external torques, the friction model is difficult to fit friction force mutations, the direct filtering method affects the accuracy of external torque estimation, and the influence of measurement noise is ignored, resulting in insufficient collision detection accuracy and reliability.
The joint torque is decoupled through the Newton-Euler method, a high-frequency separation adaptive filtering framework is constructed, and the high- and low-frequency residual prediction models are trained using the XGBoost algorithm. The momentum observer is feedforward compensated to reduce the dynamic model error and the influence of friction, thereby improving the collision detection accuracy.
It significantly improves the accuracy and reliability of robot collision detection, reduces false alarm rates, and improves the safety and stability of robots in complex tasks. It is suitable for automated production lines and medical robotics.
Smart Images

Figure CN119704187B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robot collision detection, and in particular relates to a robot collision detection method and system with dynamic model residual compensation considering frequency distribution differences. Background Art
[0002] In recent years, collaborative robots, with their flexibility and efficiency, have played a vital role in fields such as manufacturing, logistics, and healthcare. Human-robot collaboration can significantly improve the efficiency and accuracy of tasks. To ensure the safety of humans and robots performing tasks together in the same space, robots must possess collision detection capabilities. Currently, collision detection methods based on robot dynamic models are widely used because they only require information from the robot's own sensors. Among these methods, the momentum observer-based robot collision detection method is the most classic and widely used. It directly estimates the external torques on the robot's joints using momentum, avoiding the need for acceleration signals and inverting the inertia matrix. However, the accuracy of its external torque observation depends on the accuracy of the robot's dynamic model. Inaccurate dynamic models and dynamic parameters can severely impact the accuracy of robot collision detection. Therefore, achieving high-precision external torque estimation in the presence of inaccurate modeling is a key research trend in improving robot collision detection accuracy.
[0003] Through the above analysis, the problems and defects of the existing technology are as follows:
[0004] (1) It is difficult to obtain a perfect robot dynamic model and dynamic parameters only through mechanism modeling. The momentum observer constructed based on inaccurate dynamic model and parameters will inevitably contain dynamic model residuals in the estimated joint external torque, which will affect the accuracy of collision detection.
[0005] (2) The existing robot joint friction force model is difficult to fit the sudden change of friction force caused by joint reversal, which will seriously affect the external torque estimation accuracy of the momentum observer.
[0006] (3) There is a growing body of research on residual prediction and compensation for robot dynamics models. However, current research on residual prediction and compensation focuses on directly using machine learning or deep learning to predict and compensate the collected residuals, while ignoring the impact of measurement noise. Direct filtering can lead to distortion of the friction force commutation error, which seriously affects the compensation effect.
[0007] The defects and difficulties in solving the above problems are:
[0008] Dynamic model residuals cannot be analytically derived; their sources are complex and difficult to accurately describe using traditional modeling methods. These residuals not only include errors due to unmodeled dynamic effects but are also affected by factors such as friction nonlinearity and measurement noise. Therefore, the challenge in solving this problem lies in developing an algorithm that can effectively predict and compensate for dynamic model residuals based on the diverse characteristics of these residuals, thereby improving the reliability and sensitivity of collision detection.
[0009] The significance of solving the above problems and defects is:
[0010] By developing an algorithm that can effectively predict and compensate for dynamic model residuals, a new solution can be developed to improve the accuracy and reliability of robot collision detection. Effectively addressing this issue not only enhances the safety and stability of robots in complex tasks but also promotes more advanced dynamic model residual compensation methods within robot control systems. Furthermore, this method can be applied to other areas such as robot friction compensation and external force detection. Summary of the Invention
[0011] In view of the problems existing in the prior art, the present invention provides a robot collision detection method for dynamic model residual compensation taking into account frequency distribution differences.
[0012] The present invention is implemented as follows: a dynamic model residual compensation robot collision detection method considering frequency distribution differences includes:
[0013] S1. Decouple the theoretical torque of the robot joints based on the Newton-Euler method and its variants to obtain the robot's momentum, Coriolis force, centrifugal force, and gravity components;
[0014] S2. Solve the external torque expression output by the momentum observer through Laplace forward and inverse transform, and express the residual expression of the joint external torque accordingly;
[0015] S3. Design a feature vector based on the residual expression; extract the relevant sub-expressions of each component in the residual expression as dynamic features, and preliminarily form a feature vector with the kinematic features of the robot;
[0016] S4, building a high-frequency separation adaptive filtering training framework;
[0017] According to the differences in frequency distribution of different components of the residual signal, the residual signal is split into high-frequency and low-frequency signals through a low-pass filter and predicted separately;
[0018] For the training of high-frequency residual prediction models, the commutation features of robot joint friction are constructed, and an adaptive filtering framework is built based on them;
[0019] S5, collect training data through random trajectories, introduce time series information into the training data through a sliding window to perform data enhancement processing, and input the residual signal into the high-frequency separation adaptive filtering framework to obtain the output target value of the model training; then use XGB oos t algorithm is trained to obtain high-frequency and low-frequency residual prediction models respectively;
[0020] S6. The prediction result of the trained residual prediction model is input into the momentum observer in a feedforward form to obtain the compensated joint external torque signal, and then collision detection is performed based on the set threshold.
[0021] Furthermore, in step S1, the expression of the theoretical joint torque of the robot can be obtained based on the Newton-Euler algorithm and its variants:
[0022]
[0023] Among them, τ i represents the theoretical torque of the robot's i-th joint; Represents the angle, velocity and acceleration of the robot's ith joint respectively; NE α (·) represents the standard Newton-Euler algorithm; MNE α (·) represents a variant of the Newton-Euler algorithm, which splits the joint velocity into two different inputs to obtain additional degrees of freedom, so that the output matrix can automatically satisfy the skew symmetry property; α∈{g0,0} indicates whether the effect of gravity is considered in the Newton-Euler algorithm;
[0024] As a further preferred method, the theoretical torque can be decoupled based on the Newton-Euler algorithm and its variants to obtain the input items of the subsequent momentum observer, which include the momentum of the robot, the Coriolis force and the centrifugal force, and the gravity component, which can be calculated by the following formula:
[0025]
[0026] Among them, β is a dynamic variable defined for the sake of simplicity, g(q) represents the gravity vector of the robot, is the transpose of the robot's Coriolis force and centrifugal force matrix, M(q) represents the robot's inertia matrix, and p is the robot's generalized momentum; the vector e n =(0 … 0 1 0 … 0) T , the nth element is 1 and the rest are 0.
[0027] Furthermore, the step S2 specifically includes:
[0028] First, determine the expression of the momentum observer as follows:
[0029] r(t)=K0[p(t)-∫(τ m -τ f +r+β)dt]
[0030] Where r(t) represents the external torque of the joint output by the momentum observer at time t, K0 represents the diagonal gain matrix of the momentum observer, τ m represents the motor driving torque, τ f is the calculated friction force;
[0031] Taking into account factors such as dynamic modeling error, friction error, and sensor measurement error, it is impossible to obtain a completely accurate external torque monitoring signal. Incorporating these error factors into the derivation process, the calculation formula in actual conditions can be expressed as follows:
[0032]
[0033] in, Indicates that the variable is an estimated version based on kinetic model calculation or actual reading;
[0034] By solving the above differential equations through Laplace forward and inverse transform, we can obtain the expression of the momentum observer output external torque as follows:
[0035]
[0036] In the two formulas, * represents the convolution operation; then the residual of the external torque monitoring value can be defined as follows:
[0037]
[0038] The variables in the above formula are defined as follows:
[0039]
[0040] Furthermore, the step S3 specifically includes:
[0041] According to the defined residual expression, the expressions related to the robot friction modeling error and the dynamic modeling error can be extracted as follows:
[0042]
[0043] Among them, h fe (t) represents the portion of the residual that comes from friction modeling error, Respectively Part related to friction modeling; h e (t) represents the part of the residual that comes from the dynamic modeling error, and h e(t) can be further decomposed into the error components related to momentum, Coriolis force, centrifugal force, and gravity, which can be expressed as follows:
[0044]
[0045] From the above formula, we can see that the residual r e Depend on and {h p , h g , h C , h f}decision; among which, It can be calculated by the dynamic model and the friction model; therefore, it can be used as the feature vector input of the subsequent XGBoost, and {h p , h g , h C , h f} is fitted through XGBoost training; on the basis of the dynamic features, the kinematic features of the robot are added, and the feature vector of the dynamic residual prediction model can be preliminarily extracted into the following form:
[0046]
[0047] Furthermore, the step S4 specifically includes:
[0048] According to the difference in frequency distribution of different components of the residual signal, the residual signal can be split into high-frequency signal and low-frequency signal through a low-pass filter, which can be expressed as follows:
[0049]
[0050] r high =r e -r low
[0051] Wherein, LPF represents low-pass filter; r low Represents the low-frequency residual signal. The dynamic model error (such as momentum and gravity error) is concentrated in the low-frequency signal; r high Represents high-frequency residual signals. Measurement noise and friction commutation errors are concentrated in high-frequency signals. Its essence is to further decouple the residual from the perspective of frequency.
[0052] The adaptive filtering framework specifically includes:
[0053] First, the commutation characteristics of the robot joint friction force are constructed as follows:
[0054]
[0055] Among them, k represents the kth moment, ns represents the length of the friction mutation gap window, n a Indicates the speed reverse look-ahead window length;
[0056] According to the commutation characteristics, the high-frequency residual signal can be adaptively filtered to reduce the measurement noise contained therein while retaining the friction commutation error, thereby increasing the fitting accuracy of the model; it can be expressed as follows:
[0057]
[0058] Among them, r df (k) is the high-frequency residual signal after adaptive filtering at the kth moment, r filter (k) is the high-frequency residual signal after low-pass filtering;
[0059] According to the differential characteristics of the frequency distribution of different components of the residual signal and the constructed friction commutation features, the extracted feature vector can be further extracted into the feature vector corresponding to the high-frequency residual and the feature vector corresponding to the low-frequency residual, which are specifically in the following form:
[0060]
[0061] Among them, feature low Represents low-frequency feature vectors, including the kinematic characteristics of the robot and related features of the dynamic model; feature high Represents high-frequency feature vectors, including the robot's kinematic characteristics, friction error terms, and friction commutation characteristics.
[0062] Furthermore, the step S5 specifically includes:
[0063] First, let the robot run 20 randomly generated trajectories to collect the robot's angle, velocity, and acceleration data. The acceleration signal is low-pass filtered to filter out the measurement noise it contains. The collected data is used according to steps S3 and S4 to obtain the input and output data sets for model training, which can be shown as follows:
[0064]
[0065] Among them, X low,i represents the low-frequency feature dataset of the robot’s i-th joint, Y low,i represents the low-frequency residual target value of the robot's i-th joint; X high,i It represents the high-frequency feature dataset of the i-th joint, Y high,i represents the high-frequency residual target value of the robot's i-th joint; n represents the data collected at n moments in total;
[0066] The main idea of the data enhancement method based on sliding windows is to define a sliding window of length L, which contains the time series feature data of the period [t-L+1, t], and use the time series feature data of the sliding window as the feature data of the current moment as the model input to achieve the effect of data enhancement. It is worth noting that if there is no data before time t, the missing data will be filled with 0. At the same time, the length of the window L can be selected according to different processing situations, so as to flexibly adjust the length of the retained historical time series information according to the actual situation. The feature data set at time t can be expressed as follows:
[0067]
[0068] X low,i (t) represents the low-frequency feature dataset of the robot’s i-th joint at the t-th moment, X high,i (t) represents the high-frequency feature dataset of the robot's i-th joint at time t; further, the overall feature dataset of the i-th joint can be rewritten as follows:
[0069]
[0070] Another object of the present invention is to provide a robot collision detection system with dynamic model residual compensation considering frequency distribution differences, comprising:
[0071] An acquisition module is used to decouple the theoretical torque of the robot joints based on the Newton-Euler method and its variants to obtain the robot's momentum, Coriolis force, centrifugal force, and gravity components;
[0072] A solution module is used to solve the external torque expression output by the momentum observer through Laplace forward and inverse transform, and to express the residual expression of the joint external torque accordingly;
[0073] The extraction module is used to design the feature vector based on the residual expression; the relevant sub-expressions of each component in the residual expression are extracted as dynamic features, and the feature vector is preliminarily formed with the kinematic features of the robot;
[0074] A construction module is used to build a high-frequency separation adaptive filtering training framework. Based on the differences in the frequency distribution of different components of the residual signal, the residual signal is split into high-frequency and low-frequency signals through a low-pass filter for prediction. For the training of the high-frequency residual prediction model, the commutation characteristics of the robot joint friction force are constructed, and the adaptive filtering framework is constructed based on this.
[0075] The acquisition module is used to collect training data through random trajectories, introduce time series information into the training data through a sliding window to perform data enhancement processing, and input the residual signal into the high-frequency separation adaptive filtering framework to obtain the output target value of the model training; then the XGBoost algorithm is used for training to obtain high-frequency and low-frequency residual prediction models respectively;
[0076] The collision detection module is used to input the prediction results of the trained residual prediction model into the momentum observer in a feedforward form to obtain the compensated joint external torque signal, and then perform collision detection based on the set threshold.
[0077] Another object of the present invention is to provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the robot collision detection method with residual compensation of the dynamic model considering frequency distribution differences.
[0078] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the robot collision detection method with dynamic model residual compensation considering frequency distribution differences.
[0079] Another object of the present invention is to provide an information data processing terminal, which is used to implement the dynamic model residual compensation robot collision detection system that considers frequency distribution differences.
[0080] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0081] First, this paper proposes a robot collision detection method that compensates for dynamic model residuals by considering frequency distribution differences. The main concept is to design feature vectors based on the constructed residual expression, and then establish a residual prediction model through XGBoost training to predict the dynamic residuals contained in the momentum observer monitoring signal. During the model training process, an adaptive filtering training framework with high-frequency separation is proposed based on the frequency distribution of the residual signal to further improve the model's predictive capabilities. Finally, the predicted dynamic model residuals are feedforward compensated to the momentum observer, thereby improving the momentum observer's collision detection accuracy.
[0082] 1. This application proposes a dynamic model residual compensation method for a momentum observer. By predicting the dynamic model residual through machine learning and feeding it into the momentum observer, it can effectively reduce the impact of model error and dynamic parameter error and improve the robot collision detection accuracy.
[0083] 2. This application decouples the theoretical torque using the Newton-Euler method and its variants. Simultaneously, the residual expression contained in the momentum observer output signal is solved using the forward and inverse Laplace transform. This allows the extraction of eigenvectors related to the dynamic and friction models. This constructs more representative eigenvectors as model input to improve the model's predictive capabilities.
[0084] 3. This application decouples the residual signal from a frequency perspective by considering the differences in the frequency distribution of the different components of the residual signal. Furthermore, to address the influence of noise contained in high-frequency signals, an adaptive filtering framework is established by constructing friction commutation features to reduce the impact of friction on model accuracy during the low-speed commutation phase, thereby improving the prediction accuracy of friction mutation errors.
[0085] Second, as auxiliary evidence for the inventiveness of the claims of the present invention, it is also reflected in the following important aspects:
[0086] (1) The expected benefits and commercial value of the technical solution of the present invention after transformation are:
[0087] By combining machine learning methods with momentum observers, this invention has significant commercial value in the field of robot collision detection. This technology not only significantly improves robot safety but also reduces reliance on external sensors in practical applications, lowering hardware costs. Furthermore, the solution's high-precision detection capabilities can be applied across multiple industries, particularly in automated production lines, service robots, and medical robotics, generating higher economic returns for businesses. Furthermore, by reducing false positives and missed detections, this invention can improve production line efficiency and stability, creating further benefits for businesses.
[0088] (2) The technical solution of the present invention fills the technical gap in the industry at home and abroad:
[0089] Currently, in the field of robot collision detection both domestically and internationally, conventional momentum observer methods are limited by the accuracy of the dynamic model, resulting in detection accuracy that is difficult to meet the needs of practical applications. This invention innovatively solves this problem by using machine learning technology to successfully predict and compensate for the dynamic model residuals by considering the differences in the frequency distribution of the dynamic model residuals. Regarding the treatment of friction mutation errors, traditional models are unable to effectively address the effects of nonlinear friction during the low-speed commutation phase. This invention fills this technological gap through a high-frequency adaptive filtering training framework. This technology has demonstrated excellent adaptability and application potential in practical robotic applications.
[0090] Third, the present invention addresses the shortcomings of existing methods in robot collision detection technology and solves technical problems such as the fact that collision detection accuracy is limited by the accuracy of the dynamic model, friction modeling errors are difficult to predict, and measurement noise has an adverse effect on model training. In traditional methods, due to the uncertainty of the dynamic model, the monitoring signal will contain a large amount of external torque residuals, which will affect the accuracy of collision detection, and the compensation for friction modeling errors has certain limitations, resulting in a high false alarm rate. The present invention constructs a method for compensating for external torque residuals that takes frequency distribution into consideration, fully utilizes the frequency distribution information of external torque residuals, separates the residual signal, and enhances the prediction accuracy of the model, thereby further improving the accuracy of collision detection and effectively improving the stability of detection.
[0091] The technological advancement of the present invention in industrial applications also lies in the use of the XGBoost algorithm combined with the designed high- and low-frequency adaptive filtering training framework for residual prediction, which overcomes the problem of insufficient extraction of input and output mapping relationships in traditional methods. By using the XGBoost algorithm to independently model and predict the separated high-frequency and low-frequency residual signals, it can not only enhance the model's prediction accuracy for friction modeling errors, but also reduce the adverse effects of measurement noise on prediction accuracy. This high-frequency separated adaptive filtering training framework can more accurately predict the changes in the robot's external torque residuals during normal motion, providing an effective solution for robot collision detection in complex industrial scenarios.
[0092] In addition, the present invention has achieved significant improvements in detection accuracy and response time. Since traditional collision detection schemes are mostly limited by the accuracy of the dynamic model, it is difficult to achieve high-precision detection under the uncertainty factors of the dynamic model, and therefore their application in industrial automation is limited. Through frequency separation and residual compensation, the present invention not only achieves effective processing of complex external torque residuals, but also achieves high-precision prediction of friction modeling errors in a high-frequency adaptive filtering training framework, greatly improving the sensitivity and response speed of the detection system. This technological advancement has significantly improved the safety and reliability of robots in industrial operations.
[0093] Finally, the present invention innovatively introduces a residual compensation feedforward model for the momentum observer. This model predicts high- and low-frequency residual signals separately and feeds them forward into the momentum observer. This method dynamically compensates for the robot's external torque residuals in real time, significantly reducing false positives and false negatives, and providing a more intelligent and accurate collision detection method for complex working conditions in industrial robot applications. Compared with existing technologies, this invention provides a more intelligent and efficient solution, significantly improving the application value and adaptability of robots in industrial operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1This is a flow chart of a robot collision detection method using dynamic model residual compensation taking into account frequency distribution differences, provided by an embodiment of the present invention;
[0095] Figure 2 Schematic diagram of a high-frequency separation adaptive filtering training framework provided by an embodiment of the present invention;
[0096] Figure 3 is a schematic diagram of a collision detection process including a residual compensation module provided by an embodiment of the present invention;
[0097] Figure 4 2. It is a schematic diagram showing the effect of performing dynamic residual compensation on the external torque signal of the robot joint provided by an embodiment of the present invention;
[0098] Figure 5 2 is a schematic diagram of a robot hard collision detection experiment provided by an embodiment of the present invention;
[0099] Figure 6 Schematic diagram of a robot soft collision detection experiment (balloon experiment) provided by an embodiment of the present invention, wherein (a) is the estimated external torque value of joint 2 before compensation, (b) is the estimated external torque value of joint 2 after compensation, (c) is the terminal Z-axis force before compensation, and (d) is the terminal Z-axis force after compensation;
[0100] Figure 7 is a schematic diagram of a balloon experiment platform provided by an embodiment of the present invention;
[0101] Figure 8 This is a structural block diagram of a robot collision detection system with residual compensation of a dynamic model taking into account frequency distribution differences, provided by an embodiment of the present invention.
[0102] Figure 9 This is a diagram showing the effect of the friction force commutation characteristics and the adaptive filtering method provided by an example of the present invention;
[0103] Figure 10 Schematic diagram of a data enhancement method based on a sliding window provided by an example of the present invention;
[0104] Figure 7 Chinese: 1. Robot body; 2. Six-dimensional force sensor; 3. Balloon. DETAILED DESCRIPTION
[0105] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0106] like Figure 1As shown, an embodiment of the present invention provides a dynamic model residual compensation robot collision detection method considering frequency distribution differences, comprising the following steps:
[0107] S1. Decouple the theoretical torque of the robot joints based on the Newton-Euler method and its variants to obtain the robot's momentum, Coriolis force, centrifugal force, and gravity components;
[0108] S2. Solve the external torque expression output by the momentum observer through Laplace forward and inverse transform, and express the residual expression of the joint external torque accordingly;
[0109] S3. Design a feature vector based on the residual expression; extract the relevant sub-expressions of each component in the residual expression as dynamic features, and preliminarily form a feature vector with the kinematic features of the robot;
[0110] S4, building a high-frequency separation adaptive filtering training framework;
[0111] According to the differences in frequency distribution of different components of the residual signal, the residual signal is split into high-frequency and low-frequency signals through a low-pass filter and predicted separately;
[0112] For the training of high-frequency residual prediction models, the commutation features of robot joint friction are constructed, and an adaptive filtering framework is built based on them;
[0113] S5. Training data is collected through random trajectories. Time series information is introduced into the training data through a sliding window to perform data enhancement processing. At the same time, the residual signal is input into the high-frequency separation adaptive filtering framework to obtain the output target value of the model training. The XGBoost algorithm is then used for training to obtain high-frequency and low-frequency residual prediction models respectively.
[0114] S6. The prediction result of the trained residual prediction model is input into the momentum observer in a feedforward form to obtain the compensated joint external torque signal, and then collision detection is performed based on the set threshold.
[0115] This paper proposes a robot collision detection method based on frequency distribution difference-based dynamic model residual compensation. This method primarily improves collision detection accuracy by performing frequency-division prediction and compensation on the residual signals of the robot's joint torques. First, in step S1, the robot's joint torques are decoupled using the Newton-Euler method and its variants to obtain dynamic information such as the robot's momentum, Coriolis force, centrifugal force, and gravity components. These dynamic components provide basic data on the robot's motion state, facilitating subsequent residual calculation and the construction of a compensation model.
[0116] Next, in step S2, the external torque expression output by the momentum observer is solved using the Laplace forward and inverse transforms, and based on this, a residual expression for the joint external torque is constructed. This step quantifies the difference between the robot's actual external torque and the ideal dynamic model into a residual expression, providing an actionable target quantity for subsequent frequency separation compensation. The design of the residual expression is the core of the collision detection model, helping to extract information about the difference between the robot's actual force and the theoretical torque.
[0117] In step S3, a eigenvector is designed based on the residual expression. This is achieved by decomposing the components of the residual expression and extracting subexpressions related to the robot's dynamic and kinematic characteristics to form a preliminary eigenvector. The design of this eigenvector takes into account both the actual motion of the robot's joints and the different components of the torque residual. This allows subsequent frequency separation to more accurately match high- and low-frequency components, thereby enhancing the model's prediction performance.
[0118] In step S4, a high-frequency separation adaptive filtering training framework is constructed. Based on the differences in frequency distribution, the residual signal is decomposed into high-frequency and low-frequency signals through a low-pass filter for separate prediction. This separation of high and low frequencies effectively mitigates interference in the residual signal caused by frequency inconsistencies. Furthermore, an adaptive filtering framework is constructed to adapt to the friction characteristics of the high-frequency residual. This framework adapts to the changing characteristics of friction during commutation and ensures accurate prediction of the high-frequency signal.
[0119] In step S5, training data is collected through random trajectories and the data is introduced into the time series information through a sliding window to enhance the timeliness and robustness of the data. The residual signal is input into the high-frequency separation adaptive filtering framework and the target training output is obtained after data preprocessing. oos The t algorithm trains high-frequency and low-frequency residual prediction models respectively, XGB oos The t model can handle the nonlinear characteristics in the residual signal and improve the prediction accuracy of high- and low-frequency residuals.
[0120] Finally, in step S6, the trained high- and low-frequency residual prediction models are fed forward into the momentum observer to generate compensated joint external torque signals. This compensated signal more accurately reflects the robot's actual external torque based on the ideal dynamics model. Ultimately, collision detection is performed using the set collision detection threshold, effectively improving detection accuracy and real-time performance.
[0121] In step S1 provided in the embodiment of the present invention, the expression of the theoretical joint torque of the robot can be obtained based on the Newton-Euler algorithm and its variants:
[0122]
[0123] Among them, τ i represents the theoretical torque of the robot's i-th joint; Represents the angle, velocity and acceleration of the robot's ith joint respectively; NE α (·) represents the standard Newton-Euler algorithm; MNE α (·) represents a variant of the Newton-Euler algorithm, which splits the joint velocity into two different inputs to obtain additional degrees of freedom, so that the output matrix can automatically satisfy the skew symmetry property; α∈{g0,0} indicates whether the effect of gravity is considered in the Newton-Euler algorithm;
[0124] As a further preferred method, the theoretical torque can be decoupled based on the Newton-Euler algorithm and its variants to obtain the input items of the subsequent momentum observer, which include the momentum of the robot, the Coriolis force and the centrifugal force, and the gravity component, which can be calculated by the following formula:
[0125]
[0126] Among them, β is a dynamic variable defined for the sake of simplicity, g(q) represents the gravity vector of the robot, is the transpose of the robot's Coriolis force and centrifugal force matrix, M(q) represents the robot's inertia matrix, and p is the robot's generalized momentum; the vector e n =(0…0 10…0) T , the nth element is 1 and the rest are 0.
[0127] Step S2 provided in this embodiment of the present invention specifically includes:
[0128] First, determine the expression of the momentum observer as follows:
[0129] r(t)=K0[p(t)-∫(τ m -τ f +r+β)dt]
[0130] Where r(t) represents the external torque of the joint output by the momentum observer at time t, K0 represents the diagonal gain matrix of the momentum observer, τ m represents the motor driving torque, τ f is the calculated friction force;
[0131] Taking into account factors such as dynamic modeling error, friction error, and sensor measurement error, it is impossible to obtain a completely accurate external torque monitoring signal. Incorporating these error factors into the derivation process, the calculation formula in actual conditions can be expressed as follows:
[0132]
[0133] in, Indicates that the variable is an estimated version based on kinetic model calculation or actual reading;
[0134] By solving the above differential equations through Laplace forward and inverse transform, we can obtain the expression of the momentum observer output external torque as follows:
[0135]
[0136] In the two formulas, * represents the convolution operation; then the residual of the external torque monitoring value can be defined as follows:
[0137]
[0138] The variables in the above formula are defined as follows:
[0139]
[0140] Step S3 provided in this embodiment of the present invention specifically includes:
[0141] According to the defined residual expression, the expressions related to the robot friction modeling error and the dynamic modeling error can be extracted as follows:
[0142]
[0143] Among them, h fe (t) represents the portion of the residual that comes from friction modeling error, Respectively Part related to friction modeling; h e (t) represents the part of the residual that comes from the dynamic modeling error, and h e (t) can be further decomposed into the error components related to momentum, Coriolis force, centrifugal force, and gravity, which can be expressed as follows:
[0144]
[0145] From the above formula, we can see that the residual r e Depend on and {h p , h g , h C , h f}decision; among which, It can be calculated by the dynamic model and the friction model; therefore, it can be used as the feature vector input of the subsequent XGBoost, and {h p , h g , h C , h f} is fitted through XGBoost training; on the basis of the dynamic features, the kinematic features of the robot are added, and the feature vector of the dynamic residual prediction model can be preliminarily extracted into the following form:
[0146]
[0147] Step S4 provided in this embodiment of the present invention specifically includes:
[0148] According to the difference in frequency distribution of different components of the residual signal, the residual signal can be split into high-frequency signal and low-frequency signal through a low-pass filter, which can be expressed as follows:
[0149]
[0150] r high =r e -r low
[0151] Wherein, LPF represents low-pass filter; r low Represents the low-frequency residual signal. The dynamic model error (such as momentum and gravity error) is concentrated in the low-frequency signal; r high Represents high-frequency residual signals. Measurement noise and friction commutation errors are concentrated in high-frequency signals. Its essence is to further decouple the residual from the perspective of frequency.
[0152] The adaptive filtering framework specifically includes:
[0153] First, the commutation characteristics of the robot joint friction force are constructed as follows:
[0154]
[0155] Among them, k represents the kth moment, n s represents the length of the friction mutation gap window, n a Indicates the speed reverse look-ahead window length;
[0156] According to the commutation characteristics, the high-frequency residual signal can be adaptively filtered to reduce the measurement noise contained therein while retaining the friction commutation error, thereby increasing the fitting accuracy of the model; it can be expressed as follows:
[0157]
[0158] Among them, r df (k) is the high-frequency residual signal after adaptive filtering at the kth moment, r filter (k) is the high-frequency residual signal after low-pass filtering;
[0159] According to the differential characteristics of the frequency distribution of different components of the residual signal and the constructed friction commutation features, the extracted feature vector can be further extracted into the feature vector corresponding to the high-frequency residual and the feature vector corresponding to the low-frequency residual, which are specifically in the following form:
[0160]
[0161] Among them, feature low Represents low-frequency feature vectors, including the kinematic characteristics of the robot and related features of the dynamic model; feature high Represents high-frequency feature vectors, including the robot's kinematic characteristics, friction error terms, and friction commutation characteristics.
[0162] Step S5 provided in this embodiment of the present invention specifically includes:
[0163] First, let the robot run 20 randomly generated trajectories to collect the robot's angle, velocity, and acceleration data. The acceleration signal is low-pass filtered to filter out the measurement noise it contains. The collected data is used according to steps S3 and S4 to obtain the input and output data sets for model training, which can be shown as follows:
[0164]
[0165] Among them, X low,i represents the low-frequency feature dataset of the robot’s i-th joint, Y low,i represents the low-frequency residual target value of the robot's i-th joint; X high,i It represents the high-frequency feature dataset of the i-th joint, T high,i represents the high-frequency residual target value of the robot's i-th joint; n represents the data collected at n moments in total;
[0166] The main idea of the data enhancement method based on sliding windows is to define a sliding window of length L, which contains the time series feature data of the period [t-L+1, t], and use the time series feature data of the sliding window as the feature data of the current moment as the model input to achieve the effect of data enhancement; it is worth noting that if there is no data before time t, the missing data will be filled with 0; at the same time, the length of the window can be selected according to different processing situations, so as to flexibly adjust the length of the retained historical time series information according to the actual situation; the feature data set at time t can be expressed as follows:
[0167]
[0168] X low,i (t) represents the low-frequency feature dataset of the robot’s i-th joint at the t-th moment, X high,i(t) represents the high-frequency feature dataset of the robot's i-th joint at time t; further, the overall feature dataset of the i-th joint can be rewritten as follows:
[0169]
[0170] like Figure 8 As shown, an embodiment of the present invention provides a dynamic model residual compensation robot collision detection system considering frequency distribution differences, including:
[0171] An acquisition module is used to decouple the theoretical torque of the robot joints based on the Newton-Euler method and its variants to obtain the robot's momentum, Coriolis force, centrifugal force, and gravity components;
[0172] A solution module is used to solve the external torque expression output by the momentum observer through Laplace forward and inverse transform, and to express the residual expression of the joint external torque accordingly;
[0173] The extraction module is used to design the feature vector based on the residual expression; the relevant sub-expressions of each component in the residual expression are extracted as dynamic features, and the feature vector is preliminarily formed with the kinematic features of the robot;
[0174] A construction module is used to build a high-frequency separation adaptive filtering training framework. Based on the differences in the frequency distribution of different components of the residual signal, the residual signal is split into high-frequency and low-frequency signals through a low-pass filter for prediction. For the training of the high-frequency residual prediction model, the commutation characteristics of the robot joint friction force are constructed, and the adaptive filtering framework is constructed based on this.
[0175] The acquisition module is used to collect training data through random trajectories, introduce time series information into the training data through a sliding window to perform data enhancement processing, and input the residual signal into the high-frequency separation adaptive filtering framework to obtain the output target value of the model training; then the XGBoost algorithm is used for training to obtain high-frequency and low-frequency residual prediction models respectively;
[0176] The collision detection module is used to input the prediction results of the trained residual prediction model into the momentum observer in a feedforward form to obtain the compensated joint external torque signal, and then perform collision detection based on the set threshold.
[0177] Another object of the present invention is to provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the robot collision detection method with residual compensation of the dynamic model considering frequency distribution differences.
[0178] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the robot collision detection method with dynamic model residual compensation considering frequency distribution differences.
[0179] Another object of the present invention is to provide an information data processing terminal, which is used to implement the dynamic model residual compensation robot collision detection system that considers frequency distribution differences.
[0180] The present invention is specifically implemented:
[0181] Step S1 specifically includes:
[0182] Based on the Newton-Euler algorithm and its variants, the expression of the robot's theoretical joint torque can be obtained as follows:
[0183]
[0184] Among them, τ i Represents the theoretical torque of the robot's i-th joint calculated based on the dynamic model. Represents the angle, velocity and acceleration of the robot’s i-th joint respectively. α (·) indicates the standard Newton-Euler algorithm. MNE α (·) represents a variant of the Newton-Euler algorithm, which splits the joint velocity into two different inputs to obtain additional degrees of freedom, so that the output matrix automatically satisfies the skew symmetry property. α∈{g0,0} indicates whether gravity is considered in the Newton-Euler algorithm.
[0185] Based on formula (1), the theoretical torque can be decoupled to obtain the input of the subsequent momentum observer, which includes the momentum of the robot, the Coriolis force, the centrifugal force, and the gravity component, which can be calculated by the following formula:
[0186]
[0187] Among them, β is a dynamic variable defined for the sake of simplicity, g(q) represents the gravity vector of the robot, is the transpose of the robot's Coriolis force and centrifugal force matrix, M(q) represents the robot's inertia matrix, and p is the robot's generalized momentum. n =(0 … 0 1 0 … 0) T , the nth element is 1 and the rest are 0.
[0188] Furthermore, step S2 specifically includes:
[0189] First, determine the expression of the momentum observer as follows:
[0190] r(t)=K0[p(t)-∫(τ m -τ f +r+β)dt] (3)
[0191] Where r(t) represents the external torque of the joint output by the momentum observer at time t, K0 represents the diagonal gain matrix of the momentum observer, τ m represents the motor driving torque, τ f is the calculated friction force.
[0192] Furthermore, considering factors such as dynamic modeling error, friction error, and sensor measurement error, it is impossible to obtain a completely accurate external torque monitoring signal. Combining formula (3), incorporating the above error factors into the derivation process, the calculation formula in actual conditions can be expressed as follows:
[0193]
[0194] in, Indicates that the variable is an estimated version based on kinetic model calculations or actual readings.
[0195] Furthermore, by solving formulas (3) and (4) through Laplace forward and inverse transform, the expression of the external torque output by the momentum observer can be obtained as follows:
[0196]
[0197] In the two formulas, * represents the convolution operation. Then the residual of the external torque monitoring value can be defined as follows:
[0198]
[0199] The variables in the above formula are defined as follows:
[0200]
[0201] Furthermore, step S3 specifically includes:
[0202] According to formulas (6) to (7), the expressions related to the robot friction modeling error and the dynamic modeling error can be extracted as follows:
[0203]
[0204] Among them, h fe (t) represents the portion of the residual that comes from friction modeling error, Respectively Part related to friction modeling. e (t) represents the part of the residual that comes from the dynamic modeling error, and he (t) can be further decomposed into the error components related to momentum, Coriolis force, centrifugal force, and gravity, which can be expressed as follows:
[0205]
[0206] From formulas (8) to (9), we can see that the residual r e Depend on and {h p , h g , h C , h f} decision. Among them, It can be calculated by the dynamic model and the friction model. Therefore, it can be used as the feature vector input of the subsequent XGBoost, and {h p , h g , h C , h f} can be fitted through XGBoost training. By adding the robot's kinematic characteristics to the dynamic characteristics, the feature vector of the dynamic residual prediction model can be initially extracted into the following form:
[0207]
[0208] Furthermore, step S4 constructs a high-frequency separation adaptive filtering training framework, the framework structure is as follows Figure 2 As shown, specifically including:
[0209] According to the difference in frequency distribution of different components of the residual signal, the residual signal can be split into high-frequency signal and low-frequency signal through a low-pass filter, which can be expressed as follows:
[0210]
[0211] Wherein, LPF stands for low-pass filter. low Represents the low-frequency residual signal. The dynamic model error (such as momentum and gravity error) is concentrated in the low-frequency signal. high represents the high-frequency residual signal, where measurement noise and friction commutation error are concentrated. Formula (11) essentially decouples the residual from the perspective of frequency.
[0212] However, high The measurement noise contained in cannot be directly fitted due to its randomness, which affects the model fitting accuracy. Directly using filtering will cause friction mutation error distortion, thus affecting the compensation effect. Therefore, an adaptive filtering method can be constructed to remove the noise signal. The specific steps are as follows:
[0213] First, the commutation characteristics of the robot joint friction force are constructed as follows:
[0214]
[0215] Among them, k represents the kth moment, n s represents the length of the friction mutation gap window, n a Indicates the speed reverse look-ahead window length.
[0216] Furthermore, based on the commutation characteristics, the high-frequency residual signal can be adaptively filtered to reduce the measurement noise contained therein while retaining the friction commutation error, thereby increasing the fitting accuracy of the model. It can be expressed as follows:
[0217]
[0218] Among them, r df (k) is the high-frequency residual signal after adaptive filtering at the kth moment, r filter (k) is the high-frequency residual signal after low-pass filtering. The effect of the adaptive filtering method is as follows: Figure 9 As shown in the figure, after the high-frequency residual signal is adaptively filtered, the commutation error of the friction force is well preserved, and the measurement noise is correspondingly removed by low-pass filtering.
[0219] According to the differential characteristics of the frequency distribution of different components of the residual signal and the constructed friction commutation features, the extracted feature vector can be further extracted into the feature vector corresponding to the high-frequency residual and the feature vector corresponding to the low-frequency residual, which are specifically in the following form:
[0220]
[0221] Among them, feature low Represents low-frequency feature vectors, including the robot's kinematic characteristics and related features of the dynamic model. high Represents high-frequency feature vectors, including the robot's kinematic characteristics, friction error terms, and friction commutation characteristics.
[0222] Furthermore, step S5 includes:
[0223] First, set the diagonal elements of the momentum observer's diagonal gain matrix K0 to [10, 10, 15, 30, 30, 30]. The robot runs 20 randomly generated trajectories to collect joint angle, velocity, acceleration data, and the output of the momentum observer. The acceleration signal is low-pass filtered to filter out the measurement noise it contains. Substituting the collected data into equations (8) to (14), the following equation is obtained:
[0224]
[0225] Among them, X low,i represents the low-frequency feature dataset of the robot’s i-th joint, Y low,i Represents the low-frequency residual target value of the robot's i-th joint. high,i It represents the high-frequency feature dataset of the i-th joint, Y high,i represents the high-frequency residual target value of the robot's i-th joint. n represents the data collected at n moments in time.
[0226] In order to establish an effective residual prediction model, a large amount of high-quality data is required to ensure the accuracy and robustness of machine learning training. To this end, a data enhancement method based on a sliding window is used to reduce the difficulty of obtaining a large number of data samples and improve the quality of sample data. The schematic diagram of this method is shown in Figure 10 As shown in the figure, the main idea is to define a sliding window of length L, which contains the time series feature data of the period [t-L+1, t], and use the time series feature data of the sliding window as the feature data of the current moment as the model input to achieve the effect of data enhancement. It is worth noting that if there is no data before time t, the missing data will be filled with 0. At the same time, the length of the window L can be selected according to different processing situations, so that the length of the retained historical time series information can be flexibly adjusted according to the actual situation. The feature data set at time t can be expressed as follows:
[0227]
[0228] X low,i (t) represents the low-frequency feature dataset of the robot’s i-th joint at the t-th moment, X high,i (t) represents the high-frequency feature dataset of the robot's joint at time t. Furthermore, the overall feature dataset of the joint can be rewritten as follows:
[0229]
[0230] Furthermore, step S6 includes:
[0231] After obtaining the trained residual prediction model, it can be added to the momentum observer as an independent residual compensation module. The overall structure of the collision detection is as follows: Figure 3 As shown in Figure 1, the residual prediction model receives joint angle, velocity, and acceleration information, and calculates low-frequency features and high-frequency features through formulas (8)(9)(12)(14) and inputs them into the corresponding residual prediction model. The high-frequency residual prediction results and the low-frequency residual prediction results are then jointly compensated to the output signal of the momentum observer. Finally, the collision detection function is input to determine whether a collision occurs. The collision detection function can be expressed as follows:
[0232]
[0233] Among them, r(t) is the external torque signal at time t, ε DTh , ε UTh The upper and lower limits of the collision detection threshold are set. Once the external torque signal exceeds the set threshold, it means that the robot has collided.
[0234] like Figure 4 Figure 1 shows a comparison of the external torque estimation of the momentum observer before and after adding the residual compensation module. The robot is monitored in a collision-free state, so the closer the estimated external torque is to 0, the higher the accuracy. The proposed dynamic model residual compensation method, which considers frequency distribution differences, demonstrates superior compensation results and effectively improves the external torque estimation accuracy of the momentum observer.
[0235] like Figure 5 The figure shows the results of the robot hard collision experiment. The characteristics of hard collision are: the external force changes rapidly and is an impact force. The experimental method is to quickly apply impact force to the robot through the human body to generate a hard collision signal. Figure 5 As can be seen, after adding the residual compensation module, the robot's threshold accuracy has been significantly improved from [-11NM, 9NM] before compensation to [-4.5NM, 5.5NM], further enhancing the accuracy and response speed of collision detection. Therefore, the proposed dynamic model residual compensation robot collision detection method, which considers frequency distribution differences, demonstrates excellent performance in detecting hard collisions.
[0236] like Figure 6 The following is the result of the robot soft collision experiment. The characteristics of soft collision are: the external force changes slowly and is a squeezing force. The experiment is carried out through a balloon experiment. The experimental platform is as follows Figure 7 As shown, the robot end is equipped with a six-dimensional force sensor, and the linear velocity of the end in the Z axis is set to 0.1m / s, so that the end is pressed vertically on the balloon to produce a soft collision effect on the joint. When the monitored external torque of the joint exceeds the set threshold, the robot responds and returns to the starting point. For this reason, the smaller the contact force detected by the end sensor in the Z direction, the higher the collision detection accuracy and the faster the response speed. Figure 6As can be seen, before the residual compensation module was added, the external torque output by the robot contained dynamic model residuals. For this reason, the threshold was set to [-3NM, 8NM]. When a collision was detected, the end-point force sensor read 9.61N. After the residual compensation module was added, the dynamic model residuals were compensated, further improving accuracy. The threshold was set to [0NM, 7NM]. When a collision was detected, the end-point force sensor read 6.90N. Therefore, the proposed robot collision detection method for dynamic model residual compensation, which considers frequency distribution differences, demonstrates excellent performance for soft collision detection.
[0237] This invention focuses on improving the accuracy of robot collision detection and is applicable to specific areas such as industrial robots and service robots. In industrial applications, such as assembly robots on automated production lines, the accuracy of collision detection technology is directly related to production efficiency and equipment safety. The technical solution of this invention effectively compensates for the external torque residual output by the momentum observer, thereby achieving high-precision collision detection. This high-precision collision detection method can significantly reduce equipment damage and production delays caused by collisions, thereby reducing economic losses for enterprises.
[0238] The technology of this invention also has important applications in the field of service robots. For example, in medical settings, service robots responsible for delivering medicine or accompanying patients may collide due to complex environments. The collision detection scheme of this invention allows the robot to quickly detect the occurrence of a collision and effectively take measures to reduce potential damage to surrounding equipment and patients. This not only improves the robot's operational safety in complex environments but also enhances its ability to respond to emergencies.
[0239] Furthermore, this invention can be applied to robot scheduling and management within intelligent manufacturing systems, helping enterprises achieve more efficient resource allocation and risk control by improving collision detection accuracy. By incorporating this technology, robots can accurately provide feedback on collision detection information while performing tasks, enabling management systems to rapidly adjust workflows and ensure smooth production operations.
[0240] These specific application embodiments demonstrate the innovation and practical value of the present invention in improving the accuracy of robot collision detection, and provide a solid foundation for the further development of robotics technology.
[0241] like Figure 4 Figure 1 shows a comparison of the external torque estimation of the momentum observer before and after adding the residual compensation module. The robot is monitored in a collision-free state, so the closer the estimated external torque is to 0, the higher the accuracy. The proposed dynamic model residual compensation method, which considers frequency distribution differences, demonstrates superior compensation results and effectively improves the external torque estimation accuracy of the momentum observer.
[0242] like Figure 5 The figure shows the results of the robot hard collision experiment. The characteristics of hard collision are: the external force changes rapidly and is an impact force. The experimental method is to quickly apply impact force to the robot through the human body to generate a hard collision signal. Figure 5 As can be seen, after adding the residual compensation module, the robot's threshold accuracy has been significantly improved from [-11NM, 9NM] before compensation to [-4.5NM, 5.5NM], further enhancing the accuracy and response speed of collision detection. Therefore, the proposed dynamic model residual compensation robot collision detection method, which considers frequency distribution differences, demonstrates excellent performance in detecting hard collisions.
[0243] like Figure 6 The following is the result of the robot soft collision experiment. The characteristics of soft collision are: the external force changes slowly and is a squeezing force. The experiment is carried out through a balloon experiment. The experimental platform is as follows Figure 7 As shown, the robot end is equipped with a six-dimensional force sensor, and the linear velocity of the end in the Z axis is set to 0.1m / s, so that the end is pressed vertically on the balloon to produce a soft collision effect on the joint. When the monitored external torque of the joint exceeds the set threshold, the robot responds and returns to the starting point. For this reason, the smaller the contact force detected by the end sensor in the Z direction, the higher the collision detection accuracy and the faster the response speed. Figure 6 As can be seen, before the residual compensation module was added, the external torque output by the robot contained dynamic model residuals. For this reason, the threshold was set to [-3NM, 8NM]. When a collision was detected, the end-point force sensor read 9.61N. However, after the residual compensation module was added, the dynamic model residuals were compensated, further improving accuracy. With the threshold set to [0NM, 7NM], the end-point force sensor read 6.90N when a collision was detected. Therefore, the proposed robot collision detection method for dynamic model residual compensation, which considers frequency distribution differences, demonstrates excellent performance for soft collision detection.
[0244] like Figure 9 The figure shows the friction commutation characteristics and the effect of the adaptive filtering method. Figure 9 It can be seen that the friction commutation feature can well locate the friction commutation error; at the same time, after the high-frequency residual signal is adaptively filtered, the commutation error of the friction force is well retained, and the measurement noise is correspondingly removed by low-pass filtering.
[0245] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will appreciate that the above-mentioned devices and methods can be implemented using computer-executable instructions and / or contained in processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, or can be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0246] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.
Claims
1. A robot collision detection method based on dynamic model residual compensation considering frequency distribution differences, characterized in that: The following steps are involved: S1. Decouple the theoretical torque of the robot joints based on the Newton-Euler method and its variants to obtain the robot's momentum, Coriolis force, centrifugal force, and gravity components; S2. Solve the external torque expression output by the momentum observer through Laplace forward and inverse transform, and express the residual expression of the joint external torque accordingly; S3. Design a feature vector based on the residual expression; extract the relevant sub-expressions of each component in the residual expression as dynamic features, and preliminarily form a feature vector with the kinematic features of the robot; S4, building a high-frequency separation adaptive filtering training framework; According to the differences in frequency distribution of different components of the residual signal, the residual signal is split into high-frequency and low-frequency signals through a low-pass filter and predicted separately; For the training of high-frequency residual prediction models, the commutation features of robot joint friction are constructed, and an adaptive filtering framework is built based on them; S5. Training data is collected through random trajectories. Time series information is introduced into the training data through a sliding window to perform data enhancement processing. At the same time, the residual signal is input into the high-frequency separation adaptive filtering framework to obtain the output target value of the model training. The XGBoost algorithm is then used for training to obtain high-frequency and low-frequency residual prediction models respectively. S6. Feeding the prediction results of the trained residual prediction model into the momentum observer in a feedforward manner to obtain the compensated joint external torque signal, and then performing collision detection based on the set threshold; In step S1, the expression of the theoretical joint torque of the robot is obtained based on the Newton-Euler algorithm and its variants: ; in, Indicates the robot Theoretical torque of each joint; Represents the robot The angles, velocities, and accelerations of each joint; represents the standard Newton-Euler algorithm; It represents a variant of the Newton-Euler algorithm, which obtains additional degrees of freedom by splitting the joint velocity into two different inputs, so that the output matrix automatically satisfies the skew symmetry property; It indicates whether the influence of gravity is considered in the Newton-Euler algorithm; The theoretical torque is decoupled based on the Newton-Euler algorithm and its variants to obtain the input of the subsequent momentum observer, which includes the robot's momentum, Coriolis force, centrifugal force, and gravity component, and is calculated by the following formula: ; in, is a dynamic variable defined for simplified representation, represents the robot's gravity vector, is the transpose of the robot's Coriolis force and centrifugal force matrix, represents the inertia matrix of the robot, is the generalized momentum of the robot; the vector , No. elements are 1 and the rest are 0.
2. The robot collision detection method with dynamic model residual compensation considering frequency distribution differences as claimed in claim 1, characterized in that: The step S2 specifically includes: First, determine the expression of the momentum observer as follows: ; in, Indicates the The external torque of the joint output by the moment momentum observer, represents the diagonal gain matrix of the momentum observer, represents the motor driving torque, is the calculated friction force; Taking into account the factors of dynamic modeling error, friction error and sensor measurement error, it is impossible to obtain a completely accurate external torque monitoring signal; incorporating the above error factors into the derivation process, the calculation formula in actual situation is expressed as follows: ; in, Indicates that the variable is an estimated version based on kinetic model calculation or actual reading; Solving the differential equation by Laplace forward and inverse transform, we can obtain the expression of the momentum observer output external torque as follows: ; In the two formulas represents the convolution operation; then the residual of the external torque monitoring value is defined as follows: ; The variables in the above formula are defined as follows: 。 3. The robot collision detection method with dynamic model residual compensation considering frequency distribution differences as claimed in claim 1, characterized in that: The step S3 specifically includes: According to the defined residual expression, the expressions related to the robot friction modeling error and the dynamic modeling error are extracted as follows: ; in, represents the portion of the residual that comes from friction modeling error, Respectively Part related to friction modeling; represents the part of the residual that comes from the dynamic modeling error, and It is further decomposed into the error parts related to momentum, Coriolis force, centrifugal force and gravity, which are expressed as follows: ; From the above formula, we know that the residual Depend on as well as decision; among which, It is calculated by the dynamic model and the friction model; therefore, it is used as the feature vector input of the subsequent XGBoost, and The fitting is performed through XGBoost training; the kinematic characteristics of the robot are added on the basis of the dynamic characteristics, that is, the feature vector of the dynamic residual prediction model is initially extracted into the following form: 。 4. The robot collision detection method with dynamic model residual compensation considering frequency distribution differences as claimed in claim 1, characterized in that: The step S4 specifically includes: According to the difference in frequency distribution of different components of the residual signal, the residual signal is split into high-frequency signal and low-frequency signal through a low-pass filter, which can be expressed as follows: ; Among them, LPF represents low-pass filter; Represents the low-frequency residual signal, and the error of the dynamic model is concentrated in the low-frequency signal; Represents high-frequency residual signals. Measurement noise and friction commutation errors are concentrated in high-frequency signals. Its essence is to further decouple the residual from the perspective of frequency. The adaptive filtering framework specifically includes: First, the commutation characteristics of the robot joint friction force are constructed as follows: ; in, Indicates the A moment, represents the length of the friction mutation gap window, Indicates the speed reverse look-ahead window length; According to the commutation characteristics, the high-frequency residual signal is adaptively filtered to reduce the measurement noise contained therein while retaining the friction commutation error, thereby increasing the fitting accuracy of the model; it is expressed as follows: ; in, For the The high-frequency residual signal after adaptive filtering at each moment is is the high-frequency residual signal after low-pass filtering; According to the differential characteristics of the frequency distribution of different components of the residual signal and the constructed friction commutation features, the extracted feature vectors are further extracted into feature vectors corresponding to high-frequency residuals and feature vectors corresponding to low-frequency residuals, which are specifically in the following form: ; in, Represents low-frequency feature vectors, including the kinematic characteristics of the robot and related features of the dynamic model; Represents high-frequency feature vectors, including the robot's kinematic characteristics, friction error terms, and friction commutation characteristics.
5. The robot collision detection method with dynamic model residual compensation considering frequency distribution differences as claimed in claim 1, characterized in that: The step S5 specifically includes: First, the robot is run along 20 randomly generated trajectories to collect its angle, velocity, and acceleration data. The acceleration signal is low-pass filtered to remove the measurement noise it contains. The collected data is then used in steps S3 and S4 to obtain the input and output data sets for model training, as shown in the following equation: ; in, Indicates the robot A low-frequency feature dataset of joints, Indicates the robot The low-frequency residual target value of each joint; It means the A high-frequency feature dataset of joints, Indicates the robot The high-frequency residual target value of each joint; Indicates that a total of Data at a moment; The main idea of the data enhancement method based on sliding window is to define a A sliding window containing the period The time series feature data of the sliding window is used as the feature data of the current moment as the model input to achieve the effect of data enhancement; it is worth noting that if If there is no data before the moment, the missing data will be filled with 0; at the same time, the window is selected according to different processing situations The length of the historical time series information can be flexibly adjusted according to the actual situation; The feature dataset at each moment is represented as follows: ; Indicates the robot The joint in The low-frequency feature dataset at time t, Indicates the robot The joint in The high-frequency feature dataset at the moment; further, The overall feature dataset of the joints is rewritten as follows: 。 6. A robot collision detection system with dynamic model residual compensation considering frequency distribution differences, which implements the robot collision detection method with dynamic model residual compensation considering frequency distribution differences as described in any one of claims 1 to 5, characterized in that: The dynamic model residual compensation robot collision detection system considering frequency distribution differences includes: An acquisition module is used to decouple the theoretical torque of the robot joints based on the Newton-Euler method and its variants to obtain the robot's momentum, Coriolis force, centrifugal force, and gravity components; A solution module is used to solve the external torque expression output by the momentum observer through Laplace forward and inverse transform, and to express the residual expression of the joint external torque accordingly; The extraction module is used to design the feature vector based on the residual expression; the relevant sub-expressions of each component in the residual expression are extracted as dynamic features, and the feature vector is preliminarily formed with the kinematic features of the robot; A construction module is used to build a high-frequency separation adaptive filtering training framework. Based on the differences in the frequency distribution of different components of the residual signal, the residual signal is split into high-frequency and low-frequency signals through a low-pass filter for prediction. For the training of the high-frequency residual prediction model, the commutation characteristics of the robot joint friction force are constructed, and the adaptive filtering framework is constructed based on this. The acquisition module is used to collect training data through random trajectories, introduce time series information into the training data through a sliding window to perform data enhancement processing, and input the residual signal into the high-frequency separation adaptive filtering framework to obtain the output target value of the model training; then the XGBoost algorithm is used for training to obtain high-frequency and low-frequency residual prediction models respectively; The collision detection module is used to input the prediction results of the trained residual prediction model into the momentum observer in a feedforward form to obtain the compensated joint external torque signal, and then perform collision detection based on the set threshold.
7. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the robot collision detection method with dynamic model residual compensation considering frequency distribution differences as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the robot collision detection method with residual compensation of a dynamic model considering frequency distribution differences as described in any one of claims 1 to 5.
9. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the dynamic model residual compensation robot collision detection system considering frequency distribution differences as described in claim 6.
Citation Information
Patent Citations
Mechanical arm collision detection method based on model parameter error observer
CN114407022A
Collaborative robot collision detection method of support vector machine based on supervised learning
CN116330344A