Keywords

1 Introduction

Human motion analysis is widely used to provide a quantitative description of movement patterns, which have been applied for biomechanical researches and clinical practices [1,2,3] as well as in many fields such as: development of humanoid robots [1], clinical gait analysis [4], sports motion analysis [5, 6], human computer interaction (HCI) and augmented reality applications [7, 8]. In clinical scenarios, it is considered an important clinical tool for quantifying normal and pathological patterns of locomotion, showing to be useful for prescription of treatments as well as in the evaluation of such treatments [2, 9]. Several efforts have been made to develop strategies for a suitable measurement and data acquisition related to the kinematics of human gait [10], among these strategies, there are some systems based on goniometers, systems based on electromyography and systems based on computer vision techniques [11], which aims at capturing information related to position and orientation of the joints of body segments involved during any gait phases. Currently, computer vision-based gait analysis have reported to be the most advanced and accurate technique to provide clinical measures of the gait by using reflective markers placed in several parts of the lower limb of the person [10, 11]. However, this strategy is quite expensive because it requires high frame rate cameras, advanced image or video processing techniques, an accurate position of markers in anatomical landmarks and high-structured laboratories. Currently, gait analysis based on inertial sensors technology has arisen as an alternative to traditional computer vision-based gait analysis systems due to its low-cost and usability in internal/external environments afford a wide range of remote applications [11, 12]. This technology combines multi-axial accelerometers, gyroscopes and eventually magnetometers sensors to provide linear acceleration, angular velocity and magnetic field strength measurements, which are fused by a specific sensor fusion algorithm and are included in a single inertial measurement unit [5], usually referred to as IMU. In addition, IMUs are designed to be attached to different body segments. However, their use is limited due to the lack of standards for placing sensors on body segments and defining joint coordinate systems, a fundamental problem that directly affects the kinematic analysis [13]. In other words, IMUs local frames are not typically aligned with anatomically defined frames for each body segments, for which an initial sensor-to-body calibration procedure is required [5, 6, 14]. In consequence, human gait analysis based on inertial measurement units (IMUs) is still considered a challenging task and the accuracy of those systems is still debated [13, 15].

2 Related Works

Several strategies have been proposed to solve this fundamental problem [16, 17] by attempting to align the IMUs local frames respect to the body segment frames [18]. Some calibration techniques are based on special sequence of predefined user movements to define the axis of joint motion [5, 15], or by including supplementary devices such as video cameras [19], anatomical landmark or exoskeleton harnesses [20]. Nevertheless, the use of those additional tools requires experienced personnel. Basically, each IMU provides an estimate of the body segment orientation relative to a global frame of reference (the Earth’s coordinate systems) but they do not measure position directly, for which a second general frame related to anatomical coordinate system (Body Frame) must be established, the same that is suggested by the international society of biomechanics (ISB) and defined as a mutual coordinate system, named, the joint coordinate system (JCS) [14]. However, the initial location between the sensors and body segments is eventually unknown, a problem that has been faced as a transformation of coordinate issue, for which have been evolved some strategies based on rotational matrix [6], Euler angles [21], a quaternion strategy [16,17,18] and optimization techniques. Those strategies expect to accomplish the axis of joint motion and, consequently, measure 3D joint angles [18].

This paper presents a novel sensor-to-body alignment method based on quaternions strategy for estimating the joint angles of the hip, knee and ankle of the lower limbs during the gait. For doing that, two different sequences of rotation based on Euler angle-axis factors are developed. The first rotational sequence calibrates sensor’s frame under a new general body frame by estimating their quaternions of the initial orientation. Then, a correction process is applied by factorizing the captured quaternions. Once the general body frame is defined, a second rotational sequence is implemented, which aligns each sensor frame to body frames, allowing to define the anatomical frames. Unlike other approaches, we do not attempt to exactly establish certain orientations and specific placement in which the sensors must be mounted with respect to the body segments but instead, alignment process of sensor-to-body frames is carried out using relevant information from the anatomical axis of major importance involved in the motion of each joint.

The rest of this article is organized as follows: after this introduction and related works, next section presents the methods, then results are shown and last section discusses conclusions.

3 Methods

The method pipeline is illustrated in Fig. 1. The method starts by assuming that different coordinate systems are associated to each IMU sensor (Sensor Frame), then its aims is to define a mutual coordinate system with the same orientation for each body segments, beginning at the Pelvis. In this method, seven IMU sensors are used, setting a rigid body model, for which each IMU is attached to the lateral position of each body segment, as well as the superior position of the mid-foot, with an additional IMU sensor positioned over the pelvis, at the level of the L5S1 joint. Finally, an common coordinate system for the body segments is obtained and established as the anatomical body frame (Body Frame), which is used to compute the joint angles, such as: flexion-extension, abduction-adduction and internal-external rotation. The proposed method includes two stages: a sensor’s calibration and an alignment process, respectively, by introducing a quaternion strategy based on two Euler angles-axis sequence, as described below:

