Preprint
Article

This version is not peer-reviewed.

An Open-Source Wearable System for Real-Time Human Biomechanical Analysis

A peer-reviewed article of this preprint also exists.

Submitted:

21 March 2025

Posted:

25 March 2025

You are already at the latest version

Abstract
The advancement of inertial measurement unit (IMU) technology has opened new opportunities for motion analysis, yet its widespread adoption in clinical practice remains constrained by the high costs of proprietary systems, lengthy setup procedures, and the need for specialized expertise. To address these challenges, we present a multi-IMU system designed with streamlined calibration, efficient data processing, and a focus on accessibility for patient-facing applications. Although initially developed for human gait analysis, the modular design of this system enables adaptability across diverse motion tracking scenarios. This work outlines the system’s technical framework, including protocols for data acquisition, derivation of gait variables, and considerations for user-friendly software deployment. We further illustrate its utility by measuring lower-limb gait kinematics in near-real time and providing stride-to-stride biofeedback using a single sensor. These initial results underscores the potential of this system for both laboratory-based gait assessment and rehabilitation interventions in clinical environments and future work will assess validation against traditional optical motion capture methods.
Keywords: 
;  ;  ;  
Subject: 
Engineering  -   Bioengineering

1. Introduction

Real-time Biofeedback and Analysis using IMU Tracking (ReBAIT) is an innovative open-source Python library designed to facilitate kinematic near-real-time visual biofeedback. ReBAIT as presented in this manuscript is designed for a gait retraining protocol during treadmill walking but is versatile enough to be extended to other biomechanical applications e.g., upper limb assessments and tasks, and broader physical therapeutic interventions. This manuscript presents the primary objectives of ReBAIT: (1) to deliver an accessible, real-time biofeedback solution for both researchers and clinicians, and (2) to establish a platform that can be extended for gait retraining and other scientific or clinical purposes.
Wearable sensors, particularly inertial measurement units (IMUs), offer a practical solution for enabling real-world biomechanical analysis [1,2,3]. Although methods and models for IMU data collection and analysis are well established, their clinical utility has been hindered by challenges such as integration drift, calibration requirements, magnetic interference, sensor placement variability, and the high costs associated with multi-sensor systems [4]. Furthermore, real-time or near-real-time quantification of movement with minimal setup and computational requirements remains a significant barrier. Despite these known issues, IMUs provide a robust method for directly measuring kinematic variables, such as segmental acceleration, angular velocity, and orientation rather than deriving these from optical motion capture data [5,6,7]. This can yield more reliable data with less post-processing in situations where a full motion analysis or gait study may be unnecessary or even prohibitive, such as in clinical or home settings [8,9] .
To help address these issues with the adoption of IMU-based systems, ReBAIT was designed with the following capabilities:
  • Real-time data collection and analysis with Python-based tools;
  • Offline data troubleshooting tools that replicate real-time analysis to facilitate debugging and post-processing;
  • Algorithms for gait event detection tailored for diverse applications;
  • Calculation and visualization of target variables for biofeedback;
  • Support for single and multi-IMU configurations to accommodate various research and clinical scenarios; and
  • Development of a composite biofeedback variable from a single IMU, consistent with established methodologies.
In its initial application, ReBAIT computes the Lower Limb Trajectory Error (LLTE) from a single IMU and sagittal plane kinematics during treadmill walking at controlled speeds. The LLTE has been defined as the sum of the square of the difference between a measured and reference translation of the knee in the anterior-posterior (A/P) and superior-inferior (S/I) directions and rotation of the shank with respect to the ground during stance-phase as described by [10,11,12] and shown in Figure 1 and (1). These measurements compare a participant’s lower limb movement against a defined target trajectory, providing actionable biofeedback to meet that target. The long-term vision of ReBAIT is to establish a robust, scalable framework for real-time wearable biofeedback systems applicable to locomotion biomechanics and other domains. This manuscript outlines ReBAIT’s development, with demonstrations of its use for treadmill-based gait analysis, including the calculation of sagittal plane kinematics and LLTE components. While overground biofeedback applications may face practical challenges, the ability to quantify gait in real-time holds significant value for validating clinical observations and monitoring patients in real-world environments.
L L T E = 1 N n = 1 N x k n e e , n m e a s x k n e e , n r e f l e g l e n g t h 2 + y k n e e , n m e a s y k n e e , n r e f l e g l e n g t h 2 + θ k n e e , n m e a s θ k n e e , n r e f tan 1 f o o t l e n g t h l e g l e n g t h 2 1 / 2

2. Materials and Methods

2.1. Basic Biomechanical Methods

This section provides setup and mathematical details for the biomechanical computations implemented in the ReBAIT library.

2.1.1. Sensor Placement and Mounting

