Introduction
Human Activity Recognition (HAR) has advanced significantly, moving from simple inertial measurements to complex multi-modal sensing environments. Modern applications often require the integration of heterogeneous sensors—such as gas sensors, thermal arrays, and optical spectrum sensors—to distinguish between nuanced activities like cooking or cleaning. However, deploying these sophisticated models to edge devices remains a challenge. Conventional microcontrollers (MCUs) process instructions sequentially, which can lead to sampling instability and data bottlenecks as sensor counts and model complexity increase.
Field-Programmable Gate Arrays (FPGAs) provide a compelling alternative due to their inherent parallelism. Despite this, the steep learning curve associated with hardware description languages (HDLs) like Verilog has limited their adoption in the HAR research community. This paper introduces FieldHAR, an open-source Register Transfer Level (RTL) framework designed to bridge this gap by providing a fully integrated, end-to-end solution for HAR on FPGAs.
The FieldHAR Architecture
The FieldHAR framework is designed for modularity and scalability. It consists of three primary components: a scalable sensor interface, a top controller module, and a dedicated neural network inference block.
The Scalable Sensor Interface utilizes a hardware library for I2C and SPI protocols, allowing multiple sensors to be sampled in parallel. This ensures that the addition of new sensors does not degrade the sampling frequency of existing ones. Data is buffered in FIFOs and managed by the Top Controller Module, which coordinates the flow between raw data acquisition and the inference engine.
Hardware-Algorithm Co-Optimization
To maximize efficiency on resource-constrained hardware, FieldHAR employs several co-optimization strategies:
- Branched CNN Architecture: Instead of simple data concatenation, FieldHAR uses a "feature fusion" approach. Each sensor modality is processed by a dedicated CNN branch, allowing the model to extract meaningful features from low-dimensional sensors (e.g., pressure) before merging them with high-dimensional data (e.g., thermal arrays).
- Modality Selection: A trainable importance weight ($\alpha$) is assigned to each sensor branch during training. This allows researchers to identify and prune "lazy" sensors that contribute minimally to accuracy, significantly reducing hardware resource requirements.
- Quantization and Normalization: The framework utilizes Post-Training Quantization (PTQ) to convert 32-bit floating-point weights into 11-bit fixed-point integers. Additionally, bias terms are removed through tensor normalization, further reducing the memory footprint.
The Inference Block (shown above) implements the neural network layers directly in RTL. It features optimized Multiply-Accumulate (MAC) units and state machines for weight and feature retrieval, enabling high-speed execution.
Experimental Results
The framework was validated using a sensor-rich kitchen dataset involving 10 subjects performing 10 distinct activities. The system was implemented on a low-end Intel Cyclone IV FPGA.
- Resource Efficiency: The entire pipeline utilized only 25% of the available logic elements and 2% of the on-chip memory.
- Performance: The 11-bit quantized hardware model maintained high fidelity, with less than a 1% drop in accuracy compared to the 32-bit offline baseline.
- Latency and Power: Inference latency was measured at 0.25ms in parallel mode, supporting a throughput of 4,000 labels per second. Total power consumption remained under 140 mW, confirming its suitability for battery-powered wearable devices.
Conclusion
FieldHAR provides a robust, parallelized alternative to MCU-based HAR systems. By integrating data acquisition and neural inference into a single RTL framework, it enables real-time, multi-modal activity recognition at the edge. Future work will focus on expanding layer support to include Recurrent Neural Networks (RNNs) and implementing Quantization-Aware Training (QAT) for even greater efficiency.
Summary updated