In modern manufacturing, the application of robot technology in polishing and grinding complex parts has become increasingly widespread. These processes require precise perception of external contact forces to ensure quality and efficiency. However, the gravitational force of the end-effector load interferes with force measurements, necessitating accurate gravity compensation. This paper addresses the challenge by proposing a gravity compensation method for six-dimensional force sensors mounted on industrial robots. The method dynamically eliminates the effects of load gravity, sensor zero drift, installation angles, and tool orientation, enabling real-time external force perception during polishing operations. By leveraging robot technology, we enhance the adaptability of robots in handling complex part geometries and varying tool configurations.
The core of the method involves calculating the gravitational components in the sensor coordinate system based on the robot’s current pose and tool installation angles. We collect force sensor data and Euler angles at multiple robot poses, use least squares to determine load parameters, and apply particle swarm optimization to solve for sensor installation deviations. The integration of robot technology ensures that the compensation algorithm accounts for dynamic changes in tool orientation, which is critical for maintaining accuracy in complex polishing tasks. Below, we detail the computational models, experimental validation, and analysis, highlighting the role of robot technology in improving force sensing precision.

The relationship between forces and moments in a six-dimensional force sensor can be described mathematically. Let the sensor readings be represented as $[F_x, F_y, F_z, M_x, M_y, M_z]$, where $F_x, F_y, F_z$ are force components and $M_x, M_y, M_z$ are moment components. The zero points of the sensor are denoted as $[F_{x0}, F_{y0}, F_{z0}]$ for forces and $[M_{x0}, M_{y0}, M_{z0}]$ for moments. The gravitational force of the end-effector load is $G$, and its center of mass in the sensor coordinate system is at $(x, y, z)$. The gravitational components in the sensor frame are $[G_x, G_y, G_z]$, and the corresponding moments are $[M_{gx}, M_{gy}, M_{gz}]$. The equations governing this relationship are:
$$ \begin{cases} G_x = F_x – F_{x0} \\ G_y = F_y – F_{y0} \\ G_z = F_z – F_{z0} \\ M_{gx} = M_x – M_{x0} \\ M_{gy} = M_y – M_{y0} \\ M_{gz} = M_z – M_{z0} \end{cases} $$
From theoretical mechanics, the moments due to gravity are:
$$ \begin{cases} M_{gx} = G_z \cdot y – G_y \cdot z \\ M_{gy} = G_x \cdot z – G_z \cdot x \\ M_{gz} = G_y \cdot x – G_x \cdot y \end{cases} $$
Combining these, we derive:
$$ \begin{cases} M_x = F_z \cdot y – F_y \cdot z + M_{x0} + F_{y0} \cdot z – F_{z0} \cdot y \\ M_y = F_x \cdot z – F_z \cdot x + M_{y0} + F_{z0} \cdot x – F_{x0} \cdot z \\ M_z = F_y \cdot x – F_x \cdot y + M_{z0} + F_{x0} \cdot y – F_{y0} \cdot x \end{cases} $$
By defining constants $k_1$, $k_2$, and $k_3$, we simplify to a matrix form. For $N$ robot poses, we form a system of equations:
$$ \begin{bmatrix} M_{x1} \\ M_{y1} \\ M_{z1} \\ M_{x2} \\ M_{y2} \\ M_{z2} \\ \vdots \\ M_{xN} \\ M_{yN} \\ M_{zN} \end{bmatrix} = \begin{bmatrix} 0 & F_{z1} & -F_{y1} & 1 & 0 & 0 \\ -F_{z1} & 0 & F_{x1} & 0 & 1 & 0 \\ F_{y1} & -F_{x1} & 0 & 0 & 0 & 1 \\ 0 & F_{z2} & -F_{y2} & 1 & 0 & 0 \\ -F_{z2} & 0 & F_{x2} & 0 & 1 & 0 \\ F_{y2} & -F_{x2} & 0 & 0 & 0 & 1 \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ 0 & F_{zN} & -F_{yN} & 1 & 0 & 0 \\ -F_{zN} & 0 & F_{xN} & 0 & 1 & 0 \\ F_{yN} & -F_{xN} & 0 & 0 & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} x \\ y \\ z \\ k_1 \\ k_2 \\ k_3 \end{bmatrix} $$
This is represented as $\mathbf{m} = \mathbf{F} \cdot \mathbf{p}$, where $\mathbf{p} = [x, y, z, k_1, k_2, k_3]^T$. Using least squares, we solve for $\mathbf{p}$:
$$ \mathbf{p} = (\mathbf{F}^T \mathbf{F})^{-1} \cdot \mathbf{F}^T \mathbf{m} $$
This yields the center of mass coordinates and constants $k_1$, $k_2$, $k_3$. The zero points of the moments are then computed as:
$$ \begin{cases} M_{x0} = k_1 – F_{y0} \cdot z + F_{z0} \cdot y \\ M_{y0} = k_2 – F_{z0} \cdot x + F_{x0} \cdot z \\ M_{z0} = k_3 – F_{x0} \cdot y + F_{y0} \cdot x \end{cases} $$
Coordinate transformations are essential in robot technology for mapping forces between frames. The world coordinate system $O_0-X_0Y_0Z_0$ aligns with the robot base, with $Z_0$ pointing upward against gravity. The sensor frame $O_1-X_1Y_1Z_1$ is derived by rotating the base frame by Euler angles $o$, $a$, and $t$ (Z-Y-Z sequence). The transformation matrix from sensor to base frame is:
$$ \mathbf{R}_1^0 = \text{Rot}(z, o) \cdot \text{Rot}(y, a) \cdot \text{Rot}(z, t) $$
where the rotation matrices are:
$$ \text{Rot}(z, \theta) = \begin{bmatrix} \cos \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{bmatrix}, \quad \text{Rot}(y, \theta) = \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin \theta & 0 & \cos \theta \end{bmatrix} $$
The full transformation matrix is:
$$ \mathbf{R}_1^0 = \begin{bmatrix} \cos o \cos a \cos t – \sin o \sin t & -\cos o \cos a \sin t – \sin o \cos t & \cos o \sin a \\ \sin o \cos a \cos t + \cos o \sin t & -\sin o \cos a \sin t + \cos o \cos t & \sin o \sin a \\ -\sin a \cos t & \sin a \sin t & \cos a \end{bmatrix} $$
Gravity in the base frame is $\mathbf{g}^0 = [0, 0, -1]^T$, and in the sensor frame, it is $\mathbf{g}^1 = (\mathbf{R}_1^0)^T \cdot \mathbf{g}^0$. The force components relate as:
$$ \begin{bmatrix} F_x \\ F_y \\ F_z \end{bmatrix} = \mathbf{R}_1^0 \cdot \begin{bmatrix} 0 \\ 0 \\ -G \end{bmatrix} + \begin{bmatrix} F_{x0} \\ F_{y0} \\ F_{z0} \end{bmatrix} = \left[ (\mathbf{R}_1^0)^T \mid \mathbf{I} \right] \cdot \begin{bmatrix} 0 \\ 0 \\ -G \\ F_{x0} \\ F_{y0} \\ F_{z0} \end{bmatrix} $$
For $N$ poses, we form a system and solve for the parameters using least squares. The gravitational components in the sensor frame are:
$$ \begin{cases} g_x = \sin a \cdot \cos t \cdot G \\ g_y = -\sin a \cdot \sin t \cdot G \\ g_z = -\cos a \cdot G \end{cases} $$
External forces are then computed by subtracting the zero points and gravitational components:
$$ \begin{cases} F_{ex} = F_x – F_{x0} – g_x \\ F_{ey} = F_y – F_{y0} – g_y \\ F_{ez} = F_z – F_{z0} – g_z \\ M_{ex} = M_x – M_{x0} – M_{gx} \\ M_{ey} = M_y – M_{y0} – M_{gy} \\ M_{ez} = M_z – M_{z0} – M_{gz} \end{cases} $$
Sensor installation angles are optimized using particle swarm optimization due to machining and assembly errors. The transformation between sensor and flange frames involves rotations $\alpha$ (about Z) and $\beta$ (about Y). The transformation matrix is:
$$ \mathbf{T} = \begin{bmatrix} \cos \alpha \cos \beta & -\sin \alpha & \cos \alpha \sin \beta \\ \sin \alpha \cos \beta & \cos \alpha & \sin \alpha \sin \beta \\ -\sin \beta & 0 & \cos \beta \end{bmatrix} $$
Gravity in the adjusted sensor frame is $\mathbf{g}^2 = \mathbf{T}^T \cdot \mathbf{g}^1$. The optimization minimizes the sum of squared errors between measured and computed forces. The objective function is:
$$ \gamma(\alpha, \beta) = \sum_{i=1}^N \left( \sigma_{xi}^2 + \sigma_{yi}^2 + \sigma_{zi}^2 \right) $$
where $\sigma_{xi}, \sigma_{yi}, \sigma_{zi}$ are force errors for pose $i$. Particle swarm optimization iteratively updates particle positions and velocities to find optimal $\alpha$ and $\beta$.
For tool installation angles, defined by Euler angles $A$, $B$, $C$, the transformation from tool to base frame is:
$$ \mathbf{R}_2^0 = \begin{bmatrix} \cos A \cos B \cos C – \sin A \sin C & -\cos A \cos B \sin C – \sin A \cos C & \cos A \sin B \\ \sin A \cos B \cos C + \cos A \sin C & -\sin A \cos B \sin C + \cos A \cos C & \sin A \sin B \\ -\sin B \cos C & \sin B \sin C & \cos B \end{bmatrix} $$
Gravity in the sensor frame, accounting for tool orientation, is:
$$ \begin{bmatrix} g_{3x} \\ g_{3y} \\ g_{3z} \end{bmatrix} = \mathbf{T}^T \cdot \mathbf{R}_2^0 \cdot \begin{bmatrix} g_x \\ g_y \\ g_z \end{bmatrix} $$
Experiments were conducted using a Kawasaki RS020N robot and an ATI Delta SI-660-60 force sensor. The robot technology platform included various end-effectors for polishing. Data was collected at multiple poses to compute parameters. The table below shows sensor measurements at six poses:
| Pose | $F_x$ (N) | $F_y$ (N) | $F_z$ (N) | $M_x$ (N·m) | $M_y$ (N·m) | $M_z$ (N·m) |
|---|---|---|---|---|---|---|
| 1 | 64.291 | 41.572 | 0.207 | -3.295 | 2.739 | -0.112 |
| 2 | 1.158 | -7.457 | 81.072 | 0.084 | -1.044 | 0.247 |
| 3 | -74.473 | -5.014 | 2.662 | -0.493 | -5.589 | 0.674 |
| 4 | 3.593 | -0.892 | -73.060 | -1.129 | -0.911 | 0.239 |
| 5 | 4.214 | -60.765 | 3.232 | 4.075 | -0.830 | 0.232 |
| 6 | -40.153 | 5.178 | 67.268 | -0.750 | -3.534 | 0.473 |
Euler angles for these poses are:
| Pose | $o$ (°) | $a$ (°) | $t$ (°) |
|---|---|---|---|
| 1 | -179.960 | 85.362 | -35.598 |
| 2 | -91.398 | 179.184 | 88.600 |
| 3 | -0.620 | 89.839 | 179.810 |
| 4 | -115.523 | 0.477 | -64.472 |
| 5 | 89.998 | 90.936 | 89.793 |
| 6 | -154.608 | 144.128 | -165.311 |
Computed parameters include load gravity $G = 76.8773$ N, center of mass $(x, y, z) = (-0.00006, 0.0054, 0.0601)$ m, and sensor installation angles $\alpha = 1.53°$, $\beta = -1.7°$. Sensor zero points are:
| $F_{x0}$ (N) | $F_{y0}$ (N) | $F_{z0}$ (N) | $M_{x0}$ (N·m) | $M_{y0}$ (N·m) | $M_{z0}$ (N·m) |
|---|---|---|---|---|---|
| 2.3583 | -4.9745 | 4.0776 | -0.4786 | -0.9727 | 0.2399 |
Static compensation results show force errors within ±1 N and moment errors within ±0.05 N·m after accounting for installation angles. Dynamic compensation under various tool orientations confirms force errors within ±1 N, demonstrating the robustness of the method. The integration of robot technology allows for real-time adjustments, crucial for complex polishing applications.
External force perception experiments involved adding known loads to the end-effector. The table below compares actual and computed external forces:
| Load Type | Actual Force (N) | Computed Force (N) | Error (N) |
|---|---|---|---|
| Flat Plate | 5.380 | 5.955 | 0.575 |
| Circular Tube | 7.540 | 7.656 | 0.116 |
| Elliptical Tube | 1.913 | 1.713 | -0.200 |
| Large Blade | 19.322 | 19.139 | -0.183 |
| Small Blade | 8.455 | 8.268 | -0.187 |
| Copper Bar | 13.366 | 13.978 | 0.612 |
Errors are within ±1 N, validating the method’s accuracy. Analysis of sensor precision indicates that force component fluctuations contribute to errors. The table below summarizes sensor random errors:
| Component | Range | Standard Deviation |
|---|---|---|
| $F_x$ (N) | 0.029691 | 0.009231 |
| $F_y$ (N) | 0.006209 | 0.001715 |
| $F_z$ (N) | 0.077644 | 0.023167 |
| $M_x$ (N·m) | 0.000484 | 0.000159 |
| $M_y$ (N·m) | 0.000244 | 0.00005 |
| $M_z$ (N·m) | 0.004163 | 0.00137 |
Euler angle errors also affect compensation accuracy. For tool orientation (60°, 90°, 135°), force errors vary with deviations in angles $a$ and $t$. Minimal errors occur at specific offsets, e.g., $a$ errors of 0°, 1.1°, and 1.8° for X, Y, Z forces, respectively. This highlights the importance of precise angle calibration in robot technology.
In conclusion, the proposed gravity compensation algorithm effectively eliminates the influence of end-effector load gravity, sensor zero drift, installation angles, and tool orientation. By leveraging robot technology, the method achieves high accuracy in external force perception, with errors within ±1 N. This enables industrial robots to perform precise polishing of complex parts, adapting to varying tool configurations and dynamic operational conditions. Future work could focus on enhancing real-time processing and integrating advanced sensor fusion techniques in robot technology applications.