Sensors are mounted using hook-and-loop straps on key segments of the lower limb (foot, shank, and thigh), as well as on the sacrum and sternum. Figure 2 illustrates the placement configuration, ensuring consistent alignment for accurate biomechanical data capture.
Once mounted, the distance from the shank IMU to the ipsilateral knee joint center is measured and recorded for calculation of the knee joint position, along with foot length and knee joint height from the floor. Note that these locations can be easily adjusted for other biomechanical analysis needs.

2.1.2. Calibration

Once the IMUs are mounted to the appropriate segments and anthropometric values have been measured, the devices must be calibrated to ensure proper co-orientation of each device. Both a static calibration, consisting of data recording while the subject holds a stationary neutral pose (similar to that depicted in Figure 2), and a dynamic calibration, consisting of data recording during repeated toe-touches and steady-state normal walking, are used to align the IMUs.
Upon completion of the calibration procedure, the data are used to compute the offset between each sensor’s arbitrary global reference coordinate system and a segment-fixed coordinate system consistent with International Society of Biomechanics (ISB) recommendations [13]. The calibration algorithm has three steps. First, using the linear acceleration data from the static calibration, the direction with the largest magnitude (corresponding to gravity) is aligned with the superior-inferior axis.
n ^ = g a v e r a g e × g a n a t o m i c a l | g a v e r a g e × g a n a t o m i c a l |
θ = arccos g a v e r a g e · g a n a t o m i c a l | g a v e r a g e | | g a n a t o m i c a l |
q g = cos θ 2 , sin θ 2 n ^
where g a v e r a g e is the average acceleration vector from the stationary period in the IMU’s global reference frame I G , g a n a t o m i c a l = 9.81 j ^ is the gravitational acceleration vector in the segment-fixed ISB reference frame S i , and q g is the quaternion representing the partial transform from I G to S i .
Second, a Principal Components Analysis (PCA) is performed on the angular velocity data from the dynamic calibration. The PCA calculates the axis with the largest variation in angular velocity, which corresponds to the axis of rotation for the various segments. This axis is aligned with the medial-lateral axis. Previous work [14] has demonstrated that PCA can robustly determine the knee axis of rotation using an IMU system; we expand that work here to measure hip and ankle joint angles in the sagittal plane.
n ^ = e P C A × e 1
θ = arccos e P C A · e 1
q PCA = cos θ 2 , sin θ 2 sgn n ^ y
where e P C A is the result from PCA analysis of angular velocity, e 1 = k ^ is the axis normal to the sagittal plane in the ISB reference frame, n ^ y is the component of n ^ in the y-direction, i.e. aligned with gravity, and q PCA is the quaternion representing rotation about the vertical axis to align e P C A with e 1 .
Next, angular velocity vectors are rotated to align with a lab-fixed global reference frame W L :
ω W = q PCA q g q IMU ω I M U q IMU q g q PCA
where ω W is the segment angular velocity in W L at a given time step, q IMU is the IMU orientation quaternion in I G at that time step, ω I M U is the segment angular velocity in I G at that time step, and q is the conjugate of quaternion q .
The magnitude of the maximum and minimum angular velocity values are compared, and if the magnitude of the maximum is greater than the magnitude of the minimum, i.e. max ω > | min ω | , q PCA is rotated about the vertical axis by half a rotation to achieve proper alignment of the medial-lateral axis:
q PCA = j ^ q PCA , 0
where q PCA , 0 is the result of (7).
Once q g and q PCA are determined, they can be used in conjunction with q IMU , to transform any vector in I G to S i as in (8).
Finally, the average orientation quaternion during the stationary calibration q 0 is computed for each segment. Right-multiplying by this quaternion will calculate the current orientation quaternion relative to the initial orientation in S i :
q i = q PCA q g q IMU q 0
When q i is computed for each segment, the rotation between the quaternions for two adjoining segments can be calculated to determine joint angles, as will be discussed in Section 2.1.3.

2.1.3. Sagittal Plane Joint Angles

Joint angles are derived from the orientation quaternions measured by the segment-mounted IMUs. First, each orientation quaternion is transformed using calibration quaternions, aligning the arbitrary IMU reference frame with the fixed laboratory frame and ensuring consistency with segment-fixed frames. This transformation enables the calculation of segment orientations relative to their initial positions in the neutral pose, as recorded during calibration (see Section 2.1.2). The transformed quaternions for each segment are computed using Equation 10.
Once the orientation of each segment is determined, the joint quaternions, representing the relative rotation at a joint between two adjacent segments, are calculated. For example, the knee quaternion is obtained as the rotation between the shank quaternion q SH and the thigh quaternion q TH . Equations for hip, knee, and ankle joints are shown in Table 1.
Finally, joint angles are computed by taking the portion of the joint quaternion that lies in the sagittal plane:
θ j = 2 arccos w j w j 2 + z j 2 sgn z j
where θ j is the sagittal plane joint angle, and w j and z j are respectively the real and k ^ components of the joint quaternion q j corresponding to either the hip, knee, or ankle quaternion from Table 1.

2.1.4. Joint Positions and LLTE Corrections

