Brought to you by:
Paper

Zero velocity interval detection based on a continuous hidden Markov model in micro inertial pedestrian navigation

, , and

Published 26 April 2018 © 2018 IOP Publishing Ltd
, , Citation Wei Sun et al 2018 Meas. Sci. Technol. 29 065103 DOI 10.1088/1361-6501/aab59d

0957-0233/29/6/065103

Abstract

Shoe-mounted pedestrian navigation systems based on micro inertial sensors rely on zero velocity updates to correct their positioning errors in time, which effectively makes determining the zero velocity interval play a key role during normal walking. However, as walking gaits are complicated, and vary from person to person, it is difficult to detect walking gaits with a fixed threshold method. This paper proposes a pedestrian gait classification method based on a hidden Markov model. Pedestrian gait data are collected with a micro inertial measurement unit installed at the instep. On the basis of analyzing the characteristics of the pedestrian walk, a single direction angular rate gyro output is used to classify gait features. The angular rate data are modeled into a univariate Gaussian mixture model with three components, and a four-state left–right continuous hidden Markov model (CHMM) is designed to classify the normal walking gait. The model parameters are trained and optimized using the Baum–Welch algorithm and then the sliding window Viterbi algorithm is used to decode the gait. Walking data are collected through eight subjects walking along the same route at three different speeds; the leave-one-subject-out cross validation method is conducted to test the model. Experimental results show that the proposed algorithm can accurately detect different walking gaits of zero velocity interval. The location experiment shows that the precision of CHMM-based pedestrian navigation improved by 40% when compared to the angular rate threshold method.

Export citation and abstract BibTeX RIS

1. Introduction

The rapid development of micro electro mechanical system (MEMS) inertial sensors has promoted the possibility of an indoor pedestrian navigation system. The well-designed micro inertial measurement unit (MIMU), based on MEMS technology, meets the requirements of pedestrian navigation applications of low cost, small size, light weight and low power consumption. Therefore, a pedestrian navigation scheme can be carried out with a MIMU mounted on the wrist, waist or foot [13]. A pedestrian navigation system based on MEMS MIMU mainly depends on a strapdown inertial navigation system (SINS) algorithm with zero velocity update (ZUPT) technology. The SINS algorithm calculates the 3D navigation parameters (namely attitude, velocity and position) of each step use the sensors data collected by the MIMU. However, the calculated position errors of the pure inertial mechanization will be accumulated three times with time due to drift errors and low accuracy of the MEMS inertial sensors. Therefore, ZUPT technology is usually adopted to restrict error accumulation while using the SINS algorithm to calculate position parameters. A Kalman filter is designed with measurement information introduced during zero velocity intervals to correct the inertial navigation errors and improve the system accuracy [46].

The accurate implementation of the ZUPT technology depends on the validity and accuracy of gait detection and zero velocity interval extraction. There are several research works focusing on improving the gait detection accuracy, and that have conducted plenty of theoretical research and experimental validation. Generally, the data features used in gait detection include one or some combinations of acceleration magnitude, moving average, moving variance, angular rate magnitude, moving average and energy [7]. The detection algorithms mainly adopted can be classified into two categories: threshold based discrimination methods and machine learning based methods. The threshold methods set threshold values based on the selected data features, combined with the time durations of a specific walking status to make discrimination [78]. These methods are easily implementated and could be effective for specific fixed gait detection of a single individual; they only require analysing gait characteristics and setting the appropriate thresholds to ensure high accuracy. Nevertheless, their performance is comparatively poor as to adaptability for different individuals and different walking patterns. Machine learning based methods include naive Bayesian classification, support vector machine classification, hidden Markov model, etc [911]. They utilize sensors data features to train classifiers. The model with better generalization performance can be obtained by learning and optimizing the parameters from the training set, which contains various patterns of gait, and the adaptability of different gait detection can be improved with a well trained model. However, these methods need to carry out a large amount of data collection work to ensure that the training set contains the most comprehensive data characteristics of various walking gaits. Therefore, these methods are of high complexity and depend on the performance of the model.

The zero velocity interval of a pedestrian is short in the entire gait cycle, and the existing zero velocity interval detection methods usually use acceleration or angular rate data or the fusion of various data, and set some corresponding thresholds to distinguish them. Another method is based on K mean clustering algorithm adaptive detection, but its fundamental principle remains the threshold method [12]. In this paper, based on the analysis of the data characteristics of foot-mounted micro inertial sensor output, a pedestrian gait detection algorithm based on the continuous hidden Markov model is proposed. The Gaussian mixture model is adopted to model the y-axis angular rate, and a four-state left–right hidden Markov model (HMM) is designed according to the pedestrian gait transition rule. Finally, experiments are carried out to verify the feasibility of the proposed algorithm.

2. Gait detection model based on HMM

2.1. Model selection

Pedestrian walking gait features can be reflected by the output data of inertial sensors (accelerometers and gyros). By analyzing the inertial sensor output data of each axis, the y-axis angular rate is chosen as the measurement due to its curve that can best reflect the pedestrian walking gait. In the foot-mounted pedestrian navigation system, the y-axis angular rate is directly observed, while the expected extraction of the walking gait transition is hidden and invisible. Therefore, an HMM can be applied to realize the gait detection problem; the corresponding hidden states can be estimated by making full use of the visible output information in probability form.

According to the output data features, the HMM can be categorized into discrete output HMM (DHMM) and continuous output HMM (CHMM) [10]. The gyro output is a continuously changing value in a pedestrian navigation system, which can be discretized into some visible symbols by setting corresponding thresholds, then symbol discrimination based DHMM can be carried out for gait classification [13]. However, although the literature has proposed a variety of threshold rules, threshold discrimination methods always have some limitations, in that they are difficult to be adapt to different gaits. Therefore, considering the gyro continuous output data directly, a multi-component Gaussian mixture model is adopted in this paper, to estimate the probability of the original data belonging to a certain Gaussian component based on Bayesian theory [14, 15]. Then the CHMM is constructed to decode the Gaussian mixture model to reveal the latent states (i.e. the walking gait) hidden under the original data [16, 17].

Walking gait usually varies with individuals; for a specific individual, the gait phases exhibit periodic characteristics. In this study, a gait is defined as the state transition process of one foot: it starts with one foot standing still on the ground and ends up with the same foot falling to the ground. A gait can be divided into four stages, i.e. the total states $N=4$ , and they are depicted as $\boldsymbol{S}=\left\{{{S}_{1}},{{S}_{2}},{{S}_{3}},{{S}_{4}} \right\}$ , and the state at time $t\left(1\leqslant t\leqslant T \right)$ is depicted as ${{q}_{t}}\left({{q}_{t}}\in \boldsymbol{S} \right)$ . While a pedestrian is walking normally, his/her feet always alternatively keep static relative to the ground and then swing in the air, which successively go through four key time points, i.e. heel off (HO), toe off (TO), heel strike (HS) and toe strike (TS). The gait states are divided up as ${{S}_{1}}$ : TS-HO, ${{S}_{2}}$ : HO-TO, S3: TO-HS and ${{S}_{4}}$ : HS-TS. For normal walking, with the known foot state at any time, the state transition rule of one step is restricted as: the next state can only remain the current state or forward transfer to the next state, while backward transfer to the past state or forward transfer to a non-adjacent state is illegal, e.g. the transitions of ${{S}_{2}}\to {{S}_{2}}$ and ${{S}_{2}}\to {{S}_{3}}$ are allowed while the transition of ${{S}_{2}}\to {{S}_{1}}$ or ${{S}_{2}}\to {{S}_{4}}$ is unachievable. The occurrence epoch of each state transition are depicted in figure 1 as HO: ${{S}_{1}}\to {{S}_{2}}$ , TO: ${{S}_{2}}\to {{S}_{3}}$ , HS: ${{S}_{3}}\to {{S}_{4}}$ and TS: ${{S}_{4}}\to {{S}_{1}}$ . The property of gait transition is consistent with the left–right HMM, therefore, the state transition model adopted in this paper is depicted in figure 2.

Figure 1.

Figure 1. Gyro signal with gait transition.

Standard image High-resolution image
Figure 2.

Figure 2. Gait transition model.

Standard image High-resolution image

2.2. Model parameters

The circles in figure 2 are the four defined states, arrows indicate the possible state transition directions in every single step, and the figures above each arrow specify the corresponding state transition probability. Thus, considering the state transition characteristics of the left–right HMM, the state transition matrix of the walking gait is defined as equation (1) [17].

Equation (1)

where ${{a}_{ij}}$ is the conditional probability of state ${{S}_{i}}$ at time $t$ to transfer to state ${{S}_{j}}$ at time $t+1$ , i.e.

Equation (2)

The state transition probability ${{a}_{ij}}$ satisfies the normal stochastic constraints

Equation (3)

