An IMU-to-Body Alignment Method Applied to Human Gait Analysis

This paper presents a novel calibration procedure as a simple, yet powerful, method to place and align inertial sensors with body segments. The calibration can be easily replicated without the need of any additional tools. The proposed method is validated in three different applications: a computer mathematical simulation; a simplified joint composed of two semi-spheres interconnected by a universal goniometer; and a real gait test with five able-bodied subjects. Simulation results demonstrate that, after the calibration method is applied, the joint angles are correctly measured independently of previous sensor placement on the joint, thus validating the proposed procedure. In the cases of a simplified joint and a real gait test with human volunteers, the method also performs correctly, although secondary plane errors appear when compared with the simulation results. We believe that such errors are caused by limitations of the current inertial measurement unit (IMU) technology and fusion algorithms. In conclusion, the presented calibration procedure is an interesting option to solve the alignment problem when using IMUs for gait analysis.


Introduction
Functional mobility usually refers to the skill of ambulating safely in a free living environment by walking, running, climbing and even when handling assistive devices, such as walkers, crutches and canes [1,2]. About 15% of the world's population live with some disability condition, of which 2%-4% suffer significant functional problems [3]. In this scenario, one of the major goals of neuromuscular rehabilitation is to regain gait function in order to promote more independent lives [4]. The assessment of functional activities, such as walking, can help clinicians to determine patients' autonomy level and the optimal care they should receive [5].
Therefore, it is essential to understand and characterize systematically motion disturbances to improve the diagnosis, enhance treatments and measure patients' evolution. The estimation of joint angular displacements is a fundamental part of human motion analysis and involves the detection of joint position and spatial orientation [6]. The relevance of these parameters is observed in many clinical scenarios such as gait training and rehabilitation in patients with stroke, Parkinson's disease and cerebral palsy [7][8][9].

IMU-to-Body Alignment Method
To estimate the lower limb joint angles, it is necessary to measure the orientation of two adjacent body segments forming the joint. We propose a method to estimates hip, knee and ankle joint angles of the lower limb. To simplify the mathematical explanation, here we only present the data for the right leg, although the same concept may be obviously applied to both legs. In this method, four IMUs sensors are used: one is placed on the pelvis (body segment named PV), one on the right thigh (TH), one on the right shank (SH), and another on the right foot (FT). Each body segment also has an associated coordinate system (BF), which is called, in this work, a technical-anatomical frame. Note that the technical-anatomical frame is an estimate and it is also different from the anatomical bone-embedded frame as defined by the International Society of Biomechanics (ISB) recommendations [25,26]. The reason is that the axes of body segments' Cartesian coordinate systems, within ISB recommendations, are defined based on bony landmarks that are palpable or identifiable from X-rays.

