In modern industrial applications, the demand for precise force and torque measurements has led to the widespread use of six-axis force sensors. These sensors are critical in fields such as robotics, aerospace, biomedical engineering, and automotive systems, where they provide accurate data on three-dimensional forces and three-dimensional moments. However, traditional data acquisition modules for six-axis force sensors often suffer from large size, low accuracy, and a lack of integrated data processing capabilities. This results in significant inter-dimensional coupling, where the output of one dimension is influenced by inputs from others, thereby reducing measurement precision. To address these limitations, we have developed a compact, high-precision, and real-time data acquisition module based on the EtherCAT bus, which incorporates online decoupling technology using a neural network optimized by a genetic algorithm. This module not only enhances accuracy and speed but also reduces the computational burden on upper-level systems by performing decoupling directly on the microcontroller unit (MCU).
The core of our approach lies in the integration of EtherCAT communication protocol with advanced decoupling algorithms. EtherCAT, known for its high transmission rates, flexible topology, and excellent real-time performance, enables efficient data exchange in large industrial networks. Our module hardware includes power circuits, control circuits, acquisition circuits, filtering circuits, and other essential components, all designed to minimize size while maximizing performance. The software framework involves initialization procedures, application layer protocols for EtherCAT, and a data acquisition flow that ensures synchronization and low latency. For decoupling, we employ a neural network trained offline using experimental data, with parameters optimized via a genetic algorithm to improve generalization and avoid local minima. This allows for online decoupling on the MCU, achieving relative errors below 0.85% and a 37.1% improvement over traditional least squares methods.
In this article, we detail the design and implementation of our EtherCAT-based module, including the hardware architecture, software workflow, and decoupling algorithm. We present experimental results from single-dimensional and six-dimensional loading tests, demonstrating the module’s accuracy, stability, linearity, and real-time capabilities. By leveraging EtherCAT and intelligent decoupling, our solution overcomes the drawbacks of conventional systems, paving the way for more reliable and efficient force measurements in industrial automation.
Background and Challenges in Six-Axis Force Sensor Technology
Six-axis force sensors, also referred to as multi-axis force/torque sensors, are essential for capturing complex mechanical interactions in dynamic environments. These sensors typically consist of structural elements like upper and lower rings, force-sensing beams, and strain gauges that convert mechanical strain into electrical signals. When force is applied, the strain gauges detect deformations, producing differential voltage outputs that correspond to the six dimensions of force and torque. However, due to non-linearities in the sensor structure and bridge circuits, inter-dimensional coupling occurs, where the output of one channel is affected by inputs from others. This coupling severely compromises accuracy, making decoupling a critical step in data processing.
Traditional data acquisition methods rely on amplifiers and analog modules to condition and transmit signals, but these approaches introduce errors and increase module size. Moreover, decoupling is often performed offline on a computer, leading to delays and reduced real-time performance. In contrast, our module integrates acquisition and processing on a single platform, using EtherCAT for high-speed communication. The EtherCAT protocol supports cycle times as low as 1 ms, enabling rapid data transfer and synchronization in distributed control systems. By addressing coupling through software decoupling algorithms, we achieve higher precision without hardware modifications, which are often costly and time-consuming.
Common decoupling techniques include linear methods like least squares and non-linear approaches such as extreme learning machines (ELM), support vector regression (SVR), and backpropagation neural networks (BPNN). While ELM and SVR offer certain advantages, they may lack generalization or require substantial memory, making them less suitable for resource-constrained MCUs. Our choice of a genetic algorithm-optimized neural network balances accuracy, efficiency, and deployability, ensuring robust performance in real-world applications. The following sections elaborate on our system design, algorithm development, and experimental validation.