The output of the y-axis gyro is modeled as a Gaussian mixture model with three Gaussian components, and the observation probability of the continuous observation ${{O}_{t}}$ generated by state ${{S}_{j}}$ at time $t$ is denoted as ${{b}_{j}}({{O}_{t}})$ , then the relationship between the hidden walking gait and the real observable output can be determined by the output probability distribution $\boldsymbol{B}=\left\{{{b}_{j}}({{O}_{t}}) \right\}$ , where

Equation (4)

where ${{O}_{t}}={{\omega }_{yt}}$ is the y-axis angular rate observations at time $t$ , $\boldsymbol{G}({{\mu }_{jm}},{{\Sigma }_{jm}},{{O}_{t}})$ represents the Gaussian model, and ${{c}_{jm}}$ is the accounted weight of the mth $\left(m=1,2,3 \right)$ Gaussian component conditioning on state ${{S}_{j}}$ , and it satisfies the following constraints

Equation (5)

where ${{\mu }_{jm}}$ and ${{\Sigma }_{jm}}$ are the mean and covariance matrix of the mth Gaussian component conditioning on state ${{S}_{j}}$ respectively.

The prior probability of each state at the initial time is also necessary in HMM applications; it reveals the probability $\pi =\left\{{{\pi }_{i}} \right\}$ that the system may start in a specific state at time $t=1$ , where

Equation (6)

and ${{\pi }_{i}}$ meets the constraints

Equation (7)

To sum up, the continuous output HMM of pedestrian gait can be denoted by $\boldsymbol{\lambda }=(\boldsymbol{A},\boldsymbol{B},\boldsymbol{\pi })$ .

3. Zero velocity detection

3.1. Parameter training

For parameter training, a key aspect is the reference or labeled observation sequence, i.e. the true gait transitions extracted from the observations. For this purpose, an optical tracking system or footswitches based on force-sensitive resistors have been adopted in the literature [7, 14]. In our study, we utilized two footswitches, one placed under the heel and the other under the first toe, to record the gait cycle according to the force generated by walk.

According to the pedestrian walking patterns, the induction can be explicitly conducted based on the fact that the time of gait transition is far less than that of it remaining unchanged in each gait cycle. Therefore, when setting the initial value of the state transition matrix, the diagonal elements ${{a}_{ii}}$ should be set at large values while the non-diagonal elements ${{a}_{ij}}(i\ne j)$ at small ones. Specifically, in this paper it is set to

Equation (8)

Since the collected walking data may not always start from standstill, the probability distribution of the initial state is set to

Equation (9)

The initial probability distribution of the gyro output based on the Gaussian mixture model is difficult to estimate, hence the mixture matrix ${{c}_{jm}}$ and all Gaussian component parameters ${{\mu }_{jm}}$ , ${{\Sigma }_{jm}}$ ($1\leqslant j\leqslant 4,\ 1\leqslant m\leqslant 3$ ) are randomly generated by Gaussian distribution.

The initial model can be denoted by ${{\boldsymbol{\lambda }}^{(0)}}=\left({{\boldsymbol{A}}^{(0)}},{{\boldsymbol{B}}^{(0)}},{{\boldsymbol{\pi }}^{(0)}} \right)$ ; after the initial values of the model parameters are determined, they can be adjusted and optimized using the Baum–Welch algorithm in combination with the actual observation data. The parameters estimation formulas are listed in equations (10)–(14) [10].

Equation (10)

Equation (11)

Equation (12)

Equation (13)

Equation (14)

where ${{\alpha }_{t}}\left(\,j \right)$ is the forward variate

and ${{\beta }_{t}}\left(i \right)$ is the backward variate

${{\gamma }_{t}}(\,j,m)$ represents the probability that the output angular rate conditioning on state $j$ at time $t$ belongs to the mth Gaussian model.

Equation (15)

The Baum–Welch algorithm is an expectation maximization algorithm specifically applied in HMM parameter training problems. It optimizes model parameters through recursively conducting E-step and M-step utilizing the given observation sequence and the initial model parameters. In the E-step, the expectation of the log likelihood function of the most probable hidden state sequence is calculated by using the estimated parameters and the observation sequence, while in the M-step, the maximum value of the log likelihood function is calculated, and the improved model parameters are obtained. We set the maximum number of iterations and convergence conditions, and stop the iteration when the log likelihood is less than the set value to meet the convergence conditions or the iteration times is up to the upper limits.

3.2. Model validation

After the model parameters are well determined, the state ${{q}_{t}}$ at time $t$ can be estimated by the correspondent output ${{O}_{t}}$ using the Viterbi algorithm [10]

Equation (16)

Equation (17)

Equation (18)

where ${{\delta }_{t}}(\,j)$ is the probability of the system in state ${{S}_{j}}$ at time $t$ after a sequence of state transitions, ${{\varphi }_{t}}(\,j)$ is the state value, and ${{q}_{t}}$ is the maximal probability state at time $t$ .

Equations (16)–(18) show that for a given observation sequence with length T (denoted as ${{O}_{1}},{{O}_{2}},\cdots ,{{O}_{T}}$ ), the application of the standard Viterbi algorithm to decode the optimal hidden state sequence (denoted as ${{q}_{1}},{{q}_{2}},\cdots ,{{q}_{T}}$ ) requires two processes. First, the optimal observation probability is calculated recursively from t  =  1 to t  =  T, which is similar to the forward algorithm of the hidden Markov model evaluation problem. Then, optimal state path backtracking from t  =  T to t  =  1. Although the standard Viterbi algorithm can effectively decode the hidden state sequence, it requires traversing the entire observation sequence and starting a hidden states search from the last observation, which cannot meet the demand for real-time detection of zero velocity interval of pedestrian navigation. The sliding window method can be used for online decoding, and the Viterbi algorithm is used to decode the local optimal hidden state sequence in the selected window length, before the window moves to the next position; only the first decoded hidden state in the window is reserved. On the one hand, the window length should be reduced as small as possible considering it determines the time delay, while on the other hand, the state sequence obtained by a windowed Viterbi algorithm is locally optimal, which may make the decoded results with a short window different from the results utilizing the whole observation sequence. Therefore, it is a trade-off between the time delays and decoding accuracy to determine the window length.

The leave-one-subject-out cross validation is a special case of the k-fold cross validation method; its main idea is that in the hypothesis there are n samples, n  −  1 samples are selected as the training set to train the model, and the remaining sample as a test set to validate the model. Training and testing is carried out in this way in turns, and finally a total of n models are obtained and carried out n times for validation [14]. The leave-one-subject-out method has the advantage that the sample is uniquely divided. The training set is only one less than that of the sample set, so the training model is pretty similar to the expected model. However, the disadvantage of the method is that it is not suitable for model training and testing with large data sets, but it can be the best choice for a few pedestrian walking experiments.

Four states are contained in the decoding results, where the state ${{S}_{1}}$ is the desired zero velocity interval while the states ${{S}_{2}}$ , ${{S}_{3}}$ and ${{S}_{4}}$ make up the swing phase together.

4. Experimental results and analysis

4.1. Zero velocity detection

In order to verify the adaptability of the proposed algorithm to detect different walking gaits, eight subjects (five men and three women) carried out the straight-line walking experiments along the same trajectory with three different walking speeds, including slow walk, normal walk and fast walk. Their walking trajectory was fixed to be the same, but their walking speeds were chosen by themselves as they felt suitable. Each subject walked ten times at each speed they chose, and each walk was carried out independently. Therefore, the total number of collected data sets was 240. In the experiment, the MIMU was installed on the instep of the right foot, and the data was collected at a sample rate set to 100 Hz. Considering the length of collected data was different due to the different walking speeds and different subjects, only 40 second y-axis angular rate data was extracted from every recorded data for the algorithm validation.

The leave-one-subject-out method (introduced in section 3.2) was carried out to perform the cross validation, and the initial model parameters were adopted as in section 3.1. Firstly, a set of data (1 of the total 240 data sets) was randomly selected as the test set and the model was trained by the remaining 239 sets of experimental data. The model parameters converged after nine iterations. The log likelihood values are shown in figure 3 and the trained model parameters list as follows. The initial state probability distribution is

and the state transition matrix is

and the GMM parameters ${{c}_{jm}}$ , ${{\mu }_{jm}}$ and ${{\sigma }_{jm}}$ ($1\leqslant j\leqslant 4,\ 1\leqslant m\leqslant 3$ ) are separately given as

Figure 3.

Figure 3. Log-likelihood in each iteration.

Standard image High-resolution image

Then, the selected test set data was used to carry out gait discrimination with the obtained model. The window length was set to 10, which meant the time delay was 0.1 s, and the decoding result is depicted in figure 4. The dotted line is the y-axis angular rate while the ladder shape solid line corresponds to the four classified walking gait results. Compared with the angular rate curve, the CHMM trained with the training set data can accurately carry out gait classification on the test set data, and the last time of the extracted zero velocity interval (the state ${{S}_{1}}$ ) was long, which provided a reliable guarantee for the implementation of ZUPT to correct the accumulated navigation errors.

Figure 4.

Figure 4. Results of gait classification.

Standard image High-resolution image

In addition, the influence of initial values was further examined. Since the Gaussian parameters are initialized randomly by Gaussian distribution, the initial state transition matrix is mainly studied. We changed the diagonal elements in equation (8) from 0.6 to 0.95 with a step of 0.05 and examined the trained parameters. The experimental results showed that the initial value of the model parameters only affects the number of iterations required for convergence in the model training process, with little effect on the optimal parameters of the model. Specifically, the mean values of the tuned diagonal elements in the state transition matrix were (0.8463, 0.8728, 0.8054, 0.8162) and the standard deviations were (0.0054, 0.0104, 0.0092, 0.0208).

The false positive rate (FPR) and false negative rate (FNR) are two criteria that reflect the model generalization performance, FPR is defined as the ratio of the false positive (FP) to the negative and FNR is the ratio of the false negative (FN) to the positive, i.e.

According to statistics, the FP rate is 2.8% and the FN rate is about 4.1%.

In order to compare the gait detection results of the continuous output hidden Markov detection algorithm and the threshold discriminant method, the gait detection is performed by the method of the angular velocity threshold, and the threshold value is set at ${{\omega }_{{\rm th}}}$   =  0.5 rad s−1. The comparison results are shown in figure 5. The comparison shows that for most of the time the y-axis angular velocity threshold method can effectively extract the zero velocity interval to form a reasonable gait, but occasionally there will be some short-term unreasonable static, which may prohibit us from carrying out the ZUPT algorithm, while the proposed CHMM algorithm does not exhibit this problem and the detection accuracy improved by 6.5%.

Figure 5.

Figure 5. Comparison of gait detection.

Standard image High-resolution image

4.2. Location experiment

Using the angular rate threshold method and the trained CHMM, zero velocity intervals of a set of normal walking data in a corridor were detected separately. Then, the ZUPT algorithm was carried out during the detected zero velocity intervals to correct navigation errors caused by the micro inertial pedestrian navigation algorithm; the result is shown in figure 6. The thick line represents the actual trajectory, a 45 m corridor, the thin line is the positioning results based on the zero velocity intervals detected by the gyro threshold method, and the dashed line is the positioning results based on the zero velocity intervals detected by CHMM. The results show that the trajectory of the CHMM solution is more stable than that of the gyro threshold method, and it is coincident with the reference path in the first 23 m. Both the methods gradually deviate from the reference trajectory after 23 m, which is caused by the heading divergence due to the inertial navigation, and it requires external conditions to be restricted. The final position deviation caused by the threshold method reaches 1.20 m, while that caused by the CHMM is 0.72 m, and the position accuracy is improved by 40% compared to the former.

Figure 6.

Figure 6. Walking trajectory.

Standard image High-resolution image

5. Conclusions

According to the state of the foot, pedestrian normal walking can be classified according to the state of the foot so that the different states of the foot can be effectively detected and the zero velocity interval can be obtained accurately. Based on this idea, this paper combined the characteristics of the state transition matrix of the HMM and the continuous output Gaussian mixture model. The walking process of pedestrians was abstracted as a fourth order continuous output HMM. The Baum–Welch algorithm was used to train and optimize model parameters, and then the sliding window Viterbi algorithm was used to estimate the state from the output value, thereby achieving zero velocity detection in the walking process. Finally, the leave-one-subject-out method was applied to cross validate the proposed zero velocity detection algorithm. The experimental results show that the proposed algorithm can effectively detect the zero velocity interval in normal walking gait. The test results are of high reliability and good stability, and have reference value for improving the accuracy of pedestrian navigation.

Acknowledgment

This study was supported in part by the Program for Liaoning Excellent Talents in University (LJQ2015044), Liaoning BaiQianWan Talents Program (201576), Basic Research Project in Higher Education of Department of Education of Liaoning (LJ2017FAL005), Key Laboratory for Aerial Remote Sensing Technology of National Administration of Surveying, Mapping and Geoinformation (NASG) (2015B11), Key Laboratory of Precise Engineering and Industry Surveying of National Administration of Surveying, Mapping and Geoinformation (PF2015-13) and the Graduate education innovation program of Liaoning Technical University (YS201608).

Please wait… references are loading.
10.1088/1361-6501/aab59d