Calibration Algorithm and Definition of Technical-Anatomical Frames
During five seconds of static acquisition (initial upright posture), the orientation data is used to define the sensor-to-body alignment. The first stage consists of correcting the sensor frame placed on the pelvis (called IMU-F-PV coordinate system). This correction procedure aims to align the IMU-F-PV with the gravity. Let GF q I MU−F−PV O be the quaternion of the IMU placed on the pelvis, in the initial posture computed by averaging the orientation data (as in [27]) acquired over 5 s interval. Since the orientation data is obtained in quaternion format, the operations to align the sensor quaternion GF q I MU−F−PV O with the gravity are performed as follows: (1) Obtain x-axis (x I MU−F−PV ) of the coordinate system referred to the IMU orientation measured by the quaternion GF q I MU−F−PV O associated with the initial posture, and using Equation (1) to convert from unit quaternions to direction cosine matrix, x I MU−F−PV defined as shown in Equation (2): 2(q 1 q 2 − q 0 q 3 ) 2(q 1 q 3 + q 0 q 2 ) 2(q 1 q 2 + q 0 q 3 ) q 2 0 − q 2 1 + q 2 2 − q 2 3 2(q 2 q 3 − q 0 q 1 ) 2(q 1 q 3 − q 0 q 2 ) 2(q 2 q 3 + q 0 q 1 ) where i is the unit vector in direction of the x axis. (2) Define the angle θ between x I MU−F−PV and the gravity vector ZG. The angle θ is calculated using Equation (3): where q 0 , q 1 , q 2 and q 3 are the components of the quaternion GF q I MU−F−PV O .
(3) Define the vector n 1 orthonormal to the mentioned vectors (x I MU−F−PV and ZG). Around this vector a rotation θ is made according to Euler's rotation theorem. The orthonormal and unit vector n 1 is defined as shown in Equation (4). The correction quaternion q c (θ, n 1 ) is calculated using Equation (5): q(θ, n) = (cos( θ 2 ), n sin( θ 2 )).
The technical-anatomical frame of the pelvis (BF-PV) calculated with respect to the global frame (GF), during the initial posture, is defined as shown in Equation (6): Other initial technical-anatomical frame (BF) using quaternions are defined during the calibration procedure as shown in Table 1. Table 1. Definition of technical-anatomical quaternions obtained during calibration posture (straight upright posture).

Segment
Initial Quaternion Definition Let q ROT (θ, n) be the quaternion of rotation calculated using Equation (5) for θ = 90 • or 180 • and n = i or n 2 . BF refers to body-frame, GF to global frame.
Once the initial technical-anatomical quaternions are defined, the sensor-to-body orientation BF q I MU−F−B is determined for each sensor using Equation (7): where B denotes the body segment, namely PV, TH, SH and FT, and * denotes the complex conjugate of the quaternion. Once we have the relative orientation of the sensor to the body segment, the orientation of each segment at any instant of time can be determined as GF q BF−PV , GF q BF−TH , GF q BF−SH and GF q BF−FT , for the pelvis, thigh, shank and foot, respectively. Then, the hip, knee and ankle joint rotations are defined by relating the orientation of the distal body segment with respect to the proximal body segment. The technical-anatomical frames are presented in Figure 1 for each body segment. During the initial posture the joint angles are assumed to be zero, since the corresponding body segments are aligned. The proposed algorithm is also conceived in such a way that the IMUs can be placed in any arbitrary position on the body segments. This means that the user does not have to be concerned about placing the IMUs in an exact position. The algorithm to extract the joint angles is presented in detail in the next section. The technical-anatomical frame of the pelvis (BF-PV) calculated with respect to the global frame (GF), during the initial posture, is defined as shown in Equation (6): Other initial technical-anatomical frame (BF) using quaternions are defined during the calibration procedure as shown in Table 1. Table 1. Definition of technical-anatomical quaternions obtained during calibration posture (straight upright posture).

Segment Initial Quaternion Definition
be the quaternion of rotation calculated using Equation (5) for θ = 90° or 180° and = or . BF refers to body-frame, GF to global frame.
Once the initial technical-anatomical quaternions are defined, the sensor-to-body orientation is determined for each sensor using Equation (7): where B denotes the body segment, namely PV, TH, SH and FT, and * denotes the complex conjugate of the quaternion. Once we have the relative orientation of the sensor to the body segment, the orientation of each segment at any instant of time can be determined as , , and , for the pelvis, thigh, shank and foot, respectively. Then, the hip, knee and ankle joint rotations are defined by relating the orientation of the distal body segment with respect to the proximal body segment. The technical-anatomical frames are presented in Figure 1 for each body segment. During the initial posture the joint angles are assumed to be zero, since the corresponding body segments are aligned. The proposed algorithm is also conceived in such a way that the IMUs can be placed in any arbitrary position on the body segments. This means that the user does not have to be concerned about placing the IMUs in an exact position. The algorithm to extract the joint angles is presented in detail in the next section.