Joint positions are computed by double integration of linear accelerations captured by the IMUs. The position of the knee joint center is an important parameter for calculating the LLTE. Given the well-documented issue of drift during integration, correction methods are essential to ensure accuracy.
Integration is performed only between zero-velocity samples, specifically those closest to mid-stance during each step. Mid-stance and other gait events are determined via an algorithm using the shank angular velocity [15]. Following the approach described in [1], the zero velocity update method limits integration to intervals where accelerations are near zero, reducing drift accumulation. Two key corrections were applied to the knee joint position after integration for the LLTE calculations:
1. Anterior-Posterior Correction: Without correction, the knee A/P position during the stance phase would default to zero due to the absence of a reference frame (Figure 3). This error was resolved by calculating the sine of the leg’s orientation at initial contact and adjusting the initial position to align with that orientation.
2. Superior-Inferior Correction: At mid-stance, the vertical position of the knee joint is a known value, as shown in Figure 3. The calculated knee position from double integration was adjusted to enforce this known boundary condition, thereby correcting drift in the superior-inferior direction.
At the end of each gait cycle, the corrected knee position and shank angle from the preceding stance phase are compared to the target trajectory. The LLTE is computed as the deviation from this target, as defined in [12], and that scalar value representing the deviation can easily be visualized for the purpose of real-time performance assessment during walking.

2.2. ReBAIT Technical Description

