Next Article in Journal
Improved One-Way Hash Chain and Revocation Polynomial-Based Self-Healing Group Key Distribution Schemes in Resource-Constrained Wireless Networks
Next Article in Special Issue
Inertial Sensor Self-Calibration in a Visually-Aided Navigation Approach for a Micro-AUV
Previous Article in Journal
All-Optical Graphene Oxide Humidity Sensors
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Inertial Sensor-Based Smoother for Gait Analysis

Department of Electrical Engineering, University of Ulsan, Mugeo, Namgu, Ulsan 680-749, Korea
Sensors 2014, 14(12), 24338-24357; https://doi.org/10.3390/s141224338
Submission received: 17 October 2014 / Revised: 5 December 2014 / Accepted: 9 December 2014 / Published: 17 December 2014
(This article belongs to the Special Issue Inertial Sensors and Systems)

Abstract

: An off-line smoother algorithm is proposed to estimate foot motion using an inertial sensor unit (three-axis gyroscopes and accelerometers) attached to a shoe. The smoother gives more accurate foot motion estimation than filter-based algorithms by using all of the sensor data instead of using the current sensor data. The algorithm consists of two parts. In the first part, a Kalman filter is used to obtain initial foot motion estimation. In the second part, the error in the initial estimation is compensated using a smoother, where the problem is formulated in the quadratic optimization problem. An efficient solution of the quadratic optimization problem is given using the sparse structure. Through experiments, it is shown that the proposed algorithm can estimate foot motion more accurately than a filter-based algorithm with reasonable computation time. In particular, there is significant improvement in the foot motion estimation when the foot is moving off the floor: the z-axis position error squared sum (total time: 3.47 s) when the foot is in the air is 0.0807 m2 (Kalman filter) and 0.0020 m2 (the proposed smoother).

1. Introduction

Gait analysis is the study of human walking [13]. It is helpful in the medical diagnosis and treatment of those diseases that affect the ability to walk.

There are many devices that can be used to perform gait analysis [4]. Mechanical goniometers are used to measure hip, knee and ankle angles. Force plates on the floor or on a shoe (such as the wearable force plate from Tec Gihan Co., Kyoto, Japan) are used to measure the vertical force beneath the foot [5]. Optical motion trackers (such as Vicon) are used to measure the movement of a leg and a foot. These sensor systems can be used independently or together to give necessary gait parameters, such as stride length, walking speed and ground reaction forces.

Probably, an optical motion tracker is the most popular gait analysis tool [6], since it provides a very accurate description of foot and leg motion. The disadvantages of an optical motion tracker are its high cost and limited walking range. You can only increased walking range by using additional cameras, which can be quite expensive for a long walking range.

An alternative technology for the optical motion tracker is the use of inertial sensors [7,8]. Although the accuracy of inertial sensor-based estimation is generally worse than that of the optical motion tracker, the inertial sensor approach does not have a walking range limitation, and the cost is generally cheaper. If inertial sensors (gyroscopes and accelerometers) are attached to a leg, the angles of leg joints can be estimated (see [911] and commercial products from INSENCO and Xsens). These angle-based systems are extended to estimate whole human body motion [1214]. Theoretically, the position of a leg also can be estimated using the inertial navigation algorithm [15]. However, the position estimation error quickly diverges when low cost inertial sensors are used. If inertial sensors are attached to a foot, the position (in addition to angle estimation) can be estimated using an inertial navigation algorithm. Unlike in the leg case, we know that the foot touches the ground almost periodically during walking. When the foot touches the ground, the velocity of the foot becomes temporarily zero, and during this zero velocity interval, the velocity errors of the inertial navigation algorithm can be reset. This zero velocity updating significantly reduces the position error [16].

Estimation of foot movement by attaching inertial sensors to the foot has been extensively studied in the context of a pedestrian navigation system [17,18]. In the filter-based foot motion estimation, the position error increases as soon as the foot is off the ground, since there are no measurements when the foot is in the air. The position error decreases once the foot touches the ground from the zero velocity updating. Thus, in the filter-based foot motion estimation, the motion estimation is not accurate when the foot is moving, but the final position (after the zero velocity updating) becomes accurate. In the pedestrian navigation system, the final position of the foot (that is, the final position of a person) is the main concern and, thus, the filter-based estimation can be used.

On the other hand, foot motion trajectory is the main concern in gait analysis. The filter estimated position can be improved using the smoother. The filtering algorithm uses the measurement data up to the current time to compute the current estimation. On the other hand, the smoother uses the whole measurement data (including the future data) to compute the current estimation. In [19], a smoother algorithm is proposed based on the forward-backward filter, where a smoothing algorithm is applied for each walking step. The position after the zero velocity updating is used as the initial value of a backward filter. The smoothed result for each step is combined rather heuristically to produce total walking estimation.

In this paper, the smoothing problem is formulated as a global optimization problem, where the whole walking motion is estimated in a single optimization problem. The smoother algorithm is formulated as a quadratic optimization problem (motivated by [20]), where its problem size depends on the total walking time. Since the problem size becomes very large even for a few minutes of walking data, the efficient solution is given utilizing the sparse structure of the problem.

The remainder of the paper is organized as follows. In Section 2, a basic material is introduced defining the coordinate systems and the main variables. In Section 3, a Kalman filter to estimate the foot motion is given. In Section 4, a smoother algorithm to estimate the foot motion is formulated in the quadratic optimization problem. In Section 5, a solution to the quadratic optimization problem is given using the sparse structure of the problem. In Section 6, experiment results are given to verify the proposed algorithm. Concluding remarks are given in Section 7.

2. Problem Formulation

