An industrial robot collision detection method and system based on adaptive threshold and baseline learning
By using an adaptive threshold and baseline learning method, the collision detection threshold is dynamically adjusted and combined with sliding window statistics, which solves the problems of high false alarm rate, high false alarm rate and insufficient robustness in the existing technology, and achieves stable detection and graded response under different working conditions.
Patent Information
- Application Number
- CN202611435824.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-06
AI Technical Summary
Existing industrial robot collision detection technologies have shortcomings in dynamic working condition adaptability, transient interference identification, load adaptation, noise resistance mechanisms, and graded response, resulting in high false alarm rates, high false negative rates, and insufficient system robustness.
An adaptive threshold and baseline learning method is adopted. The joint motion state signal is processed by a filter to dynamically adjust the collision detection threshold. Combined with the statistical residual distribution characteristics of the sliding window, the adaptive threshold is adjusted in real time and the baseline is learned, thereby enhancing the robustness and sensitivity of the system.
It maintains stable detection sensitivity and low false alarm rate under different operating conditions, effectively identifies transient interference during rapid deceleration, improves system robustness through multi-joint voting and continuous confirmation mechanisms, and achieves graded response to collisions of different intensities.
Smart Images

Figure CN123040067A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial robot technology, and specifically to an industrial robot collision detection method and system based on adaptive threshold and baseline learning. Background Technology
[0002] Industrial robots play a crucial role in modern production, performing critical tasks such as welding, assembly, painting, and material handling. Their working environments are becoming increasingly complex, and human-robot collaboration is becoming increasingly close, making safety a critical indicator of robot technology. When industrial robots collaborate with humans or interact with their surroundings on production lines, the risk of accidental collisions is unavoidable. This can range from minor damage to workpieces and fixtures to permanent damage to mechanical structures or even endangering personnel safety. Therefore, industrial robot systems must possess real-time, reliable collision detection capabilities to trigger safety protection actions within milliseconds of a collision, minimizing losses.
[0003] Among the various existing collision detection technologies, collision detection based on dynamic models has become the mainstream approach in the field of sensorless collision detection because it does not require additional external sensors. This method uses a robot dynamic model to calculate the desired joint torque, compares it with the actual torque to obtain the residual, and then compares the residual with a preset threshold to determine whether a collision has occurred. However, most existing dynamic model-based solutions use fixed thresholds for judgment, which faces a series of performance bottlenecks that are difficult to overcome in practical engineering applications.
[0004] The main problem with existing technologies is that the modeling error is not a stationary noise with a fixed amplitude, but rather exhibits significant nonlinear time-varying characteristics depending on the motion state and load conditions. A fixed threshold cannot dynamically adjust the detection threshold according to the joint motion state. Under high-speed, high-acceleration conditions, the normal torque fluctuation amplitude caused by inaccurate friction models and inertial force calculation deviations far exceeds the fixed threshold, leading to numerous false alarms. Conversely, if the threshold is artificially raised to improve anti-interference capabilities, weak collision signals under low-speed, light-load conditions will be completely drowned out, resulting in missed detections. These two issues constitute an irreconcilable contradiction.
[0005] At the same time, existing solutions lack an effective mechanism for identifying non-steady transient processes during robot operation. In particular, during the rapid deceleration phase, servo control delay and nonlinear frictional hysteresis effects can generate torque spikes with amplitude characteristics that are highly similar to those of real collisions. Traditional solutions frequently trigger false triggers because they cannot identify this specific motion pattern, which seriously interferes with the normal production cycle.
[0006] Furthermore, existing technologies lack the ability to perceive and adapt to the characteristics of model error distribution online. When the robot load changes or the inertia parameter changes due to differences in robot structure, the statistical distribution of the residual signal will drift significantly. Fixed thresholds or simple linear adjustments cannot automatically track this change and must rely on repeated manual tuning, which severely restricts the versatility and rapid deployment capability of the algorithm across different loads and robot models.
[0007] The existing solutions' single-cycle, single-joint independent judgment logic also has inherent vulnerabilities. Occasional factors such as electromagnetic interference and communication jitter can trigger alarms with just a single sampling, lacking continuous verification in the time dimension and multi-joint collaborative verification in the spatial dimension, resulting in severely insufficient system robustness. Most existing methods only output a binary result of whether a collision has occurred, and cannot respond in a graded manner according to the collision intensity, which is not conducive to refined safety control and production line continuity assurance.
[0008] In summary, existing industrial robot collision detection technologies have significant shortcomings in terms of dynamic working condition adaptability, transient interference recognition, load adaptation, noise reduction mechanisms, and graded response. There is an urgent need for an intelligent collision detection method that can comprehensively solve the above problems. Summary of the Invention
[0009] To address the problems existing in the prior art, the present invention aims to provide an industrial robot collision detection method and system based on adaptive threshold and baseline learning, which enables the collision detection threshold to be dynamically adjusted in real time according to the joint motion state, thereby maintaining stable detection sensitivity and a low false alarm rate under different motion conditions.
[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A collision detection method for industrial robots based on adaptive threshold and baseline learning, wherein the method sequentially executes the following steps in each control cycle: Receive joint angular velocity signals from the servo system and joint angular acceleration signal A first-order low-pass filter is used to filter the received non-first frame joint angular velocity signals. and joint angular acceleration signal Filtering is performed, and the first frame is directly assigned a value; Receive joint angle feedback from servo system and the filtered angular velocity and filtered angular acceleration The desired joint torque under collision-free conditions is calculated using a robot dynamics model. ; Receive the actual torque from the servo system and expected torque Compare the deviation between the actual torque and the expected torque, and calculate the original torque residual joint by joint. and the original torque residual Perform a second low-pass filter to obtain the filtered residual; Calculate the adaptive collision threshold based on the filtered current joint motion state. The adaptive collision threshold Based on the basic threshold It consists of the linear superposition of velocity-related terms and acceleration-related terms; Simultaneously, during normal operation, the distribution characteristics of the residuals after statistical filtering via a sliding window are used to calculate the lower limit of the threshold. ; Take the adaptive collision threshold With the lower threshold The maximum value in is used as the final threshold. ; Calculate the residual threshold ratio based on the filtered residual and the final threshold. And obtain the maximum residual threshold ratio When the maximum residual threshold is greater than Greater than the warning level threshold A collision is determined to have occurred.
[0011] The filtered angular velocity and angular acceleration are as follows:
[0012]
[0013] in, For the first The first cycle The filtered angular velocity of the joint, For the first The feedback from the servo system in the [number]th cycle Joint original angular velocity, For velocity filtering coefficients, For the first The first cycle Filtered angular acceleration of the joint. For the first The feedback from the servo system in the [number]th cycle Joint primitive angular acceleration, These are the acceleration filter coefficients; The desired torque The calculation is as follows:
[0014] in, The minimum parameter regression matrix, The minimum inertia parameter estimate obtained by identification; For joint angle, The filtered angular velocity, This represents the angular acceleration after filtering.
[0015] The original torque residual is calculated as follows:
[0016] in, For the first Joint original torque residual, The actual torque of the servo feedback. The desired torque calculated for the model; The filtered residuals are as follows:
[0017] in, For the first The first cycle Joint filtering residuals These are the residual filter coefficients.
[0018] The adaptive threshold is calculated as follows:
[0019] in, For the velocity term coefficient, For acceleration term coefficients; The lower limit of the baseline is calculated as follows:
[0020] in, It is a multiple of the standard deviation; , Calculate the moving mean and standard deviation of the residuals, respectively:
[0021]
[0022] Where W is the length of the sliding window. For the first in the window One residual sample.
[0023] Residual threshold ratio The calculation is as follows: .
[0024] When analyzing the distribution characteristics of the residuals after statistical filtering using a sliding window, the sliding window is continuously updated over time. Before updating the sliding window, a rapid deceleration condition is determined, and the determination condition is as follows:
[0025] in, The threshold for rapid deceleration. This refers to the acceleration threshold for rapid deceleration. During rapid deceleration, the baseline window is not updated and the collision confirmation counter is not incremented; the window is only updated during non-rapid deceleration periods.
[0026] The severity of the collision is determined based on the ratio of the residual to the threshold, as follows: Emergency Level: ≥ ; Collision level: > ≥ ; Warning level: > ≥ ; No collision: < , in, The ratio of emergency level thresholds, The collision level threshold ratio, The ratio of warning level thresholds, < < .
[0027] When a collision is determined to have occurred, multi-joint voting and continuous confirmation are performed: Joint count exceeding the threshold:
[0028] If the joint count exceeds the threshold ≥ If the cycle is determined to be a candidate collision, it is marked as a flag bit. =1, otherwise =0; like =1, then the continuous confirmation count = +1; otherwise =0; When consecutive confirmation count ≥ When a collision occurs, the system determines that a collision has occurred and outputs a collision flag, a collision axis number, and the severity of the collision. The threshold for continuous confirmation count.
[0029] An industrial robot collision detection system based on adaptive threshold and baseline learning, deployed within a robot controller, includes: The state filter has its input connected to the feedback channel of the servo system. It receives the joint angular velocity and joint angular acceleration fed back by the servo system, performs a first-order low-pass filter on the joint angular velocity and joint angular acceleration, and outputs the filtered joint motion state. The dynamic model module has a first input terminal connected to the output terminal of the state filter to receive the filtered joint motion state, and a second input terminal connected to the angle feedback channel of the servo system to receive the joint angle. The dynamic model module has a built-in minimum parameter regression matrix and pre-identified inertial parameters, and calculates and outputs the desired torque based on the joint state. The residual calculator has its first input terminal connected to the output terminal of the dynamic model module to receive the desired torque, and its second input terminal connected to the torque feedback channel of the servo system to receive the actual torque. The residual calculator calculates the absolute value of the difference between the actual torque and the desired torque to obtain the torque residual, performs a first-order low-pass filter on the torque residual, and outputs the filtered residual. The baseline learning module, whose input is connected to the output of the residual calculator, receives the filtered residual, and during normal operation, statistically analyzes the residual distribution characteristics through a sliding window, calculates the lower limit of the threshold, and outputs it. A threshold manager has a first input connected to the output of the state filter to receive the filtered joint motion state, and a second input connected to the output of the baseline learning module to receive the lower threshold. The threshold manager calculates an adaptive collision threshold based on the joint motion state. The adaptive collision threshold is composed of a base threshold, a velocity-related term, and an acceleration-related term, and the maximum value between the adaptive collision threshold and the lower threshold is taken as the final threshold output. The collision detector has its first input terminal connected to the output terminal of the residual calculator to receive the filtered residual, and its second input terminal connected to the output terminal of the threshold manager to receive the final threshold. The collision detector compares the filtered residual with the final threshold. When the residual exceeds the threshold, it determines that a collision has occurred and outputs the collision detection result.
[0030] The output of the state filter is also connected to the third input of the collision detector, and the filtered joint motion state is output to the collision detector for rapid deceleration judgment. The collision decision-maker also performs at least one of the following: rapid deceleration transient interference elimination judgment, multi-joint voting, severity classification, and continuous confirmation; The rapid deceleration transient interference elimination judgment is as follows: when the absolute value of the filtered angular velocity exceeds the velocity threshold and the filtered angular acceleration is less than the negative acceleration threshold, the robot is determined to be in a rapid deceleration state. During the rapid deceleration state, the update of the sliding window is paused and the collision confirmation count is not incremented. The multi-joint voting is as follows: calculate the ratio of the residual of each joint to the final threshold, count the number of joints whose ratio exceeds the warning level threshold ratio, and when the number of joints exceeding the threshold reaches the voting threshold, the control cycle is determined to be a candidate collision. The severity classification is as follows: take the maximum value among the ratios of the residuals of each joint to the final threshold, and classify the collision severity into warning level, collision level and emergency level according to the comparison results of the maximum value with the ratios of the warning level threshold, collision level threshold and emergency level threshold. The continuous confirmation is defined as follows: when a certain control cycle is determined to be a candidate collision, the continuous confirmation count is incremented; otherwise, it is reset to zero. When the continuous confirmation count reaches the continuous confirmation threshold, the collision is finally confirmed to have occurred.
[0031] By adopting the above scheme, this invention effectively solves the core problem of existing collision detection methods based on dynamic models being unable to adapt to dynamic working conditions due to the use of fixed thresholds, through the synergistic effect of adaptive threshold calculation and baseline learning mechanism. Specifically, this invention decomposes the collision detection threshold into three linearly superimposed parts: a base threshold, a velocity-related term, and an acceleration-related term. This allows the threshold to be dynamically adjusted in real time according to the joint motion speed and acceleration: the threshold is appropriately widened when the robot moves at high speed to avoid false alarms caused by normal torque fluctuations; the threshold is automatically tightened when the robot moves at low speed to ensure that weak collision signals are not drowned out. At the same time, the baseline learning module continuously calculates the mean and standard deviation of the residual distribution through a sliding window during normal operation, and dynamically corrects the lower limit of the threshold by adding a multiple of the mean and standard deviation. This allows the system to automatically track the drift of the residual distribution caused by load changes or machine model differences, without the need for manual repeated threshold tuning. The synergistic effect of the above two mechanisms enables this method to maintain stable detection sensitivity and a low false alarm rate under different working conditions such as high-speed heavy load and low-speed light load, overcoming the inherent contradiction of difficulty in balancing sensitivity and false alarm rate in traditional fixed threshold schemes.
[0032] Furthermore, this invention employs a rapid deceleration transient interference identification and elimination mechanism. When the joint speed exceeds the speed threshold and the acceleration is less than the negative acceleration threshold, the robot is determined to be in a rapid deceleration state, and baseline window updates and collision confirmation counts are paused. This effectively avoids torque spikes caused by friction model errors during normal rapid deceleration being misjudged as collisions.
[0033] Furthermore, this invention employs a multi-joint voting and continuous confirmation mechanism, requiring at least two joints to simultaneously exceed a threshold and for collision conditions to be met for three consecutive control cycles before a collision is finally confirmed. This effectively suppresses single false triggers caused by transient factors such as electromagnetic interference and communication jitter, thereby improving the robustness of the system in complex industrial environments. Attached Figure Description
[0034] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram of a sliding window for baseline learning. Figure 3 This is a schematic diagram illustrating the relationship between the adaptive threshold and the residual. Figure 4 This is a system block diagram of the present invention; Figure 5 Comparison chart of adaptive threshold elimination of false alarms during rapid deceleration; Figure 6 This is a diagram showing the effect of automatic severity grading at level three. Figure 7 The graph shows the false alarm rate of a real robot running for 60 seconds. Detailed Implementation
[0035] like Figure 1 As shown, this invention discloses an industrial robot collision detection method based on adaptive threshold and baseline learning, which sequentially executes the following steps in each control cycle: Step 1: Low-pass filtering of joint status.
[0036] Receive joint angular velocity signals from the servo system and joint angular acceleration signal Due to joint angular velocity signals and joint angular acceleration signal The signal contains high-frequency noise, which, if used directly in dynamic calculations, will cause fluctuations in the desired torque. Therefore, a first-order low-pass filter is used to filter the received joint angular velocity signal. and joint angular acceleration signal Perform filtering:
[0037]
[0038] in, For the first The first cycle The filtered angular velocity of the joint, in rad / s; For the first The feedback from the servo system in the [number]th cycle Initial angular velocity of the joint; The velocity filtering coefficient has a value ranging from 0.1 to 0.5, with 0.3 being preferred. For the first The first cycle Filtered angular acceleration of the joint; For the first The feedback from the servo system in the [number]th cycle Joint primitive angular acceleration; These are acceleration filter coefficients, ranging from 0.1 to 0.5, with 0.3 being preferred. The first frame is not filtered and the values are assigned directly.
[0039] Step 2: Calculate the desired torque.
[0040] Receive joint angle feedback from servo system and the filtered angular velocity output from step 1 and filtered angular acceleration The desired joint torque under collision-free conditions is calculated using a robot dynamics model.
[0041] The equations of motion for the robot joint space are:
[0042] in, This is the joint torque vector; The inertia matrix represents the joint angles. The function; The matrix represents the Coriolis force and centrifugal force, which is the joint angle. and angular velocity The function; The vector represents the gravity term, and the angle represents the joint angle. The function; Let be the friction torque term vector, and be the joint velocity. The function.
[0043] The joint space dynamics equations of the robot can be linearized with respect to the inertial parameters as follows:
[0044] in, This is the regression matrix; This is the standard inertial parameter vector for the robot, containing all inertial parameters such as the mass, center of mass position, and inertial tensor of each link.
[0045] Then, it is decomposed and compressed into a minimal parameter form using QR:
[0046] in, This is the minimum inertial parameter vector.
[0047] The desired torque is calculated using the filtered state:
[0048] in, for The minimum parametric regression matrix of dimension ; The minimum inertia parameter estimate obtained by identification; Joint angle, unit: rad; The filtered angular velocity is expressed in rad / s. This represents the filtered angular acceleration, in rad / s².
[0049] Through offline parameter identification experiments, the following results were obtained: The robot motion was driven by an optimized excitation trajectory; joint torque and motion data were collected; a linear regression equation was constructed; and the minimum inertia parameter estimate was obtained by solving the equation using the least squares method. And pre-loaded into the collision detection system.
[0050] Step 3: Calculate the original torque residual.
[0051] Receive the actual torque from the servo system and the desired torque output in step 2 Compare the deviation between the actual torque and the expected torque, and calculate the residuals joint by joint:
[0052] in, For the first Joint original torque residual, in N·m; The actual torque of the servo feedback is expressed in N·m. The desired torque calculated for the model, in N·m.
[0053] Step 4: Perform low-pass filtering on the original torque residual.
[0054] Original torque residual It still contains some noise, so it is subjected to a second low-pass filter:
[0055] in, For the first The first cycle Residual after joint filtering, in N·m; The residual filter coefficient has a value range of 0.2 to 0.8, with 0.5 being preferred.
[0056] Step 5: Identification and elimination of transient interference during rapid deceleration.
[0057] When a robot decelerates rapidly during normal movement, the actual torque may briefly deviate from the expected torque due to inaccurate friction models or servo control delays, resulting in residual spikes. This is not a collision, but it can easily be misjudged. Therefore, the judgment condition is set as follows:
[0058] in, The threshold value for rapid deceleration is 0.05~0.5 rad / s, preferably 0.1 rad / s; The acceleration threshold for rapid deceleration is set between 1.0 and 10.0 rad / s², with 3.0 rad / s² being preferred. During rapid deceleration, the baseline window is not updated, and the collision confirmation counter is not incremented. The window is only updated during non-rapid deceleration periods (i.e., when the rapid deceleration determination condition in step 5 is not met). The baseline statistics can only be used for threshold calculation after the window is full. The window is updated using a first-in, first-out (FIFO) method; for each new sample, the oldest sample is removed to maintain a constant window length. Figure 2 As shown, the sliding window updates continuously over time, and the statistics are dynamically adjusted accordingly.
[0059] Step 6: Baseline learning.
[0060] During normal operation, the residual signal follows a certain statistical distribution. Its distribution characteristics are learned through a sliding window to provide a lower limit benchmark for the adaptive threshold. The maintenance length is... Sliding window (default) =80), calculate the moving mean and standard deviation of the residuals:
[0061]
[0062] in, This is the moving average of the residuals (unit: N·m), which is the average value of the residuals within the window. W is the sliding standard deviation of the residuals (unit: N·m), i.e., the standard deviation of the residuals within the window; W is the length of the sliding window (range: 40~200, preferably 80). For the first in the window A number of residual samples. The window is updated only during non-rapid deceleration periods, and the baseline statistics can only be used for threshold calculation after the window is full.
[0063] Step 7: Adaptive threshold calculation.
[0064] like Figure 3 As shown, the error of the dynamic model increases during high-speed motion, and a fixed threshold can lead to false alarms or missed alarms. Therefore, the threshold needs to be dynamically adjusted according to the motion state. Basic threshold. (User-defined, default 10 N·m, range 5~20 N·m). The adaptive threshold is a linear superposition of the base term, velocity term, and acceleration term:
[0065] in, This is the velocity term coefficient (with a value ranging from 0.1 to 5.0 N·m·s / rad, preferably 1.0). This is the acceleration term coefficient (with a value range of 0.01~1.0 N·m·s² / rad, preferably 0.1).
[0066] The lower limit of the baseline is calculated as follows:
[0067] , These are the moving mean and standard deviation of the residuals, respectively. It is a multiple of the standard deviation (ranging from 1.0 to 3.0, preferably 2.0).
[0068] The final threshold is the maximum of the two:
[0069] Step 8: Severity determination.
[0070] To distinguish between collision events of different intensities, the severity of the collision is determined based on the ratio of the residual to the threshold.
[0071] The residual threshold ratio is calculated as follows:
[0072] Maximum residual threshold ratio for:
[0073] The severity levels are as follows: Emergency Level: ≥ ; The threshold ratio for emergency level is 2.5 to 5.0, with 3.0 being the preferred value.
[0074] Collision level: > ≥ ; The collision level threshold ratio has a value range of 1.2 to 2.5, with 1.5 being preferred.
[0075] Warning level: > ≥ ; The warning level threshold ratio has a value range of 0.8 to 1.2, with 1.0 being preferred.
[0076] No collision: < , < < .
[0077] Step 9: Multi-joint voting and continuous confirmation.
[0078] A single joint exceeding the threshold may be caused by noise and requires confirmation by multi-joint voting; a single instance exceeding the threshold may be caused by transient interference and requires confirmation over multiple consecutive cycles.
[0079] Joint count exceeding the threshold:
[0080] Voting decision: If the number of joints exceeds the threshold ≥ If the cycle is determined to be a candidate collision, it is marked as a flag bit. =1, otherwise =0.
[0081]
[0082] in, The multi-joint voting threshold (i.e., the minimum number of joints exceeding the threshold required to trigger voting, ranging from 1 to 3, preferably 2) is used to control "triggering only when several joints exceed the threshold simultaneously".
[0083] Continuous confirmation recursion: if =1, then the continuous confirmation count = +1; otherwise =0. When the consecutive confirmation count... ≥ When a collision occurs, the system determines that a collision has occurred and outputs a collision flag, a collision axis number, and the severity of the collision.
[0084] in, The continuous confirmation count threshold (i.e., the number of cycles in which the voting conditions need to be met consecutively, with a value ranging from 2 to 5, preferably 3) is used to control "confirmation only after several consecutive cycles are triggered".
[0085] Based on the same inventive concept, this invention also discloses an industrial robot collision detection system based on adaptive threshold and limit learning, deployed within the robot controller, such as... Figure 4 As shown, it specifically includes a state filter, a dynamic model module, a residual calculator, a threshold manager, a baseline learning module, and a collision determiner.
[0086] The input of the state filter is connected to the feedback channel of the robot servo system to receive the joint angular velocity signals fed back by the servo system. and joint angular acceleration signal And filter the non-first frame signals:
[0087]
[0088] in, For the first The first cycle The filtered angular velocity of the joint; For the first The feedback from the servo system in the [number]th cycle Initial angular velocity of the joint; These are the velocity filter coefficients; For the first The first cycle Filtered angular acceleration of the joint; For the first The feedback from the servo system in the [number]th cycle Joint primitive angular acceleration; These are the acceleration filter coefficients.
[0089] The output of the state filter is connected to the dynamic model module and the threshold manager to process the filtered angular velocity. and angular acceleration The output is sent to the dynamics model module for desired torque calculation, to the threshold manager for adaptive threshold calculation, and to the collision decision-maker for rapid deceleration judgment.
[0090] The dynamics model module has a built-in robot minimum parameter regression matrix. and identification parameters The first input of the dynamic model module is connected to the output of the state filter to receive the filtered angular velocity. and angular acceleration The second input terminal of the dynamic model module is connected to the angle feedback channel of the servo system to receive joint angles. The dynamic model module calculates the desired torque based on the joint state, using the following formula:
[0091] in, The minimum parameter regression matrix is the minimum inertial parameter estimate obtained through offline parameter identification experiments and pre-stored in the dynamic model module. The identified parameters... The data is obtained by: driving the robot's motion with an optimized excitation trajectory, collecting joint torque and motion data, constructing a linear regression equation, solving it using the least squares method to obtain the minimum inertial parameter estimate, and preloading it into the dynamic model module.
[0092] The output of the dynamic model module is connected to the residual calculator to calculate the desired torque. Output to the residual calculator.
[0093] The first input of the residual calculator is connected to the output of the dynamic model module to receive the desired torque. The second input terminal of the residual calculator is connected to the torque feedback channel of the robot servo system to receive the actual torque. The residual calculator first calculates the absolute value of the difference between the actual torque and the expected torque to obtain the original torque residual. The calculation formula is:
[0094] Then, the residual calculator performs a first-order low-pass filter on the original residuals to further smooth the signal. The filtering formula is as follows:
[0095] in, For the first The first cycle Residual after joint filtering, in N·m; These are the residual filter coefficients.
[0096] The output of the residual calculator is connected to the baseline learning module and the collision detector, respectively, to process the filtered residual. The output is sent to the baseline learning module for baseline statistics calculation, and also to the collision detector for collision determination.
[0097] The first input of the threshold manager is connected to the output of the state filter to receive the filtered angular velocity. and angular acceleration The second input of the threshold manager is connected to the output of the baseline learning module to receive the baseline lower limit. The threshold manager first calculates an adaptive threshold based on the motion state, using the following formula:
[0098] in, For the velocity term coefficient, This is the coefficient for the acceleration term.
[0099] Then, the threshold manager takes an adaptive threshold. Compared with the lower limit of the baseline The maximum value in the range is used as the final threshold:
[0100] The output of the threshold manager is connected to the collision determiner, which sets the final threshold. Output to the collision detector.
[0101] The input of the baseline learning module is connected to the output of the residual calculator to receive the filtered residual. The baseline learning module dynamically adjusts the lower limit of the threshold by statistically analyzing the residual distribution characteristics through a sliding window during normal operation. Specifically, the maintenance length is... Using a sliding window, calculate the moving mean and standard deviation of the residuals:
[0102]
[0103] in, For the velocity term coefficient, This is the coefficient for the acceleration term.
[0104] Then calculate the lower baseline:
[0105] in, It is a multiple of the standard deviation.
[0106] The window is updated only during periods of non-rapid deceleration, and baseline statistics can only be used for threshold calculation after the window is full. The window is updated using a first-in, first-out (FIFO) method; for each new sample, the oldest sample is removed to maintain a constant window length.
[0107] The output of the baseline learning module is connected to the threshold manager, which calculates the lower baseline limit. Output to the threshold manager.
[0108] The first input terminal of the collision determiner is connected to the output terminal of the residual calculator to receive the filtered residual. The second input of the collision determiner is connected to the output of the threshold manager to receive the final threshold. The third input terminal of the collision detector is connected to the output terminal of the state filter to receive the filtered angular velocity. and angular acceleration The collision determiner executes the following decision logic sequentially: (1) Identification and elimination of transient interference during rapid deceleration: When the following conditions are met When the robot is determined to be in a state of rapid deceleration, baseline window updates and collision confirmation counting are paused during this period. The threshold for rapid deceleration. This is the threshold for rapid deceleration.
[0109] (2) Severity determination: Calculate the residual threshold ratio of each joint. Then take the maximum value. And classified according to the following criteria: Emergency Level: ≥ ; The threshold ratio for emergency level is 2.5 to 5.0, with 3.0 being the preferred value.
[0110] Collision level: > ≥ ; The collision level threshold ratio has a value range of 1.2 to 2.5, with 1.5 being preferred.
[0111] Warning level: > ≥ ; The warning level threshold ratio has a value range of 0.8 to 1.2, with 1.0 being preferred.
[0112] No collision: < , < < .
[0113] (3) Multi-joint voting: The number of joints whose residuals exceed the warning level threshold is: If the joint count exceeds the threshold ≥ If the cycle is determined to be a candidate collision, it is marked as a flag bit. =1, otherwise =0. Where, The threshold for multi-joint voting.
[0114] (4) Continuous confirmation: If =1, then the continuous confirmation count = +1; otherwise =0. When the consecutive confirmation count... ≥ When a collision is detected, it is determined that a collision has occurred. The threshold for continuous confirmation count.
[0115] The collision detector outputs the collision detection result, including the collision flag and the collision axis number. And the severity.
[0116] Taking a certain type of six-axis industrial robot as an example, the control cycle T = 4ms. The parameter configuration is as follows: Velocity filter coefficient =0.3, acceleration filter coefficient =0.3, residual filter coefficient =0.5, basic threshold =10 N·m, baseline window W=80, standard deviation multiple =2.0, rapid deceleration speed threshold =0.1 rad / s, rapid deceleration threshold =3.0 rad / s², voting threshold =2, number of consecutive confirmations =3, Warning Level Multiplier =1.0, Collision-level multiplier =1.5, Emergency Level Multiplier =3.0. The minimum inertia parameter was obtained through parameter identification experiments and preloaded.
[0117] During normal operation, the residual remains within the range of 3–5 N·m. When the robot's end effector collides with a rigid obstacle at a speed of 50 mm / s, the residual exceeds the threshold within the first control cycle and is confirmed for three consecutive cycles, triggering an emergency shutdown. Theoretical analysis shows that this method can complete all calculations within a 4 ms control cycle, with a collision response delay of 12 ms.
[0118] Verification of the transient interference elimination mechanism during rapid deceleration: When the elimination mechanism is not enabled, the robot decelerates rapidly to zero, and residual spikes are caused by friction model errors. These spikes exceed the threshold for 15 consecutive cycles, and the system misjudges it as a collision and stops. After enabling the mechanism, the system correctly identifies the rapid deceleration state and pauses the confirmation count. No false alarms are triggered, and the deceleration is completed normally.
[0119] Figure 5 Based on 12 seconds of simulation data, the simulation includes four operating conditions: normal constant speed, rapid deceleration (0.4s), collision 1, and collision 2. Figure 5 Subgraph (a) shows the comparison between residuals and thresholds: when a collision occurs, the adaptive threshold also rises briefly due to the acceleration term, but the residual peak rises faster, and it can still be detected correctly. Subgraph (b) shows the comparison of decision output: the fixed threshold scheme has 15 false alarms during the rapid deceleration phase, while the adaptive threshold scheme has no false alarms; collision 1 and collision 2 are marked as "confirmed" for 10 / 15 and 11 / 15 frames respectively. Because the continuous confirmation mechanism requires three consecutive cycles of exceeding the threshold before outputting a decision (delay ≤ 12ms), it is not a missed detection.
[0120] The severity of the two collisions in the above simulation scenario differs. Figure 6 and Figure 5 Using the same data set, the severity was graded into three levels: Collision 1 peak ratio 2.5 times → Collision level, Collision 2 peak ratio 10.2 times → Emergency level, verifying that the severity grading mechanism can distinguish between collisions of different intensities.
[0121] Baseline learning load adaptive validation: According to the mechanism design, when load changes cause alterations in the residual distribution, a baseline window refill is triggered (approximately 80 cycles). During the refilling period, the threshold is determined solely by the base threshold and the velocity / acceleration term. After refilling, the lower limit of the threshold is automatically adjusted to the new mean plus k times the standard deviation. (See...) Figure 7 ) Figure 7Based on 60 seconds of real-world operating data from a certain type of collaborative robot, the engineering applicability was verified. The false alarm rate was 0.54% under 60 seconds of complete operating conditions (stationary / acceleration / constant speed / deceleration / reversal). False alarms were concentrated in the baseline non-convergence during the startup phase (11 frames) and the reversal transient during the running phase (69 frames). The startup phase can be avoided by delaying the activation.
[0122] In summary, this invention effectively solves the core problem of existing collision detection methods based on dynamic models, which cannot adapt to dynamic conditions due to the use of fixed thresholds, by leveraging the synergistic effect of adaptive threshold calculation and baseline learning mechanisms. Specifically, this invention decomposes the collision detection threshold into three linearly superimposed components: a base threshold, a velocity-related term, and an acceleration-related term. This allows the threshold to be dynamically adjusted in real time according to the joint motion speed and acceleration—the threshold is appropriately widened during high-speed robot movement to avoid false alarms caused by normal torque fluctuations; the threshold is automatically tightened during low-speed movement to ensure that weak collision signals are not drowned out. Simultaneously, the baseline learning module continuously calculates the mean and standard deviation of the residual distribution through a sliding window during normal operation, dynamically correcting the lower limit of the threshold by adding a multiple of the mean and standard deviation. This allows the system to automatically track residual distribution drift caused by load changes or machine model differences, eliminating the need for repeated manual threshold tuning. The synergistic effect of these two mechanisms enables this method to maintain stable detection sensitivity and a low false alarm rate under different operating conditions, such as high-speed heavy load and low-speed light load, overcoming the inherent contradiction of difficulty in balancing sensitivity and false alarm rate in traditional fixed-threshold schemes.
[0123] Furthermore, this invention employs a rapid deceleration transient interference identification and elimination mechanism. When the joint speed exceeds the speed threshold and the acceleration is less than the negative acceleration threshold, the robot is determined to be in a rapid deceleration state, and baseline window updates and collision confirmation counts are paused. This effectively avoids torque spikes caused by friction model errors during normal rapid deceleration being misjudged as collisions.
[0124] Furthermore, this invention employs a multi-joint voting and continuous confirmation mechanism, requiring at least two joints to simultaneously exceed a threshold and for the collision condition to be met for three consecutive control cycles before a collision is finally confirmed. This effectively suppresses single false triggers caused by transient factors such as electromagnetic interference and communication jitter, improving the system's robustness in complex industrial environments. Through a three-level severity grading mechanism, collision events are classified into warning, collision, and emergency levels based on the ratio of residual to threshold. This allows the system to take differentiated protective actions for collisions of varying intensities, balancing safety and production line continuity.
[0125] The above description is merely an embodiment of the present invention and does not constitute any limitation on the technical scope of the present invention. Therefore, any minor modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. A method for collision detection of an industrial robot based on adaptive threshold and baseline learning, characterized in that, The method executes the following steps sequentially within each control cycle: Receive joint angular velocity signals from the servo system and joint angular acceleration signal A first-order low-pass filter is used to filter the received non-first frame joint angular velocity signals. and joint angular acceleration signal Filtering is performed, and the first frame is directly assigned a value; Receive joint angle feedback from servo system and the filtered angular velocity and filtered angular acceleration The desired joint torque under collision-free conditions is calculated using a robot dynamics model. ; Receive the actual torque from the servo system and expected torque Compare the deviation between the actual torque and the expected torque, and calculate the original torque residual joint by joint. and the original torque residual Perform a second low-pass filter to obtain the filtered residual; Calculate the adaptive collision threshold based on the filtered current joint motion state. The adaptive collision threshold Based on the basic threshold It consists of the linear superposition of velocity-related terms and acceleration-related terms; Simultaneously, during normal operation, the distribution characteristics of the residuals after statistical filtering via a sliding window are used to calculate the lower limit of the threshold. ; Take the adaptive collision threshold With the lower threshold The maximum value in is used as the final threshold. ; Calculate the residual threshold ratio based on the filtered residual and the final threshold. And obtain the maximum residual threshold ratio When the maximum residual threshold is greater than Greater than the warning level threshold A collision is determined to have occurred.
2. The industrial robot collision detection method based on adaptive threshold and baseline learning according to claim 1, characterized in that, The filtered angular velocity and angular acceleration are as follows: in, For the first The first cycle The filtered angular velocity of the joint, For the first The feedback from the servo system in the [number]th cycle Joint original angular velocity, For velocity filtering coefficients, For the first The first cycle Filtered angular acceleration of the joint. For the first The feedback from the servo system in the [number]th cycle Joint primitive angular acceleration, These are the acceleration filter coefficients; The desired torque The calculation is as follows: in, The minimum parameter regression matrix, The minimum inertia parameter estimate obtained by identification; For joint angle, The filtered angular velocity, This represents the angular acceleration after filtering.
3. The industrial robot collision detection method based on adaptive threshold and baseline learning according to claim 1, characterized in that, The original torque residual is calculated as follows: in, For the first Joint original torque residual, The actual torque of the servo feedback. The desired torque calculated for the model; The filtered residuals are as follows: in, For the first The first cycle Joint filtering residuals These are the residual filter coefficients.
4. The industrial robot collision detection method based on adaptive threshold and baseline learning according to claim 1, characterized in that, The adaptive threshold is calculated as follows: in, For the velocity term coefficient, For acceleration term coefficients; The lower limit of the baseline is calculated as follows: in, It is a multiple of the standard deviation; , Calculate the moving mean and standard deviation of the residuals, respectively: Where W is the length of the sliding window. For the first in the window One residual sample.
5. The industrial robot collision detection method based on adaptive threshold and baseline learning according to claim 1, characterized in that, Residual threshold ratio The calculation is as follows: 。 6. The industrial robot collision detection method based on adaptive threshold and baseline learning according to claim 1, characterized in that, When analyzing the distribution characteristics of the residuals after statistical filtering using a sliding window, the sliding window is continuously updated over time. Before updating the sliding window, a rapid deceleration condition is determined, and the determination condition is as follows: in, The threshold for rapid deceleration. This refers to the acceleration threshold for rapid deceleration. During rapid deceleration, the baseline window is not updated and the collision confirmation counter is not incremented; the window is only updated during non-rapid deceleration periods.
7. The industrial robot collision detection method based on adaptive threshold and baseline learning according to claim 1, characterized in that, The severity of the collision is determined based on the ratio of the residual to the threshold, as follows: Emergency Level: ≥ ; Collision level: > ≥ ; Warning level: > ≥ ; No collision: < , in, The ratio of emergency level thresholds, The collision level threshold ratio, The ratio of warning level thresholds, < < .
8. The industrial robot collision detection method based on adaptive threshold and baseline learning according to claim 1, characterized in that, When a collision is determined to have occurred, multi-joint voting and continuous confirmation are performed: Joint count exceeding the threshold: If the joint count exceeds the threshold ≥ If the cycle is determined to be a candidate collision, it is marked as a flag bit. =1, otherwise =0; like =1, then the continuous confirmation count = +1; otherwise =0; When consecutive confirmation count ≥ When a collision occurs, the system determines that a collision has occurred and outputs a collision flag, a collision axis number, and the severity of the collision. The threshold for continuous confirmation count.
9. An industrial robot collision detection system based on adaptive threshold and baseline learning, deployed within a robot controller, characterized in that, include: The state filter has its input connected to the feedback channel of the servo system. It receives the joint angular velocity and joint angular acceleration fed back by the servo system, performs a first-order low-pass filter on the joint angular velocity and joint angular acceleration, and outputs the filtered joint motion state. The dynamic model module has a first input terminal connected to the output terminal of the state filter to receive the filtered joint motion state, and a second input terminal connected to the angle feedback channel of the servo system to receive the joint angle. The dynamic model module has a built-in minimum parameter regression matrix and pre-identified inertial parameters, and calculates and outputs the desired torque based on the joint state. The residual calculator has its first input terminal connected to the output terminal of the dynamic model module to receive the desired torque, and its second input terminal connected to the torque feedback channel of the servo system to receive the actual torque. The residual calculator calculates the absolute value of the difference between the actual torque and the desired torque to obtain the torque residual, performs a first-order low-pass filter on the torque residual, and outputs the filtered residual. The baseline learning module, whose input is connected to the output of the residual calculator, receives the filtered residual, and during normal operation, statistically analyzes the residual distribution characteristics through a sliding window, calculates the lower limit of the threshold, and outputs it. A threshold manager has a first input connected to the output of the state filter to receive the filtered joint motion state, and a second input connected to the output of the baseline learning module to receive the lower threshold. The threshold manager calculates an adaptive collision threshold based on the joint motion state. The adaptive collision threshold is composed of a base threshold, a velocity-related term, and an acceleration-related term, and the maximum value between the adaptive collision threshold and the lower threshold is taken as the final threshold output. The collision detector has its first input terminal connected to the output terminal of the residual calculator to receive the filtered residual, and its second input terminal connected to the output terminal of the threshold manager to receive the final threshold. The collision detector compares the filtered residual with the final threshold. When the residual exceeds the threshold, it determines that a collision has occurred and outputs the collision detection result.
10. The industrial robot collision detection system based on adaptive threshold and baseline learning according to claim 9, characterized in that, The output of the state filter is also connected to the third input of the collision detector, and the filtered joint motion state is output to the collision detector for rapid deceleration judgment. The collision decision-maker also performs at least one of the following: rapid deceleration transient interference elimination judgment, multi-joint voting, severity classification, and continuous confirmation; The rapid deceleration transient interference elimination judgment is as follows: when the absolute value of the filtered angular velocity exceeds the velocity threshold and the filtered angular acceleration is less than the negative acceleration threshold, the robot is determined to be in a rapid deceleration state. During the rapid deceleration state, the update of the sliding window is paused and the collision confirmation count is not incremented. The multi-joint voting is as follows: calculate the ratio of the residual of each joint to the final threshold, count the number of joints whose ratio exceeds the warning level threshold ratio, and when the number of joints exceeding the threshold reaches the voting threshold, the control cycle is determined to be a candidate collision. The severity classification is as follows: take the maximum value among the ratios of the residuals of each joint to the final threshold, and classify the collision severity into warning level, collision level and emergency level according to the comparison results of the maximum value with the ratios of the warning level threshold, collision level threshold and emergency level threshold. The continuous confirmation is defined as follows: when a certain control cycle is determined to be a candidate collision, the continuous confirmation count is incremented; otherwise, it is reset to zero. When the continuous confirmation count reaches the continuous confirmation threshold, the collision is finally confirmed to have occurred.