Fig. 1.
figure 1

The pipeline of our proposed method is illustrated. Panel (a) illustrates the sensor local frames (SF) according to an initial location of sensors. Panel (b) illustrates the results of alignment process between sensor to body frames (BF), respectively. The General Frame (GF) corresponds to Earth’s coordinate system.

3.1 Calibration Algorithm and Definition of General Body Frame

First, a new coordinate system is defined by using an initial orientation in quaternion format (q) from the sensor placed at Pelvis. The problem is herein formulated as the decomposition into quaternion factors from a quaternion associated with some rotation in \(R^3\), those factors provide meaningful and useful rotation about to their principal axes and are used for calibrating and aligning some coordinate systems. We consider that any two independent coordinate frames can be related by a sequence of rotations about coordinate axis, as well-known as Euler angle-axes sequence [22]. Thus, the corresponding quaternion (q) is considered as a rotation operator related by the sequence of rotations (abc), as follows:

$$\begin{aligned} q = a^i \otimes b^j \otimes c^k \end{aligned}$$
(1)

where \(i,j,k=1,2,3\) describe the rotation about the principal axes. In this work, a first sequence of rotation was defined by \(a^3b^2c^1\), whose sequence order is established according to the importance of movements at the pelvis [23]. Therefore, our rotation operator is defined as: \(q = a^3 \otimes b^2 \otimes c^1\). To decompose into its quaternion factors, a factorizing process is formulated applying some criteria established by quaternion algebra [22]. For instance, the product of two rotation sequences may be depicted by a rotation operator. In this case, a new rotation operator is included and defined as: \(p = a^3 \otimes b^2\), simplifying the rotation respect to a single axis (\(c^1\)) as:

$$\begin{aligned} q = a^3 \otimes b^2 \otimes c^1 = p \otimes c^1 \end{aligned}$$
(2)

where \(c^1\) is the rotation respect to \(x{\hat{i}}\) -axis. Provided that only its angle need to be computed, the principal axes are defined according to their unit vector for each rotation as:

$$\begin{aligned} c^1 = c_0 + \hat{i} c_1 = \cos \frac{\phi }{2} + \hat{i} \sin \frac{\phi }{2} \end{aligned}$$
(3)
$$\begin{aligned} b^2 = b_0 + \hat{j} b_2 = \cos \frac{\theta }{2} + \hat{j} \sin \frac{\theta }{2} \end{aligned}$$
(4)
$$\begin{aligned} a^3 = a_0 + \hat{k} a_3 = \cos \frac{\psi }{2} + \hat{k} \sin \frac{\psi }{2} \end{aligned}$$
(5)

where \(c_0, c_1, b_0, b_2, a_0\) and \(a_3\) are the components of each sequence of rotation, abc, respectively. In the same way, q and p quaternions may be to depict as: \(q= q_0 + \hat{i} q_1 + \hat{j} q_2 + \hat{k} q_3\) and \(p= p_0 + \hat{i} p_1 + \hat{j} p_2 + \hat{k} p_3\), where \((q_o, q_1, q_2, q_3)\) and \((p_o, p_1, p_2,p_3)\) are the components of those quaternions, respectively. Therefore, each angle of rotation is obtained by:

$$\begin{aligned} \tan \phi = \frac{-2(q_0q_1+q_2q_3)}{-q_0^2+q_2^2+q_1^2-q_3^2} \end{aligned}$$
(6)

where \(\phi \) angle is used to obtain the factor \(c^1\) from Eq. 3, thus p is also obtained replacing \(c^1\) in Eq. 2. Finally, the obtained p factor is decomposed into its components: \(p_0 = a_0b_0\), \(p_1 = -a_3b_2\), \(p_2 = a_0b_2\) and \(p_3 = a_3b_0\) by multiplying the obtained quaternion factors, p and \(c^1\). Those relationship among quaternion components are used to establish their angles respect to their principal axes, as follow:

$$\begin{aligned} \frac{p_2}{p_0} = \frac{b_2}{b_0} = \tan \frac{\theta }{2} \end{aligned}$$
(7)
$$\begin{aligned} \frac{p_3}{p_0} = \frac{a_3}{a_0} = \tan \frac{\psi }{2} \end{aligned}$$
(8)