Two-coordinate frames (the body coordinate frame and the navigation coordinate frame) are defined as in Figure 1. The three axes of the body coordinate frame coincide with the three axes of the inertial sensor unit. The z-axis of the navigation coordinate frame coincides with the local gravitational direction. The choice of the x-axis of the navigation coordinate frame can be chosen arbitrarily, since the walking direction is not important in the gait analysis. The notation [p]n ([p]b) is used to denote that a vector p is represented in the navigation (body) coordinate frame.

The position of the foot is defined by [r]nR3, which is the origin of the body coordinate frame expressed in the navigation coordinate frame. Similarly, the velocity of the foot is denoted by [v]nR3. The attitude of the foot is represented using a quaternion qR4, which represents the rotation relationship between the navigation coordinate frame and the body coordinate frame. The directional cosine matrix corresponding to quaternion q is denoted by C(q) ∈ SO(3).

The basic dynamic equations [21,22] of q, r and v are given by:

q ˙ = 1 2 Ω ( ω ) q v ˙ = C ( q ) a b = v
where ω = [ωx ωy ωz ]′ is the angular velocity of the body coordinate frame with respect to the navigation coordinate frame. The symbol Ω(ω) is defined by:
Ω ( ω ) [ 0 ω x ω y ω z ω x 0 ω z ω y ω y ω z 0 ω x ω z ω y ω x 0 ] .

The external acceleration (acceleration related to the movement, excluding the gravitational acceleration) expressed in the body coordinate frame is denoted by abR3.

The goal of this paper is to estimate q, r and v. The estimated values are denoted by , and , respectively The inertial navigation algorithm [19,23] is used to estimate q, r and v, where the equations in Equation (1) are integrated to compute , and . Accelerometer output yaR3 and gyroscope output ygR3 are related to ω and ab as follows:

y a = C ( q ) g ˜ + a b + b a + n a y g = ω + b g + n g
where naR3 and ngR3 are sensor noises. The vector is the local gravitational acceleration, where = [0 0 9.8] is used. The sensor biases are denoted by baR3 and bgR3. It is assumed that the sensor biases are constant and unknown.

Let T be the sampling period of the sensor output. The sampled outputs of ya and yg are denoted by ya,k = ya(kT) and yg,k = yg(kT). The same notation is used for qk, rk and vk. Let N be the final discrete time index of the sensor output, where the starting index is one. The discrete sensor noise na,k and ng,k are assumed to be zero mean white Gaussian noises, whose covariances are given by:

R a = E { n a , k n a , k } R 3 × 3 , R g = E { n g , k n g , k } R 3 × 3 .

Due to high sensor noise level of low cost inertial sensors and unknown biases, an inertial navigation algorithm without external reference measurement can estimate foot motion only for a few seconds. To overcome this problem, a zero velocity updating method is used in an inertial sensor-based foot motion estimation. During walking, the foot touches the ground almost periodically. When the foot is on the ground, we know that the velocity of the foot is zero. Thus, whenever the foot touches the ground, the velocity error in the inertial navigation algorithm can be reset, which significantly reduces foot motion estimation errors. To use this zero velocity updating, zero velocity intervals (that is, when the foot is on the ground) must be detected. Many zero velocity detection algorithms have been proposed [16,24].

In this paper, we use a simple zero velocity detection algorithm. Let Zm be a set of all discrete time indices belonging to the zero velocity intervals. The discrete time k belongs to Zm if the following conditions are satisfied:

y g , i B g , k N g 2 i k + N g 2 y a , i y a i 1 B a , k N a 2 i k + N a 2
where Ng and Na are even number integers.

3. Kalman Filter

In this section, q, r, v, bg and ba are estimated using a Kalman filter. The estimated values are denoted by KF, KF, KF, g,KF and a,KF. As in [19,23], qkba,k are not directly estimated in the Kalman filter. They are first estimated from the integration equation of (1), and then, the errors in the integrated values are estimated in the Kalman filter. These estimated values will be used in Section 4 to derive a smoothed estimation.

3.1. Initialization

Since only the relative position is important in the gait analysis, the initial position is assumed to be zero: that is, kf,1 = 03×1, where “1” denotes the initial discrete time index. Assuming that a person is not moving at the initial time, the initial attitude is computed using the triad algorithm [25,26]. The following two vector relations are used in the triad algorithm:

[ y a ] b = C ( q ̂ K F , 1 ) [ 0 0 1 ] [ 1 0 0 ] = C ( q ̂ K F , 1 ) [ 1 0 0 ] .

The pitch and roll angles are determined from the first vector relation, and the yaw angle is determined from the second vector relation. Since the heading of walking is not important in the gait analysis, the yaw angle can be chosen arbitrarily.

The initial velocity is chosen to be zero: that is, KF,1 = 03×1. If there is no particular information on bg and ba, the initial estimates are chosen to be zero (g,KF,1 = a,KF,1 = 03×1).

3.2. Integration of Estimated Values

Suppose we have computed KF,k, KF,k, ⋯ , a, KF,k at the discrete time k. The estimated values at the discrete time k + 1 are firstly computed using Equation (1), where ω and ab are replaced by ygg and yaC(q̂)g̃ − b̂a:

q ̂ ˙ = 1 2 Ω ( y a b ̂ a ) q ̂ = 1 2 Ω ( ω + n g b ̂ g ) q ̂ v ̂ ˙ = C ( q ̂ ) ( y a b ̂ a ) g ˜ = C ( q ̂ ) ( a b + n a + b a b ̂ a ) + ( C ( q ̂ ) C ( q ̂ ) I ) g ˜ r ̂ ˙ = v ̂ .

For later use, we define a function fk, which represents a numerical integration of Equation (6) from kT to (k + 1)T:

[ q ̂ K F , k + 1 r ̂ K F , k + 1 v ̂ K F , k + 1 ] = f k ( [ q ̂ K F , k r ̂ K F , k v ̂ K F , k ] , [ n g , k n a , k ] , [ b g b ̂ g , k b a b ̂ a , k ] ) .

