OpenSense - An Open-Source Toolbox For Inertial-Measurement-Unit-Based Measurement of Lower Extremity Kinematics Over Long Durations-239161
OpenSense - An Open-Source Toolbox For Inertial-Measurement-Unit-Based Measurement of Lower Extremity Kinematics Over Long Durations-239161
Abstract
Background: The ability to measure joint kinematics in natural environments over long durations using inertial
measurement units (IMUs) could enable at-home monitoring and personalized treatment of neurological and mus-
culoskeletal disorders. However, drift, or the accumulation of error over time, inhibits the accurate measurement of
movement over long durations. We sought to develop an open-source workflow to estimate lower extremity joint
kinematics from IMU data that was accurate and capable of assessing and mitigating drift.
Methods: We computed IMU-based estimates of kinematics using sensor fusion and an inverse kinematics approach
with a constrained biomechanical model. We measured kinematics for 11 subjects as they performed two 10-min tri-
als: walking and a repeated sequence of varied lower-extremity movements. To validate the approach, we compared
the joint angles computed with IMU orientations to the joint angles computed from optical motion capture using
root mean square (RMS) difference and Pearson correlations, and estimated drift using a linear regression on each
subject’s RMS differences over time.
Results: IMU-based kinematic estimates agreed with optical motion capture; median RMS differences over all sub-
jects and all minutes were between 3 and 6 degrees for all joint angles except hip rotation and correlation coefficients
were moderate to strong (r = 0.60–0.87). We observed minimal drift in the RMS differences over 10 min; the average
slopes of the linear fits to these data were near zero (− 0.14–0.17 deg/min).
Conclusions: Our workflow produced joint kinematics consistent with those estimated by optical motion capture,
and could mitigate kinematic drift even in the trials of continuous walking without rest, which may obviate the need
for explicit sensor recalibration (e.g. sitting or standing still for a few seconds or zero-velocity updates) used in current
drift-mitigation approaches when studying similar activities. This could enable long-duration measurements, bringing
the field one step closer to estimating kinematics in natural environments.
Keywords: Inertial measurement unit, Open-source, Kinematics, Biomechanical model, Drift
Introduction
Inertial measurement units (IMUs) could enable bio-
*Correspondence: [email protected] mechanics and rehabilitation researchers to measure
†
Mazen Al Borno and Johanna O’Day co-first author kinematics in a variety of populations, in natural envi-
3
Department of Bioengineering, Stanford University, Stanford, CA, USA
ronments and over long durations. From detecting
Full list of author information is available at the end of the article
© The Author(s) 2022. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which
permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the
original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or
other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line
to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory
regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this
licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativeco
mmons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.
Al Borno et al. Journal of NeuroEngineering and Rehabilitation (2022) 19:22 Page 2 of 11
functional improvement in patients post-stroke to moni- However, ferromagnetic disturbances distort the meas-
toring fall-risk in older adults [1], continuous sensing of urement of the earth’s magnetic field, which can lead
kinematics could improve our understanding of human to inaccurate orientation estimates [18]. Sensor fusion
movement pathology by providing many repetitions of approaches have been designed to mitigate drift in spe-
a movement in home or community settings, in contrast cific and precise movements such as those performed
with the limited number of trials and highly-controlled by robots [6]. Validation studies applying sensor fusion
environment of a laboratory experiment. IMUs could methods in human movement analysis have reported
also enable early detection of disease or injury-risk. They average RMS differences in the range of 1.7°–8° for
could then be used together with mobile interventions to joint angles over short durations (on the order of one
create rehabilitation or injury-prevention strategies that minute) [5, 19–21]. Recent work has shown that sensor
are optimized to the user’s biomechanics. In addition, fusion algorithms [22–24] can produce estimations of
IMUs are an inexpensive way to measure movement in sensor orientations with less than 10° RMS difference
large cohorts, facilitating large-scale multi-center clini- over five minutes. We extend the work by estimating
cal trials for which traditional motion capture is currently drift-free physiologically realistic joint angles in new
infeasible. experimental conditions over 10 min.
IMUs have been used to estimate kinematics during Previous studies have computed IMU-based estimates
human movement for the past 30 years [2] and over the of kinematics using biomechanical models with accura-
past decade, the biomechanics and rehabilitation com- cies under 5° RMS difference. These results suggest the
munities have substantially improved the accuracy of physiological joint constraints of biomechanical mod-
IMU-based methods for measuring kinematics. For els may mitigate errors due to drift. For the most part,
example, researchers have developed new sensor fusion however, these studies have used closed-source com-
algorithms to estimate orientations [3–6] and devised mercially available models (e.g., MVN Xsens) [25] that
more precise sensor-to-body segment alignment meth- cost on the order of $10 k, or simple models that are
ods [7, 8]. Researchers have also employed biomechanical developed in-house and thus are limited to users with
models [9–11], and used neural networks and optimiza- IMU and modeling expertise [10, 26–30]. Tagliapietra
tion [12–15] to estimate accurate kinematics without et al. (2018) provide an open-source IMU-based inverse
reliance on potentially distorted magnetometer data or kinematics algorithm using a biomechanical model; this
precise IMU placement. Some studies have shown accu- study reports good agreement (RMS differences less
racy for lower extremity kinematics on the order of one than 6 degrees) between their IMU-based estimates of
degree root mean square (RMS) difference compared kinematics and the robotic-encoder-based or optical-
to optical motion capture. However, the overwhelming based kinematics, but the approach has not been tested
majority of studies only assess accuracy of steady-state for human movement.
behavior (e.g., walking or running) over short durations Ideally, the research community would have access
(on the order of one minute or less) [16], even though to an open-source platform that allows computation
these conditions are not wholly representative of natural of kinematics from experimentally recorded IMU data
behavior. using a physiologically representative musculoskeletal
A key challenge when estimating 3D orientation from model that has been evaluated for use over long dura-
IMUs over long durations is managing compounding tions. This integrated environment would empower
drift over time. Most IMU-based algorithms to esti- researchers to generate further analyses and insights
mate joint kinematics rely on three-dimensional ori- (e.g. estimations of musculotendon lengths or veloci-
entations computed through sensor fusion, a process ties required to generate motion) that would otherwise
where triaxial data from the accelerometer, gyroscope, involve invasive and complex experiments.
and/or magnetometer are combined to give a more Our goal was thus to develop an open-source work-
accurate measure of orientation than could be provided flow for computing three-dimensional joint kinemat-
by any of the single data streams. Strap-down integra- ics with IMU sensors using a human musculoskeletal
tion, or integrating gyroscope data from an IMU that model that was accurate and capable of assessing and
is strapped to the body segment of interest (as opposed mitigating drift. To evaluate our workflow, we com-
to mounted on a stabilized platform), results in random pared against optical motion capture data during
drift as numerical integration amplifies noise in the 10-min periods of common activities. To facilitate
gyroscope data [17]. Accelerometer-based and mag- access of long-duration validation data to the research
netometer-based compensation can correct this drift community, we also sought to provide an open dataset
using Earth’s gravitational and magnetic field vector. of synchronized IMU and optical motion capture data.
Al Borno et al. Journal of NeuroEngineering and Rehabilitation (2022) 19:22 Page 3 of 11
Methods for a continuous 10-min trial. Next, subjects took the cal-
Data collection ibration pose again, and then completed multiple cycles
We collected IMU and optical motion capture data for of lower-extremity movements for 10 min. Each cycle
11 subjects in a laboratory environment, which included consisted of sitting, standing, ascending and descending
significant amounts of electronic equipment and fer- three stairs, side-stepping for five meters, walking around
romagnetic materials. All subjects provided informed a 12-m oval circuit, and finally running around a 12-m
consent to a protocol approved by the Stanford Univer- oval circuit. Subjects completed the cycle 6–10 times
sity Institutional Review Board. Subjects were young over the 10 min.
(27.9 ± 6.7 years, mean ± 1 standard deviation (sd)
and free of any musculoskeletal injuries or disorders; Sensor fusion
the mean body mass index of subjects was in the “nor- We tested three sensor fusion algorithms: a proprietary
mal” range (23.7 ± 2.4 kg/m2) and the majority were filter (embedded on-board the Xsens IMU sensor), and
male (9/11). Subjects were outfitted with 8 IMUs (MTw two open-source complementary filters [3, 5]. The com-
Awinda, Xsens North America Inc., Culver City, USA), plementary filters used the raw accelerometer, gyroscope,
which were affixed to thin plexiglass plates with clus- and magnetometer signals read from the IMU sensors.
ters of at least 4 retro-reflective markers, constituting a We implemented the complementary filters using the
marker plate, and secured to the upper back (T2), lower developers’ open-source code [3, 5] in MATLAB R2019a
back (L5), and the right and left thighs, shanks, and feet (Mathworks, Inc., Natick MA, USA) with the initial ori-
(Additional file 1: Figure S1). IMU signals were sampled entation estimate computed from the accelerometer and
at 100 Hz for nine subjects, and at 40 Hz for two sub- magnetometer measurements when the sensors were at
jects (due to a protocol inconsistency). IMU data were rest (i.e., when the subject was standing still for a few sec-
acquired via a graphical interface (MT Studio, Xsens onds). We manually tuned the filter gain (“beta param-
North America, USA). eter”) of the complementary filters [5] using data from
Optical motion capture data were collected simulta- two randomly chosen subjects (sampled at 100 Hz), and
neously to enable comparison of the IMU-based esti- this filter gain of 0.1 was used for all subjects with data
mates of joint kinematics to the current gold standard. collected at 100 Hz. For the two subjects with data col-
In addition to the markers on the marker plate, markers lected at 40 Hz, the filter gain value of 0.1 overcorrected
were placed on the bony landmarks of the C7 vertebrae, drift, resulting in poor accuracy. Therefore, we experi-
sternoclavicular joints, acromion processes, anterior mented with filter gains of 0.05 and 0.025 and found the
and posterior superior iliac spines, medial and lateral latter was optimal. To evaluate the accuracy of the sensor
femoral epicondyles, medial and lateral malleoli, calca- fusion algorithm, we compared the IMU-based orienta-
nei, and 5th metatarsal heads. Markers on the medial tion estimates to those computed using the motion cap-
femoral epicondyles and malleoli and makers obscured ture markers affixed to the marker plates. The orientation
by the marker plates were removed prior to walking tri- difference was expressed as the angle of an axis-angle
als. Marker trajectories were measured at 100 Hz using representation of the relative rotation. From this angle,
an eight-camera motion capture system (Motion Analy- we computed RMS errors. As the markers and IMUs
sis Corporation, Santa Rosa, CA, USA). A standard video were rigidly mounted to the marker plate, we would
camera (30 frames/s) was used to record each trial and expect minimal errors in the optical estimates of orien-
visually confirm events or event timings offline. The opti- tation, thus we report RMS errors and refer to them as
cal motion capture and IMU data were synchronized by sensor fusion errors.
maximizing the cross-correlation between the resulting
joint kinematics. Inverse kinematics workflow
We used OpenSim 4.2 [31, 32] (simtk.org/projects/
Experimental conditions opensim) to compute both IMU-based and optical-
Experimental data were collected while each subject motion-capture-based estimates of kinematics, which
completed two conditions: (i) 10 min of walking and we refer to as IMU-based kinematics and optical-based
turning and (ii) 10 min of a repeated series of move- kinematics, respectively. We used a physiological skele-
ments. Subjects started each condition with an initial cal- tal model with 22 segments and 43 degrees-of-freedom
ibration pose, standing with their arms by their sides, feet (dofs). The model had 16 dofs in the lower body includ-
hip’s width apart, and facing forward for a period of 5 s. ing 6 for the pelvis and 5 for each lower extremity. The
In the first condition, subjects were instructed to walk hip was modeled as a ball-and-socket joint (3 dofs), the
straight for 5 m at a self-selected pace then turn 180° knee as a custom joint with 1 dof [33–35]. The ankle
using a self-selected strategy and to repeat this sequence and foot in the model of Rajagopal and colleagues [36]
Al Borno et al. Journal of NeuroEngineering and Rehabilitation (2022) 19:22 Page 4 of 11
was simplified to a single pin joint representing ankle Assessing IMU orientation data and joint kinematics
plantarflexion-dorsiflexion, with the subtalar and mtp As noted above, the data were collected in a laboratory
joints removed by welding (making them rigid). The environment with ferromagnetic disturbances which
model was scaled to match each subject’s anthropom- resulted in distortions in IMU orientation estimates,
etry based on experimentally-measured markers placed especially in the heading direction. These erroneous
on anatomical landmarks. Model scaling was only IMU orientation estimates led to exaggerated hip adduc-
relevant for computing optical-based kinematics, as tion, hip rotation, and ankle flexion in the downstream
rigid body segment length does not affect IMU-based inverse kinematics solution. To address this, we devel-
inverse kinematics. For optical-based kinematics, we oped a pre-screening process that used the kinematic
used an inverse kinematics algorithm to solve for the constraints of the skeletal model to identify experimental
joint angles that minimized the difference between the sensor orientations that were physiologically unrealistic.
experimentally measured marker positions and the cor- This pre-screening was part of the general pipeline, and
responding virtual markers on the model. we recommend applying it to achieve comparable results.
Our OpenSense toolkit in OpenSim 4.2 was used to The pre-screening process was based on the inverse kin-
compute IMU-based joint kinematics. The IMU orien- ematics orientation differences described above and did
tation data resulting from a given sensor fusion algo- not assume knowledge of the true IMU orientations. The
rithm were imported and associated with a rigid body pre-screening process was: (i) if the differences exceeded
(e.g., pelvis) based on a user-defined sensor mapping. a threshold of 45 degrees in the first 10 s of the trial, indi-
To determine the orientation of the IMUs relative to cating poor tracking of the IMU orientation, then these
the body segment on which they were placed, we used data were excluded or (ii) if the average range of the
the calibration pose data. We used the optical motion difference over 60 ms bins (in the first 10 s of the trial)
capture data to pose the model (given that our main exceeded a threshold of 30 degrees, indicating unrealistic
focus was assessing drift) and the IMU calibration data variability and therefore poor data, then these data were
to compute the orientations of the IMUs relative to the excluded. We share a subject information table indicat-
posed model’s body segments as fixed rotational offsets. ing which IMUs were included in our analysis of joint
The modeled virtual IMU frames were then assigned kinematics (Additional file 1: Table S2). The values of 45
these offsets relative to the underlying rigid body. degrees and 30 degrees were chosen based on the data of
After this calibration step, we used Eq. 1 to compute five trials and kept constant for all 22 trials in the study.
the difference, expressed as the angle ( θi ) of the axis- Seven of 11 subjects had at least one IMU excluded from
angle representation between the experimentally meas- analysis as a result of the pre-screening.
ured IMU orientations (a rotation matrix expressed in
exp
Earth’s reference frame N, N Ri ), and the orientations
of the model’s virtual IMUs ( Rivir ). We denote this dif-
N
Statistics
ference as Ri . We used an inverse kinematics algorithm We compared the joint angles computed with IMU ori-
(Eq. 2) that solved for the joint angles (q) that mini- entations to the joint angles computed from optical
mized this weighted-squared difference (wi θi2). motion capture using root mean square (RMS) differ-
min wi θi2 ence. We calculated a Pearson correlation between each
q (2) subject and joint angle and reported the mean and stand-
i∈IMUs
ard deviation for the correlation coefficients and average
We used θi to quantify the RMS differences between change in correlation coefficients over 10 min (Table 1).
the experimentally measured IMU orientations and the Bilateral joint measures were pooled for all summary
virtual IMU orientations. From here we refer to these statistics. As some data were not normally distributed,
RMS differences as inverse kinematics orientation dif- as determined by a Shapiro–Wilk test, we computed the
ferences. In the inverse kinematics algorithm, we down- median and interquartile range of RMS difference over
weighted the terms corresponding to the distal IMUs all subjects and all minutes for each joint angle. Outliers
(reduced the relative weighting on the shank IMUs and were defined as values 1.5 times the interquartile range
the foot IMUs, i.e. wshank and wfoot) to minimize the below or above the 25th and 75th percentile (correspond-
influence of the IMUs that were closer to the in-ground ing to the bottom or top of the box, respectively, in box
metal force-plates (see Additional file 1: Table S1). plots).
Al Borno et al. Journal of NeuroEngineering and Rehabilitation (2022) 19:22 Page 5 of 11
Table 1 Correlation coefficients between IMU- and optical-based kinematics over 10 min of overground walking, averaged over all
subjects
Joint angle Overall correlation (r) Average difference in correlation
(r) between 1st and 10th minute
We quantified drift for each subject and joint angle likely due to the nearly horizontal trajectories of the sub-
using a linear regression on each subject’s individual jects’ RMS differences, at which point R 2 approaches a
per-minute RMS differences for each joint angle over negative value (i.e., the chosen model fits worse than a
the 10 min. For each joint angle, we averaged the slopes horizontal line).
of the linear fits across subjects. We report the range of Individual subjects’ mean IMU-based joint angles
slopes to represent drift as an average change in RMS over the gait cycle showed minimal difference (within
difference per minute. To examine changes over time in two standard deviations) from optical-based joint
RMS differences for different sensor fusion algorithms, angles between the 1st and 10th minute of overground
we subtracted a subject’s joint angle RMS difference at walking (Fig. 2). IMU-based hip rotation showed the
the end of the first minute from the RMS difference at least agreement with optical-based kinematics. A few
the end of the 10th minute. We completed all statistical subjects (Subjects 2,3,11) had IMU-based kinematics
analyses in MATLAB R2019a. outside two standard deviations of optical-based kin-
ematics (Fig. 2). The residual plots between the IMU-
based and optical-based kinematics for all subjects are
Results included in Additional file 1: Figure S4.
Median RMS differences between IMU and optical-based We found moderate to strong correlations between
kinematics were 3–6° over all subjects and all minutes the IMU-based kinematics and the optical-based kine-
(Fig. 1) for all joint angles except hip rotation (12°); these matics as indicated by high correlation coefficients over
values are within the reported variability and uncertainty the 10-min period of overground walking, ranging from
of optical motion capture [37]. We saw a similar range of r = 0.60–0.87 (Table 1). The average difference in cor-
RMS differences between IMU and optical-based kine- relation coefficient between the first and 10th minute
matics for the 10-min sequence of lower-extremity move- was also near zero (− 0.1–0.1), indicating little change
ments. Results for the two open-source complementary or drift over the 10 min. The results were similar for the
filters were similar, so we focus on the results produced sequence of lower-extremity movements (Additional
with the open-source algorithm from Madgwick et al. file 1: Table S3) and also whether we used the com-
[5] and refer to it as the “complementary filter”. Minute- plementary filter or the proprietary filter from Xsens
by-minute RMS differences for the complementary filter (Additional file 1: Figure S5).
from Mahony et al. [3] can be found in Additional file 1: Joint angles computed using the complementary filter
Figure S2 and highlight that these trends for RMS differ- and the proprietary filter from Xsens showed similar
ences over time were also largely flat. changes in median RMS difference over 10 min, with
Lower extremity joint kinematics showed minimal less than 2 degrees versus less than 4 degrees, respec-
drift. Median RMS differences were largely unchanged tively, during walking (Additional file 1: Figure S5). The
over 10 min for all joint angles during both conditions proprietary filter, however, had more and larger outliers
(Fig. 1). Each individual subject’s per-minute RMS dif- than the complimentary filter. For example, almost 50
ferences showed minimal change over 10 min for all degrees change in RMS difference in knee flexion was
joint angles (Additional file 1: Figure S3), and the aver- recorded for one subject (Additional file 1: Figure S5),
age slopes of the linear fits to these data were near zero highlighting that when the proprietary filter starts to
(− 0.14–0.17°/min), indicating minimal drift. Though drift, errors can accumulate quickly and substantially.
the linear fits were not strong (R2 = − 0.03–0.4), this was
Al Borno et al. Journal of NeuroEngineering and Rehabilitation (2022) 19:22 Page 6 of 11
A Walking
10 10 10 10
0 0 0 0
1 2 3 4 5 6 7 8 9 10
20
hip adduction 30 *
hip rotation 20
knee flexion minute
10 15 10
0 0 0
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
minute minute minute
10 10 10 10
0 0 0 0
1 2 3 4 5 6 7 8 9 10
hip rotation knee flexion minute
30 * hip adduction 30 * 20
15 15 10
0 0 0
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
minute minute minute
Fig. 1 Root mean square (RMS) differences for IMU-based lower extremity joint kinematics over 10 min. Our open-source workflow produced
IMU-based kinematics comparable to optical-based kinematics during A a 10-min period of overground walking and B a 10-min sequence of
common lower-extremity movements. Median RMS differences between IMU and optical-based kinematics were 3–6° for all joint angles except hip
rotation (12°) over all subjects and all minutes. Flat trends across median per-minute RMS differences highlight minimal drift over 10 min. Box plot
height is equal to interquartile range with outliers (black dots) defined as values exceeding 1.5 times the interquartile range. The asterisk denotes a
different y-axis range. Results shown used the complementary filter [5]
Similar results were achieved for the sequence of lower- orientations in the 10th minute of overground walking
extremity movements (see minute-by-minute RMS dif- (Fig. 3). Note that all other figures with IMU-based kin-
ferences in Additional file 1: Figure S6). ematics show downweighted results.
We found that downweighting the distal sensor ori- Changes in inverse kinematics orientation differ-
entations (reducing the relative weighting on the shank ences (the angle difference between the experimen-
and feet sensor orientations) when solving inverse tal IMU orientation and the virtual IMU orientation)
kinematics improved the accuracy of the kinematic from the 1st to 10th minute were strongly correlated
estimates and reduced drift. The inverse kinematics with changes in sensor fusion error (Fig. 4), indicating
computed with downweighted distal sensors’ orienta- that inverse kinematics orientation differences are a
tions showed less RMS difference (up to 28% less) than helpful tool for tracking errors in the orientations from
inverse kinematics computed with uniformly weighted sensor fusion when present.
Al Borno et al. Journal of NeuroEngineering and Rehabilitation (2022) 19:22 Page 7 of 11
0 0 15
20 20 80
-10
S2
IMU-based kinematics
S3 (mean, single subject)
-40
0 % Gait Cycle 100
0 0 15
20 20 80
knee flexion (o)
hip rotation (o)
-5 -10 40
S2
S2 S11 S2
-35 -40 0
0 % Gait Cycle 100 0 % Gait Cycle 100
20
optical-based kinematics
(mean ± 2sd, all subjects)
ankle
-10
IMU-based kinematics
S3
-40 (mean, single subject)
0 % Gait Cycle 100
Fig. 2 IMU-based lower extremity joint kinematics in the 1st minute (top) and 10th minute (bottom). Individual subjects’ IMU-based kinematics
for the right side of the body during the 1st and 10th minute of overground walking (N = 10 subjects, one subject, S1, lacked any periods of
straight-walking and was omitted from this plot). Mean ± two standard deviations (sd) for optical-based kinematics is shown as a grey shaded band
and individual subject means for IMU-based kinematics are shown as black lines
benefit from having error-monitoring features integrated It is important to consider the limitations of our
with user-friendly software (OpenSim) that possesses a work. We used the optical motion capture data to pose
significant community of 25,000 + users/year worldwide the model for IMU registration, which is an unrealistic
[31]. Users can extend these tools to meet their research approach for natural environments. We instructed sub-
needs by combining IMU-based estimates of motion with jects to take a “neutral” pose, with pelvic tilt, pelvic list,
a range of open-source models or explore underlying hip flexion, hip adduction, hip rotation, knee flexion, and
quantities like muscle dynamics. ankle flexion at 0 degrees. The mean difference between
Our study also provides insights about how different the subject’s chosen pose (measured with motion cap-
joints are affected by magnetic disturbances and drift. ture) and the instructed pose was relatively small (3.8°),
For example, while magnetic disturbances can cause large and the difference range was 0–20.1 degrees (maximum
errors in heading angles, our results suggest that these was hip rotation) over all joint angles, and all subjects. A
errors do not significantly impact the accuracy of the range of calibration approaches including manual, static,
knee flexion angle. This is an important observation as functional, and anatomical methods have been described
a major concern in the adoption of IMUs in biomechan- and assessed [7]. While using an IMU-based calibration
ics and physical rehabilitation is the presence of mag- might have altered the RMS differences, we expect our
netic disturbances in the patient’s home. We suspect that conclusions showing minimal drift would be unchanged.
knee flexion accuracy is not severely impacted by mag- Despite being one of the longer validation studies for
netic disturbances because these disturbances will likely IMU-based kinematics, our 10-min experiments may not
impact the heading of both the shank and the thigh simi- be sufficient to understand the accuracy over multiple
larly, and possibly because of the kinematic constraint on hours or days. However, we have three cases where the
the knee (i.e., one dof in the sagittal plane). We observed IMUs were calibrated between seven and twelve minutes
that the IMU orientations computed from sensors on before the start of the 10-min experiment and we again
the feet were most affected by magnetic disturbances. In observed minimal drift (Additional file 1: Table S5). This
laboratories similar to ours with in-ground force plates, suggests that our results might translate to longer dura-
researchers have reported significant magnetic distur- tions, but future experiments should assess this. In this
bances to the point where they recommended that meas- study, we focused on assessing the accuracy over an
urements be performed at least 40 cm off the ground aggregate of activities. Future work should validate the
[18]. We were able to increase the agreement between approach for the individual activities in the sequence of
IMU- and optical-based kinematics by reducing the fre- lower-extremity movements, along with other activi-
quency at which the complementary filter incorporated ties of daily living, including upper body kinematics, and
magnetometer data for the foot IMU (Additional file 1: more natural sequences of these activities. Since our sam-
Figure S7). This balanced the positive influence from ple size was small and our subject demographics were
some magnetometer information and distortion from the homogenous, it is uncertain how our results may trans-
force plates. As this may be overfitting to our data, we did late to other populations. We hope that future studies
not use this approach when reporting our final results, will be conducted with larger, more diverse populations
but offer it as an approach to explore further when com- and will build upon the data repository we have provided.
puting IMU-based kinematics in disturbed magnetic
environments. Conclusions
Similar to past studies, we saw the largest joint angle Our open-source workflow (OpenSense, OpenSim)
RMS differences in hip rotation (12.7 degrees median provides accurate estimates of human joint kinemat-
RMS difference). This could be partially due to the fact ics with wearable technology by leveraging the advan-
that the foot IMUs were most affected by ferromagnetic tages of inertial sensors, sensor fusion algorithms,
disturbances, and their distorted heading estimates could and model-driven simulation. The validation over
have introduced error into the hip rotation angle, which 10-min durations during common human movements
was the dof that relied most on this heading information. gives confidence to users in being able to monitor and
RMS errors on the order of 10 degrees are also observed compute kinematics with minimal drift using IMUs.
for optical motion capture, which may also have contrib- Though all of our kinematics were calculated offline, a
uted to the RMS differences we observed [37]. We also recent study has shown promising accuracy over short
qualitatively observed large hip adduction errors due to durations with a low-cost and portable system utilizing
magnetic disturbances while the subjects were sitting the same open-source tools to compute inverse kine-
in the sequence of lower-extremity movements. Future matics described here (42). Integration with the Open-
work is needed to assess joint-specific impacts of mag- Sim musculoskeletal simulation environment opens
netic disturbances. the gateway to investigate other quantities, like muscle
Al Borno et al. Journal of NeuroEngineering and Rehabilitation (2022) 19:22 Page 10 of 11
mechanics and inverse dynamics with IMUs. Future Consent for publication
The participant whose photo is anonymized in Additional file 1: Figure S1 has
work will focus on developing algorithms to estimate provided consent to publication of this photo.
kinetics from IMU data and streamlining real-time
systems to enable biomechanical monitoring, feed- Competing interests
The authors have no competing interests related to the content of this article.
back, and interventions outside of the lab. This suite of
open-source tools brings the field closer to conducting Author details
human movement studies in natural environments. 1
Department of Computer Science and Engineering, University of Colorado,
Denver, CO, USA. 2 Center for Bioengineering, University of Colorado, Anschutz
Medical Campus, Aurora, CO, USA. 3 Department of Bioengineering, Stanford
University, Stanford, CA, USA. 4 Department of Mechanical Engineering, Stan-
Abbreviations
ford University, Stanford, CA, USA. 5 Department of Biomechanical Engineering,
IMU: Inertial measurement unit; IK: Inverse kinematics; RMS: Root mean square.
Delft University of Technology, Delft, Netherlands. 6 Department of Orthopae-
dic Surgery, Stanford University, Stanford, CA, USA.
Supplementary Information
Received: 1 July 2021 Accepted: 2 February 2022
The online version contains supplementary material available at https://doi.
org/10.1186/s12984-022-01001-x.
15. Teufl W, Miezal M, Taetz B, Frohlichi M, Bleser G, Nazarahari M, et al. 38. Falbriard M, Meyer F, Mariani B, Millet GP, Aminian K. Drift-free foot
CNN-based estimation of sagittal plane walking and running biome- orientation estimation in running using wearable IMU. Front Bioeng
chanics from measured and simulated inertial sensor data. Gait Posture. Biotechnol. 2020;8(2):1–11.
2021;8(June):1–14. https://doi.org/10.1016/j.jbiomech.2021.110229. 39. Veltink PH, Bussmann HBJ, De Vries W, Martens WLJ, Van Lummel RC.
16. Weygers I, Kok M, Konings M, Hallez H, De Vroey H, Claeys K. Inertial Detection of static and dynamic activities using uniaxial accelerometers.
sensor-based lower limb joint kinematics: A methodological systematic IEEE Trans Rehabil Eng. 1996;4(4):375–85.
review. Sensors (Switzerland). 2020;20(3):1–23. 40. Weygers I, Kok M, De Vroey H, Verbeerst T, Versteyhe M, Hallez H, et al.
17. Xing H, Hou B, Lin Z, Guo M. Modeling and compensation of random drift Drift-free inertial sensor-based joint kinematics for long-term arbitrary
of MEMS gyroscopes based on least squares support vector machine movements. IEEE Sens J. 2020;20(14):7969–79.
optimized by chaotic particle swarm optimization. Sensors (Switzerland). 41. Lee JK, Jeon TH. IMU-based but magnetometer-free joint angle estima-
2017;17:10. tion of constrained links. Proc IEEE Sensors. 2018;2018:31–4.
18. de Vries WHK, Veeger HEJ, Baten CTM, van der Helm FCT. Magnetic distor- 42. Slade P, Habib A, Hicks JL, Delp SL. An open-source and wearable system
tion in motion labs, implications for validating inertial magnetic sensors. for measuring 3D human motion in real-time. Ieee Trans Biomed Eng.
Gait Posture. 2009;29(4):535–41. 2021. https://doi.org/10.1101/2021.03.24.436725.
19. Lambrecht JM, Kirsch RF. Miniature low-power inertial sensors: Promising
technology for implantable motion capture systems. IEEE Trans Neural
Syst Rehabil Eng. 2014;22(6):1138–47. Publisher’s Note
20. Bertomeu-Motos A, Lledó LD, Díez JA, Catalan JM, Ezquerro S, Badesa Springer Nature remains neutral with regard to jurisdictional claims in pub-
FJ, et al. Estimation of human arm joints using two wireless sensors in lished maps and institutional affiliations.
robotic rehabilitation tasks. Sensors (Switzerland). 2015;15(12):30571–83.
21. El-Gohary M, McNames J. Shoulder and elbow joint angle tracking with
inertial sensors. IEEE Trans Biomed Eng. 2012;59(9):2635–41.
22. Wittmann F, Lambercy O, Gassert R. Magnetometer-based drift cor-
rection during rest in IMU arm motion tracking. Sensors (Switzerland).
2019;19(6):13–7.
23. Nazarahari M, Rouhani H. Sensor fusion algorithms for orientation
tracking via magnetic and inertial measurement units: An experimental
comparison survey. Inf Fusion. 2021;76(April):8–23. https://doi.org/10.
1016/j.inffus.2021.04.009.
24. Nazarahari M, Rouhani H. A Full-State Robust Extended Kalman Filter for
Orientation Tracking during Long-Duration Dynamic Tasks Using Mag-
netic and Inertial Measurement Units. IEEE Trans Neural Syst Rehabil Eng.
2021;29:1280–9.
25. Roetenberg D, Luinge H, Slycke P. Xsens MVN: Full 6DOF human motion
tracking using miniature inertial sensors. Xsens Motion Technol BV Tech
Rep. 2009;3:67.
26. Molet T, Boulic R, Thalmann D. Human Motion Capture Driven by
Orientation Measurements. Presence Teleoperators Virtual Environ.
1999;8(2):187–203.
27. Luinge HJ, Veltink PH, Baten CTM. Ambulatory measurement of arm
orientation. J Biomech. 2007;40(1):78–85.
28. Zhou H, Hu H. Reducing drifts in the inertial measurements of wrist and
elbow positions. IEEE Trans Instrum Meas. 2010;59(3):575–85.
29. Šlajpah S, Kamnik R, Munih M. Kinematics based sensory fusion for wear-
able motion assessment in human walking. Comput Methods Programs
Biomed. 2014;116(2):131–44.
30. Tagliapietra L, Modenese L, Ceseracciu E, Mazzà C, Reggiani M. Validation
of a model-based inverse kinematics approach based on wearable iner-
tial sensors. Comput Methods Biomech Biomed Engin. 2018;21(16):834–
44. https://doi.org/10.1080/10255842.2018.1522532.
31. Seth A, Hicks JL, Uchida TK, Habib A, Dembia CL, Dunne JJ, et al.
OpenSim: Simulating musculoskeletal dynamics and neuromuscular
control to study human and animal movement. PLOS Comput Biol.
2018;14(7):e1006223. https://doi.org/10.1371/journal.pcbi.1006223.
32. Delp SL, Anderson FC, Arnold AS, Loan P, Habib A, John CT, et al. Open-
Sim: Open source to create and analyze dynamic simulations of move-
ment. IEEE Trans Biomed Eng. 2007;54(11):1940–50.
Ready to submit your research ? Choose BMC and benefit from:
33. Rajagopal A, Dembia CL, Demers MS, Delp DD, Hicks JL, Delp SL. Full
body musculoskeletal model for muscle- driven simulation of human gai.
• fast, convenient online submission
Gut. 2015;63:2068–79.
34. Arnold EM, Ward SR, Lieber RL, Delp SL. A Model of the Lower Limb for • thorough peer review by experienced researchers in your field
Analysis of Human Movement. Ann Biomed Eng. 2010;38(2):269–79. • rapid publication on acceptance
https://doi.org/10.1007/s10439-009-9852-5.
• support for research data, including large and complex data types
35. Walker PS, Rovick JS, Robertson DD. The effects of knee brace hinge
design and placement on joint mechanics. J Biomech. 1988;21:11. • gold Open Access which fosters wider collaboration and increased citations
36. Rajagopal A, Dembia CL, DeMers MS, Delp DD, Hicks JL, Delp SL. Full- • maximum visibility for your research: over 100M website views per year
Body Musculoskeletal Model for Muscle-Driven Simulation of Human
Gait. IEEE Trans Biomed Eng. 2016;63(10):2068–79. At BMC, research is always in progress.
37. Cappozzo A, Catani F, Leardini A, Benedetti MG, Della CU. Position and
orientation in space of bones during movement: Experimental artefacts. Learn more biomedcentral.com/submissions
Clin Biomech. 1996;11(2):90–100.