Abstract
Anomaly detection, for uncovering faults and failures, is a crucial task for wireless sensor networks (WSNs). This paper presents a real-time algorithm, SRKF (State Recognition based on Kalman Filter), designed for the detection of human activity states using triaxial accelerometers. By focusing on the change in signal vector magnitude (CSVM) and employing a Kalman filter to smooth activity trends, the system achieves high accuracy in distinguishing between steady states and transitions on resource-constrained mobile hardware.
Introduction
Human activity recognition (HAR) is vital for healthcare, eldercare, and fitness tracking. However, most existing methods rely on complex feature extraction—like Fourier transforms or deep neural networks—that require significant computational resources. This makes them difficult to run in real-time on wearable devices or smartphones without causing significant battery drain. This work addresses the gap between high accuracy and low computational cost by focusing on identifying long-duration "states" rather than transient "gestures."
Methodology: The SRKF Algorithm
The core of the proposed approach is the SRKF algorithm, which follows a streamlined processing pipeline:
- Signal Vector Magnitude (SVM): To ensure orientation independence, the algorithm calculates the overall magnitude of acceleration across the $x, y, and z$ axes.
- Change of SVM (CSVM): Instead of raw data, the system extracts peaks from the SVM signal. The difference between these peaks (CSVM) represents activity intensity.
- Noise Filtering: Values below $0.2g$ are ignored to filter out minor body tremors or sensor friction.
- Kalman Filtering: The human state is modeled as an Autoregressive (AR) process. A Kalman filter is applied to the sum of CSVM values to provide a stable estimate of the current activity level.
A key innovation is the "Sum of 3" rule (F3). Processing the sum of three CSVM values yields better results than using a single value because a single gait cycle produces two distinct acceleration peaks. Summing three values effectively covers a full cycle, preventing the algorithm from misinterpreting mid-stride dips as state changes.
Experimental Setup
The researchers evaluated the algorithm with 10 healthy adults performing a sequence of standing, walking, sitting, and running. Hardware consisted of an ADXL345 triaxial accelerometer connected via Bluetooth to an Android smartphone.
The study confirmed that the chest is a superior location for monitoring whole-body state compared to the waist. Sensors on the waist are more heavily influenced by individual leg movements (gait style), which introduces unnecessary noise into the state detection process.
Key Results
The SRKF algorithm consistently outperformed traditional threshold-based methods:
- Walking and Transitions: Achieved 95% accuracy for walking (including stairs) and complex transitions (e.g., slow walk to run).
- Static Detection: Standing was identified with 87% accuracy, compared to 80% for simpler methods.
The results demonstrate that the Kalman filter is highly effective at fitting the trends of human movement, making it easier to pinpoint the exact moment a user changes their behavior.
Conclusion
By focusing on the change in magnitude (CSVM) rather than complex frequency-domain features, the SRKF algorithm remains lightweight enough for mobile hardware while maintaining high precision. Future work will focus on expanding the participant diversity and refining the classification to distinguish between different types of steady states, such as walking versus running, on battery-constrained devices.
Summary updated