Research on Gravity Compensation for Six-Axis Force Sensor Using Unscented Kalman Filter

In human-robot interaction systems, precise force measurement is critical for ensuring safety, reliability, and operational accuracy. The six-axis force sensor is widely used to measure forces and torques in three-dimensional space, but it is susceptible to inaccuracies due to gravitational effects from end-effector tools. These inaccuracies arise because the sensor’s zero-point shifts as the robot’s pose changes during motion, leading to significant errors in force readings. Traditional compensation methods, such as linear regression, least squares, wavelet transforms, neural networks, and particle swarm optimization, have limitations in handling nonlinearities and complex sensor models, often requiring extensive parameter tuning and struggling with environmental variations. To address these challenges, we propose a gravity compensation algorithm based on the Unscented Kalman Filter (UKF) for six-axis force sensors. The UKF effectively estimates and corrects sensor errors by processing measurement data through a nonlinear filtering approach, without the need for linearization. This method leverages the unscented transformation to approximate the probability distribution of system states, enabling robust and accurate error correction. In this paper, we detail the UKF algorithm design, including state vector selection, noise modeling, and prediction-correction steps, and validate its performance through experiments involving dynamic unloaded conditions. Results demonstrate that the UKF-based approach significantly reduces sensor errors, enhancing measurement precision for applications in robotics and beyond.

The six-axis force sensor is integral to various fields, including industrial automation, aerospace, and medical devices, due to its ability to provide real-time force and torque feedback. However, gravitational forces from attached tools introduce biases that compromise data integrity. Existing compensation techniques often fail to account for nonlinear dynamics or require complex calibrations. For instance, linear methods assume a static relationship between sensor readings and gravity, which is invalid in dynamic scenarios. Neural networks can adapt but demand large datasets and computational resources. The UKF offers a superior alternative by handling nonlinear systems through sigma points that capture the state distribution, ensuring accurate estimations even with noisy measurements. Our work focuses on implementing UKF for a six-axis force sensor mounted on a robotic arm, with the goal of minimizing gravitational errors to near zero. By comparing raw sensor data with UKF-processed outputs, we show that the algorithm reduces force and torque deviations effectively, making it suitable for high-precision tasks like assembly, surgery, and collaborative robotics.

The Unscented Kalman Filter is a recursive estimator that extends the standard Kalman Filter to nonlinear systems without linearization. It uses the unscented transformation to generate sigma points that represent the mean and covariance of the state distribution. These points are propagated through the nonlinear system to compute predicted states and measurements, followed by a correction step using actual sensor data. For a six-axis force sensor, the state vector typically includes forces and torques along the X, Y, and Z axes. The UKF algorithm involves initializing parameters, predicting states, and updating estimates based on measurements. Key advantages include its ability to handle non-Gaussian noise and nonlinearities, which are common in force sensor data. In the following sections, we describe the mathematical formulation of UKF and its application to gravity compensation for a six-axis force sensor.

The state vector for the six-axis force sensor is defined as:
$$x = [f_x, f_y, f_z, m_x, m_y, m_z]^T$$
where $f_x$, $f_y$, and $f_z$ represent forces along the X, Y, and Z axes, and $m_x$, $m_y$, and $m_z$ denote torques about these axes. The state transition function models the system dynamics, while the measurement function relates states to sensor outputs. Process noise $Q$ and measurement noise $R$ are assumed to be zero-mean Gaussian distributions, with covariances derived from sensor characteristics. The unscented transformation parameters—$\alpha$, $\beta$, and $\kappa$—control the spread of sigma points; we set $\alpha = 0.001$, $\beta = 2$, and $\kappa = 0$ based on empirical tuning for the six-axis force sensor. The prediction step computes the prior state estimate and covariance, while the correction step refines these using sensor measurements.