This section outlines the software implementation of the biomechanical methods described above and provides guidance on adapting the system for applications beyond gait tracking.
ReBAIT is implemented in Python 3.9 and is compatible with most operating systems, though certain restrictions may apply depending on the sensors used or if there are changes to the IMU system used in this study (XSENS, Movella, Henderson, NV USA). The source code is available on GitHub (https://github.com/ZachHoegberg/ReBAIT) under the LGPLv3 open-source license. A complete list of dependencies can be found in the requirements.txt file. To assist users, the repository includes Jupyter notebooks detailing the main methods and their usage, with explanations of gait event detection algorithms, references, and illustrative examples. Additionally, short example scripts demonstrate the application of ReBAIT to published datasets, and an example gallery compiles existing methods for quick reference.
At a high level, the system architecture comprises four main components:
  • Callback Class: Handles incoming sensor data streams, ensuring real-time processing and synchronization.
  • DataCollector Class: Stores incoming sensor data and performs calculations, including gait metrics and LLTE corrections.
  • PlotFunc Class: Displays visual biofeedback during data collection, allowing real-time assessment and intervention.
  • ReBAIT Top-Level Function: Manages and coordinates the interaction between the Callback, DataCollector, and PlotFunc classes, serving as the primary interface for users.
This modular structure enhances flexibility, allowing users to integrate ReBAIT with various hardware and extend its functionality to other biomechanical tracking applications. The design emphasizes ease of use, making it accessible to both researchers and clinicians.

2.2.1. DataCollector Class

The DataCollector 4, class is responsible for managing incoming IMU data packets, ensuring proper storage, and performing necessary calculations, such as position, gait events, trajectory error (e.g., LLTE), and other relevant kinematic metrics.
Data collection using a DataCollector object runs in a separate thread from the main process. While Python’s Global Interpreter Lock prevents threads from executing on multiple cores simultaneously, this approach improves performance by separating data collection from visualization and processing.

2.2.2. Initialization

When a DataCollector object is created, numpy arrays are pre-allocated to optimize performance during trials. The array size is determined by the IMU sampling frequency and the expected trial duration. For trials exceeding 60 minutes, modifications to ensure sufficient memory allocation are recommended.

2.2.3. Data Packets

IMUs return data packets at a configurable rate of 100 Hz. Each packet contains the following measurements:
  • Timestamp
  • Linear Acceleration
  • Angular Velocity
  • Gravity-compensated Acceleration
  • Orientation Quaternion
  • Euler Angles
The extracted data are inserted to time-series arrays, maintaining synchronization across all IMUs. To ensure synchronization between IMUs and calculated values, one IMU is designated as the global time reference. For gait analysis, this is typically an IMU used for gait event detection; in this work, the right shank sensor was used as the time reference. This synchronization approach provides robust results even in cases of dropped packets or timing discrepancies between IMUs.
Upon receiving a data packet, values are extracted and appended to their respective arrays. For packets from the global reference IMU, joint angles are computed using the latest orientation quaternions, as described in Section 2.1.3. Gait event detection algorithms are subsequently executed using the most recent angular velocity data. Once a gait cycle is completed, integration algorithms compute limb segment velocities and positions followed by LLTE computation; the LLTE value can then be displayed to the subject as a form of biofeedback.

2.2.4. Visualization

In order to produce visualizations for biofeedback, the calculated LLTE values are plotted in real-time and displayed to the participant. Plotting is achieved using the PyQt5 package, a light-weight library ideal for responsive graphics with minimal latency. The ReBAIT main class accepts a object which extends the QTWidgets.QMainWindow class as an argument. ReBAIT will start the plot when data collection starts after calibration is complete. The supplied object should setup a timer and update function using the QMainWindow framework to automatically update the plot at regular intervals.

2.3. Real-Time Data Collection and Processing

The ReBAIT library provides a comprehensive pipeline for real-time IMU data collection, processing, and visualization. This includes initialization, sensor placement, biofeedback generation, and data export, as outlined below.

2.3.1. System Initialization

Before data collection, XSENS Device Manager is used to enable sensors. Once configured, the manager is closed, and the Python-based system establishes connection with the base station, initializes the IMUs, and displays sensor assignments for mounting.

2.3.2. Script Initialization

Upon running the data collection script, the system initializes IMUs and sets up a data buffer to store incoming packets. The user is prompted to mount the sensors and input anthropometric measurements (e.g., foot length, knee height, shank IMU to knee joint center distance) as described in Section 2.1.1. The target gait pattern is then selected from a library in the case of computing LLTE, and an instance of the DataCollector class is created to integrate sensor callbacks, anthropometric data, and gait patterns.
The ReBAIT system initializes the real-time biofeedback plot using PyQt5. The plotting interface is modular, enabling customization for various research or clinical applications. Visualization updates occur once per gait cycle, ensuring a seamless feedback experience during data collection.

2.3.3. Calibration Process

Calibration proceeds as described in Section 2.1.2. For static calibration, participants assume a neutral pose for five seconds while data is collected. For dynamic calibration, participants perform several toe-touches and normal walking steps (typically five to ten of each). Once completed, all IMUs are calibrated for subsequent data collection.

2.3.4. Data Collection and Real-Time Feedback

With calibration complete, data collection can begin. Trials can be conducted continuously or segmented into shorter intervals, with recalibration performed if sensors are bumped or dislocated from their calibrated position. During trials, the system streams real-time data, updates visualizations, and provides biofeedback for participants or clinicians as described in Section 2.2.4. The system’s state is periodically backed up in a temporary file to prevent data loss.

2.3.5. Data Export and File Structure

At the end of data collection, users are prompted to name and save the session data. All raw sensor data and computed variables are compiled into an xarray dataset, aligned by time and category, and saved in a NetCDF (.nc) file. All other values, including trial details and anthropometric measurements, are saved as metadata in the file. Temporary files are deleted upon successful export, and the system allows users to exit or initiate a new session.

2.4. Post-Processing and Playback Class

The system includes functionality to "replay" previously recorded sessions for offline testing and development. This feature eliminates the need for a complete sensor setup and calibration, facilitating re-analysis with alternative error functions or targets.
Playback uses the same DataCollector class as real-time data collection but replaces the live sensor callback with a Playback object. This object reads saved data and simulates packet generation, feeding it into the DataCollector for processing. By leveraging saved timestamps, the playback system accurately recreates the original calibration and data collection sequence.

2.4.1. Creating LLTE Reference Targets

Reference (i.e. target) gait profiles for LLTE calculations were generated by collecting data from a pilot participant walking with specific patterns, such as normal unrestricted gait or restricted knee motion using an orthotic brace. Data from 60 seconds of walking at a set speed were averaged to create normalized knee positions (A/P and S/I components) and shank angles, forming the target reference profiles. These targets were saved as pickle files and can be loaded into the DataCollector for use as real-time biofeedback targets to achieve during gait training, for instance.

2.4.2. DataJoint Post-Processing and Statistical Analysis

Post-processing was performed using DataJoint, a relational database framework for managing computations and analyses. Key tables used in this study include:
  • Subject Table: Contains all unique participants in the study.
  • ImuRecording Table:
    Key: Participant
    Fields: Project name, list of IMU base files
  • ImuTrial Table:
    Key: IMU recording and IMU trial ID (a string containing the trial number and condition)
    Fields: IMU file ID (where the trial is located), start and stop indices for each trial, IMU file path, file type
  • ImuTrialInfo Table:
    Keys: From the IMU trial table
    Fields: Participant’s group number, target for gait training, trial number
The first table should be changed to suit the needs of the user. This table serves as a foundation with primary keys for subsequent tables, such as:
  • ImuJointKinematicsNorm Table:
    Keys: From the IMU trial table
    Fields: Stance phase time normalized sagittal plane joint angles for left and right, hip, knee and ankle.
  • ImuJointKinematicsSeries:
    Keys: From the IMU trial table
    Fields: Sagittal plane joint angles for left and right, hip, knee and ankle from the whole trial.
  • ImuLLTE Table:
    Keys: From the IMU trial table
    Fields: Target, Trial number, LLTE value, Time normalized LLTE trajectories, Components of the LLTE and LLTE values from the first and last 30 seconds of the trial.
From these tables, we extract data for calculating descriptive statistics (e.g., means, standard deviations) for each participant.

2.5. Data Collection Protocol

To demonstrate the abilities of our system and validate the utility of the LLTE for measuring deviations in gait pattern, we conducted the study outlined in this section. This study was conducted as part of a larger research project approved by the Northwestern University Institutional Review Board (STU00220488). Twenty-three able-bodied participants (12F/11M; age: 26 ± 5 years; height: 1.7 ± 0.1 m; weight: 72.7 ± 17.6 kg) were recruited. Participants were asked to walk at four preset speeds (0.80, 1.00, 1.25, and 1.50 m s−1) for one minute each on a treadmill (COSMED USA, Chicago, IL USA).
Eight IMUs (XSENS) were initialized and connected to the local base receiver station before being mounted on participants as described in Section 2.1.1. Anthropometric data, namely height, mass, knee joint center to floor distance, and foot length, were input into a Python-based system. Following initialization, participants underwent static and dynamic calibration procedures as described in Section 2.1.2. During trials, participants began walking only after the treadmill reached the preset speed. Data collection started once participants demonstrated steady gait patterns as confirmed visually and continued for one minute. In order to demonstrate the capabilities of this system, we analyzed a subset of data from a larger collection with the participants described above. The purpose of this section and subsequent sections are to provide baseline data and demonstrate the functionality of our system for biofeedback of a single composite variable of lower limb single-plane kinematics.

2.6. Data Processing and Statistical Analysis

Data from the lower limb and pelvis IMUs were processed to calculate joint angles and the LLTE variable from the single IMU located on the right leg segment. Joint angle data were gap filled with a cubic join, and then filtered with a bi-directional low-pass fourth order butterworth filter with a cutoff of 24 Hz, which is customizable in the analysis. A single walking trial was held out from the 1.00 ms−1 due to an error in the data collection process (91 processed trials were included). The LLTE target was generated as the aggregate of the LLTE component trajectories normalized according to the method of [12] during normal walking at 0.80 m s−1 across all participants. No filtering or gap-filling was done to the calculated LLTE component trajectories. Any stance phase that lasted longer than 1 second was removed from the analysis, as these were outliers due to a missed gait event. A one-way repeated measures Analysis of Variance (ANOVA) assessed the main effect of walking velocity on values of LLTE across participants. Because the LLTE was time normalized to stance phase, we expect there to be no effect of walking velocity on the LLTE values. We also note the effects of each of the constituent components of the LLTE on the overall LLTE value. If there was a significant difference between the LLTE values, this was addressed post-hoc. Statistical analysis was completed with Pingouin Version 0.5.5 Data normality and sphericity were confirmed with the Mauchley test. A Greenhouse-Geisser correction was implemented when sphericity was violated. We report the p-value and effect size ( partial eta squared, η p 2 ).

3. Results

We first present results showing the measured joint angles during gait and verify that changes in the joint kinematics measured by our system match values from previous work. We then present results of the LLTE measure across speeds and analyze the change in LLTE as gait speed increases. The measured ROMs across a range of walking speeds from 0.80 m s−1 to 1.50 m s−1 are shown in Figure 5 and Table 2. The hip joint angle range-of-motion (ROM) during stance phase was shown to increase as walking speed increases due to increased flexion at initial contact and increased extension at toe off. The knee joint angle had minimal change in total ROM with respect to speed, but flexion at initial contact up to the middle of stance increased as speed increased. Finally, the ankle showed a small increase in dorsiflexion at initial contact and substantially increased plantarflexion at toe off as speed increased.
During stance phase, the LLTE components appear similar across the range of speeds when normalized to stance time to match the time-normalized LLTE target (Figure 6). The ANOVA results suggested no significant effect of speed on LLTE ( F = 1.32 , p = 0.278 , η p 2 = 0.0368 ). These findings suggest that LLTE values are uncorrelated to gait speed changes across the range of tested speeds when using the aggregate 0.80 ms−1 as the target trajectory. The contributions of the A/P and S/I knee position and shank angle components to the total LLTE are shown in Figure 7. At each walking speed, the A/P knee position had the greatest effect on the overall LLTE, with the angle swept out by the shank having slightly smaller effect and the S/I shank angle having minimal effect on the LLTE across all tested speeds. It is notable that there is high levels of variability for the A/P error component, which in turn dominates the variance of the LLTE values.

4. Discussion

We developed ReBAIT as an easy to implement and low cost system that can use only a single sensor to quantify human locomotion and deliver real-time feedback for providing gait training. The accuracy of our system relies on accurate calibration of the IMUs for both joint angles and LLTE calculations. The goal of this work was to introduce the framework and analysis scheme from initial data capture to final outputs and aggregate analysis.
Prior work used an anthropometric model for the estimation of segment lengths and kinematic reconstruction, and a calibration with either specific poses and/or walking forward and backward in their environment [4], while our method utilizes quiet standing in a neutral position and only forward walking. These differences aim to make calibration simple, more accessible, and highly repeatable for novice users.
Sagittal-plane joint angles are calculated using the orientation of IMUs on adjacent segments. This method of calculating joint angles mirrors that of prior work [5] using quaternions in place of rotation matrices; however, our work introduces a novel and straight-forward method of setting up and calibrating the sensors. Measured joint angles during gait approximately match the expected trajectories, and the demonstrated changes in lower limb joint ROM approximately match previous work analyzing the relationship between gait speed and joint kinematics [16].
In previous work, the LLTE has been limited to use as a simulation and design metric for custom prosthetic feet [11,12,17,18] to encourage gait symmetry in persons with unilateral transtibial amputation. Here we have extended its use as a biofeedback metric given its unique properties of consolidating multiple kinematic features into a single scalar value. For the purpose of gait training, the two major determinants of the LLTE appear to be the A/P position of the knee and the shank angle swept out during stance phase, while the S/I position of the knee is less variable and therefore more valuable as a design metric for prosthetic ankle-feet (i.e., build height), as shown in Figure 6 and Figure 7. Calculating the LLTE with an IMU requires a number of assumptions and corrections that are not necessary when using marker-based motion capture, as described in the methods Section 2.1.4. The component trajectories approximately match those presented in previous work, and the calculated LLTE values are slightly lower than values from previous studies ( 0.40 compared to > 0.70 ) [10,11], although those studies compared prosthesis user trajectories to able-bodied. Furthermore, we have presented evidence that the LLTE values as a stance time normalized metric do not differ significantly with speed. This opens the door to using the LLTE as a biofeedback measure to influence gait for research into motor adaptation or clinical gait retraining within a limited range of speeds.

4.1. Limitations

While the joint angle trajectories appear reasonable and align with previous work to help verify the platform described here, it has not yet been validated against traditional optical motion capture systems, which will be conducted in future work. The calibration method for this system is robust to arbitrary mounting but sensitive to errors or violations of assumptions during the calibration process. For example, we currently assume that during the dynamic calibration period all of the angular velocity is about the frontal axis. This assumption may not hold perfectly in some situations with out-of-plane movement such as hip circumduction and ankle supination/pronation. Additionally, during the static calibration we assume that the longitudinal axis of the shank and thigh are perfectly aligned with gravity and this may not always be the case, especially in certain patient groups with large skeletal morphological deviations. We also note that the platform was assessed in a controlled environment with fixed walking on a treadmill with motion primarily limited to the sagittal plane, and therefore future work should involve assessment in more dynamic scenarios. Finally, our system is subject to the common issues with IMUs such as drift and offsets, which are highly dependent on the quality of the sensor technology. Here we employed an established commercial system (XSENS), and therefore the effects of using alternative sensors, especially those that are low-cost to expand applicability, should be assessed when integrated with our proposed platform.

5. Conclusions

In conclusion, we have developed and demonstrated the capabilities of a simple-to-use IMU system for the estimation of lower limb kinematics that allows for data visualization for near-real-time biofeedback from single or multiple sensors. Our system offers advantages in terms of applicability to researchers and clinicians due to minimal setup, operation, and technical expertise compared to more traditional motion capture systems. Planned future work on this system includes expanding applicability to track upper limb kinematics, tracking during overground walking, and additional joint angle measurements that include transverse and frontal plane angles.

Author Contributions

Conceptualization, S.D. and M.M.; methodology, S.D. and M.M.; software, Z.H. and S.D.; validation, Z.H., S.D. and M.M.; formal analysis, Z.H. and S.D.; data curation, S.D.; writing—original draft preparation, Z.H and S.D..; writing—review and editing, M.M.; visualization, Z.H and S.D.; supervision, M.M.; project administration, S.D. and M.M.; funding acquisition, S.D. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Administration for Community Living, National Institute on Disability, Independent Living and Rehabilitation Research grant number 90SFGE0.

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki, and approved by the Institutional Review Board of Northwestern University (STU00220488, Approved: 02/2024)

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ReBAIT Real-time Biofeedback and Analysis using IMU Tracking
IMU Inertial Measurement Unit
ISB International Society of Biomechanics
PCA Principal Component Analysis
LLTE Lower Limb Trajectory Error
ANOVA Analysis of Variance
ROM Range of Motion
AP Anterior-Posterior
SI Superior-Inferior

References

  1. Ojeda, L.; Zaferiou, A.; Cain, S.; Vitali, R.; Davidson, S.; Stirling, L.; Perkins, N. Estimating Stair Running Performance Using Inertial Sensors. Sensors 2017, 17, 2647. [Google Scholar] [CrossRef] [PubMed]
  2. Vitali, R.; Cain, S.; McGinnis, R.; Zaferiou, A.; Ojeda, L.; Davidson, S.; Perkins, N. Method for Estimating Three-Dimensional Knee Rotations Using Two Inertial Measurement Units: Validation with a Coordinate Measurement Machine. Sensors 2017, 17, 1970. [Google Scholar] [CrossRef] [PubMed]
  3. Adamczyk, P.G.; Harper, S.E.; Reiter, A.J.; Roembke, R.A.; Wang, Y.; Nichols, K.M.; Thelen, D.G. Wearable sensing for understanding and influencing human movement in ecological contexts. Current Opinion in Biomedical Engineering 2023, 28, 100492. [Google Scholar] [CrossRef] [PubMed]
  4. Hafer, J.F.; Vitali, R.; Gurchiek, R.; Curtze, C.; Shull, P.; Cain, S.M. Challenges and advances in the use of wearable sensors for lower extremity biomechanics. Journal of Biomechanics 2023, 157, 111714. [Google Scholar] [CrossRef] [PubMed]
  5. Schepers, M.; Giuberti, M.; Bellusci, G. Xsens MVN: Consistent Tracking of Human Motion Using Inertial Sensing, 2018. [CrossRef]
  6. Al Borno, M.; O’Day, J.; Ibarra, V.; Dunne, J.; Seth, A.; Habib, A.; Ong, C.; Hicks, J.; Uhlrich, S.; Delp, S. OpenSense: An open-source toolbox for inertial-measurement-unit-based measurement of lower extremity kinematics over long durations. Journal of NeuroEngineering and Rehabilitation 2022, 19, 22. [Google Scholar] [CrossRef] [PubMed]
  7. Potter, M.V.; Cain, S.M.; Ojeda, L.V.; Gurchiek, R.D.; McGinnis, R.S.; Perkins, N.C. Evaluation of Error-State Kalman Filter Method for Estimating Human Lower-Limb Kinematics during Various Walking Gaits. Sensors 2022, 22, 8398. [Google Scholar] [CrossRef] [PubMed]
  8. Adans-Dester, C.; Hankov, N.; O’Brien, A.; Vergara-Diaz, G.; Black-Schaffer, R.; Zafonte, R.; Dy, J.; Lee, S.I.; Bonato, P. Enabling precision rehabilitation interventions using wearable sensors and machine learning to track motor recovery. npj Digital Medicine 2020, 3, 121. [Google Scholar] [CrossRef] [PubMed]
  9. Lee, S.I.; Adans-Dester, C.P.; Grimaldi, M.; Dowling, A.V.; Horak, P.C.; Black-Schaffer, R.M.; Bonato, P.; Gwin, J.T. Enabling Stroke Rehabilitation in Home and Community Settings: A Wearable Sensor-Based Approach for Upper-Limb Motor Training. IEEE Journal of Translational Engineering in Health and Medicine 2018, 6, 1–11. [Google Scholar] [CrossRef] [PubMed]
  10. Olesnavage, K.M.; Prost, V.; Johnson, W.B.; Winter, A.G. Passive Prosthetic Foot Shape and Size Optimization Using Lower Leg Trajectory Error. Journal of Mechanical Design 2018, 140, 102302. [Google Scholar] [CrossRef]
  11. Prost, V.; Johnson, W.B.; Kent, J.A.; Major, M.J.; Winter, A.G. Biomechanical evaluation over level ground walking of user-specific prosthetic feet designed using the lower leg trajectory error framework. Scientific Reports 2022, 12, 5306. [Google Scholar] [CrossRef] [PubMed]
  12. Folinus, C.; Winter, V, A.G. Design and Mechanical Validation of Commercially Viable, Personalized Passive Prosthetic Feet. Journal of Mechanical Design 2025, 147, 035001. [CrossRef]
  13. Wu, G.; Siegler, S.; Allard, P.; Kirtley, C.; Leardini, A.; Rosenbaum, D.; Whittle, M.; D’Lima, D.D.; Cristofolini, L.; Witte, H.; et al. ISB recommendation on definitions of joint coordinate system of various joints for the reporting of human joint motion—part I: ankle, hip, and spine. Journal of Biomechanics 2002, 35, 543–548. [Google Scholar] [CrossRef] [PubMed]
  14. McGrath, T.; Fineman, R.; Stirling, L. An Auto-Calibrating Knee Flexion-Extension Axis Estimator Using Principal Component Analysis with Inertial Sensors. Sensors 2018, 18, 1882. [Google Scholar] [CrossRef] [PubMed]
  15. Gouda, A.; Andrysek, J. Rules-Based Real-Time Gait Event Detection Algorithm for Lower-Limb Prosthesis Users during Level-Ground and Ramp Walking. Sensors 2022, 22, 8888. [Google Scholar] [CrossRef] [PubMed]
  16. Hanlon, M.; Anderson, R. Prediction methods to account for the effect of gait speed on lower limb angular kinematics. Gait & Posture 2006, 24, 280–287. [Google Scholar] [CrossRef]
  17. Olesnavage, K.M.; Winter, A.G. Design and Preliminary Testing of a Prototype for Evaluating Lower Leg Trajectory Error as an Optimization Metric for Prosthetic Feet. In Proceedings of the Volume 5A: 40th Mechanisms and Robotics Conference, Charlotte, North Carolina, USA, August 2016; p. V05AT07A038. [CrossRef]
  18. Prost, V.; Johnson, W.B.; Kent, J.A.; Major, M.J.; Winter, V, A.G. Systematic Assessment of Prosthesis Stiffness on User Biomechanics Using the Lower Leg Trajectory Error Framework and Its Implication for the Design and Evaluation of Ankle-Foot Prostheses. Journal of Biomechanical Engineering 2022, 145. [CrossRef]
Figure 1. Kinematic components used in the calculation of the LLTE.
Figure 1. Kinematic components used in the calculation of the LLTE.
Preprints 153186 g001
Figure 2. IMU Placement. IMU-fixed coordinate systems are shown, with x-axis (green), y-axis (blue), and z-axis (red). Sternum (a): At or slightly superior to Xiphoid process, Sacrum (b): Superior to the midpoint between the posterior superior iliac spine, Thigh (c): Anterior, approximately 15 cm proximal to the knee joint center defined by the midpoint between the femoral condyles, Shank (d): Anterior, approximately 15 cm distal to the knee joint center, Foot (e): Dorsal aspect halfway between the metatarsophalangeal joint and the ankle joint.
Figure 2. IMU Placement. IMU-fixed coordinate systems are shown, with x-axis (green), y-axis (blue), and z-axis (red). Sternum (a): At or slightly superior to Xiphoid process, Sacrum (b): Superior to the midpoint between the posterior superior iliac spine, Thigh (c): Anterior, approximately 15 cm proximal to the knee joint center defined by the midpoint between the femoral condyles, Shank (d): Anterior, approximately 15 cm distal to the knee joint center, Foot (e): Dorsal aspect halfway between the metatarsophalangeal joint and the ankle joint.
Preprints 153186 g002
Figure 3. Illustration of corrections to the knee joint S/I position during stance phase for different gait presentations, namely a stiff or flexed knee gait.
Figure 3. Illustration of corrections to the knee joint S/I position during stance phase for different gait presentations, namely a stiff or flexed knee gait.
Preprints 153186 g003
Figure 4. Block diagram of ReBAIT system components and workflow.
Figure 4. Block diagram of ReBAIT system components and workflow.
Preprints 153186 g004
Figure 5. Ensemble averages of time normalized stance phase lower extremity joint angles across participants during normal walking on a treadmill at four different speeds (0.80 m s−1 panels A-C, 1.00 m s−1, panels D-F, 1.25 m s−1, panels G-I and 1.50 m s−1, panels J-L). The solid lines and transparent error bands denote the mean and one standard deviation, respectively.
Figure 5. Ensemble averages of time normalized stance phase lower extremity joint angles across participants during normal walking on a treadmill at four different speeds (0.80 m s−1 panels A-C, 1.00 m s−1, panels D-F, 1.25 m s−1, panels G-I and 1.50 m s−1, panels J-L). The solid lines and transparent error bands denote the mean and one standard deviation, respectively.
Preprints 153186 g005
Figure 6. Time normalized A/P knee position (panel A), S/I knee position (panel B), and sagittal-plane shank angle (panel C) trajectories across stance that are components of the LLTE for each walking speed. The solid lines and transparent error bands denote the mean and one standard deviation, respectively.
Figure 6. Time normalized A/P knee position (panel A), S/I knee position (panel B), and sagittal-plane shank angle (panel C) trajectories across stance that are components of the LLTE for each walking speed. The solid lines and transparent error bands denote the mean and one standard deviation, respectively.
Preprints 153186 g006
Figure 7. Values of the LLTE and its constituent components across walking speeds when compared to the aggregate 0.80 ms−1 across participants as the target trajectory.
Figure 7. Values of the LLTE and its constituent components across walking speeds when compared to the aggregate 0.80 ms−1 across participants as the target trajectory.
Preprints 153186 g007
Table 1. Lower Limb Joint Rotation Quaternions.
Table 1. Lower Limb Joint Rotation Quaternions.
Hip q h = q PV q TH
Knee q k = q SH q TH
Ankle q a = q SH q FT
Table 2. Mean sagittal plane range-of-motion for each leg joint across participants (mean ± standard deviation) at each speed.
Table 2. Mean sagittal plane range-of-motion for each leg joint across participants (mean ± standard deviation) at each speed.
Joint 0.80 m s−1 1.00 m s−1 1.25 m s−1 1.50 m s−1
Right Hip 39.18 ± 11.84 42.68 ± 7.75 48.55 ± 8.64 55.13 ± 7.32
Right Knee 38.40 ± 13.57 41.79 ± 10.30 42.82 ± 16.35 39.85 ± 17.15
Right Ankle 28.63 ± 29.60 25.34 ± 6.99 27.72 ± 8.20 23.11 ± 8.87
Left Hip 34.44 ± 7.34 41.23 ± 8.28 46.91 ± 10.40 54.17 ± 12.79
Left Knee 33.00 ± 7.99 37.52 ± 10.62 36.24 ± 10.41 36.20 ± 8.02
Left Ankle 22.28 ± 4.71 24.13 ± 7.49 25.52 ± 9.09 24.87 ± 10.20
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated