Keywords

1 Introduction

Lower limb motor functions are important to prevent bedridden and to make independence in daily living and social participation. Therefore, motor disabled persons or elderly people with decreased motor function need rehabilitation training of their lower limbs. In the rehabilitation, it is important to evaluate a level of motor function of subjects in order to make rehabilitation program and to instruct it.

Generally, therapists perform the evaluation of motor function in rehabilitation by simple manual methods such as watching movements, measurement of the range of motion (ROM) with a manual goniometer, or measurement of time and counting the number of steps in 10 m walking test. Although these simple, manual evaluation methods are effective in limited space and time for rehabilitation training, those evaluation results depend on therapists. On the other hand, for quantitative and objective evaluation of movements, motion measurement system such as a camera-based system or electric goniometer has been used. Rehabilitation program based on the quantitative and objective evaluations with motion measurement system is expected to increase rehabilitation effect and to decrease rehabilitation term. However, those motion measurement systems are mainly used in research works in laboratories, because the systems require large space for setting the system and time-consuming setup process, and are expensive.

Recently, use of inertial sensors (accelerometers and gyroscopes) has been studied in measurement and analysis of movements focusing on its shrinking in size, low cost and easiness for settings. In evaluation of motor functions, segment inclination angles and joint angles have important information for therapists and patients. Therefore, many studies have been performed on measurement of joint angles or segment tilt angles with inertial sensors [16].

A motion measurement system using inertial sensors has to give joint or segment inclination angles calculating from angular velocities and/or acceleration signals. In addition, measurement of total lower limb movements such as simultaneous measurement of hip, knee and ankle joint angles is required for clinical evaluation in rehabilitation support. In our previous study, a joint angle calculation method based on the integral of angular velocity using Kalman filter was applied to all the joint angles of the lower limbs. Measurement of gait with healthy subjects suggested that the method can be used practically in measurement of those angles in the sagittal plane [79]. The integral-based method was modified to have variable Kalman gain and was found to have high measurement accuracies in measurements of angles during 2-dimensional movements of a double pendulum rigid body model and angles in the sagittal plane during treadmill walking with healthy subjects [10].

Angle measurement of 3-dimensional (3D) movements has been required for evaluation of motor function. For measurement of 3D angles with inertial sensors, a method of using attitude angle representation by quaternion was proposed [5]. However, measurement of Euler angle was tested in that study. On the other hand, the integral of angular velocity can be expanded to measure 3D movements, and it is possible to provide simply angles both in the sagittal plane and in the frontal plane.

The question focused in this paper was whether there are any differences in angle calculation between the integral-based method and the quaternion based one or not. Therefore, this paper aimed to evaluate angle measurement accuracies of the different calculation methods. For this purpose, the previously developed integral-based method with variable Kalman gain [10] was expanded to measure angles in the sagittal and the frontal planes. Then, an angle calculation method using quaternion with a fixed gain Kalman filter was developed. The quaternion-based and the extended integral-based methods were evaluated in measurements of angles during 3D movements in the sagittal and the frontal planes using the rigid body model that represented the lower limb. In addition, the two methods were compared in calculation of lower limb angles measured during treadmill walking with healthy subjects and during gait with hemiplegic subjects.

2 Angle Calculation Methods

In this paper, two calculation methods shown in Fig. 1 were tested in angle measurements. Both methods are described below.

Fig. 1.
figure 1

Outline of tested angle calculation methods.

2.1 Extended Integral-Based Method

Figure 1(a) shows outline of the integral-based method of calculating segment inclination angle. In this paper, the previously developed integral-based method with variable Kalman gain [10] was extended to calculate angles in the sagittal and the frontal planes. Basically, a segment inclination angle is calculated by the integral of angular velocity (an output of a gyroscope). That is, segment inclination angle \( \theta_{inc} (t) \) is calculated by

$$ \theta_{inc} (t) = \int_{0}^{t} {\omega (\tau )d\tau } + \theta_{inc} (0) $$
(1)

where \( \omega (t) \) shows angular velocity measured with a gyroscope. \( \theta_{inc} (0) \) is the initial joint angle calculated from acceleration data. For instance, the angle in the sagittal plane is calculated from acceleration signal, \( a_{x} \) and \( a_{z} \), by the following equation.

$$ \theta_{inc} (0) = \tan^{ - 1} \frac{{a_{z} (0)}}{{a_{x} (0)}} $$
(2)

Joint angle \( \theta_{joint} (t) \) are calculated from 2 inclination angles of the adjacent segments. For example,

$$ \theta_{joint} (t) = \theta_{inc1} (t) - \theta_{inc2} (t) $$
(3)

Here, the calculated angle is corrected by Kalman filter using angle measured with an accelerometer in order to remove accumulated calculation error in the integral [79]. Kalman filter estimates error in the angle calculated from the output of a gyroscope (\( \Delta \hat{\theta } \)) by using the difference between angles obtained by a gyroscope and by an accelerometer (\( \Delta y \)). Then, angle (\( \hat{\theta } \)) is calculated. The difference of angles in the sagittal plane is calculated by

$$ \Delta y(t) = \theta_{gyro} (t) - \theta_{acc} (t) = \theta_{inc} (t) - \tan^{ - 1} \frac{{a_{z} (t)}}{{a_{x} (t)}} $$
(4)

The state equation and the observation equation are shown by following equations using the error of the angle measured with gyroscopes (\( \Delta \theta \)) and bias offset (\( \Delta b \)):

$$ \left[ {\begin{array}{*{20}c} {\Delta \theta_{k + 1} } \\ {\Delta b_{k + 1} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 1 & {\Delta t} \\ 0 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\Delta \theta_{k} } \\ {\Delta b_{k} } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} {\Delta t} \\ 1 \\ \end{array} } \right]w $$
(5)
$$ \Delta y_{k} = \left[ {\begin{array}{*{20}c} 1 & 0 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\Delta \theta_{k} } \\ {\Delta b_{k} } \\ \end{array} } \right] + v $$
(6)

where \( w \) and \( v \) are errors in measurement with the gyroscope and with the accelerometer, respectively.

Kalman filter repeats correction by Eq. (7) and prediction by Eq. (8):

$$ \left[ {\begin{array}{*{20}c} {\Delta \hat{\theta }_{k} } \\ {\Delta \hat{b}_{k} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\Delta \hat{\theta }_{k}^{ - } } \\ {\Delta \hat{b}_{k}^{ - } } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} {K_{1} } \\ {K_{2} } \\ \end{array} } \right](\Delta y_{k} - \Delta \hat{\theta }_{k}^{ - } ) $$
(7)
$$ \left[ {\begin{array}{*{20}c} {\Delta \hat{\theta }_{k + 1}^{ - } } \\ {\Delta \hat{b}_{k + 1}^{ - } } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 1 & {\Delta t} \\ 0 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\Delta \hat{\theta }_{k} } \\ {\Delta \hat{b}_{k} } \\ \end{array} } \right] $$
(8)

where \( K_{1} \) and \( K_{2} \) are Kalman gain for \( \Delta \theta \) and \( \Delta b \), respectively. The hat upon a character and the superscript minus represent estimated value and predicted value, respectively. For the initial state, \( \Delta \theta_{0} \) was set at zero and \( \Delta b_{0} \) was set at the value at the last measurement.

Value of Kalman gain was determined by the noise ratio that was adjusted based on the difference between the angle estimated by the Kalman filter and the angle calculated from acceleration signals. Here, the angle difference was used approximately as the magnitude of influence of impact and motion accelerations, because large angle difference is considered to involve large error caused by impact and movement accelerations in the angle calculated from accelerations. That is, the value of the noise ratio \( n \) was adjusted by the following equation:

$$ n = n_{0} e^{a} \cdot \,\left| {\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{\theta } - \theta_{acc} } \right| $$
(9)

where, \( \left| {\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\frown}$}}{\theta } - \theta_{acc} } \right| \) represent the angle difference between the angle estimated by the Kalman filter \( \hat{\theta } \) and the angle calculated from acceleration signals \( \theta_{acc} \). \( n_{0} \) and \( a \) are parameters whose values were determined by trial and error method, respectively. In this case, value of Kalman gain decreases as the noise ration increases.

2.2 Quaternion-Based Method

Quaternion can be used to represent the attitude of each segment of a rigid body model and human body. As shown in Fig. 1(b), two quaternions are calculated from acceleration signals and from angular velocity signals measured with an inertial sensor. First, attitude angle representation by quaternion was obtained from the angular velocity. Then, Kalman filter was applied to correct the error using attitude angle representation by quaternion obtained from the gravitational acceleration.

Using the triaxial angular velocity \( \varvec{\omega}= (\omega_{x} ,\,\omega_{y} ,\,\omega_{z} ) \), quaternion \( \varvec{q} \) is propagated according to the differential equation [11]:

$$ \dot{\varvec{q}} = \frac{1}{2}\left[ {\begin{array}{*{20}c} 0 & { - \omega_{x} } & { - \omega_{y} } & { - \omega_{z} } \\ {\omega_{x} } & 0 & {\omega_{z} } & { - \omega_{y} } \\ {\omega_{y} } & { - \omega_{z} } & 0 & {\omega_{x} } \\ {\omega_{z} } & {\omega_{y} } & { - \omega_{x} } & 0 \\ \end{array} } \right]\varvec{q} $$
(10)

The state equation shown by Eq. (11) is the time integration of Eq. (10), where \( \varvec{w} \) is the process noise in measurement with a gyroscope.

$$ \varvec{q}_{{\varvec{k} + 1}} = \frac{1}{2}\left[ {\begin{array}{*{20}c} 2 & { - \Delta t\omega_{xk} } & { - \Delta t\omega_{yk} } & { - \Delta t\omega_{zk} } \\ {\Delta t\omega_{xk} } & 2 & {\Delta t\omega_{zk} } & { - \Delta t\omega_{yk} } \\ {\Delta t\omega_{yk} } & { - \Delta t\omega_{zk} } & 2 & {\Delta t\omega_{xk} } \\ {\Delta t\omega_{zk} } & {\Delta t\omega_{yk} } & { - \Delta t\omega_{xk} } & 2 \\ \end{array} } \right]\varvec{q}_{\varvec{k}} + \varvec{w} $$
(11)

The observation equation is given by the following equation considering the observation noise \( {\mathbf{v}} \) in measurement with an accelerometer.

$$ \varvec{z}_{k} = \left[ {\begin{array}{*{20}c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right]\varvec{q}_{k} + \varvec{v} = \varvec{Iq}_{k} + \varvec{v} $$
(12)

where the observation vector is the quaternion-based attitude representation \( \varvec{z} \) that is obtained from the gravitational acceleration. Then, correction and prediction are represented by

$$ \hat{\varvec{q}}_{k} = \hat{\varvec{q}}_{k}^{ - } + \varvec{K}(\varvec{z}_{k} - \hat{\varvec{q}}_{k}^{ - } ) $$
(13)
$$ \hat{\varvec{q}}_{k + 1}^{ - } = \frac{1}{2}\left[ {\begin{array}{*{20}c} 2 & { - \Delta t\omega_{xk} } & { - \Delta t\omega_{yk} } & { - \Delta t\omega_{zk} } \\ {\Delta t\omega_{xk} } & 2 & {\Delta t\omega_{zk} } & { - \Delta t\omega_{yk} } \\ {\Delta t\omega_{yk} } & { - \Delta t\omega_{zk} } & 2 & {\Delta t\omega_{xk} } \\ {\Delta t\omega_{zk} } & {\Delta t\omega_{yk} } & { - \Delta t\omega_{xk} } & 2 \\ \end{array} } \right]\hat{\varvec{q}}_{\varvec{k}} $$
(14)

The attitude angle representation by quaternion \( \varvec{z} \) can be obtained by the followings [12].

$$ \varvec{z}_{k} = \left[ {\cos \left( {\frac{{\theta_{k} }}{2}} \right),\,\,\sin \left( {\frac{{\theta_{k} }}{2}} \right) \times \left[ {\frac{{\varvec{A}_{k} }}{{\left\| {\varvec{A}_{k} } \right\|}}} \right]} \right] $$
(15)

where the angle \( \theta_{k} \) and axis of rotation \( \varvec{A}_{k} \) are obtained from the inner and the cross products of a measured acceleration vector \( \varvec{a}_{k} \) and the acceleration vector defined as the initial attitude of the sensor \( \varvec{a}_{0} \). That is,

$$ \theta_{k} = \cos^{ - 1} \left( {\varvec{a}_{k} \cdot \varvec{a}_{\varvec{0}} } \right) $$
(16)
$$ \varvec{A}_{k} = \varvec{a}_{k} \times \varvec{a}_{\varvec{0}} $$
(17)

Using a rotation matrix calculated from the corrected quaternion \( \hat{\varvec{q}}_{k} \), longitudinal vector of each body segment is rotated. Then, the rotated vector is projected onto the sagittal and the frontal planes of the global coordinate system. Inclination angles are obtained from the inner product of the projected vector and an unit vector in each plane.

3 Evaluation of Angle Calculation Methods

3.1 Measurement of 3D Movements with Rigid Body Model

Experimental Method.

A rigid body model consisted of steel prop body and tubular aluminium prismatic bar with a ball joint as shown in Fig. 2, which represented the thigh with the hip joint. A wireless inertial sensor (WAA-010, Wireless Technologies) was attached to the rigid body model with double-sided adhesive tapes. The inertial sensor includes a 3-axis gyroscope (IDG-3200, InvenSense) and a 3-axis accelerometer (ADXL345, Analog Devices). The inertial sensor communicates with a personal computer using Bluetooth (Ver 2.0 + EDR, Class 2). Markers for the optical motion measurement system (OPTOTRAK, Northern Digital Inc.) were also attached on the prismatic bar with double-sided adhesive tapes in order to measure reference angles for evaluation of measurement accuracy.

Fig. 2.
figure 2

Rigid body model used in measurement of angles during 3D movements.

The sensor signals and the marker positions were measured simultaneously with a personal computer at a sampling frequency of 100 Hz. Measured acceleration signals were filtered with Butterworth low-pass filter with the cut-off frequency of 10 Hz in order to remove high frequency noise. Then, inclination angles were calculated by the 2 methods shown in Fig. 1.

Fig. 3.
figure 3

An example of measured inclination angles during 3D movements of the rigid body model (2 s of cycle period).

The initial position of the thigh part was in the direction of the gravity. In the measurements, the thigh part was moved repeatedly simulating the circumduction gait. That is, the thigh part was moved to flexed position of about 45° in the sagittal plane through adducted position of about 45° in the frontal plane from the initial position, and then the thigh part was moved to the initial position by extension movement in the sagittal plane. This movement was performed manually with a cycle period of 2 s, 4 s and 8 s, respectively. The sensor was faced almost the frontal plane during the movement. The movement was performed repeatedly during a measurement trial of 30 s. Since prolonged measurements did not increase measurement error in our previous tests [8], the number of measurement trial was increased (10 trials) with 30 s of measurement time for each trial in this paper. In the evaluation, the differences between the sensor and marker settings were measured before measurement trial and removed.

Results.

Figure 3 shows an example of measured inclination angles during the 3D movements. Inclination angles in the sagittal plane calculated by the 2 methods showed similar waveforms as that of reference angle waveform. Angles in the frontal plane calculated by the integral-based method, however, showed larger difference in angle waveform with the reference angle waveform than that by the quaternion-based one.

Fig. 4.
figure 4

Evaluation of angle calculation methods in measurement of 3D movements of the rigid body model.

Figure 4 shows evaluation results of the calculation methods for measurements of 3D movements of the rigid body model. The RMSE (root mean square error) and the CC (correlation coefficient) values showed that the quaternion-based method increased measurement accuracy both for angles in the sagittal and the frontal planes. For fast movements (2 s of cycle period), variations of RMSE and CC values also decreased with the quaternion-based method. However, for slow movements (8 s of cycle period), the variation of RMSE and CC values increased with the quaternion-based method although measurement accuracy increased with the quaternion-based one.

Fig. 5.
figure 5

Evaluation of angle calculation methods in measurement of angles in the sagittal plane during treadmill walking of healthy subjects.

3.2 Measurement of Movement During Treadmill Walking with Healthy Subjects

Method.

As the first test of evaluation of the two calculation methods in measurement of human movements, previously measured treadmill walking [10] were analyzed. The walking were measured with 3 healthy subjects (male, 22-23 y.o.) during 90 s under 3 different walking speed conditions (1 km/h, 3 km/h, and 5 km/h) with wireless inertial sensors (WAA-010, Wireless Technologies) and 3D motion analysis system (OPTOTRAK, Northern Digital Inc.) simultaneously. Five trials were performed for each walking speed.

Result.

Figure  5 shows average RMSE values for angles in the sagittal plane calculated by different 3 methods: integral-based method with fixed Kalman gain, integral-based method with variable Kalman gain and quaternion-based method. The RMSE values of the quaternion-based method were larger than the integral-based method with variable Kalman gain except for the thigh angle under the fast speed condition (5 km/h). The quaternion-based method showed almost similar RMSE values as those by the integral-based method with fixed Kalman gain, although shank angles were measured with better accuracy using the integral-based methods.

3.3 Preliminary Tests in Measurement of Gait with Hemiplegic Subjects

Method.

Gait movements of 2 hemiplegic subjects were measured with wireless inertial sensors (WAA-010, Wireless Technologies). In this measurement, each subject walked about 10 m on level floor. The measured foot inclination angle was compared to the angle calculated from acceleration signals only. The angle calculated from acceleration only involves measurement error caused by motion acceleration. However, angles under the quiet condition can be measured from gravitational acceleration with good measurement accuracy.

Result.

Average values of measured motion acceleration of the foot during quiet standing and at around the foot flat condition were shown in Table 1. Here, the foot flat condition was detected by the angular velocity measured with the sensor attached to the foot [13]. This result means that the foot inclination angle calculated from acceleration only can provide appropriate angle values at the foot flat condition because the motion acceleration was small as same as that under the quiet standing condition.

Table 1. Average magnitude of motion acceleration of the foot during quiet standing condition (before walking) and during foot flat condition.
Fig. 6.
figure 6

Examples of measured inclination angle of the paralyzed foot during gait with a hemiplegic subject (subject 1).

Figures 6 and 7 show examples of measured inclination angles of the paralyzed foot in the sagittal plane. As seen in Fig. 6, the angle calculated by the integral-based method were different from the angle calculated from acceleration before and after the walking, and also at around the foot flat shown by shaded area. The quaternion-based method seems to measure appropriately the angle at around the foot flat in addition to those before and after the walking as shown in Fig. 6(b). For the other hemiplegic subject, however, the quaternion-based method could not remove measurement error at around the foot flat and after the walking although it decreased the errors compared to the integral-based method as shown in Fig. 7.

Fig. 7.
figure 7

Examples of measured inclination angle of the paralyzed foot during gait with a hemiplegic subject (subject 2).

4 Discussions

As shown in Fig. 4, the quaternion-based angle calculation method showed higher measurement accuracy in measurement of 3D movements of the rigid body model than that of the integral-based method with variable Kalman gain. Average RMSE values of the integral-based and the quaternion-based methods were less than 2.5° and 2.0°, respectively, and average CC values were larger than 0.993 and 0.997, respectively. For angles in the frontal plane during 3D movements, average RMSE values were less than 3.0° and 2.1° and average CC values were larger than 0.986 and 0.988 for the integral-based and the quaternion-based methods, respectively. In our previous study, the integral-based method with variable Kalman gain showed that average values of RMSE and correlation coefficient in measurement of 2D movements of a double pendulum rigid body model were less than 1.5° and larger than 0.998, respectively [10]. The quaternion-based method would be more effective by improving measurement accuracies for 3D movements up to those for 2D movements.

The quaternion-based angle calculation method is considered to be effective compared to the integral-based one. As shown in Fig. 3, the integral-based method caused difference in waveform of angle in the frontal plane. Measurement accuracy of the quaternion-based method was higher than the integral-based one as shown in Fig. 4. In addition, as seen in Figs. 6(a) and 7(a), the integral-based method calculated angle inappropriately in some cases of measurement of gait of hemiplegic subjects. The quaternion-based method could measure angles appropriately in some of such cases as shown in Fig. 6(b).

Angle measurement accuracy obtained from the analysis of treadmill walking measured with healthy subjects showed that the integral-based method with variable Kalman gain would be useful for measurement of angles in the sagittal plane during gait of healthy subjects. It can improve manual measurement with goniometer that is used with resolution larger than about 5°. The sensor system also makes possible to measure angles during movements in addition to measurement of range of motion (ROM). These suggest that the angle calculation methods tested in this paper can be practical in measurement of movements.

In the measurement of angles during treadmill walking, the quaternion-based method showed almost similar RMSE values as those of the integral-based method with fixed Kalman gain, which were less than those of the integral-based method with variable Kalman gain. For measurement of lower limb angles during gait, the variable Kalman gain method is considered to be effective because it could remove error in Kalman filtering caused by impact and motion acceleration and also increase Kalman filtering effect under low motion acceleration conditions. Since the variable Kalman gain method used in the integral-based method can not be applied directly to the quaternion-based one, it is necessary to develop and test variable Kalman gain method applicable to the quaternion-based method.

Figure 4 showed that measurement accuracy of angles in the sagittal plane was high for slow movements, especially with the quaternion-based method. For fast movements (2 s of cycle period), it is considered that the integral-based method could decrease the error by applying the variable Kalman gain method. Since the quaternion-based method with constant Kalman gain showed higher measurement accuracy than that of the integral-based method, it is expected that the quaternion-based method further improves measurement accuracy for fast movements by applying variable gain method. However, for the angles in the frontal plane, the measurement accuracy for slow movements (8 s of cycle period) decreased. Although the cause of the error increase in measurement of angles in the frontal plane is not clear, there is a possibility that there were some differences between fast and slow movements.

The integral-based method showed inappropriate angle calculation results in some cases of measurement of gait movement of hemiplegic subjects. The quaternion-based method was shown to have a possibility of improving the measurement accuracy. Since such inappropriate angle calculation was mainly seen in angles of paralyzed leg, it is considered that rotation movement of lower limb as seen in circumduction gait caused the inappropriate results. Evaluation tests of angle measurement accuracies for various gait movements are necessary to validate a measurement method of 3D movements.

5 Conclusions

In this paper, the integral-based angle calculation method with variable Kalman gain and the quaternion-based method with fixed Kalman gain were compared in angle measurements during 3D movements with the rigid body model and in measurements of lower limb angles during treadmill walking measured with healthy subjects and during gait measured with hemiplegic subjects. The quaternion-based method showed higher measurement accuracies for angles in the sagittal and the frontal planes during 3D movements of the rigid body model than those of the integral-based one. Although the quaternion-based method showed less measurement accuracy for angles during treadmill walking of healthy subjects than that of the integral-based one, the quaternion-based one was suggested to be effective in angle measurement during gait of hemiplegic subjects. Since the results of measurement angles with the rigid body model and during treadmill walking suggested effectiveness of variable Kalman gain method, it is expected that the quaternion-based method improves the measurement accuracy for treadmill walking by applying the variable Kalman gain method. The quaternion-based angle calculation method would be more effective for measurement of angles in the sagittal and the frontal planes during gait by improving measurement accuracies for 3D movements up to those of the 2D movements.