In the prediction phase, the state vector and covariance matrix are propagated forward:
$$x_{k|k-1} = f(x_{k-1|k-1})$$
$$P_{k|k-1} = G_{k-1} P_{k-1|k-1} G_{k-1}^T + Q_{k-1}$$
where $f$ is the state transition function, $G$ is the state transition matrix, and $Q$ is the process noise covariance. For the six-axis force sensor, we assume a constant velocity model, where forces and torces change gradually. The sigma points are generated as:
$$X_{k|k-1}^{(0)} = x_{k|k-1}$$
$$X_{k|k-1}^{(i)} = x_{k|k-1} + \left( \sqrt{(n + \lambda) P_{k|k-1}} \right)_i, \quad i = 1, \dots, n$$
$$X_{k|k-1}^{(i+n)} = x_{k|k-1} – \left( \sqrt{(n + \lambda) P_{k|k-1}} \right)_i, \quad i = 1, \dots, n$$
where $n$ is the state dimension (6 for the six-axis force sensor), and $\lambda = \alpha^2 (n + \kappa) – n$. These points are transformed through the measurement function $h$ to obtain predicted measurements:
$$y_{k|k-1}^{(i)} = h(X_{k|k-1}^{(i)}), \quad i = 0, \dots, 2n$$
The predicted measurement mean and covariance are calculated as:
$$y_{k|k-1} = \sum_{i=0}^{2n} w_i^{(m)} y_{k|k-1}^{(i)}$$
$$P_{yy,k|k-1} = \sum_{i=0}^{2n} w_i^{(c)} (y_{k|k-1}^{(i)} – y_{k|k-1}) (y_{k|k-1}^{(i)} – y_{k|k-1})^T + R_k$$
where $w_i^{(m)}$ and $w_i^{(c)}$ are weights for the mean and covariance, respectively.

The correction phase updates the state estimate using the Kalman gain:
$$K_k = P_{xy,k|k-1} P_{yy,k|k-1}^{-1}$$
$$x_{k|k} = x_{k|k-1} + K_k (y_k – y_{k|k-1})$$
$$P_{k|k} = P_{k|k-1} – K_k P_{yy,k|k-1} K_k^T$$
where $P_{xy,k|k-1}$ is the cross-covariance matrix between state and measurement predictions. For the six-axis force sensor, this process effectively compensates for gravitational biases by iteratively adjusting estimates based on real-time data.

To validate the UKF algorithm, we conducted experiments using a six-axis force sensor (model KWR 75) with a sampling rate of 1000 Hz. The sensor was mounted between a robotic arm (RM-65) and an anthropomorphic robotic hand to simulate human-robot interaction scenarios. Data were collected under dynamic unloaded conditions, where the robotic arm was subjected to accelerations and angular velocities without external contacts. This setup allowed us to isolate gravitational effects on the six-axis force sensor readings. The raw sensor data exhibited significant errors due to gravity, with force deviations up to 6 N and torque deviations up to 1 N·m. We applied the UKF algorithm to process these data, initializing the state vector with measured forces and torques and setting noise covariances based on sensor specifications.

The experimental results show a marked improvement in accuracy after UKF processing. For instance, force errors along the X-axis were reduced from 0–3 N to 0–0.162 N, while torque errors about the Z-axis decreased from 0–1 N·m to 0–0.039 N·m. The following table summarizes the error ranges before and after UKF compensation for the six-axis force sensor:

Axis Error Type Raw Data Error Range UKF-Processed Error Range
X Force (N) 0–3 0–0.162
Y Force (N) 0–2 0–0.160
Z Force (N) 0–6 0–0.227
X Torque (N·m) 0–1 0–0.010
Y Torque (N·m) 0–1 0–0.010
Z Torque (N·m) 0–1 0–0.039

The UKF algorithm’s performance is further illustrated through force and torque plots over time. For example, the X-axis force data, initially noisy and biased, became smooth and centered near zero after processing. Similarly, torque readings showed reduced fluctuations. The algorithm’s robustness is attributed to its ability to handle nonlinearities in the six-axis force sensor dynamics, such as variations in gravitational torque as the robot moves. We also compared UKF with other methods like extended Kalman filter (EKF) and found that UKF provides better accuracy due to its unscented transformation, which avoids linearization errors. The computational cost of UKF is manageable for real-time applications, with each iteration completing within milliseconds on standard hardware.

The effectiveness of the UKF-based gravity compensation can be analyzed mathematically. The state estimation error covariance $P_{k|k}$ converges over time, indicating stable performance. For the six-axis force sensor, the measurement function $h$ is linear in this context, but the state transition $f$ may include nonlinearities from robot kinematics. The UKF handles this by approximating the distribution through sigma points. The Kalman gain $K_k$ adjusts based on the innovation $y_k – y_{k|k-1}$, effectively canceling gravitational biases. The process noise covariance $Q$ and measurement noise covariance $R$ are tuned empirically; for our six-axis force sensor, we set:
$$Q = \text{diag}(0.01, 0.01, 0.01, 0.001, 0.001, 0.001)$$
$$R = \text{diag}(0.1, 0.1, 0.1, 0.01, 0.01, 0.01)$$
reflecting the higher uncertainty in force measurements compared to torques. These values ensure that the UKF prioritizes recent measurements while smoothing out noise.

In practice, implementing UKF for a six-axis force sensor requires careful initialization. The initial state vector $x_{0|0}$ is set to the first sensor reading, and the initial covariance $P_{0|0}$ is chosen based on sensor precision. For our experiments, we used:
$$x_{0|0} = [0, 0, 0, 0, 0, 0]^T$$
$$P_{0|0} = \text{diag}(1, 1, 1, 0.1, 0.1, 0.1)$$
The weights for sigma points are computed as:
$$w_0^{(m)} = \frac{\lambda}{n + \lambda}$$
$$w_0^{(c)} = \frac{\lambda}{n + \lambda} + (1 – \alpha^2 + \beta)$$
$$w_i^{(m)} = w_i^{(c)} = \frac{1}{2(n + \lambda)}, \quad i = 1, \dots, 2n$$
This configuration ensures that the sigma points capture the true distribution mean and covariance, leading to accurate predictions for the six-axis force sensor.

Despite its advantages, the UKF algorithm has limitations. It assumes Gaussian noise, which may not hold for all six-axis force sensor environments. Future work could explore non-Gaussian filters or adaptive UKF variants. Additionally, the algorithm’s parameters require tuning for specific sensor models, which can be time-consuming. Automated tuning methods, such as reinforcement learning, could enhance usability. We also plan to integrate the UKF with other sensor fusion techniques, like inertial measurement units, to further improve accuracy for dynamic robotic applications.

In conclusion, the UKF-based gravity compensation algorithm significantly enhances the precision of six-axis force sensors by reducing errors caused by gravitational forces. Through experimental validation, we demonstrated that the algorithm minimizes force and torque deviations to near zero, making it suitable for high-precision tasks in human-robot interaction. The UKF’s ability to handle nonlinearities without linearization makes it superior to traditional methods. Future research will focus on extending this approach to multi-sensor systems and real-time adaptive filtering for broader applications in robotics and automation. The six-axis force sensor, when combined with UKF, becomes a reliable tool for achieving accurate force control in complex environments.

The mathematical foundation of UKF can be extended to include parameter estimation for the six-axis force sensor. For instance, the sensor’s calibration matrix might be estimated online to account for wear and tear. The state vector could be augmented to include parameters like bias and scale factors:
$$x_a = [f_x, f_y, f_z, m_x, m_y, m_z, b_f, b_m]^T$$
where $b_f$ and $b_m$ represent force and torque biases. The UKF would then estimate these parameters simultaneously, improving long-term accuracy. The prediction and correction equations remain similar, but the state dimension increases, requiring more sigma points. This approach could automate calibration for the six-axis force sensor, reducing maintenance needs.

Another area for improvement is computational efficiency. The UKF requires $2n+1$ sigma points, which for a six-axis force sensor with an augmented state (e.g., $n=8$) results in 17 points. This may be burdensome for low-power embedded systems. Techniques like the scaled unscented transformation or reduced-point filters could be explored to maintain accuracy while lowering computational load. Nonetheless, for most robotic applications, the standard UKF is sufficient, as demonstrated by our real-time experiments with the six-axis force sensor.

In summary, the UKF algorithm offers a robust solution for gravity compensation in six-axis force sensors, addressing key challenges in dynamic environments. By leveraging unscented transformation, it provides accurate state estimates without the pitfalls of linearization. As robotics continues to advance, such algorithms will play a crucial role in enabling precise and safe human-robot collaboration. The six-axis force sensor, empowered by UKF, will find increased use in applications ranging from industrial automation to medical robotics, where force accuracy is paramount.

Scroll to Top