In consequence, \(\phi \), \(\theta \) and \(\psi \) angles are estimated from the initial orientation of sensor placed at pelvis. Finally, both values, rotation angles and each quaternion factors are used as correction factors for calibrating and adjusting the new Sensor Frame (SF) according to Earth’s coordinate system.

- Calibration algorithm: A first stage of the proposed method consists in canceling any rotation angle respect to Earth’s coordinate system, this is due to the initial position of the IMU at pelvis. For doing that, an initial posture for our rigid body model is suggested when this is evaluated in volunteers. This pose is commonly well-known as N-pose (straight back, feet aligned respect to upright shoulder) and is suggested to avoid any flexion-extension angle of the hip and lower limbs. Then, a new sensor coordinate system is established (named Sensor Frame) where the z-axis is agreed to direct towards the front of volunteer and the xy-plane is perpendicularly considered respect to horizontal plane. This is formulated as the following set-zero calibration problem:

(9)
(10)

where is the quaternion’s component due to initial orientation of sensor at the pelvis, corresponds to orientation respect to vertical plane, is the c component defined in the sequence of rotation \(a^3b^2c^1\), this component describes the rotation respect to magnetic field vector, \(p_0\) defines to correction factor respect to vertical-axis around this y-axis and \(r_{\hat{j} 90}\) corresponds to a rotation of \(90^0\). (*) is its complex conjugate. The result of this process is illustrated in Fig. 2.

Fig. 2.
figure 2

The proposed calibration process is illustrated. Panel (a) illustrates an initial coordinate system of sensor located at the pelvis. Panel (b) illustrates the obtained result of calibration and alignment process.

3.2 IMUs Alignment Process and Definition of Body Frame

Once the new general frame (SF) was established at the pelvis, each inertial sensor requires to be aligned to its body segment (see Fig. 1). This problem is herein formulated as the following sensor-to-body alignment problem:

(11)

where depicts the corrected quaternion of any \(n-\)IMU, at a time \(t=0\). This rotational correction is computed respect to general sensor frame (SF). Thus, defines the improved rotation of the pelvis’ sensor frame (SF). Then, body frames are aligned to the principal axis of body segments by using the corrected quaternion , defining a common body frame, here named, the Anatomical Frame (BF). In this process, the quaternion factors obtained from our sequence of rotation are included, as follow:

(12)

where \(p_n\) defines the corrected position for each IMU. This value depends on quaternion factor , which is obtained by improved rotation about body \(x-\)axis, and defines an improved rotation about body \(y-\)axis.

Since the anatomical frame (BF) was aligned, those improved quaternion are used to estimate some rotations of the body segment respect to our proposed rigid body model, as follow:

(13)

where \(R_n\) is the rotation of any \(n-\)IMU, at a time \(t\ne 0\). Basically, we estimates the joint rotation combining two rotations of continuous body segments by:

$$\begin{aligned} \varTheta _n = R_{n-1} \otimes R_n \end{aligned}$$
(14)

where \(\varTheta _n\) is the joint rotation between two continuous body segments. Finally, the angles from hip, knee and ankle joints, such as: flexion/extension, internal/external rotation and abduction/adduction, are estimated. For doing that, a second sequence of rotations is implemented as \(a^1b^3c^2\). The order of this sequence of rotation corresponds to the agreement suggested by the international biomechanics society [14], establishing a general reporting standard for joint kinematics. This sequence of rotation is also factorized for yielding some factors and component of quaternions related to the rotation about the anatomical axes. This process is similar to the formulation process used for the first sequence of rotation \(a^3b^2c^1\).

4 Results

The performance of our proposed method was two-fold evaluated using a comparative analysis respect to two different approaches: an goniometer system and a camera-based motion system, respectively. For doing that, the method was implemented in an IMU-based motion capture system from the well-known XSens TechnologyFootnote 1, namely, the MVN AWINDA system, a commercial IMU-based motion capture for motion tracking applications in real time [5]. This system includes a set of seven IMU sensors. Each IMU measures the acceleration, angular rate and the magnetic field vector in its own three-dimensional local coordinate system. The axes of this local coordinate system represent an orthonormal base that is typically well aligned with the outer casing of the sensor and it incorporates algorithms for estimating sensor’s orientation with respect to a global fixed coordinate system (GF). Its orientation is provided in quaternions format (q). Sensor data were collected at a sampling frequency of 60 Hz. The experimental evaluation process was implemented in MATLAB R17, running on a Linux PC with 2 Intel Quad Core i7 at 3.07 GHz and 24 GB of RAM.

