1. Introduction
In physical human–robot interaction (pHRI) [
1,
2], quantifying the severity of collisions on the human body provides critical guidance for higher-level systems in managing post-collision events. Haddadin et al. [
3,
4] systematically investigated this problem through extensive experiments, quantifying the severity of impacts on different parts of the human body. Their results demonstrated that relative velocity, effective mass, and the elastic modulus of the contact surface all influence collision severity, with the relative velocity at impact identified as the dominant factor. In contrast, the contribution of the robot’s reflected mass exhibits a saturation effect [
5,
6]. Building on this work, Haddadin later introduced the concept of a “collision event pipeline” [
7], a generic stage-based framework that decomposes the collision process into multiple phases to facilitate systematic analysis.
Novel robotic components, such as the adaptive soft robotic actuator (ASRA) [
8], have also been explored for collision detection, showing promising response speed and accuracy but limited general applicability. A generalized momentum-based collision detection method was first introduced by Haddadin [
3] and experimentally validated in various pHRI scenarios. This approach is simple to implement, requires no external sensors, and has demonstrated broad applicability. At its core, the first-order momentum observer (FOMO) estimates external torques by computing momentum residuals, without relying on joint angular accelerations or the inverse of the inertia matrix, thereby substantially reducing sensitivity to measurement noise [
9]. Building on this framework, the second-order momentum observer (SOMO) [
10] exhibits stronger robustness to velocity noise, albeit at the expense of slower response and without a complete theoretical proof. An improved second-order observer [
11,
12] enhances dynamic performance by incorporating a feedforward term, which shortens response time but compromises disturbance rejection relative to the standard SOMO. More recently, Liu [
13] proposed a higher-order generalized momentum observer that achieves stronger disturbance rejection by adopting a higher cutoff frequency, though at the cost of increased computational burden inherent to higher-order systems.
Kalman filtering has shown strong potential for suppressing noise in external torque estimation. Wahrburg et al. [
14] first applied Kalman filtering to robotic manipulators, formulating a state-space model based on generalized momentum that effectively attenuated noise but exhibited limited performance in handling nonlinearities such as friction. Moreover, due to the inherent properties of Kalman filtering, inaccuracies in covariance matrices led to amplified estimation errors. To address these limitations, Yigit et al. [
15] employed the extended Kalman filter (EKF), which improved robustness against nonlinear factors including friction, though estimation accuracy remained suboptimal. Wang et al. [
16] further advanced this approach by integrating encoder and accelerometer measurements within an EKF framework to estimate link-side states, achieving substantial improvements in estimation precision and dynamic responsiveness. However, the reliance on accelerometers increased both system cost and complexity. More recently, Dong et al. [
15] proposed a sliding window variational adaptive Kalman filtering method grounded in an error probability model. By adaptively updating the external force parameters of the ECM within the process model, this approach significantly reduced estimation error without requiring additional sensors. Neural network basis functions combined with barrier Lyapunov functions have been exploited to enhance signal convergence [
12], while fuzzy logic systems have been employed to approximate nonlinearities, leading to fuzzy compensation disturbance observers that mitigate the impact of initial values [
17,
18].
In recent years, extensive efforts have been devoted to adaptive Kalman filtering algorithms and external torque estimation [
19,
20,
21] in robotic systems. A defining feature of adaptive Kalman filters is their ability to provide real-time estimates of noise covariance. For example, Ref. [
22] employed perturbation analysis of the discrete-time algebraic Riccati equation (DARE) to examine the sensitivity of Kalman filters to deviations in noise covariance estimates, thereby assessing estimation accuracy. Building on this line of work, Zhenwei Li et al. [
23] developed a variational Bayesian maximum correntropy cubature Kalman filter with adaptive kernel bandwidth, where the bandwidth was updated online using Mahalanobis distance. This approach substantially reduced the influence of non-Gaussian measurement noise on the estimation results. However, the method suffers from high computational cost and sensitivity to parameter tuning, which constrains its applicability in broader scenarios.
In this work, we propose a Kalman filtering-based algorithm for estimating interaction torques in robotic manipulators under conditions of uncertain or time-varying process noise covariance. The method employs variational inference to estimate unknown process noise covariances, decoupling noise parameters from manipulator configurations and payload characteristics. At each measurement cycle, the posterior probability density function of the noise covariance is iteratively updated within a closed-form variational Bayesian framework, yielding an approximate Gaussian posterior of the process noise. This enables optimal external torque estimation through Kalman filtering. The approach is experimentally validated on a Franka manipulator and benchmarked against several state-of-the-art methods for external torque estimation in real robotic systems.
2. Materials and Methods
2.1. System Dynamics of Robotic Manipulators
When a robotic manipulator interacts with the external environment through force exchange, and assuming rigid joints and rigid links, the system dynamics can be described by the following equation of motion [
24]:
where the position and velocity of the linkage are denoted by
, where
n is the number of joints, respectively, and the two variables are the states of the robot.
denotes the symmetric positive definite inertia matrix,
denotes the Coriolis matrix satisfying passivity, and
is the gravity torque vector. The torque generated by the motor
and the external torque
are the inputs to the system. In practice, the joint angle
q can be obtained either by multiplying the motor’s actual angle
by the joint reduction ratio or directly from the joint’s absolute encoder. The joint angular velocity
is computed via differentiation of the joint angle, while the motor torque
is derived by multiplying the measured current with a fixed gain
. The external force
corresponds to the mapping of the generalized contact force
in Cartesian space to the joint space of the manipulator.
From the reformulation of the manipulator dynamics under the momentum concept, we obtain
The standard KF provides the optimal linear estimate of system states under the assumption of an accurate model, even in the presence of noisy measurements. To estimate the interactive torque of a robotic arm using the KF, a model of the robotic arm must be formulated. In this context,
and a noise term
. The time derivative of momentum can be interpreted as the resultant of all forces acting on the system at that moment. Consequently, the dynamic equation of the robotic arm can be rewritten as
Following the design principle of the classical disturbance observer, the driving torque is modeled as a constant, whereas the derivative of the external torque is treated as noise-driven. Set
,
, and the system state variables are defined as
, which can thus be formulated in the following state-space form:
Here,
denotes the measured generalized momentum,
represents the system measurement noise, and by augmenting the system state variable
, it follows that the process noise
is assumed to follow the normal distribution:
Here,
and
denote components of the system process noise covariance matrix, while
represents the system measurement noise covariance matrix.
Accordingly, the state-space representation can be rewritten as
where
and
. Upon discretization, the equation can be written as
Discretization of the above equation yields
Meanwhile, the parameters of the system state equation can be expressed as , , , and is the sampling time.
2.2. Effects of Noise Modeling Inaccuracies on External Torque Estimation
The optimality of the Kalman filter fundamentally depends on accurate knowledge of process and measurement noise covariances. However, in robotic manipulators, process noise varies with configuration and joint velocity, making fixed covariance assumptions unrealistic. Such mismatches reduce estimation accuracy, leading to false collision detections or erroneous external torque estimates that may compromise system safety. Prior work [
15,
25] analyzed these effects by comparing filter-calculated (FMSE), true (TMSE), and ideal (IMSE) mean squared errors, providing a quantitative view of estimation error under covariance mismatch.
To analyze the performance of the filter under conditions of process noise covariance mismatch, the process noise covariance matrix
is defined as follows:
Here,
denotes the process noise covariance matrix employed in the filtering equations,
represents the true process noise covariance matrix of the system, and
denotes the deviation between them. When the practically applied process noise covariance matrix
is substituted into the Kalman filter framework, the recursive form of the filter can be expressed as
Here, the superscript
f denotes the output term computed by the filter. According to the recursive equations, at time step
k, the covariance matrix
must be calculated under the current state estimate
. However, due to the substitution of
, the state estimates across two consecutive time steps are given by
In the presence of covariance mismatch , the covariance matrix under the ideal mean squared error (IMSE) fails to capture the true estimation error of the Kalman filter, thereby distorting the update of the Kalman gain .
2.3. Variational Inference-Based Adaptive External Torque Estimation Algorithm
The complexity of robotic systems makes process noise difficult to model, which limits the accuracy of Kalman filter-based external torque estimation. To address time-varying and non-Gaussian noise, we employ variational inference to approximate latent variable distributions from historical system data, enabling online estimation of the noise covariance. This adaptive framework allows dynamic parameter adjustment in response to noise variations, thereby improving the accuracy of external torque estimation for robotic systems.
Building on the feasibility of Kalman filtering for external torque estimation in robotic manipulators, the modeling error of ultimately leads to inaccuracies in torque estimation. The problem addressed in this section therefore reduces to deriving an approximate distribution of in order to improve the accuracy of external torque estimation.
Using variational inference, this subsection provides a detailed derivation of the implementation of variational Kalman filtering within robotic dynamics, with the estimation procedure encapsulated into an algorithmic module. It is assumed that the system noise
is governed by an independent dynamic model, decoupled from the system state variable
:
According to the Chapman–Kolmogorov relation, the prior of the system state
jointly with the process noise covariance
is given by
and with the incorporation of the subsequent measurement, Bayes’ theorem yields the posterior distribution
Variational inference approximates an intractable posterior with a tractable distribution, reformulating inference as the optimization of a closed-form variational distribution. Recalling the prediction step of the classical Kalman filter,
In this formulation, denotes the state transition matrix. The predicted covariance matrix depends not only on the process noise covariance matrix , but also on . To fully characterize the predicted covariance, we introduce a latent variable , leading to the representation .
The process noise covariance matrix
is assumed to have a prior governed by an Inverse-Wishart (IW) distribution. According to mean-field theory, one obtains
The inverse Wishart distribution is adopted due to its broad conjugacy, superior adaptability to complex data structures, and clear advantages in covariance estimation compared to other conjugate priors.The inverse Wishart distribution is better suited for high-dimensional covariance estimation in robotic manipulators, while the inverse Gaussian is more appropriate for localized impulsive noise. For brevity,
is used in place of
, yielding
Formally, the divergence between
and
is defined as
Consider the
j-th latent variable
.
Evidently, in order to minimize the KL divergence, it follows that
Since
corresponds to the probability density function of
, it follows that
, and normalization yields
Under the convexity assumption, it follows from the properties of the evidence lower bound that the variational inference procedure is guaranteed to converge.
By the evidence lower bound (ELBO) property, we obtain
Expanding
yields:
It is straightforward to derive the approximate posterior distributions of
,
, and
.
where
is an indeterminate constant, and by setting
, we obtain
Under the stated assumption,
,
,
:
and accordingly, we have
The variational Kalman-based external torque estimation method employs a closed-loop iterative scheme to estimate the process noise covariance, which is then incorporated into the momentum-based Kalman filter torque observer. Simulation results demonstrate that employing a Lyapunov-based function improves torque estimation stability and smoothness, thereby enhancing overall system performance. This formulation preserves the linear optimality of the Kalman filter even under covariance mismatch.
3. Results
To evaluate the performance of the proposed torque estimation algorithm, experiments were conducted on the Franka robotic arm, as illustrated in
Figure 1, chosen as the platform for collision detection and external torque estimation. Developed by Franka Emika in Germany, Franka integrates high precision, flexibility, and safety, and is widely employed in research and industry. Each joint is equipped with a high-resolution torque sensor (<0.05 N), making it particularly suitable for experimental validation.
The experimental protocol comprised three scenarios: torque estimation under fixed-configuration, no-load conditions to assess noise suppression; rigid-box impacts at the end-effector to evaluate collision detection; and transient human hand interactions to examine external torque estimation under compliant contact. Given that the proposed algorithm relies on the assumption of a known dynamic model, a comprehensive dynamic identification of the Franka manipulator was performed prior to the collision detection experiments to ensure the validity and reliability of the subsequent evaluations. In
Figure 2, the data acquisition process is illustrated. The joint torque sensors embedded in each link of the robotic arm capture the measured torques experienced by the joints during motion.
For ease of reading, an abbreviation table for the algorithms is provided, as shown in
Table 1. External torque of the Franka arm under collision-free conditions was estimated using ESO, KFMO, SH-AKFMO, and VBKFMO-Q.
The initial value of the process noise is set as follows: . The observation noise covariance is set to the current actual value. The initial values and is set to 8. Main parameters of ESO: , . Main parameters of KF: = 80,000I. Main parameters of SH-AKF: = 40,000I, . Main parameters of AETE: = 80,000I, , .
Figure 3 indicates that, even in the absence of external forces, all considered momentum observers exhibit non-negligible estimation bias arising from modeling inaccuracies. During external torque estimation, abrupt transients may be erroneously interpreted as collisions. However, the observations presented in
Figure 4 reveal that the absolute estimation errors remain low across the different observers, minimizing the likelihood of false collision detection. This pattern is further substantiated by the results summarized in
Table 2.
Figure 5 and
Figure 6 depict the observer outputs and corresponding joint-wise external torque estimation errors during collisions with a rigid object. Notably, for joints 1 through 4, ESO and KF exhibit substantial overshoot and discernible phase lag, whereas joints 5 through 7 show comparable performance across all four observers. This discrepancy arises because the collision occurs near the end-effector, with proximal joints (5–7) experiencing minimal perturbation, resulting in estimation behavior akin to collision-free conditions. From the detailed visualization of torque estimation, it is evident that the red dashed curve exhibits greater smoothness, and the predicted results align more closely with the actual torque.
In
Table 3, evaluation based on root-mean-square error indicates that VBKFMO-Q achieves marginally superior external torque estimation relative to SH-AKFMO, while ESO and KF demonstrate considerably lower accuracy.
Figure 7 depicts joint torque estimation during a brief (0.5 s) interaction with a compliant object (human hand) at the robotic arm’s end-effector, showing the external torque observations from the different observers. When the robotic manipulator collides with a compliant object, the advantages of VBKFMO-Q become particularly pronounced, especially in the first three joints, where it demonstrates markedly superior torque estimation accuracy and response speed compared to other torque observers of the same class. The corresponding joint-wise estimation error curves are presented in
Figure 8, and
Table 4 summarizes the root-mean-square errors for each observer throughout this interaction. Notably, the red dashed line represents the proposed VBKFMO-Q observer, which exhibits superior rapid response and estimation accuracy under soft contact conditions, closely approximating the actual external torque. Its smooth output profile further underscores its suitability for practical engineering applications.
Root-mean-square error analysis demonstrates that, in line with the preceding two experimental scenarios, the proposed algorithm consistently yields lower RMSE, with torque trajectories exhibiting both smoothness and rapid dynamic response. A consistent observation across all three experiments is that, given end-effector contact, torque estimations and corresponding RMSE progressively smooth with increasing joint indices. This phenomenon reflects that, under sufficiently accurate modeling, joints distal to the collision site are subject to attenuated perturbations, thereby providing a rigorous basis for subsequent collision isolation and identification.
4. Conclusions
In this work, an adaptive external torque estimation algorithm for robotic manipulators was proposed, capable of automatically adjusting the system process noise covariance matrix. First, commonly used generalized momentum observers were reviewed and derived based on the robot dynamics model to address human–robot safety requirements. Then, an external torque estimation method grounded in generalized momentum was described, and the effects of covariance mismatch on Kalman filter estimation were analyzed. To handle practical situations where the system process noise is unknown and difficult to model, a method was developed to adaptively adjust the process noise covariance matrix using historical data, which was then incorporated into the Kalman filter recursive equations to improve estimation accuracy. The algorithm was validated experimentally on the Franka manipulator under three scenarios: static with no external torque, collision with a rigid object, and brief contact with a compliant object. The proposed algorithm is broadly applicable to serial-link manipulators with identified dynamics, ensuring compatibility with widely used robotic systems. The results demonstrate that the proposed method provides fast and accurate external torque estimates without additional sensors, offering a reliable basis for safe operation in human–robot collaborative tasks.