System Architecture and Hardware Design
The hardware of our six-axis force sensor data acquisition module is centered around an EtherCAT slave controller (ESC) and an MCU, which together facilitate high-speed data acquisition, processing, and communication. The module is divided into five main circuit sections: power supply, control, acquisition, filtering, and auxiliary circuits. The power supply circuit generates multiple voltage levels, including 5.0 V, 3.3 V, and -5.0 V, to support various components. The 5.0 V supply powers the amplifiers and is stepped down to 3.3 V for the MCU and GPIOs, while the -5.0 V is used for dual-supply amplifier operations. This design ensures stable operation and minimizes noise interference.
The control circuit comprises the ESC and MCU subsystems. We selected the LAN9252 as the ESC for its efficient handling of EtherCAT protocols, and the STM32 as the MCU for its computational power and peripheral support. The ESC manages data frame parsing and synchronization, while the MCU executes application-layer functions, including the decoupling algorithm. The acquisition circuit features amplifier chips (AD8222) and a 16-bit analog-to-digital converter (ADC, AD7606) to enhance signal conditioning and conversion accuracy. The amplifiers boost the weak differential voltage signals from the six-axis force sensor to measurable levels, and the ADC digitizes these signals for further processing. Filtering circuits, based on RC low-pass filters, remove high-frequency noise and spikes from the sensor outputs and amplifier signals, ensuring clean data acquisition.
Auxiliary circuits include clock, reset, debugging, and configuration modules. The clock circuit provides a precise time base for synchronous operations, while the reset circuit safeguards against system failures. Debugging interfaces, such as UART and JTAG, allow for program download and real-time monitoring. The configuration circuit, involving EEPROM, stores essential parameters for the ESC’s initialization, enabling plug-and-play functionality in EtherCAT networks. The overall hardware is compact, with a PCB size of 95 mm × 100 mm × 18 mm, making it suitable for space-constrained industrial environments. The interconnection between components is illustrated in the block diagram below, highlighting the flow from sensor input to EtherCAT output.
The data acquisition process begins with the six-axis force sensor generating微弱 voltage signals under applied loads. These signals are amplified by the AD8222, which provides a gain factor to elevate them to volt-level ranges. The amplified signals are then passed through low-pass filters to eliminate noise before being digitized by the AD7606 ADC. The digital outputs are read by the STM32 MCU, which applies calibration and decoupling algorithms. The processed data is transmitted to the LAN9252 ESC via SPI, and finally, the EtherCAT frame is sent to the upper-level controller through the network interface. This seamless integration ensures that the module can handle acquisition and processing within a 1 ms cycle time, meeting real-time requirements.
Software Framework and EtherCAT Integration
The software design for our module focuses on initialization, EtherCAT protocol implementation, and data acquisition workflows. Upon power-up, the initialization sequence starts with delay functions to meet timing requirements, followed by UART setup for debugging and program download. The STM32 peripherals, including GPIOs, SPI, and clocks, are configured to enable communication with the ADC and ESC. The ADC initialization defines the sampling timing and data output format, while the ESC initialization sets the module to a pre-operational state, ready for EtherCAT communication.
The EtherCAT protocol is implemented using the CoE (CANopen over EtherCAT) profile, which manages object dictionaries and process data objects (PDOs). The object dictionary contains entries for input and output data, mapped to specific addresses for seamless data exchange. For instance, the input data from the six-axis force sensor is mapped to the 0x1A02 object and stored in the 0x6020 address range. Synchronization managers (SMs) handle the timing of data transfers, ensuring that input and output operations occur in sync with the EtherCAT cycle. The state machine of the ESC transitions through states like Init, Pre-Operational, Safe-Operational, and Operational (OP), with the OP state enabling real-time data communication.
Data acquisition is triggered by EtherCAT frames arriving from the master controller. When a frame is received, the ESC processes it at the hardware level and raises an interrupt via the synchronization managers. In the interrupt service routine, the MCU reads the output data from the ESC registers, updates the application-layer variables, and processes the input data from the ADC. The decoupled results are written back to the ESC registers for transmission in the next frame. This cycle repeats at the configured IO cycle, typically set to 1 ms, ensuring continuous and timely data updates. The software flow is designed for efficiency, with minimal latency between acquisition and processing, which is crucial for closed-loop control systems.
To facilitate online decoupling, we embedded the trained neural network parameters into the MCU firmware. The decoupling function first applies zero-point calibration to the raw digital inputs, compensating for offsets and drift. The calibrated values are converted to mV/V signals using the formula: $$I = \frac{d_a v_r}{n_s v L}$$ where \(d_a\) is the digital value from the ADC, \(v_r\) is the reference voltage, \(n_s\) is the full-scale digital value (32,768), \(v\) is the excitation voltage (5 V), and \(L\) is the amplifier gain. These signals are fed into the neural network, which outputs normalized force values relative to the full-scale ranges. The results are then scaled to digital formats for EtherCAT transmission, allowing the upper-level system to compute actual force values with simple arithmetic.
Decoupling Algorithm: Genetic Algorithm-Optimized Neural Network
The decoupling of six-axis force sensor data is a multi-input, multi-output (MIMO) regression problem, where the goal is to map the six-dimensional mV/V inputs to the six-dimensional force/torque outputs while minimizing cross-coupling effects. We chose a neural network approach due to its strong non-linear fitting capabilities and adaptability to MCU deployment. However, standard neural networks can get trapped in local minima, so we optimized the weights and biases using a genetic algorithm, which enhances global search and generalization.
The neural network architecture consists of an input layer with six neurons (one for each sensor channel), a hidden layer with 13 neurons, and an output layer with six neurons (representing the decoupled forces and torques). The input-to-hidden layer transformation is given by: $$H_i = \omega_1 I + B_1$$ where \(H_i\) is the hidden layer input, \(\omega_1\) is the weight matrix, \(I\) is the input vector of mV/V signals, and \(B_1\) is the bias vector. The hidden layer uses a sigmoid activation function: $$H_o = \frac{1}{1 + \exp(-H_i)}$$ where \(H_o\) is the hidden layer output. The output layer computation is linear: $$y_i = \omega_2 H_o + B_2$$ where \(y_i\) is the output layer input, \(\omega_2\) is the weight matrix, and \(B_2\) is the bias vector. The final output \(y_o\) is equal to \(y_i\), representing the normalized force values.
The genetic algorithm optimizes the neural network parameters by treating the combined weights and biases as a chromosome, with each element as a gene. We initialize a population of 50 chromosomes and evaluate their fitness using the mean squared error (MSE) on the training data: $$e = \frac{1}{n} \sum_{j=1}^{n} (y_j – y_{o,j})^2$$ where \(y_j\) is the target value, \(y_{o,j}\) is the predicted value, and \(n\) is the number of output dimensions (6). The training data is randomly split into training and testing sets using Matlab’s randperm function, ensuring unbiased evaluation. The genetic operations—selection, crossover, and mutation—are applied iteratively. Selection uses a roulette-wheel method based on fitness, crossover combines two chromosomes to produce offspring, and mutation randomly alters genes to maintain diversity. After a set number of iterations, the best chromosome is decoded into the optimized weight matrices and bias vectors.
This approach incorporates multiple randomization steps to improve generalization, such as random initial population and random data splitting. The offline training process in Matlab generates parameters that are then ported to the MCU for online inference. In the MCU code, the decoupling function executes the neural network computations in real-time, using fixed-point arithmetic to reduce computational overhead. The entire process, from data acquisition to decoupled output, completes within 1 ms, demonstrating the algorithm’s efficiency and suitability for embedded systems.
Experimental Setup and Methodology
To validate our module, we conducted single-dimensional and six-dimensional loading experiments using a K6D80 six-axis force sensor from ME Systems. The sensor has full-scale ranges of 1000 N for Fx and Fy, 2500 N for Fz, and 50 N·m for Mx, My, and Mz, with measurement uncertainties of ±5 N for forces and ±0.2 N·m for moments. The experimental setup included a desktop computer with an Intel network card running TwinCAT software as the EtherCAT master, a programmable power supply, loading fixtures, and calibration equipment. The TwinCAT IO cycle was set to 1 ms, with a watchdog timer of 100 ms to ensure reliability.
In the single-dimensional loading tests, each of the six channels was loaded independently with linearly increasing forces from 0% to 100% of full scale, in 10% increments, resulting in 66 data points. The accuracy was assessed by comparing the module’s digital outputs with theoretical values calculated from the sensor’s sensitivity (1.1833 mV/V) and excitation voltage. The relative error for each channel was computed as: $$E_r = \frac{|d_t – d_a|}{d_m}$$ where \(d_t\) is the theoretical digital value, \(d_a\) is the actual digital value after zero calibration, and \(d_m\) is the digital value at full scale. Stability was evaluated by recording the maximum and minimum digital values during static loading and calculating the fluctuation as a percentage of \(d_m\). Linearity was analyzed by plotting the ratio of applied force to full scale against the ratio of digital output to \(d_m\).
For the six-dimensional loading tests, we applied random combinations of forces and moments across all six axes, generating 60 data sets. Of these, 50 were used for training the decoupling algorithm, and 10 for testing. The loads were applied using hydraulic actuators for Fx, Fy, Fz, and Mz, and calibrated weights for Mx and My, with a lever arm of 0.15 m for moment generation. Each load was verified with reference single-axis force sensors to ensure accuracy. The decoupling performance was measured by the relative error between the decoupled outputs and the actual applied loads, with multiple runs to test consistency.
We compared our genetic algorithm-optimized neural network with a linear decoupling method based on least squares. The least squares solution was derived from the equation: $$A X = F_a$$ where \(A\) is the matrix of mV/V inputs, \(X\) is the decoupling matrix, and \(F_a\) is the matrix of applied forces. The solution is given by: $$X = (A^T A)^{-1} (A^T F_a)$$ This matrix was applied to the same data sets to compute relative errors, allowing a direct comparison of decoupling effectiveness.
Results and Analysis
The single-dimensional loading experiments demonstrated high accuracy and stability of our module. The relative errors for each channel are summarized in Table 1, showing maximum errors below 0.23%, which meets industrial requirements. The Fy channel had the highest error at 0.2257%, while others were lower, indicating consistent performance across dimensions.
| Channel | Relative Error (%) | Channel | Relative Error (%) |
|---|---|---|---|
| Fx | 0.0835 | Mx | 0.1356 |
| Fy | 0.2257 | My | 0.1911 |
| Fz | 0.1356 | Mz | 0.1284 |
Stability tests revealed maximum fluctuations of 0.4168% for the Fz and My channels under full-scale loading, as shown in Table 2. In other loading conditions, fluctuations were smaller, confirming the module’s robustness in static measurements.
| Channel | Fluctuation (%) | Channel | Fluctuation (%) |
|---|---|---|---|
| Fx | 0.3647 | Mx | 0.3126 |
| Fy | 0.3647 | My | 0.4168 |
| Fz | 0.4168 | Mz | 0.3126 |
Linearity plots for all six channels exhibited nearly straight lines, with minor deviations that did not impact overall performance. The consistency across dimensions validates the module’s design and calibration procedures.
In the six-dimensional loading tests, the genetic algorithm-optimized neural network achieved relative errors below 0.85% in all test cases, as illustrated in Figure 1 (though no figure is referenced, the data is described). Over five repeated tests with 10 data sets each, the maximum errors ranged from 0.4% to 0.7%, with an average around 0.55%. This demonstrates the algorithm’s stability and generalization. In contrast, the least squares method produced higher errors, up to 1.3508% as detailed in Table 3, resulting in a 37.1% improvement with our approach.
| Channel | Relative Error (%) | Channel | Relative Error (%) |
|---|---|---|---|
| Fx | 1.1502 | Mx | 1.0285 |
| Fy | 1.3508 | My | 0.9491 |
| Fz | 1.2940 | Mz | 1.2706 |
The real-time performance was confirmed by the module’s ability to complete data acquisition and decoupling within the 1 ms EtherCAT cycle. The neural network inference on the MCU added minimal latency, ensuring that the system could be used in time-critical applications. The compact size of the module also allowed for easy integration into existing industrial setups, without sacrificing functionality.
Discussion and Implications
Our EtherCAT-based data acquisition module with online decoupling represents a significant advancement in six-axis force sensor technology. By integrating acquisition and processing, we eliminate the need for external amplifiers and analog modules, reducing size and cost while improving accuracy. The use of EtherCAT ensures high-speed, synchronized communication in distributed networks, which is essential for modern industrial automation. The genetic algorithm-optimized neural network effectively addresses inter-dimensional coupling, outperforming linear methods and other non-linear approaches in terms of accuracy and deployability.
The module’s design emphasizes modularity and scalability, allowing it to be adapted for different sensor types and industrial environments. For instance, it can be configured for single-axis, three-axis, or six-axis force sensors by adjusting the software parameters. The online decoupling capability reduces the computational load on upper-level systems, enabling more efficient resource allocation in complex control systems. Moreover, the inclusion of multiple randomization techniques in the algorithm enhances robustness against overfitting and environmental variations.
Potential applications extend beyond traditional robotics to areas like aerospace, where precise force feedback is crucial for manipulator operations, and biomedical engineering, where sensors are used in prosthetic devices. Future work could focus on enhancing the algorithm with adaptive learning for dynamic environments or extending the module to support additional sensor interfaces. Overall, our solution provides a reliable, high-performance platform for force measurement, contributing to the evolution of smart manufacturing and Industry 4.0.
Conclusion
In this article, we presented the development and validation of an EtherCAT-based data acquisition module for six-axis force sensors, featuring online decoupling via a genetic algorithm-optimized neural network. The module achieves high accuracy, with relative errors below 0.85%, and operates within a 1 ms cycle time, meeting real-time industrial requirements. Its compact design and integrated processing alleviate the limitations of traditional systems, such as large size and offline decoupling. Experimental results from single-dimensional and six-dimensional tests confirm the module’s superiority over least squares methods, with a 37.1% improvement in accuracy. This innovation paves the way for more efficient and precise force sensing in diverse applications, underscoring the importance of advanced communication protocols and intelligent algorithms in modern engineering.