Joint Angles Calculation
The last general reporting standard for joint kinematics based on Joint Coordinate System (JCS) was presented by the International Society of Biomechanics (ISB) [26]. The concept of JCS was first presented by Grood and Suntay [25] only for the knee joint, but this approach has been adopted to define the kinematics of other human joints. This concept uses the description of Cartesian

Joint Angles Calculation
The last general reporting standard for joint kinematics based on Joint Coordinate System (JCS) was presented by the International Society of Biomechanics (ISB) [26]. The concept of JCS was first presented by Grood and Suntay [25] only for the knee joint, but this approach has been adopted to define the kinematics of other human joints. This concept uses the description of Cartesian coordinate systems and vector algebra to define the knee joint. In this work, we present the equivalent algebra using quaternions to define hip, knee and ankle joints. Following the method proposed by Grood and Suntay, we compute the body fixed axes and the reference axes of the JCS in Table 2 according to the frames shown in Figure 2. Table 3 summarizes the sign convention used on defining the clinical rotations, where flexion, abduction and internal rotation movements are positives. coordinate systems and vector algebra to define the knee joint. In this work, we present the equivalent algebra using quaternions to define hip, knee and ankle joints. Following the method proposed by Grood and Suntay, we compute the body fixed axes and the reference axes of the JCS in Table 2 according to the frames shown in Figure 2. Table 3 summarizes the sign convention used on defining the clinical rotations, where flexion, abduction and internal rotation movements are positives.

Joint Flexion-Extension Abduction-Adduction Internal-External Rot
Ankle rotations are dorsiflexion-plantar flexion and inversion-eversion. α, β and γ are the joint angles on sagittal, frontal and transverse planes, respectively. PV pelvis, TH thigh, SH shank, FT foot. Now, let GF q BF−PV , GF q BF−TH , GF q BF−SH and GF q BF−FT be the orientation quaternions that represent the frames fixed in each bone. Each body fixed, floating and reference axes, in Table 2, are computed as function of quaternions. Let e 2−H , e 2−K and e 2−A be the floating axis of the hip, knee and ankle joint, respectively. The corresponding equations are shown in Equation (8), where |·| indicates that the vector must be normalized, and i, j and k denote the unit vectors in direction of the x, y and z axes, respectively. Then, the equivalent equations in quaternions for calculating the joint rotations are presented in Table 4. Table 4. Joint rotations as functions of quaternions.

Joint Angles
α, β and γ are the joint angles on sagittal, frontal and transverse planes, respectively. e 2−H , e 2−K and e 2−A are the floating axes of the hip, knee and ankle, respectively. M( GF q BF−X ) is the equivalent direction-cosine matrix of the GF q BF−X quaternion of X body-segment. Body segments: PV pelvis, TH thigh, SH shank, FT foot.

Motion Acquisition System
The motion capture system Tech MCS (Technaid, Madrid, Spain) was used in the experimental procedure. The device was connected via Bluetooth to a laptop. In this study four Tech-IMU V 3.0 sensors were used to obtain orientation data in real-time. Each IMU integrates three different types of three-axial sensors: accelerometers, gyroscopes and magnetometers. Data were acquired using Tech MCS Studio software, which provides orientation (based on Kalman filtering) in quaternion format at 50 Hz. MATLAB software (The MathWorks Inc., Natick, MA, USA) was used to analyze and process the orientation data.

