**3.3 Joint angle reckoning**

Each sensor node has its own reference system. It is then necessary to define a suitable coordinate system to describe the orientation of a lower limb's segment. Two coordinate systems are used in this application. One system is fixed to the earth and may be considered for the purpose of segment of human motion analysis to be an inertial coordinate system. The other coordinate system is local to the IMU and is referred to as a body coordinate system. The attitude of an object can be represented in different ways [24]. Euler angles, rotation matrix, and quaternion are the most used methods. Quaternion is difficult to understand but compared to the two other representation methods, it requires less memory and calculation capabilities. It avoids the problem of Gimbal lock that appears in Euler angle representation. The quaternion representation is used in this application. A complete description of the use of quaternions for articular angle calculation between two segments and the transformation of the local coordinate system to the terrestrial reference is described in [24, 25].

Data captured by IMU and magnetometer are processed in real time with the algorithm executed by the onboard SoC to estimate sensor attitude. This algorithm uses a numerical integration to compute the angle from the angular velocity provided by the gyrometer. This numerical integration inevitably introduces a drift in addition to the calculation approximation error. To correct this drift which accumulates over time, the information provided by the accelerometer and the magnetometer have been merged according to the onboard algorithm. The detail of this algorithm is described in [26, 27].

Finally, tests in static and dynamic conditions show that the adopted method is effective to compensate the drift of the gyrometer during walk. The quality of estimation is related to the conditions of use of the sensor (vibration, percussion, and external accelerations experienced during a long time...). Nevertheless, if the IMU works on a limit condition for a very long duration, the risk of incorrect estimated value remains present. In the case of gait in everyday life, these conditions occur periodically, but not during a long time, the precision of estimated values remains in acceptable limits.

Thanks to this system, it is possible to calculate the joint angles of the lower limb in real time and to record them in an everyday life environment.

#### **3.4 Experiments**

The experiments are carried out in a gait analysis laboratory equipped with 3D-GA system, considered as reference, to evaluate the accuracy of the proposed system. Three healthy subjects and two hemiparetic patients have been experimented with wearing markers for 3D-GA system and the wearable system. The hemiparetic patients perform 6 times a course of 8 m with self-select comfortable speed. The 3D-GA system capture area is approximately 6 m × 3 m; this limits the recording time. To evaluate the reliability of the proposed system for a longer duration, it has been decided to practice the experiments on a treadmill. To avoid the difficulties encountered by hemiparetic patients, especially when starting the carpet, only the healthy subjects have been asked to walk on the treadmill. The healthy persons have been asked to walk on the treadmill for 1 minute. The speed of the treadmill is set at 4 km/h.

**Figure 4** shows the evolution of joint angles of a hemiparetic patient during walking on flat terrain (right side in blue and left side in red). The signals of both systems have a great similarity in shape. There is no time shift, and the differences between the signals from the two systems are limited.

**Figure 5** illustrates the changes in joint angles in the sagittal plane of a healthy person while walking on a treadmill. The joint angles estimated by the proposed system are the continuous line signals and those measured by the 3D-GA system are in dashed line. The figure shows joint angles in a 10-second window of a 1-minute recording. As for the signals observed on the hemiplegic patient, the signals of both systems have a great similarity in shape. The two systems are well synchronized. The differences between the signals from the two systems are limited.

**147**

**Table 1.**

*An Embedded Gait Analysis System for CNS Injury Patients*

**Table 1** illustrates the accuracy of the wearable system compared to the 3D-GA system. Root mean square error (RMSE) allows us to observe the difference of each sample between the two systems. The correlation coefficient (CC) allows us to evaluate the similarity of the shapes of the signals measured by the two systems. The RMSEs of joint angles estimated with respect to the reference system are between 2.4° and 4.0° for healthy persons. The CCs of healthy subjects are between 0.89 and 0.99. The signals of the hemiparetic patients have RMSEs between 3.1° and

**Figure 6** illustrates the correlation and concordance of the joint angles measured

of agreement (95%) equal −4.8° and the upper limits of agreement (95%) equal 7.6°.

Comparisons between the results of the embedded system and the reference show that the joint angles measured by the embedded system have limited differences compared to the reference system. The RMSE of the proposed system is between 2.4° and 4.0°. The signal shapes of both systems have great similarities. The