4.1 Comparative Evaluation Respect to a Goniometer System

First, the aptness for estimating the joint angles was assessed, for which a kinematic chain assembled by two goniometers was implemented. Then, three consecutive inertial sensors were placed and unaligned respect to the principal axes of the implemented kinematic chain, as is illustrated in Fig. 3.

Fig. 3.
figure 3

Overview of the proposed kinematic chain by two goniometers, \(G_1\) and \(G_2\). Panel (a) illustrates the sensor local frames aligned respect to the goniometer’s principal axes. Panel (b) illustrates the sensor local frames unaligned respect to the goniometer’s principal axes.

Then, a consecutive sequence of angles for each goniometer was performed. Angles from \(-30^0\) to \(120^0\) with steps of \(\pm 30^0\) were assigned for the first goniometer (\(G_1\)). In addition, for each assigned angle of the first goniometer, other sequence of angles from \(-30^0\) to \(120^0\) with steps of \(\pm 30^0\) were also assigned for the second goniometer (\(G_2\)). This evaluation compared the measured joint angles, when the IMUs were manually aligned, respect to our proposed alignment method, for which the IMUs were misaligned. In order to compare the joint angle obtained from both aligned and misaligned approaches, the well-known Root Mean Square Error (RSME) was calculated. This metric was used to quantify the difference of the value of the angles between the goniometers model and the estimate using the both alined and misaligned sensor approaches, respectively. The error was obtained by:

$$\begin{aligned} e(n)= \varTheta _{Goniometer}(n) - \varTheta _{sensor}(n) \end{aligned}$$
(15)
$$\begin{aligned} RMSE = \sqrt{\frac{1}{k}\sum ^k_{n=1} e^{2}(n)} \end{aligned}$$
(16)

where k represents the number of angles taken with both schemes and n represents a defined angle in a specific goniometer position. The results obtained for this evaluation are presented in Table 1.

Table 1. Performance evaluation: manual sensor alignment respect to the proposed alignment method.

The first two columns correspond to results obtained when the IMUs were manually aligned according to the segments of goniometers, being the RMSE average of each assigned angle for both goniometers, \(G_1\) and \(G_2\), respectively. In this same way, the last two columns correspond to obtained results when IMUs were misaligned and our proposed method was implemented. Overall, results shown a reduced error rates of \(1.12^0\) and \(2.28^0\) respect to \(2.02^0\) and \(4.14^0\) for each joint, \(G_1\) and \(G_2\), respectively. These were yielded when our alignment approach was used, which reflects a high accuracy with the proposed alignment method.

4.2 Comparative Analysis Respect to Camera-Based Motion System

On the other hand, the proposed IMU-to-body alignment method was also evaluated in a real scenario with some volunteers, by using the joint angles data captured from the IMU-based motion capture system respect to data captured by a camera-based motion system. Basically, camera-based motion system provides information of the joint angles, which is computed and extracted from a sequence of video using the open-source software “KINOVEA”, a semi-automated tracking tool to follow points or trajectories from optical tracking systemsFootnote 2. An example of this evaluation process is illustrated in Fig. 4.

Fig. 4.
figure 4

Example of a predefined movement (trial) to compute the joint angle in sagittal plane using both motion capture systems is illustrated. Figure (a) illustrates IMUs sensor and optical markers position. Figure (b) illustrates the joint angles measured by KINOVEA software.

Fig. 5.
figure 5

Average curves of flexion-extension during the first sequence of movements. Figure (a) corresponds to the obtained curves for hip-joint. Figure (b) corresponds to the obtained curves for knee-joint. Figure (c) corresponds to the obtained curves for ankle-joint. (Color figure online)

Fig. 6.
figure 6

Average curves of flexion-extension during the second sequence of movements. Figure (a) corresponds to the obtained curves for hip-joint. Figure (b) corresponds to the obtained curves for knee-joint. Figure (c) corresponds to the obtained curves for ankle-joint.

For this experiment, a sequence of movements was defined, as follows: the subject starts moving from a stationary position (seating-down), then the subject takes a step and the leg climbs a stool. In order to conduct this evaluation, the flexion-extension angle for the hip, knee and ankle joint were estimated using the sagittal plane, this is due to the configuration of the camera-based motion capture. For which, a set of optical markers were placed and setup on the volunteer to define some anatomical landmarks according to ISB recommendations [23], in the same way, the IMUs were placed and unaligned in each body segments of the volunteer. Therefore, both IMU and video information are captured together for comparative purpose. The IMU-based motion capture was configured to capture joint angle data to a rate of 60 Hz and the camera-based motion system captured sequences of videos to a rate of 30 Hz (30 fps). In order to compare the joint angle trajectories during the sequence of movements, a similarity metric was calculated, which allows to quantify the similarity between trajectories (curves). This metric is the well-known as the coefficient of multiple correlation (CMC), taking values between 0 and 1; with a value of 1 for indicating an exact similarity. CMC was computed as shown in [13]:

$$\begin{aligned} CMC=\sqrt{1-\frac{\sum _{g=1}^{G}[\sum _{p=1}^{P}\sum _{f=1}^{F}(\theta _{gp}(f)- \bar{\theta }_{gf})^{2}/GF_{g}(P-1)]}{\sum _{g=1}^{G}[\sum _{p=1}^{P}\sum _{f=1}^{F}(\theta _{gp}(f)- \bar{\theta }_{g})^{2}/G(PF_{g}-1)]}} \end{aligned}$$
(17)

where \(\theta _{gpf}\), is the joint angle at frame f that is measured by method p (IMU or camera system) at sequence cycle g; \(\bar{\theta }_{gf}\) is the mean angle at frame f between angles measured by the two systems for the sequence cycle g:

$$\begin{aligned} \bar{\theta }_{gf}=\frac{1}{p}\sum _{p=1}^{2}\theta _{gpf} \end{aligned}$$
(18)

\(\bar{\theta }_{g}\) is the grand mean for the sequence cycle g among these two methods:

$$\begin{aligned} \bar{\theta }_{g}=\frac{1}{2F}\sum _{p=1}^{2}\sum _{f=1}^{F}Y_{gpf} \end{aligned}$$
(19)

where \(P=2\) corresponds to the number of methods evaluated. \(F = 103\) is the total number of video frames. G is the number of cycles corresponding to a procedure (trial), which is one cycle for all trials in this evaluation.

Fig. 7.
figure 7

Average curves of flexion-extension during the third sequence of movements. Figure (a) corresponds to the obtained curves for hip-joint. Figure (b) corresponds to the obtained curves for knee-joint. Figure (c) corresponds to the obtained curves for ankle-joint.

In this evaluation, a group of 10 normal healthy subjects (age range of 22–27 years, 5 males and 5 females) with no previous history of musculoskeletal problems were evaluated. To assess the repeatability of motion data, the subjects were evaluated three times with both the IMU system and optical system. This evaluation aimed to establish the behavior of the joint angles from a lower limb when three stages of movements were carried out.

The results of this preliminary evaluation, during the first movement (seating-down stage) report an average of \(CMC=0.99\), \(CMC=1.00\) and \(CMC=0.97\) for the hip, knee and ankle joints, respectively. Figure 5 shows the average curve of Flexion-Extension angle vs. (%) Percentage of movement, obtained during the first stage for the hip, knee and ankle joints. Overall, the curves show how our aligned method applied to the IMU-based motion capture (blue line) system coincide when knee-angles and hip-angles are estimated by the optical tracking system (red line).

The obtained results, during the second phase of movement (takes a step), report an average of \(CMC=0.98\), \(CMC=0.99\) and \(CMC=0.74\), approximately. These for the hip, knee and ankle joints, respectively. These results are presented in Fig. 6, In the same way, Fig. 6 shows the average curve of Flexion-Extension angle vs. (%) Percentage of movement, obtained during the second stage for the hip, knee and ankle joints, which reveal that ankle angles measurements are sensitive when they are captured with the IMU-based motion capture, as is shown is Fig. 6(c).

Figure 7 show the obtained results, during the third phase of movements, reporting an average of \(CMC=0.88\), \(CMC=0.99\) and \(CMC=0.25\) for the hip, knee and ankle joints, respectively. In this case, Fig. 7(c) show that ankle-angles measurements are the most variable when fine movements of the ankle joint are required, this is to say, when ankle-angles involves small displacements. This is the case of our third phase of movements when the upper limb was raised. Possibility, the optical system used in this evaluation, requires to use more anatomical markers at the foot.

5 Conclusions

Unlike to conventional calibration procedures described in the literature [5], the herein proposed method provides an easy and fast sensor placement, for which no need any additional tools or special calibration movements performed by the user. The obtained results demonstrate that the estimated joint angles are equal to the expected values and consistent with the values obtained by strategies widely used in real clinical scenarios, both goniometers and optical motion system, respectively. Also, obtained results indicate that the method is suitable to measure angles of the hip, knee and ankle of the humans joints during physical activities. Therefore, the proposed method could be used in applications such as functional movements rehabilitation, that requires motion analysis of impaired persons.