cs.ROApr 14, 2026

Machine Learning-Based Real-Time Detection of Compensatory Trunk Movements Using Trunk-Wrist Inertial Measurement Units

Authors: Jannis Gabler, Clément Lhoste, Max Quast, Laura Mayrhuber, Andrea Ronco, Olivier Lambercy, Paulius Viskaitis, Dane Donegan

Organizations: Rehabilitation Engineering Laboratory, ETH Zurich, Switzerland · TU Munich, Germany · Neuroscience Center Zurich (ZNZ), Switzerland · Singapore-ETH Centre (CREATE), Singapore

Abstract

Compensatory trunk movements (CTMs) are commonly observed after stroke and can lead to maladaptive movement patterns, limiting targeted training of affected structures. Objective, continuous detection of CTMs during therapy and activities of daily living remains challenging due to the typically complex measurements setups required, as well as limited applicability for real-time use. This study investigates whether a two-inertial measurement unit configuration enables reliable, real-time CTM detection using machine learning. Data were collected from ten able-bodied participants performing activities of daily living under simulated impairment conditions (elbow brace restricting flexion-extension, resistance band inducing flexor-synergy-like patterns), with synchronized optical motion capture (OMC) and manually annotated video recordings serving as reference. A systematic location-reduction analysis using OMC identified wrist and trunk kinematics as a minimal yet sufficient set of anatomical sensing locations. Using an extreme gradient boosting classifier (XGBoost) evaluated with leave-one-subject-out cross-validation, our two-IMU model achieved strong discriminative performance (macro-F1 = 0.80 +/- 0.07, MCC = 0.73 +/- 0.08; ROC-AUC > 0.93), with performance comparable to an OMC-based model and prediction timing suitable for real-time applications. Explainability analysis revealed dominant contributions from trunk dynamics and wrist-trunk interaction features. In preliminary evaluation using recordings from four participants with neurological conditions, the model retained good discriminative capability (ROC-AUC ~ 0.78), but showed reduced and variable threshold-dependent performance, highlighting challenges in clinical generalization. These results support sparse wearable sensing as a viable pathway toward scalable, real-time monitoring of CTMs during therapy and daily living.

Figures & tables

Appendix figures & tables9 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Sep 11, 2026

Hybrid Physics-AI Framework of Body Center of Mass Dynamics from Wrist-Worn Sensors

Wrist-worn IMU has been widely used for daily-life health monitoring. Yet, it does not fully represent whole-body dynamics, for which the body center of mass (COM) is considered the physiological reference standard. Therefore, this work proposes a simplified kinematic model (KM), which is designed to map the wrist IMU to the COM acceleration. It is built upon several reductive assumptions that enable the solvability of the dynamic equations based on wrist IMU measurements alone. This work further proposes three types of hybrid AI modeling methods, namely human kinematic model-based neural network (HKM-NN) models, to leverage the power of both grey-box and black-box modeling. The HKM-NN methods include serial learning (ser-) and two approaches of simultaneous learning (sim1- and sim2-). The proposed models are trained and tested using our dataset, which includes wrist IMU measurements and ground-truth COM measurements from 10 healthy volunteers during six gait activities and sit-to-stand (SS) transitional movement. The results demonstrate the feasibility of estimating COM acceleration from wrist IMU measurements. Our KM model yields satisfactory results, with an error ranging from 6.7% to 12.5% for gait activities and 5.6% for the SS. In comparison with the KM model, our HKM-NN models significantly enhance the performance, achieving 5.3% to 9.3% errors for gait activities, and the best error of 3.9% for the SS. In addition, the HKM-NN models demonstrate distinct robustness characteristics under noisy test conditions, with sim1-/sim2- generally maintaining greater robustness under Gaussian perturbations, while the KM model exhibits comparatively strong robustness under salt-and-pepper noise. These findings highlight the importance of combining biomechanical structure with data-driven learning for wearable sensing applications operating under imperfect and noisy measurement conditions.
Feb 24, 2026

Event-Driven On-Sensor Locomotion Mode Recognition Using a Shank-Mounted IMU with Embedded Machine Learning for Exoskeleton Control

This work presents a wearable human activity recognition (HAR) system that performs real-time inference directly inside a shank-mounted inertial measurement unit (IMU) to support low-latency control of a lower-limb exoskeleton. Unlike conventional approaches that continuously stream raw inertial data to a microcontroller for classification, the proposed system executes activity recognition at the sensor level using the embedded Machine Learning Core (MLC) of the STMicroelectronics LSM6DSV16X IMU, allowing the host microcontroller to remain in a low-power state and read only the recognized activity label from IMU registers. While the system generalizes to multiple human activities, this paper focuses on three representative locomotion modes - stance, level walking, and stair ascent - using data collected from adult participants. A lightweight decision-tree model was configured and deployed for on-sensor execution using ST MEMS Studio, enabling continuous operation without custom machine learning code on the microcontroller. During operation, the IMU asserts an interrupt when motion or a new classification is detected; the microcontroller wakes, reads the MLC output registers, and forwards the inferred mode to the exoskeleton controller. This interrupt-driven, on-sensor inference architecture reduces computation and communication overhead while preserving battery energy and improving robustness in distinguishing level walking from stair ascent for torque-assist control.
May 30, 2026

An explainable hierarchical self attention-based approach for tremor detection in the time domain

Tremor is a common movement disorder associated with conditions like Parkinson's disease and Essential tremor, traditionally diagnosed through expert clinician assessment. Current automated detection methods rely on frequency-domain features informed by clinical expertise. In this work, we present an explainable, two-stage hierarchical framework for tremor detection in the time domain that learns tremor patterns directly from 3D kinematic marker time-series data across entire tremor-provoking trials. Our framework combined a deep convolutional and long short-term memory network to learn tremor representations from short, discrete, non-overlapping time segments of kinematic time series data from trials, which are then processed by a vision transformer that models their long-term temporal dynamics of time segment features for trial (session) level classification. Evaluated across nine body parts, the framework achieved F1-scores of 0.594 - 0.947 depending on body parts (average: 0.765), falling short of the frequency-domain state-of-the-art performance (0.909) while requiring minimal preprocessing. Attention weights and gradient-based class activation maps (Grad-CAM) identified time-domain features of tremor across body parts. This proof of concept demonstrated the feasibility of data-driven time-domain modeling for tremor detection across anatomically diverse body parts, while reducing reliance on expert-engineered spectral features and providing posthoc interpretability of temporal and anatomical patterns of tremor.