Hemiparetic subject 1 3.6 0.90 3.3 0.98 3.5 0.98

Average 3.4 0.90 3.3 0.98 3.3 0.98 Healthy subject 1 4.0 0.90 3.1 0.99 3.3 0.97

Average 3.8 0.90 3.1 0.99 3.0 0.98

**Joint angle Ankle Knee Hip RMSE (°) CC RMSE (°) CC RMSE (°) CC**

2 3.2 0.89 3.4 0.98 3.1 0.97

2 3.9 0.89 3.0 0.99 2.4 0.99 3 3.4 0.92 3.2 0.99 3.2 0.98

) equals 0.97. The lower limits

*DOI: http://dx.doi.org/10.5772/intechopen.83826*

3.6° and CCs between 0.89 and 0.99.

*Joint angles of a healthy subject during treadmill walking.*

**3.5 Discussion**

**Figure 5.**

by the two systems. The coefficient of determination (r2

CC of the signals between two systems is between 0.89 and 0.99.

*Comparison between the proposed system and the 3D-GA system.*

**Figure 4.** *Joint angles of a hemiparetic subject.*

*Assistive and Rehabilitation Engineering*

in acceptable limits.

**3.4 Experiments**

Finally, tests in static and dynamic conditions show that the adopted method is effective to compensate the drift of the gyrometer during walk. The quality of estimation is related to the conditions of use of the sensor (vibration, percussion, and external accelerations experienced during a long time...). Nevertheless, if the IMU works on a limit condition for a very long duration, the risk of incorrect estimated value remains present. In the case of gait in everyday life, these conditions occur periodically, but not during a long time, the precision of estimated values remains

Thanks to this system, it is possible to calculate the joint angles of the lower limb

The experiments are carried out in a gait analysis laboratory equipped with 3D-GA

system, considered as reference, to evaluate the accuracy of the proposed system. Three healthy subjects and two hemiparetic patients have been experimented with wearing markers for 3D-GA system and the wearable system. The hemiparetic patients perform 6 times a course of 8 m with self-select comfortable speed. The 3D-GA system capture area is approximately 6 m × 3 m; this limits the recording time. To evaluate the reliability of the proposed system for a longer duration, it has been decided to practice the experiments on a treadmill. To avoid the difficulties encountered by hemiparetic patients, especially when starting the carpet, only the healthy subjects have been asked to walk on the treadmill. The healthy persons have been asked to walk on the

**Figure 4** shows the evolution of joint angles of a hemiparetic patient during walking on flat terrain (right side in blue and left side in red). The signals of both systems have a great similarity in shape. There is no time shift, and the differences

**Figure 5** illustrates the changes in joint angles in the sagittal plane of a healthy person while walking on a treadmill. The joint angles estimated by the proposed system are the continuous line signals and those measured by the 3D-GA system are in dashed line. The figure shows joint angles in a 10-second window of a 1-minute recording. As for the signals observed on the hemiplegic patient, the signals of both systems have a great similarity in shape. The two systems are well synchronized.

in real time and to record them in an everyday life environment.

treadmill for 1 minute. The speed of the treadmill is set at 4 km/h.

The differences between the signals from the two systems are limited.

between the signals from the two systems are limited.

**146**

**Figure 4.**

*Joint angles of a hemiparetic subject.*

**Figure 5.** *Joint angles of a healthy subject during treadmill walking.*

**Table 1** illustrates the accuracy of the wearable system compared to the 3D-GA system. Root mean square error (RMSE) allows us to observe the difference of each sample between the two systems. The correlation coefficient (CC) allows us to evaluate the similarity of the shapes of the signals measured by the two systems. The RMSEs of joint angles estimated with respect to the reference system are between 2.4° and 4.0° for healthy persons. The CCs of healthy subjects are between 0.89 and 0.99. The signals of the hemiparetic patients have RMSEs between 3.1° and 3.6° and CCs between 0.89 and 0.99.

**Figure 6** illustrates the correlation and concordance of the joint angles measured by the two systems. The coefficient of determination (r2 ) equals 0.97. The lower limits of agreement (95%) equal −4.8° and the upper limits of agreement (95%) equal 7.6°.
