In modern industrial robotics, the six-axis force sensor plays a critical role in enabling precise force feedback during complex tasks such as welding, grinding, and assembly. However, due to manufacturing imperfections and strain gauge placement errors, cross-axis coupling inevitably occurs, leading to significant inaccuracies in force and torque measurements. Traditional decoupling methods, such as linear calibration and least-squares fitting, often fail to achieve the required precision for high-end applications, as they only reduce coupling errors by one order of magnitude, leaving residual errors of 0.2% to 0.5%. To address these limitations, we propose an improved decoupling algorithm based on particle swarm optimization (PSO) and backpropagation (BP) neural networks. This approach leverages the global optimization capabilities of PSO to enhance the training efficiency and accuracy of BP networks, effectively mitigating issues like slow convergence, oscillation, and local minima entrapment. In this paper, we detail the theoretical foundation, implementation, and experimental validation of our method, demonstrating its superiority in decoupling six-axis force sensors.
The six-axis force sensor is designed to measure three-dimensional forces (Fx, Fy, Fz) and three-dimensional moments (Mx, My, Mz) in real-time. The output vector R of the sensor is influenced by cross-coupling effects, meaning that a force applied in one direction can produce unintended outputs in other directions. The relationship between the applied force vector F and the sensor output R can be modeled as a nonlinear mapping: $$R = G(F) + \epsilon$$ where G represents the coupling function, and ε denotes measurement noise. Traditional linear decoupling methods approximate this mapping using a matrix equation: $$R = C \cdot F$$ where C is the calibration matrix. However, this linear approach fails to capture the nonlinear coupling dynamics, resulting in persistent errors. To overcome this, artificial neural networks, particularly BP networks, have been employed due to their ability to approximate any nonlinear function with arbitrary precision. A typical BP network for six-axis force sensor decoupling consists of an input layer (sensor outputs), hidden layers, and an output layer (decoupled forces and moments). The output of the network can be expressed as: $$NF = \phi_2 \left( \sum_{k=1}^{s_1} \phi_1 \left( \sum_{i=1}^{m} R_i w_{ik} \right) v_{kt} \right)$$ where Ri is the i-th input, wik and vkt are weights, φ1 and φ2 are activation functions, and NF is the decoupled output. Despite its strengths, the standard BP network suffers from slow convergence and a tendency to get stuck in local minima during training.
To enhance the performance of BP networks, we integrate particle swarm optimization, a bio-inspired algorithm that simulates the social behavior of bird flocking or fish schooling. PSO optimizes the BP network’s weights and biases by iteratively improving candidate solutions based on fitness evaluations. Each particle in the swarm represents a potential solution (i.e., a set of weights and biases), and its position is updated according to velocity and personal best (Pbest) and global best (Gbest) values. The standard PSO update equations are: $$v_{id}^{t+1} = \omega v_{id}^t + c_1 r_1 (Pbest_{id} – x_{id}^t) + c_2 r_2 (Gbest – x_{id}^t)$$ $$x_{id}^{t+1} = x_{id}^t + v_{id}^{t+1}$$ where ω is the inertia weight, c1 and c2 are acceleration coefficients, and r1 and r2 are random numbers. In our improved PSO-BP algorithm, we modify the inertia weight to be a random variable following a specific distribution, which enhances global exploration and avoids local optima. The modified inertia weight is given by: $$\omega = \mu_{min} + (\mu_{max} – \mu_{min}) \cdot \text{rand}() + \sigma \cdot \text{randn}()$$ where μmin and μmax are the minimum and maximum mean values, rand() is a uniform distribution function, randn() is a normal distribution function, and σ is the variance. Additionally, we adjust the acceleration coefficients dynamically: $$c_1 = c_{1ini} – (c_{1ini} – c_{1fin}) \left( \frac{t}{T_{max}} \right)$$ $$c_2 = c_{2ini} + (c_{2ini} – c_{2fin}) \left( \frac{t}{T_{max}} \right)$$ where t is the current iteration, and Tmax is the maximum number of iterations. This dynamic adjustment balances the exploration and exploitation phases of the optimization process.
The fitness function for PSO is defined as the mean squared error between the neural network’s output and the desired decoupled values: $$f = \frac{1}{2} \sum_{j=1}^{J} (d_j – NF_j)^2$$ where dj is the expected output for the j-th neuron, and J is the number of output units. By minimizing this fitness function, PSO guides the BP network toward optimal weight configurations. The overall workflow of our improved PSO-BP algorithm involves initializing the swarm, evaluating fitness, updating particle positions, and iterating until convergence. The integration of PSO not only accelerates training but also improves the robustness of the decoupling model for six-axis force sensors.
To validate our approach, we conducted experiments using a resistive strain-gauge-based six-axis force sensor. The sensor was mounted on a calibration platform, and forces and moments were applied in various directions to collect training data. The experimental setup included electromagnetic exciters for force application and data acquisition cards for signal recording. Below is a table summarizing a subset of the calibration data used for training the neural network.
| Sample | Applied Force (N) and Moment (Nm) | Sensor Output (V) |
|---|---|---|
| 1 | Fx = -5, Fy = 0, Fz = 0, Mx = 0, My = 0, Mz = 0 | F’x = 726.63, F’y = 15.60, F’z = -11.83, M’x = 1.77, M’y = -16.33, M’z = -92.87 |
| 2 | Fx = 0, Fy = -5, Fz = 0, Mx = 0, My = 0, Mz = 0 | F’x = -87.93, F’y = 768.33, F’z = -4.87, M’x = -6.93, M’y = -1.57, M’z = 33.47 |
| 3 | Fx = 0, Fy = 0, Fz = 4, Mx = 0, My = 0, Mz = 0 | F’x = -1.07, F’y = -26.63, F’z = -658.6, M’x = 2.03, M’y = -15.00, M’z = -1.57 |
| 4 | Fx = 0, Fy = 0, Fz = 0, Mx = -5, My = 0, Mz = 0 | F’x = 205.40, F’y = -1663.50, F’z = -95.7, M’x = -1148.10, M’y = 38.50, M’z = -66.07 |
| 5 | Fx = 0, Fy = 0, Fz = 0, Mx = 0, My = -5, Mz = 0 | F’x = 1565.13, F’y = 64.73, F’z = 71.30, M’x = 3.57, M’y = 1637.97, M’z = -30.17 |
The neural network architecture for decoupling the six-axis force sensor comprises an input layer with six neurons (corresponding to the sensor outputs), a hidden layer with 11 neurons (determined empirically), and an output layer with six neurons (representing the decoupled forces and moments). The activation functions are ‘tansig’ for the hidden layer and ‘purelin’ for the output layer. We trained the network using both standard BP and improved PSO-BP algorithms, with parameters set as follows: swarm size of 30, maximum iterations of 40, position limits of [-1, 1], velocity limits of [-5, 5], neural network training epochs of 100, learning rate of 0.003, momentum rate of 0.01, and target error of 0.004. The training process involves feeding the sensor data into the network, computing the output, and adjusting weights based on the error. The PSO component optimizes this process by searching for the best weight initialization and updates.

Simulation results demonstrate the effectiveness of our improved PSO-BP algorithm. The traditional BP network required 34 iterations to achieve the target error, whereas the PSO-optimized BP network converged in only 8 iterations. Moreover, the training curve for PSO-BP was smoother, indicating reduced oscillation and improved stability. The decoupling accuracy was evaluated by comparing the network output with the actual applied forces and moments. The improved algorithm achieved a decoupling error of less than 0.1%, significantly outperforming traditional methods. For instance, when a force of 5 N was applied along the X-axis, the decoupled output from PSO-BP showed minimal cross-talk in other axes, whereas linear decoupling exhibited noticeable errors. The following equation illustrates the decoupled output for a sample input: $$NF_x = \phi_2 \left( \sum_{k=1}^{11} \phi_1 \left( \sum_{i=1}^{6} R_i w_{ik} \right) v_{k1} \right)$$ where NFx is the decoupled force along the X-axis. The overall decoupling performance can be quantified using the root mean squared error (RMSE): $$\text{RMSE} = \sqrt{\frac{1}{N} \sum_{n=1}^{N} (F_n – NF_n)^2}$$ where N is the number of samples, Fn is the true force, and NFn is the decoupled force. Our method achieved an RMSE of 0.05 N for forces and 0.01 Nm for moments, which meets the requirements for high-precision robotic applications.
In conclusion, the improved PSO-BP neural network algorithm offers a robust solution for decoupling six-axis force sensors. By combining the nonlinear approximation capabilities of BP networks with the global optimization strengths of PSO, we address key challenges such as slow convergence and local minima. Experimental results confirm that this approach enhances decoupling accuracy and efficiency, making it suitable for industrial robotics. Future work will focus on extending this method to dynamic decoupling and real-time implementation. The six-axis force sensor, with its critical role in automation, benefits greatly from advanced decoupling techniques like the one presented here.