Experimental Procedure
A set-up ( Figure 2a) was built with two semi-spheres and the joint angles were measured by an expert physiotherapist using a universal goniometer (360 • , 20 cm clear plastic goniometer). Each semi-sphere is used to represent body segments, and the universal goniometer is used to represent an articulation with one degree of freedom.
Using the universal goniometer as reference for measurements, angular movements can be performed in a controlled approach. The rigid semi-spheres are named as S1 and S2 (upper and bottom respectively, see Figure 2a). The joint represented by the goniometer is denoted as J. Rotations from 0 • to ±80 • with steps of ±20 • about z-axis of J were performed. These angles correspond to rotations of S2 with respect to S1, which was kept static. The rotation range reaches (or even exceeds) a complete range of motion in lower limbs during walking.
One sensor (IMU 1) was placed on the goniometer, and the three others (IMUs 2, 3 and 4) were placed on two semi-spheres. The IMU 1 is used as the reference, in the same way as the sensor placed on the pelvis for the experiments with human subjects. This sensor also remained static. For each semi-sphere, technical frames were defined as described in Section 2.1 and the equations applied are analogous to those for calculating knee joint angles as described in Section 2.2. Observe that the segment S2 has two sensors (IMUs 3 and 4), that means the technical frame of S2 can be determined using both sensors. Also, these sensors were fixed to the semi-sphere using a rigid plastic pieces made by a 3D printer (Figure 2c), which were glued fitting on the semi-sphere surface. These pieces ensure that the sensors have the same posture when they are exchanged.
The proposed procedure is conceived in such way that there is no concern about placing the sensors in an exact position. Moreover, considering that significant differences may be presented between any pair of IMU sensors, this setup allows the analysis of two different approaches when estimating the joint angles: (a) using the same sensor (IMU 3 or IMU 4) in different postures; and (b) using different sensors in the same posture.
The orientation of each semi-sphere frame at any instant of time can be determined as G q S1 , G q S2 I MU3 and G q S2 I MU4 . The joint J (Figure 2b) can be represented in a total of four different ways, as shown in Table 5. A simulation run in MATLAB under ideal conditions (IMU misalignment error, bias and noise equal to zero) is also presented to demonstrate that, theoretically, different orientations of IMUs do not affect the angle measures using the proposed method (assuming that IMUs 3 and 4 are ideally equal devices). In simulation, the initial orientation of the sensors was set to the initial values obtained during experimental validation. A demonstration can be seen on an online video (Supplementary Material) Table 5. Representations of the J joint formed by S1 and S2 segments.

Data Reduction and Statistical Analysis
A 20 min warm-up of the IMU sensors was carried out before the experiments, in an attempt to stabilize the gyroscope measurements [16]. After each rotation, the semi-sphere S2 was kept stationary approximately for 15 s. Only the last 10 s of collected data, for each orientation, were used. Quaternion for each rotation is resulted from averaging quaternion data over the 10 s intervals. Once data were reduced for each sensor and orientation, the IMU-to-body alignment method was applied to estimate the joint angles. Data were collected on two occasions, one day apart, and a total of twenty trials were acquired for each session. From trial to trial, IMUs 3 and 4 were exchanged of posture. These following approaches were statistically analyzed: (1) In order to evaluate repeatability, understood as the consistency of measures of the IMU system under stated conditions on two days apart, a test-retest (intra-rater) study was performed. The angles, β, γ and δ were calculated for each representation of the joint and Intra-Class Correlation (ICC) was calculated. ICC (ICC(2,1),absolute agreement) was calculated using the software IBM SPSS Statistics 20 (α = 0.05). (2) In order to evaluate validity, root mean square error (RMSE) and concordance correlation coefficient (CCC, 95% IC) [28] between first-day measured joint angles (using IMU system) and reference values (using the gold-standard universal goniometer) were computed. Two scenarios are analyzed: (a) the differences of joint angles measures changing the postures (POS-1 and POS-2) of the sensors and (b) the differences of joint angles measures using different groups of sensors, i.e., IMU 3 relative to IMU 2 or IMU 4 relative to IMU 2, where IMUs 3 and 4 having the same posture in different occasions.

Sensor Placement on Human Lower Limb
Four sensors were positioned from the pelvis through the right lower limb (thigh, shank and foot segments, see Figure 3). The pelvis sensor was placed on the sacrum at the S2 spinous process in the middle point between two posterior superior iliac spines. The IMU describes a coordinate system defined as x-axis pointing cranially and z-axis pointing posteriorly. The thigh sensor was placed on the iliotibial tract approximately 5 cm above the patella. The shank sensor was positioned on the lower one-third of lateral shank 5 cm above of the lateral malleolus of the fibula.
The sensors on thigh and shank were positioned with x-axis pointing cranially and z-axis pointing laterally. The foot sensor was fixed with double sided tape on the dorsal region of the foot over the 3rd and 4th metatarsal bones, 3 cm above to the corresponding metatarsophalangeal joints, with z-axis pointing cranially and x-axis pointing posteriorly. These sensors were attached with double-sided tape on an acrylic plate, which was glued to elastic band with Velcro ® . Similar positions have been suggested by different authors [10,14,29]. (1) In order to evaluate repeatability, understood as the consistency of measures of the IMU system under stated conditions on two days apart, a test-retest (intra-rater) study was performed. The angles , and were calculated for each representation of the joint and Intra-Class Correlation (ICC) was calculated. ICC (ICC(2,1),absolute agreement) was calculated using the software IBM SPSS Statistics 20 ( = 0.05).
(2) In order to evaluate validity, root mean square error (RMSE) and concordance correlation coefficient (CCC, 95% IC) [28] between first-day measured joint angles (using IMU system) and reference values (using the gold-standard universal goniometer) were computed. Two scenarios are analyzed: (a) the differences of joint angles measures changing the postures (POS-1 and POS-2) of the sensors and (b) the differences of joint angles measures using different groups of sensors, i.e., IMU 3 relative to IMU 2 or IMU 4 relative to IMU 2, where IMUs 3 and 4 having the same posture in different occasions.

Sensor Placement on Human Lower Limb
Four sensors were positioned from the pelvis through the right lower limb (thigh, shank and foot segments, see Figure 3). The pelvis sensor was placed on the sacrum at the S2 spinous process in the middle point between two posterior superior iliac spines. The IMU describes a coordinate system defined as x-axis pointing cranially and z-axis pointing posteriorly. The thigh sensor was placed on the iliotibial tract approximately 5 cm above the patella. The shank sensor was positioned on the lower one-third of lateral shank 5 cm above of the lateral malleolus of the fibula.
The sensors on thigh and shank were positioned with x-axis pointing cranially and z-axis pointing laterally. The foot sensor was fixed with double sided tape on the dorsal region of the foot over the 3rd and 4th metatarsal bones, 3 cm above to the corresponding metatarsophalangeal joints, with z-axis pointing cranially and x-axis pointing posteriorly. These sensors were attached with double-sided tape on an acrylic plate, which was glued to elastic band with Velcro ® . Similar positions have been suggested by different authors [10,14,29].

Discrete Parameters of the Joint Angles
Discrete angular kinematic parameters shown in Table 6 were estimated. Discrete parameters allow making a parametric analysis, which is demonstrated to be a reliable and practical method analyzing gait data, and it is a useful tool to assess data reliability [30]. These kinematic parameters were computed for each gait cycle. To determine them, there is a need to identify the two main phases of gait, stance and swing. This procedure of segmentation consists of determining the two events that indicate the start of each phase, which are heel strike (HS) and toe off (TO). Sabatini et al. [31] propose to determine HS and TO using the angular velocity sensed by a gyroscope on the foot.

Discrete Parameters of the Joint Angles
Discrete angular kinematic parameters shown in Table 6 were estimated. Discrete parameters allow making a parametric analysis, which is demonstrated to be a reliable and practical method analyzing gait data, and it is a useful tool to assess data reliability [30]. These kinematic parameters were computed for each gait cycle. To determine them, there is a need to identify the two main phases of gait, stance and swing. This procedure of segmentation consists of determining the two events that indicate the start of each phase, which are heel strike (HS) and toe off (TO). Sabatini et al. [31] propose to determine HS and TO using the angular velocity sensed by a gyroscope on the foot. In our work, the orientation data of the foot were collected using quaternions. Each trial is divided in gait cycles to extract the kinematics parameters posteriorly. To determine the HS and TO, the angular velocity, as a function on quaternion, is computed as shown in Equation (9): where GS . q BF−FT is the vector of quaternion rates (or the time derivate of the unit quaternion) of the foot, and Ω t = (0, ω x , ω y , ω z ) T is the quaternion representation of the angular velocity ω t . Using the component of the angular velocity on the sagittal plane (ω y , for IMU placed on the foot), the HS and TO events are determined using a minimum detection algorithm. In addition, with these two estimated events, the gait cycle is divided in the two main phases. Thus, it is possible to estimate the mentioned discrete kinematic parameters using maximum and minimum detection algorithm.

Experimental Protocol for Gait Analysis
Five volunteers without gait disabilities (two male and three female, 25 ± 4 years old) were enrolled in the validation procedure of this study. The IMU sensors were placed on pelvis and on right lower limb (thigh, shank and foot segments) by a trained physiotherapist as previously described in Section 4.1. The sensor placed on the pelvis was aligned with the walking direction. The subjects were asked to keep a straight upright posture during 5 s, and then walk 10 m in a straight line. Each subject performed three trials and the five middle gait cycles were extracted for analysis. This methodology was applied to ensure that only complete gait cycles were selected, excluding motion at the beginning and at the end of the walking process. Therefore, fifteen gait cycles were acquired for each subject. This research was approved by the Ethical Committee of UFES (Research Project 214/10).

Results and Discussion
This section presents the results of three approaches applying the proposed method: (1) A simulation that evidences the method performance regardless of drift errors and other perturbations associated with the IMU sensors (considering the limitations of the systems and applications that involve IMU sensors [12][13][14][15][16]22,32]); (2) a practical validation using an experimental simplified rigid-body joint and four IMU sensors; and (3) an application in human gait analysis.

Simulation of the Proposed Method Applied to a Simplified Rigid-Body Joint
The IMUs' initial orientations were set to the initial values obtained during practical validation, in order to run the simulation as close as possible to the real experiment. The models of the joint and the IMUs are shown in Figure 4. Movements from 0 • to ±80 • with steps of ±20 • (called Postures 1 to 9) about z-axis of J were performed. Note that the simplified joint is analogous to a two-dimensional knee joint with one degree of freedom.     After applying the proposed method, only is significant under ideal conditions understanding that the rotations were applied exclusively around z-axis. Then, angular components and γ are equal to zero. The angles obtained by applying the IMU-to-body method are shown in Figure 5d. Notice that, as the angles and are equal to zero, they are not graphically presented. Also, please observe that the values of α for J1 and J4 are equal to the expected values imposed by the simulation. In summary, through this simulation, we aim to demonstrate that applying the proposed method the estimated angles are equal to the expected values and consistent with the rotations applied. In addition, we also show that the proposed method produces the correct and consistent values when the IMU sensors are placed in different positions on the body segments. Table 7 shows the data from ICC coefficients and its respective confidence intervals (95% IC) to evaluate the consistency of repeated measures of the IMU system under stated condition on two different days. ICC values were greater than 0.90 for all angular components and the different representations of the joint J. Movements associated with angles , which correspond to flexion-extension angles on sagittal plane, produced the highest ICC values of the joint (ICC = 1.00). Observe that the angular component presented the lowest ICC values and the confidence intervals were wider (e.g., 0.60-0.97). We believe that such values are caused by limitations of the current IMU technology and fusion algorithms. The movements associated with γ angles correspond to external-internal rotation angles, which are performed on transversal plane, perpendicular to the gravity vector. In accordance with the literature, these movements around to After applying the proposed method, only α is significant under ideal conditions understanding that the rotations were applied exclusively around z-axis. Then, angular components β and γ are equal to zero. The angles α obtained by applying the IMU-to-body method are shown in Figure 5d. Notice that, as the angles β and γ are equal to zero, they are not graphically presented. Also, please observe that the values of α for J 1 and J 4 are equal to the expected values imposed by the simulation. In summary, through this simulation, we aim to demonstrate that applying the proposed method the estimated angles are equal to the expected values and consistent with the rotations applied. In addition, we also show that the proposed method produces the correct and consistent values when the IMU sensors are placed in different positions on the body segments. Table 7 shows the data from ICC coefficients and its respective confidence intervals (95% IC) to evaluate the consistency of repeated measures of the IMU system under stated condition on two different days. ICC values were greater than 0.90 for all angular components and the different representations of the joint J. Movements associated with angles α, which correspond to flexion-extension angles on sagittal plane, produced the highest ICC values of the joint (ICC = 1.00). Observe that the angular component γ presented the lowest ICC values and the confidence intervals were wider (e.g., 0.60-0.97). We believe that such values are caused by limitations of the current IMU technology and fusion algorithms. The movements associated with γ angles correspond to external-internal rotation angles, which are performed on transversal plane, perpendicular to the gravity vector. In accordance with the literature, these movements around to the gravity vector present heading drift, which cannot be corrected using the accelerometer data. Therefore, this drift error may be associated with the performance of the magnetometer, gyroscope, and data fusion algorithm. Also, it has been mentioned that the heading drift is mainly due to the accuracy of the IMU sensors and, on a lesser extent, to the complexity of the task [33].  Tables 8 and 9 report the Root Mean Square Error (RMSE) and Concordance Correlation Coefficient (CCC) obtained between first-day measured joint angles (using IMU system) and reference values (using the gold-standard universal goniometer) to evaluate validity, respectively. The agreement between measures from IMU system and the universal goniometer applying the calibration procedure was excellent (CCC ≥ 0.98) for the angular component α. Note that for this angular component the maximum RMSE was 1.70 • for the J 4 representation on posture 2 (60 • ). Also, observe that the maximum RMSE (15.61 • ) is in correspondence with the angles γ. Again, these error drifts may be associated with the quality of the IMU data. In a previous validation study [34], the IMU sensors used here presented errors approximately up to 7 • across 12 explored orientations, following the self-IMU consistency (SC) test. Errors were found up to 15 • , following the Inter-IMU consistency (IC) test. These mentioned tests, with similar results, were proposed by Picerno et al. [16]. Note that the representations of J associated with IMU 3 (J 1 and J 2 ) presented lowest RMSE and highest CCC values broadly. It is possible to observe that for the angular component α, the measurements are not significantly different when using IMU 3 or IMU 4. However, for the angular components β and γ, the measurements using IMU 3 are lower than those using IMU 4. Additionally, using IMU 3 (the best case), RMSE values of β and γ apparently have similar magnitudes. Nevertheless, note that the magnitudes are not correlated with the same sense of rotation, it means that, for J 1 representation (IMU 3: POS-1), errors are higher from 0 to −80 • . On the other hand, for J 2 representation (IMU 3: POS-2), errors are higher from 0 to 80 • . Contrary to that demonstrated in simulation, the RMSE data suggest that the position of real IMU sensors is an important factor to consider in analyzes that involve the secondary planes of motion (coronal and transverse planes).

Practical Validation of the Proposed Method Applied to a Simplified Rigid-Body Joint
Besides, it is worth noting that the RMSE and CCC values mostly decrease as the angle increases. This can be observed for the angular components β and γ of the J 2 representation. The angular component γ presented the lowest CCC values (0.02 ≤ CCC ≤ 0.05), however, note that for punctual cases, the CCC values were presented into acceptable to excellent interval. For example, for J 1 representation between 80 • to −20 • (as highlighted in green color), the CCC values were from 0.48 to 0.99, corresponding with RMSE values smaller than 2.5 • . This behavior may indicate that pairs of IMU sensors can be used on specific joints, according to their range of motion in gait analysis and, even in other applications that define limits of motion within the range of acceptable performance of the sensors. According to the results obtained using the simplified joint, we present in the next section the hip, knee and ankle joint angles in the sagittal plane through motion analysis using the proposed method. Figure 6 reports the discrete angular parameters (see Table 6) proposed for gait analysis of Subject 2, as an example, over one cycle of gait, to show graphically the kinematic parameters selected in the angular series. Figure 7 reports the mean and standard deviation of the joint angles in sagittal plane of the five volunteers. Table 10 shows the discrete angular parameters calculated using the mean of fifteen gait cycles for the five volunteers.  Mean and standard deviation of the joint angles of the five volunteers are within the normal range during a gait cycle for free walking. Interestingly, the results obtained with the developed algorithm presented low standard deviations, which means that estimated measures were consistent across trials. The maximum values of standard deviation were presented for the ankle joint angles of the five volunteers (Maximum SD = 3.99, AFE3, Subject 5). According to the results of each subject, it is possible to identify characteristics of each individual. By comparing the results obtained using the proposed method with the literature [12,15,29,30], it is clear that the angular patterns are coherent and within the intervals established by mean and standard deviations. It is important to highlight  Mean and standard deviation of the joint angles of the five volunteers are within the normal range during a gait cycle for free walking. Interestingly, the results obtained with the developed algorithm presented low standard deviations, which means that estimated measures were consistent across trials. The maximum values of standard deviation were presented for the ankle joint angles of the five volunteers (Maximum SD = 3.99, AFE3, Subject 5). According to the results of each subject, it is possible to identify characteristics of each individual. By comparing the results obtained using the proposed method with the literature [12,15,29,30], it is clear that the angular patterns are coherent and within the intervals established by mean and standard deviations. It is important to highlight Mean and standard deviation of the joint angles of the five volunteers are within the normal range during a gait cycle for free walking. Interestingly, the results obtained with the developed algorithm presented low standard deviations, which means that estimated measures were consistent across trials. The maximum values of standard deviation were presented for the ankle joint angles of the five volunteers (Maximum SD = 3.99, AFE3, Subject 5). According to the results of each subject, it is possible to identify characteristics of each individual. By comparing the results obtained using the proposed method with the literature [12,15,29,30], it is clear that the angular patterns are coherent and within the intervals established by mean and standard deviations. It is important to highlight that these experiments were performed with the intention of proving a practical application of the proposed method. Notice that technical-anatomical frames, used to calculate the joint angles, are an estimate and may present a misalignment with the anatomical frame defined using bony landmarks. This means that joint angle curves may present an offset from values estimated using stereophotogrammetry, preserving the same angular patterns and range of motion.

Conclusions
In this work we have presented a novel calibration method to place and align inertial sensors with human body segments, with the goal of measuring joint angles. The advantages of the proposed method, in comparison with other methods described in the literature, include the fast and easy sensor placement, with no need of special movements performed by the user nor any additional tools, which may decrease setup time. The characteristics of this new method may make it more attractive for daily clinical routine.
The results from the computational simulation demonstrate that, when applying the proposed method, the estimated angles are equal to the expected values and consistent with the joint's rotations. Also, two real experiments have been carried out to evaluate the simulated procedure. Results indicate that the method is suitable to measure tridimensional angles of the hip, knee and ankle of the humans' joints during free walking. However, some limitations mainly associated with the accuracy of the sensors used in the real experiments for practical validation gave rise to some estimation errors, mainly in movements around the gravity vector.
In conclusion, the proposed method is an interesting option to solve the alignment problem of human gait analysis based on inertial sensors. The discussed method is especially attractive for its simplicity and easy donning and doffing of the sensors. In applications such as gait rehabilitation, that requires motion analysis of impaired persons, the method can be of great help for its simplicity and accurate results.

Conflicts of Interest:
The authors declare no conflict of interest.