We assume that the variables not used as arguments of fk are embedded in fk: for example, the ω, C(q) and terms are assumed to be embedded in the function fk.

3.3. Kalman Filter

Due to noise terms (ng,k and na,k) and bias estimation error (bgg,k and baa,k), there are errors in the numerically-integrated values of Equation (7). These errors are estimated using a Kalman filter. Let XKF,k be defined by:

X K F , k = [ q ¯ K F , k r ¯ K F , k v ¯ K F , k b ¯ g , K F , k b ¯ a , K F , k ] = [ [ 0 3 × 1 I 3 ] ( q ̂ K F , k * q k ) r k r ̂ K F , k v k v ̂ K F , k b g b ̂ g , K F , k b a b ̂ a , K F , k ] [ R 3 R 3 R 3 R 3 R 3 ]
where ⊗ is the quaternion multiplication and q* denotes the quaternion conjugate of a quaternion q [21]. The elements of XKF,k represent the estimation errors in KF,ka,KF,k. In defining XKF,k, it is assumed that the quaternion errors in KF,k are small. Thus, (KF,k)* ⊗ qk is approximated by:
( q ̂ K F , k ) * q k [ 1 q ¯ K F , k ] [ R R 3 ] .

With this assumption, the error in KF,kR4 is represented by three-dimensional vector KF,k instead of a four-dimensional vector. See [27] for the details about the multiplicative error notation of a quaternion. The initial estimate is set to KF,1 = 015×1, and the initial error covariance P1 is given by:

P 1 = E { ( X K F , 1 X ̂ K F , 1 ) ( X K F , 1 X ̂ K F , 1 ) } = [ P q , init 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 P r , init 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 P v , init 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 P b g , init 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 P b a , init ] .

The initial attitude error covariance Pq,init is given by the algorithm in [25], where Ra and 1011I3 are used as measurement noise covariances of the first and second equations in Equation (5). The small covariance value for the second equation is to make Pq,init nonsingular, since P q , init 1

is used in the smoothing algorithm. The remaining covariances Pr,initPba,init can be considered as design parameters, whose values are given in Table 1.

The dynamic equation of XKF,k is given by:

X K F , k + 1 = [ Φ k + 1 , k Ψ k + 1 , k 0 9 × 6 I 6 ] X K F , k + [ w k 0 6 × 1 ]
where:
e A k T = [ Φ k + 1 , k Ψ k + 1 , k 0 9 × 6 I 6 ] [ R 9 × 9 R 9 × 6 R 6 × 9 R 6 × 6 ]
A k = [ [ y a , k × ] 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 I 3 2 C ( q ̂ K F , k ) [ y a , k × ] 0 3 × 3 0 3 × 3 1 2 I 3 0 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 C ( q ̂ K F , k ) 0 6 × 3 0 6 × 3 0 6 × 3 0 6 × 3 0 6 × 3 ] = [ A k , 1 A k , 2 0 6 × 9 0 6 × 6 ] .

For a vector p = [p1 p2 p3]′ ∈ R3, [p×] is defined by:

[ p × ] = [ 0 p 3 p 2 p 3 0 p 1 p 2 p 1 0 ] .

Note that Ak is a lower triangular matrix, and thus, eAkT is also a lower triangular matrix having the structure in Equation (11) [28].

The process noise wk is the zero mean white Gaussian noise with:

Q k = E { w k w k } = 0 T exp ( A k , 1 r ) [ 1 4 R g 0 3 × 3 0 3 × 3 0 3 × 3 10 6 I 3 0 3 × 3 0 3 × 3 0 3 × 3 R a ] exp ( A k , 1 r ) d r
where the 106 value in Qk is added to make Qk nonsingular, since Q k 1 is used in the smoother. Derivation of Ak and Qk can be obtained by slightly modifying the results in [19,23]. The computational load of eAkT can be reduced by using the following approximation:
e A k T I 15 + A k T + 1 2 ! A k 2 T 2 .

Remark 1

How the estimation error in k-th discrete time evolves after the integration Equation (7) is represented in Equation (10). For example, (10) states that the error in r̂KF,k+1 comes from two sources. One is from the estimation error in k-th time (before the integration), and the other is from the process of numerical integration. The latter is not from the numerical integration error (it is ignored), but from the noise terms and bias estimation errors.

In an inertial sensor-only foot motion estimation, there is no external measurement. The fact that the velocity is zero during the zero velocity intervals is used as a fictitious measurement.

During the zero velocity interval, the following equation can be used as a measurement equation:

0 3 × 1 v ̂ K F , k = [ 0 3 × 3 0 3 × 3 I 3 0 3 × 3 0 3 × 3 ] X K F , k + n r , k , k Z m
where nv,k is a fictitious measurement noise representing the confidence of zero velocity interval detection in Equation (4). The z-axis value of KF,k is almost the same when the foot is on the ground, assuming that a person is walking on a flat floor. Thus, the following measurement equation can also be used during the zero velocity interval.

0 [ 0 0 1 ] r ̂ K F , k = [ 0 1 × 3 0 0 1 0 1 × 3 0 1 × 3 0 1 × 3 ] X K F , k + n r , k , k Z m
where nr,k is a fictitious measurement noise.

We assume that nv,k and nr,k are zero mean white Gaussian noises, where covariances are given by:

R v = E { n v , k n v , k } R 3 × 3 , R r = E { n r , k n r , k } R .

A standard discrete time Kalman filter is applied to Equations (10), (13) and (14). If kZm, we can compute KF,k from the Kalman filter, and these values are used to update KF,kb∈a,KF,k.

The Kalman filter algorithm of position estimation (KF,k) is summarized in the following for k1kk2 assuming that k1Zm, k2Zm and kZm for k1 < k < k2. The algorithm for other values (q̂KF,k, KF,k, b̂g,KF,k and a,KF,k) are similar.

  • discrete time k = k1Zm

    KF,k is given from the previous step

    r̄̂KF,k = 0

  • discrete time k1 < k < k2

    compute KF,k using Equation (7)

    r̄̂KF,k1 = 0 from Kalman filter time update Equation (10) with r̄̂KF,k1 = 0

  • discrete time k = k2Zm

    compute KF,k using Equation (7)

    compute r̄̂KF,k from the Kalman filter measurement update Equations (13) and (14)

    KF,kKF,k + r̄̂KF,k

    r̄̂KF,k1 = 0

The result in this section is not a new result, and similar results can be found in [19].

4. Smoothing Algorithm

In this section, the Kalman filter-estimated values (KF,ka,KF,k) in Section 3 are improved using the smoother, where the errors in KF,k, KF,k, KF,k, b̂g,KF and a,KF are compensated for. To do that, the estimation error is defined as follows.

q ¯ S M , k = [ 0 3 × 1 I 3 ] q ̂ K F , k * q k r ¯ S M , k = r k r ̂ K F , k v ¯ S M , k = v k v ̂ K F , k b ¯ g , S M = b g b ̂ g , K F b ¯ a , S M = b a b ̂ a , K F
where g,KF and a,KF are g,KF,N and a,KF,N (the final values) in the Kalman filter, which can be considered as the most accurate estimation of bg and ba. Since bg and ba are constant, g,SM and a,SM are not time dependent, while SM,k, SM,k and SM,k are time dependent. We note that the estimation errors in Equation (8) represent the errors before the measurement update, while the errors in Equation (16) represent the errors after the measurement update.

Let XSM,k be defined by:

X S M , k = [ q ¯ S M , k r ¯ S M , k v ¯ S M , k ] .

Equations for time-dependent variables (SM,k, SM,k and SM,k) are given by:

ζ k + X S M , k + 1 = Φ k + 1 , k X S M , k + ψ k + 1 , k [ b ¯ g , S M b ¯ a , S M ] + w k
where Φ and Ψ are defined in Equation (11) and:
ζ k = [ q ˜ S M , k r ̂ K F , k + 1 f 2 , k v ̂ K F , k + 1 f 3 , k ] ,
[ f k , 1 f k , 2 f k , 3 ] = f k ( [ q ̂ K F , k r ̂ K F , k v ̂ K F , k ] , [ n g , k n a , k ] , [ b ¯ g , S M b ¯ a , S M ] ) , q ˜ S M , k = [ 0 3 × 1 I 3 ] f 1 , k * q ̂ K F , k + 1 .

Derivation of Equation (18) is now explained. From Equations (16), (19) and (20), we have:

ζ k + X S M , k + 1 = [ [ 0 3 × 3 I 3 ] f 1 , k * q k + 1 r k + 1 f 2 , k v k + 1 f 3 , k ] R 9 .

The second and the third elements of Equation (21) are straightforward. The first element of Equation (21) is derived from the following:

q k + 1 = q ̂ K F , k + 1 [ 1 q ¯ S M , k + 1 ] = f 1 , k f 1 , k * q ̂ K F , k + 1 [ 1 q ¯ S M , k + 1 ] f 1 , k [ 1 q ˜ S M , k + q ¯ S M , k + 1 ]
where the following approximation is used:
f 1 , k * q ̂ K F , k + 1 [ 1 q ˜ S M , k + 1 ] ,
[ 1 q ˜ S M , k ] [ 1 q ¯ S M , k + 1 ] [ 1 q ˜ S M , k + q ¯ S M , k + 1 ] .

From Equation (21), ξk + XSM,k+1 denotes the estimation errors of fk in Equation (20). Thus, Equation (18) represents how the estimation error evolves after the integration Equation (20). Thus, Equation (18) is essentially the same as Equation (10). In the exact same methods in the case of Equation (10), Equation (21) can be obtained by slightly modifying the results in [19,23].

The smoothing problem is formulated as a quadratic optimization problem using the method in [20]. Let an optimization variable be defined by:

X ˜ = [ X S M , 1 X S M , 2 X S M , N b ¯ g , S M b ¯ a , S M ] [ R 9 × N R 6 ] .

The smoothing problem can be formulated as the following quadratic optimization problem:

min X ˜ J ( X ˜ )
where:
J ( X ˜ ) = 1 2 k = 1 N 1 w k Q k 1 w k + 1 2 k Z m ( z k H ˜ k X S M , k ) R ˜ 1 ( z k H ˜ k X S M , k ) + 1 2 ( X S M , 1 X init ) P X init 1 ( X S M , 1 X init ) + 1 2 ( b ̂ g , S M + b ¯ g , S M b g , init ) P b g , init 1 ( b ̂ g , S M + b ¯ g , S M b g , init ) + 1 2 ( b ̂ a , S M + b ¯ a , S M b a , init ) P b a , init 1 ( b ̂ a , S M + b ¯ a , S M b a , init )
X init = [ q ̂ K F , 1 0 3 × 3 0 3 × 1 ] , P X init = [ P q , init 0 3 × 3 0 3 × 3 0 3 × 3 P r , init 0 3 × 3 0 3 × 3 0 3 × 3 P v , init ]
z k = [ 0 3 × 1 v ̂ K F , k 0 [ 0 0 1 ] r ̂ K F , k ] , H ˜ k = [ 0 3 × 3 0 3 × 3 I 3 0 1 × 3 0 0 1 0 1 × 3 ] , R ˜ = [ R v 0 0 R r ] .

Initial information on bg and ba are reflected in bg,initR3 and ba,initR3. For example, bg,init can be computed if a sensor unit is put on the ground without moving for 1∼2 min. If there is no information on bg and ba, we set bg,init and ba,init to zero.

Inserting Equation (18) into Equation (27), we have:

J ( X ˜ ) = 1 2 k = 1 N 1 ( ζ k + X S M , k + 1 Φ k + 1 , k X S M , k Ψ k + 1 , k [ b ¯ g , S M b ¯ a , S M ] ) Q 1 ( ζ k + X S M , k + 1 Φ k + 1 , k X S M , k Ψ k + 1 , k [ b ¯ g , S M b ¯ a , S M ] ) + 1 2 k Z m ( z k H ˜ k X S M , k ) R 1 ( z k H ˜ k X S M , k ) + 1 2 ( X S M , 1 X init ) P X init 1 ( X S M , 1 X init ) + 1 2 ( b ̂ g , S M + b ¯ g , S M b g , init ) P b g , init 1 ( b ̂ g , S M + b ¯ g , S M b g , init ) + 1 2 ( b ̂ a , S M + b ¯ a , S M b a , init ) P b a , init 1 ( b ̂ a , S M + b ¯ a , S M b a , init ) .

It is not difficult to see that Equation (28) is a quadratic function of RN+6:

J ( X ˜ ) = 1 2 X ˜ M 1 X ˜ + M 2 X ˜ + M 3
where M1, M2 and M3 can be computed from Equation (28). M1 and M2 are given in the Appendix (M3 is omitted, since it is irrelevant in the optimization). The minimizing solution of Equation (29) can be computed by solving the following linear equation:
M 1 X ˜ * + M 2 = 0
where * is the minimizing solution.

Once the minimizing solution * is computed, the smoother estimated values are computed using Equation (16). For example, the position estimate is computed as follows:

r ̂ S M , k = r ̂ K F , k + X S M , k *
where SM,k is the smoother estimate of rk and X S M , k * is the 9(k − 1) + 1 ∼ 9k rows of *.

The result in this section is a new result. The main contribution of this section is that the foot motion Kalman filter error is compensated for using the quadratic optimization problem.

5. Smoothing Optimization Solution

Although the smoothing problem boils down to a simple linear Equation (30)M1R(9N+6)×(9N+6) becomes very large when N is large. Suppose we solve Equation (30) using the Cholesky decomposition. Let L be the Cholesky triangle (lower triangular matrix) satisfying:

M 1 = L L .

Once L is computed, * can be computed by the following equation:

L Y ˜ = M 2 L X ˜ * = Y ˜ .

The computational load of Cholesky decomposition Equation (31) is (9N + 6)3/6 flops, and the load for each linear equation in Equation (32) is (9N + 6)2/6 flops [29]. Suppose T = 0.01 and N = 12,000 (2-min walk data), then the computational load of the Cholesky decomposition alone is approximately 2 × 1014 flops, which is practically difficult to compute (due to the very long computation time and large memory requirement).

Fortunately, the matrix M1 has a sparse structure, and the computational load can be reduced using the sparse structure.

We partition M1 and M2 as follows:

M 1 = [ M 11 M 12 | M 12 M 13 ] [ R 9 N × 9 N R 6 × 9 N | R 9 N × 6 R 6 × 6 ] , M 2 = [ M 21 M 22 ] [ R 9 N × 1 R 6 × 1 ] .

We also partition in Equation (29) accordingly:

X ˜ = [ X ˜ 1 X ˜ 2 ] [ R 9 N × 1 R 6 × 1 ]

From the definition of M11 in the Appendix, we can see that M11 is a banded matrix [29] with the bandwidth p = 17:

M 11 = [ * * * * * * * * * * * * * * * * ]
where * denotes the arbitrary 9 × 9 block matrix. All unspecified entries are zero 9 × 9 block matrices.

Equation (30) can be rewritten using the partitions in Equations (33) and (34):

[ M 11 M 12 | M 12 M 13 ] [ X ˜ 1 X ˜ 2 ] = [ M 21 M 22 ]

Equation (36) can be transformed into the following equation using the Schur complement [30]:

( M 13 M 12 M 11 1 M 12 ) X ˜ 2 = M 22 M 12 M 11 1 M 21 M 11 X ˜ 1 = M 21 M 12 X ˜ 2 .

The Equation (37) can be solved in the following sequence [30]. First, find the Cholesky decomposition of banded matrix M11:

M 11 = L 11 L 11
where L11R99N is a lower triangular matrix. Find U1R9N×1 and U2R9N×1 from the following linear equation:
L 11 U 1 = M 12 L 11 U 2 = M 21 .

Inserting Equation (39) into Equation (37), we have:

( M 13 U 1 U 1 ) X ˜ 2 = M 22 U 1 U 2 .

After computing 2 in Equation (40), we compute 1 from the following equations:

L 11 U 3 = M 21 M 12 X ˜ 2 L 11 X ˜ 1 = U 3 .

When solving Equations (38)(41), the algorithms for banded matrices in [29] can be used for efficient computation and memory usage. The computational load of the Cholesky decomposition of the banded matrix Equation (38) is (9N(p2 + 3p))/2 flops (p = 17 is the bandwidth of M11, and 9Np is assumed) and 9N square root computation. The computational load of each equation in Equations (39) and (41) is 9N(p + 1) flops. Equation (40) is a small dimensional problem (2R6).

Compared with the standard method, the solution using the banded structure of M11 requires much smaller computation and memory. For example, the Cholesky decomposition requires approximately 3.6 × 107 flops and 9N square root computation in the case of N = 12, 000. Compared with 2 × 1014 flops in the standard computation case, its computational requirement is significantly small.

The main contribution of this section is to derive an efficient solution to the quadratic optimization problem and to investigate the quantitative computational requirement.

6. Experiment

Two experiments are performed to verify the proposed algorithm. In the experiments, an inertial sensor unit (Xsens MTi sensor unit) is attached on the foot, as shown in Figure 2. The parameters used in both experiments are given in Table 1.

In the first experiment, a person walked three steps, while the movement of the foot is tracked using an optical motion tracking system (Optitrack six Flex 13 camera system). The experimental setup is given in Figure 2. Six optical markers are used in the optical tracking system, and the center position of six markers is used as the true foot position. Since the coordinate systems of the optical tracker and the inertial sensor unit are different, the optical tracker output is rotated and translated.

The estimated position (Kalman filter and the proposed smoother) with the flat floor assumption (see Equation (14)) is given in Figure 3: the left figure is the z-axis movement, and the right figure is the xy-axis position. In the left figure, the zero velocity intervals are represented by the “*” symbol.

Assuming that the motion tracker value is the true position value, we can see that the Kalman filter gives a good final position estimation (around 5 s). However, the position estimated during walking is not accurate; for example, see the values between 2 and 3 s. Thus, the Kalman filter result may be good enough for the pedestrian navigation system, where the final position is important. However, the Kalman result is not good enough for gait analysis, where it is important to know how the foot has moved in addition to the final position. The final estimated position of the smoother is almost similar to that of the Kalman filter. However, we can see that there is significant improvement in the middle foot position estimation.

The z-axis estimation error is compared quantitatively in Table 2. The z-axis estimation error ez,k is defined by:

e z , k = [ 0 0 1 ] ( r k r ̂ k )
where k is either k = KF,k or k = SM,k.

The z-axis estimation error squared sum is given in Table 2. The estimation error of both algorithms during the zero velocity interval (kZm) are almost the same, since the estimated values becomes zero with the flat floor assumption. The estimation error when the foot is in the air are different; the proposed smoother gives significantly smaller estimation error: 0.0020 in the case of the proposed smoother and 0.0807 in the case of the Kalman filter. Furthermore, the maximum z-axis position errors for the Kalman filter and the proposed smoother are 4 cm and 0.5 cm, respectively. This improved estimation is due to the fact the smoother uses all of the available information.

The position estimation by the Kalman filter and the proposed smoother without the flat floor assumption are given in Figure 4. Without the flat floor assumption, we can see that the z-axis error increases since the z-axis position error is not corrected using Equation (14).

Due to the viewpoint constraint of the optical tracker, the walking distance is rather limited in the first experiment. In the second experiment, a person walked 50 m along a straight line on the flat floor. In this experiment, there is no ground truth value, except the z-axis value, which should be almost constant during the zero velocity intervals, since a person walked on a flat floor.

The Kalman filter estimated and smoother estimated positions are given in Figure 5, both with the flat floor assumption. In the Kalman filter result, the estimated xy trajectory is slightly curved. The smoother estimated xy trajectory is a little bit more straight. The true trajectory should be almost a straight line, since the person walked along a straight line.

Similar to the first experiment, there is no significant improvement in the smoother position estimation for the position where the foot is on the floor (that is, after the zero velocity updating). The smoother, however, gives more accurate foot motion estimation while the foot is moving in the air, which is important in the gait analysis. This can be seen in the z-axis graphs: the Kalman filter-estimated z-axis trajectory is not accurate, since the z-axis value cannot be negative (which means the foot is beneath the floor).

The 50-m walk is repeated by four subjects: five times for each person, thus a total of 20 experiments. The total walk length estimation is given in Table 3. The average estimated walk length is 48.99 m with the standard deviation being 0.26 m. From the small standard deviation, the estimation result does not seem to depend on the subjects.

We note that the xy-axis position error increases as the walk length increases. This is unavoidable, since the motion is estimated using the inertial navigation algorithm without any external reference. The z-axis position error increment is limited with the flat floor assumption.

The computation time of the proposed smoother was 8.7 s (MATLAB running on Intel Core i5-2310 CPU Windows PC, 2.9 GHz), where the walk time is 58.92 s (N = 5892).

7. Conclusions

In this paper, a smoother algorithm is proposed for gait analysis to obtain more accurate foot motion estimation than the filter-based estimation. In the smoother algorithm, the motion estimation problem is formulated as a quadratic optimization problem, and an efficient computational algorithm is given.

In the first experiment, we have compared the results of the Kalman filter and the proposed smoother. The Kalman filter-based estimation is quite accurate after the zero velocity update. However, foot motion estimation is not accurate when the foot is in the air. We have shown that the motion estimation is significantly improved for the foot motion in the air if the smoother is used: the z-axis position error squared sum when the foot is in the air is 0.0807 (Kalman filter) and 0.0020 (the proposed smoother). Thus, the proposed smoother is a useful algorithm for gait analysis, where the foot motion estimation is important.

In the second experiment, we investigated a long walk foot motion estimation (50 m). There is not much difference in the final position estimation of the Kalman filter and the proposed smoother. The 50-m walk was tested using four subjects, and we found that the estimation does not depend on the subject. This is not surprising, since there are no person-dependent parameters in the algorithm.

Since the proposed smoother algorithm is more complicated than the Kalman filter, the computational time is slow. In the second experiment, the computation time of the proposed smoother is about 8.7 s to process about one minute of walk data (the sampling period is 0.01 s), while it took 0.8 s for the Kalman filter. Thus, the estimation performance is improved with the additional computation time.

Acknowledgments

This work was supported by National Research Foundation of Korea Grant funded by the Korean Government (No. 2011-0002770).

Conflicts of Interest

The author declares no conflict of interest.

A. Appendix

In this Appendix, M11, M12, M13, M21, M22 (partition of M1 and M2 in Equation (33)) are defined. We use the notation M11[i, j], which represents a R9×9 matrix extracting 9(i − 1) + 1 ∼ 9i rows and 9(j − 1) + 1 ∼ 9j columns of M11. Similarly, we use M12[i] ∈ R9×6 and M21[i] ∈ R9×1 notations.

  • M11

    M 11 [ k , k ] = { P X init 1 + Φ 21 Q k 1 Φ 21 k = 1 Φ k + 1 , k Q k 1 Φ k + 1 , k + Q k 1 , 2 k N 1 Q k 1 , k = N . M 11 [ k , k ] = M 11 [ k , k ] + H ˜ k R ˜ 1 H ˜ k , k Z m M 11 [ k , k + 1 ] = Φ k + 1 , k Q k 1 , 1 k N 1 M 11 [ k + 1 , k ] = Q k 1 , Φ k + 1 , k , 1 k N 1

  • M12

    M 12 [ k ] = { Φ k + 1 , k Q k 1 Ψ k + 1 , k , k = 1 Φ k + 1 , k Q k 1 Ψ k + 1 , k Ψ k , k 1 , 2 k N 1 Ψ k , k 1 , k = N .

  • M13

    M 13 = ( k = 1 N 1 Ψ k + 1 , k Q k 1 Ψ k + 1 , k ) + [ P b g , init 1 0 3 × 3 0 3 × 3 P b a , init 1 ]

  • M21

    M 21 [ k ] = { ζ k Q k 1 Φ k + 1 , k , k = 1 ζ k Q k 1 Φ k + 1 , k + ζ k 1 Q k 1 , 2 k N 1

  • M22

    M 22 = ( k = 1 N 1 ζ k Ψ k + 1 , k ) + [ ( b ̂ g , S M b g , init ) P b g , init 1 0 0 ( b ̂ a , S M b a , init ) P b a , init 1 ]

References

  1. Perry, J. Gait Analysis: Normal and Pathological Function; SLACK Incoporated: Thorofare, NJ, USA, 1992. [Google Scholar]
  2. Lee, H.; Lee, H.; Kim, E. A New Gait Recognition System based on Hierarchical Fair Competition-based Parallel Genetic Algorithm and Selective Neural Network Ensemble. Int. J. Control Autom. Syst. 2014, 12, 202–207. [Google Scholar]
  3. Calliess, T.; Bocklage, R.; Karkosch, R.; Marschollek, M.; Windhagen, H.; Schulze, M. Clinical Evaluation of a Mobile Sensor-Based Gait Analysis Method for Outcome Measurement after Knee Arthroplasty. Sensors 2014, 14, 15953–15964. [Google Scholar]
  4. Whittle, M.W. Gait Analysis: An Introduction, 4th ed.; Elsevier Ltd.: Philadelphia, PA, USA, 2007. [Google Scholar]
  5. Liu, T.; Inoue, Y.; Shibata, K. A wearable ground reaction force sensor system and its application to the measurement of extrinsic gait variability. Sensors 2010, 10, 10240–10255. [Google Scholar]
  6. Windolf, M.; Gotzenb, N.; Morlockb, M. Systematic accuracy and precision analysis of video motion capturing systems—Exemplified on the Vicon-460 system. J. Biomech. 2008, 41, 2776–2780. [Google Scholar]
  7. Zheng, R.; Liu, T.; Inoue, Y.; Shibata, K.; Liu, K. Kinetics Analysis of Ankle, Knee and Hip Joints Using a Wearable Sensor Systems. J. Biomech. Sci. Eng. 2008, 3, 1031–1037. [Google Scholar]
  8. Zhang, B.; Jiang, S.; Wei, D.; Marschollek, M.; Zhang, W. State of the Art in Gait Analysis Using Wearable Sensors for Healthcare Applications. Proceedings of the 2012 IEEE/ACIS 11th International Conference on Computer and Information Science (ICIS), Shanghai, China, 30 May–1 June 2012; pp. 213–218.
  9. Cooper, G.; Sheret, I.; McMillian, L.; Siliverdis, K.; Sha, N.; Hodgins, D.; Kenney, L.; Howard, D. Inertial sensor-based knee flexion/extension angle estimation. J. Biomech. 2009, 42, 2678–2865. [Google Scholar]
  10. Schepers, H.M.; van Asseldonk, E.H.F.; Baten, C.T.; Veltink, P.H. Ambulatory estimation of foot placement during walking using inertial sensors. J. Biomech. 2010, 43, 3138–3143. [Google Scholar]
  11. Liu, T.; Inoue, Y.; Shibata, K. Development of a wearable sensor system for quantitative gait analysis. Measurement 2009, 42, 978–988. [Google Scholar]
  12. van Acht, V.; Bongers, E.; Lambert, N.; Verberne, R. Miniature Wireless Inertial Sensor for Measuring Human Motions. Proceedings of the EMBS 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Lyon, France, 23–26 August 2007; pp. 6278–6281.
  13. Zheng, Y.; Chan, K.C.; Wang, C. Pedalvatar: An IMU-based real-time body motion capture system using foot rooted kinematic model. Proceedings of the 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2014), Chicago, IL, USA, 14–18 September 2014; pp. 4130–4135.
  14. Bulling, A.; Blanke, U.; Schiele, B. A Tutorial on Human Activity Recognition Using Body-worn Inertial Sensors. ACM Comput. Surv. 2014, 46, 1–33. [Google Scholar]
  15. Savage, P.G. Strapdown Inertial Navigation Integration Algorithm Design Part 1: Attitude Algorithms. J. Quid. Control Dynamics 1998, 21, 19–28. [Google Scholar]
  16. Park, S.K.; Suh, Y.S. A Zero Velocity Detection Algorithm Using Inertial Sensors for Pedestrian Navigation Systems. Sensors 2010, 10, 9163–9178. [Google Scholar]
  17. Foxlin, E. Pedestrian Tracking with Shoe-Mounted Inertial Sensors. IEEE Comput. Graph. Appl. 2005, 25, 38–46. [Google Scholar]
  18. Karimi, H.A.; Jiang, M.; Zhu, R. Pedestrian Navigation Services: Challenges and Current Trends. GEOMATICA 2013, 67, 259–271. [Google Scholar]
  19. Suh, Y.S. A Smoother for Attitude and Position Estimation Using Inertial Sensors with Zero Velocity Intervals. IEEE Sens. J. 2012, 12, 1255–1262. [Google Scholar]
  20. Psiaki, M.L. Backward-Smoothing Extended Kalman Filter. J. Guid. Control Dyn. 2005, 28, 885–894. [Google Scholar]
  21. Kuipers, J.B. Quaternions and Rotation Sequences: A Primer with Applications to Orbits, Aerospace, and Virtual Reality; Princeton University Press: Princeton, NJ, USA, 1999. [Google Scholar]
  22. Titterton, D.H.; Weston, J.L. Strapdown Inertial Navigation Technology; IPeter Peregrinus Ltd.: London, UK, 1997. [Google Scholar]
  23. Nam, C.N.K.; Kang, H.J.; Suh, Y.S. Golf Swing Motion Tracking Using Inertial Sensors and a Stereo Camera. IEEE Trans. Instrum. Meas. 2014, 63, 943–952. [Google Scholar]
  24. Skog, I.; Nilsson, J.O.; Handel, P. Evaluation of zero-velocity detectors for foot-mounted inertial navigation systems. Proceedings of International Conference on Indoor Positioning and Indoor Navigation, Hoenggerberg, Switzerland, 15–17 September 2010; pp. 1–6.
  25. Shuster, M.; Oh, S. Three-axis attitude determination from vector observations. J. Guid. Control 1981, 4, 70–77. [Google Scholar]
  26. Cheng, Y.; Shuster, M.D. QUEST and the Anti-QUEST: Good and Evil Attitude Estimation. J. Astronaut. Sci. 2005, 53, 337–351. [Google Scholar]
  27. Markley, F.L. Multiplicative vs. Additive Filtering for Spacecraft Attitude Determination. Proceedings of the 6th Cranfield Conference on Dynamics and Control of Systems and Structures in Space, 8 September 2004; pp. 467–474.
  28. Loan, C.F.V. Computing Integrals Involving the Matrix Exponential. IEEE Trans. Automat. Control 1978, AC-23, 395–404. [Google Scholar]
  29. Golub, G.H.; van Loan, C.F. Matrix Computations; The Johns Hopkins University Press: Baltimore, MD, USA, 1983. [Google Scholar]
  30. Triggs, B.; McLauchlan, P.F.; Hartley, R.I.; Fitzgibbon, A.W. Bundle Adjustment—A Modern Synthesis. Lect. Notes Comput. Sci. 2000, 1883, 298–372. [Google Scholar]
Figure 1. Overview of the foot inertial sensor unit.
Figure 1. Overview of the foot inertial sensor unit.
Sensors 14 24338f1 1024
Figure 2. Experimental setup for the first experiment.
Figure 2. Experimental setup for the first experiment.
Sensors 14 24338f2 1024
Figure 3. Estimated position with the flat floor assumption: z-axis position (Left) and xy-axis position (Right).
Figure 3. Estimated position with the flat floor assumption: z-axis position (Left) and xy-axis position (Right).
Sensors 14 24338f3 1024
Figure 4. Estimated position without the flat floor assumption: z-axis position (Left) and xy-axis position (Right).
Figure 4. Estimated position without the flat floor assumption: z-axis position (Left) and xy-axis position (Right).
Sensors 14 24338f4 1024
Figure 5. Estimated position (50-m walk): z-axis position (Left) and xy-axis position (Right).
Figure 5. Estimated position (50-m walk): z-axis position (Left) and xy-axis position (Right).
Sensors 14 24338f5 1024
Table 1. Parameters of the proposed smoother and Kalman filter.
Table 1. Parameters of the proposed smoother and Kalman filter.
ParameterSymbolValuesRelated Equation
sampling periodT0.01
zero velocity detection parametersBg, Ng, Ba, Na0.2, 10, 0.4, 10(4)
sensor noise error covarianceRg, Ra0.001I3, 0.01I3
measurement noise covarianceRv, Rr0.0001I3,0.0001(15)
filter and smoother parameterPr,init, Pv,init0.0001I3, 0.0001I3(9), (27)
filter and smoother parameterPbg,init, Pba,init0.000001I3, 0.000001I3(9), (27)
Table 2. Estimated z position error squared sum with the flat floor assumption.
Table 2. Estimated z position error squared sum with the flat floor assumption.
Algorithms E 1 = k Z m e z , k 2 E 2 = k Z m e z , k 2E1 + E2
(error squared sum when the foot is on the ground)(error squared sum when the foot is in the air)
Kalman filter0.00080.08070.0815
Proposed smoother0.00090.00200.0029
Table 3. Four persons' 50-m walk experiment results.
Table 3. Four persons' 50-m walk experiment results.
Subject NumberFinal xy Position Estimated Value (m)Average (m)
148.97, 48.97, 49.16, 49.06, 49.0249.04
249.36, 49.29, 49.21, 49.37, 49.1449.27
348.52, 48.98, 48.46, 48.69, 48.4548.62
448.98, 49.00, 48.92, 49.08, 49.0649.01

Share and Cite

MDPI and ACS Style

Suh, Y.S. Inertial Sensor-Based Smoother for Gait Analysis. Sensors 2014, 14, 24338-24357. https://doi.org/10.3390/s141224338

AMA Style

Suh YS. Inertial Sensor-Based Smoother for Gait Analysis. Sensors. 2014; 14(12):24338-24357. https://doi.org/10.3390/s141224338

Chicago/Turabian Style

Suh, Young Soo. 2014. "Inertial Sensor-Based Smoother for Gait Analysis" Sensors 14, no. 12: 24338-24357. https://doi.org/10.3390/s141224338

APA Style

Suh, Y. S. (2014). Inertial Sensor-Based Smoother for Gait Analysis. Sensors, 14(12), 24338-24357. https://doi.org/10.3390/s141224338

Article Metrics

Back to TopTop