Home | About | Journals | Submit | Contact Us | Français |

**|**HHS Author Manuscripts**|**PMC5363411

Formats

Article sections

- Abstract
- I. Introduction
- II. Kinematics of the Human Leg
- III. Extended Kalman Filter Model
- IV. Implementation
- V. Analysis and Results
- VI. Conclusion
- References

Authors

Related links

Proc Am Control Conf. Author manuscript; available in PMC 2017 March 23.

Published in final edited form as:

Published online 2013 August 16. doi: 10.1109/ACC.2013.6579926

PMCID: PMC5363411

NIHMSID: NIHMS847706

Department of Electrical Engineering, University of Texas at Dallas, Richardson, TX 75080-3021

The publisher's final edited version of this article is available at Proc Am Control Conf

In this work, we present a novel method to estimate joint angles and distance traveled by a human while walking. We model the human leg as a two-link revolute robot. Inertial measurement sensors placed on the thigh and shin provide the required measurement inputs. The model and inputs are then used to estimate the desired state parameters associated with forward motion using an extended Kalman filter (EKF). Experimental results with subjects walking in a straight line show that distance walked can be measured with accuracy comparable to a state of the art motion tracking systems. The EKF had an average RMSE of 7 cm over the trials with an average accuracy of greater than 97% for linear displacement.

Gait analysis has the potential to provide diagnostic information about the functioning of the musculoskeletal, vestibular, and central and peripheral nervous system. It can detect functional degradation in these systems associated with age, disease, obesity, and trauma. The analysis and monitoring of walking patterns and gait offer many useful applications in geriatrics [1], fall risk assessment [2], disease monitoring [3], [4], sports training [5], and rehabilitation [6]. Recently, indoor pedestrian localization has received increased attention, with applications in navigation and assisting first responders and security personnel [7]–[10]. These projects seek to estimate a person’s position and/or displacement over time in GPS denied environments. We present a novel approach that can simultaneously address both of these problems by leveraging the kinematics of the human leg.

Gait analysis requires accurate measurements or estimates of body position, mechanics, and movements. Estimating related parameters with the fewest, smallest sensors is a challenging research problem. Many rsearchers have focused on inertial measurement units (IMUs), including gyroscopes and accelerometers, as portable sensors for gait analysis. Some previous research has employed only gyroscopes for gait analysis. Tong et. al. used multiple gyroscope configurations to measure angular velocities and inclination for each segment of the leg along with the knee angle [11]. They used this data along with force sensitive resistors to determine stride length and gait phases. In [12], Aminian et. al. used a gyroscope on each shin and on the right thigh to analyze velocity and stride length based on wavelet analysis. Further research in this area has used IMUs with a combination of accelerometers and gyroscopes. Using a single IMU on the shin, Li et. al. [13] calculate real time stride-by-stride walking speed and slope. Sabatini et. al. used a single IMU on the foot to measure stride length, walking speed, and incline [14]. Alvarez et. al. also use a single IMU placed on the foot [15] to estimate walking distance. Lan and Shih use a waist-mounted IMU and detect the oscillations that a human undergoes while walking and use this to estimate stride length [10]. Alvarez et al. use a similar method of stride length estimation from a waist-worn IMU and add orientation from gyroscopes [9]. Bebek et al. implement a shoe-worn IMU with sensors to detect when the foot is on the ground to reduce estimation error [16].

Our previous work developed a linear Kalman filter to estimate gait parameters and distance traveled [17]. In this work, we propose an extended Kalman filter (EKF) model that utilizes a robotic kinematic model and knowledge of human motion to estimate displacement based on gyroscope measurements. While several previous researchers have used Kalman filters to estimate displacement, they seem to be based on Inertial Navigation Systems (INS), in which gyroscopes and accelerometers are integrated to give velocity and displacement. To our knowledge, this is the first time kinematics of the leg have been used to design an extended Kalman filter.

Our EKF model exploits the similarities between the kinematics of a two-link robot arm and the kinematics of the human leg. We place gyroscopes on the thigh and the shin. A forward kinematic model uses the measurements to obtain joint angle displacement over time. The geometry of our work is similar to one of the configurations in [11] where a two segment model is considered using gyroscopes for turning and gait phase analysis. Our work uses the gyroscope measurements to inform an EKF model based on robot kinematics. We use this to estimate the linear distance traveled by a subject walking. The displacement estimates of the EKF correspond to the foot with respect to the hip, and the joint angles and angular velocities correspond to the hip and knee. To get the forward displacement, we estimate position based on cumulative displacement of the foot. This research is an important initial investigation as it could be extended towards accurate human positioning with wearable sensors. Compared to our previous development in [17], the nonlinear model allowed by the EKF has lead to increased accuracy. For foot displacement over an average walking distance of 3.55 meters, the new EKF has an average error of 6.89 cm versus 19.8 cm in the prior design, using the same input data.

The paper is arranged as follows. Section II discusses theory behind the kinematics considered and how it relates to human gait. Section III describes the basics of the EKF and the state space model for our discussion. Section IV gives the details on the experimental set up and Section V gives an analysis of the results obtained.

In order to design an effective EKF, we need a model of the human leg. A kinematic model helps us to relate the angles and positions of individual limbs and the actual forward displacement of the body. The primary joints in the human leg used for locomotion (as opposed to balance) while walking are the hip and the knee. During straight line walking, hip and knee flexion and extension occur while keeping both the shin and thigh in a single plane which is approximately parallel to the direction of motion.

To establish the forward kinematics, we model the human leg as a two-link revolute robot. In taking a single step forward, the human leg is similar to a two-link robot manipulator with the hip and knee as two joints. We assign three-dimensional Cartesian reference frames to each joint, as seen in Fig. 1. Frames *F*_{0}, *F*_{1} and *F*_{2} are assigned to the hip, knee and foot, respectively. Frame *F*_{0} is oriented such that the *x*-axis is in the direction of motion, the *y*-axis is up, and the *z*-axis is out from the hip to the right. The subsequent frames are chosen as per Denavit-Hartenberg (D-H) convention [18]. Homogeneous transformation matrices are used to map the coordinates of a point in one frame into another frame. The homogeneous transformation matrices between the frames are given by

$${T}_{1}^{0}=\left[\begin{array}{cccc}\mathit{cos}({\theta}_{1})& -\mathit{sin}({\theta}_{1})& 0& {a}_{1}\mathit{cos}({\theta}_{1})\\ \mathit{sin}({\theta}_{1})& \mathit{cos}({\theta}_{1})& 0& {a}_{1}\mathit{sin}({\theta}_{1})\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right]$$

(1)

$${T}_{2}^{1}=\left[\begin{array}{cccc}\mathit{cos}({\theta}_{2})& -\mathit{sin}({\theta}_{2})& 0& {a}_{2}\mathit{cos}({\theta}_{2})\\ \mathit{sin}({\theta}_{2})& \mathit{cos}({\theta}_{2})& 0& {a}_{2}\mathit{sin}({\theta}_{2})\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right]$$

(2)

where (1) maps *F*_{0} to *F*_{1} while (2) maps *F*_{1} to *F*_{2}. The scalars *a*_{1} and *a*_{2} are the limb lengths of the human under consideration. Length *a*_{1} corresponds to the length between the hip and the knee while *a*_{2} corresponds to teh length between the knee and the heel of the foot. *θ*_{1} and *θ*_{2} are the relative joint angles as seen in Fig. 1. The transformation between *F*_{0} and *F*_{2} is obtained by multiplying the transformations above and is seen in (3). The first and second rows of the fourth column in (3) represent the equations for the *x* and *y* displacement of the foot relative to the hip frame.

$${T}_{2}^{0}={T}_{1}^{0}{T}_{2}^{1}=\left[\begin{array}{cccc}\mathit{cos}({\theta}_{1}{+\theta}_{2})& -\mathit{sin}({\theta}_{1}{+\theta}_{2})& 0& {a}_{1}\mathit{cos}({\theta}_{1})+{a}_{2}\mathrm{cos}({\theta}_{1}{+\theta}_{2})\\ \mathit{sin}({\theta}_{1}{+\theta}_{2})& \mathit{cos}({\theta}_{1}{+\theta}_{2})& 0& {a}_{1}\mathit{sin}({\theta}_{1})+{a}_{2}\mathit{sin}({\theta}_{1}{+\theta}_{2})\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right].$$

(3)

In this section, we present the state space model and EKF model considered in our system. The state vector is

$$x={[x,y,{\theta}_{1},{\omega}_{1}{,\theta}_{2}{,\omega}_{2},{\beta}_{1},{\beta}_{2}]}^{T}$$

(4)

where *x* and *y* correspond to the horizontal and vertical position of the heel of the foot (i.e. the origin of *F*_{2}) relative to the origin of the hip frame *F*_{0}. *θ*_{1} is the angle of the thigh relative to the hip frame and ω_{1} is the corresponding angular velocity. *θ*_{2} and ω_{2} are the angle and corresponding angular velocity between the shin and the thigh. *β*_{1} and *β*_{2} are the biases from thigh gyroscope and shin gyroscope respectively and are assumed to be constant or very slowly time varying. From (3), the derivative of (4) is

$$\dot{x}=f(x)=\left[\begin{array}{c}-{a}_{1}\mathit{sin}({\theta}_{1}){\dot{\theta}}_{1}-{a}_{2}\mathit{sin}({\theta}_{1}+{\theta}_{2})({\dot{\theta}}_{1}+{\dot{\theta}}_{2})\\ {a}_{1}\mathit{cos}({\theta}_{1}){\dot{\theta}}_{1}+{a}_{2}\mathit{cos}({\theta}_{1}+{\theta}_{2})({\dot{\theta}}_{1}+{\dot{\theta}}_{2})\\ {\omega}_{1}\\ 0\\ {\omega}_{2}\\ 0\\ 0\\ 0\end{array}\right]$$

(5)

This is rewritten as = *Fx* Where

$$F=\left[\begin{array}{cccccccc}0& 0& 0& A& 0& B& 0& 0\\ 0& 0& 0& C& 0& D& 0& 0\\ 0& 0& 0& 1& 0& 0& 0& 0\\ 0& 0& 0& 0& 0& 0& 0& 0\\ 0& 0& 0& 0& 0& 1& 0& 0\\ 0& 0& 0& 0& 0& 0& 0& 0\\ 0& 0& 0& 0& 0& 0& 0& 0\\ 0& 0& 0& 0& 0& 0& 0& 0\end{array}\right]$$

(6)

$$\begin{array}{l}A=-{a}_{1}\mathit{sin}({\theta}_{1})-{a}_{2}\mathit{sin}({\theta}_{1}+{\theta}_{2})\\ B=-{a}_{2}\mathit{sin}({\theta}_{1}+{\theta}_{2})\\ C=-{a}_{1}\mathit{sin}({\theta}_{1})+{a}_{2}\mathit{sin}({\theta}_{1}+{\theta}_{2})\\ D={a}_{2}\mathit{cos}({\theta}_{1}+{\theta}_{2})\end{array}$$

The sensors are gyroscopes on the thigh and shin and measure the angular velocities of the two links. The measurement vector is given by

$$y={[{s}_{1},{s}_{2}]}^{T}={[{\omega}_{1}+{\beta}_{1},{\omega}_{1}+{\omega}_{2}+{\beta}_{2}]}^{T}$$

where *s*_{1} reflects the fact that the thigh angular velocity measurement includes the thigh rotation and the gyro 1 bias. Similarly, the shin angular velocity measurement, *s*_{2}, is a combination of shin rotation, thigh rotation, and the bias of gyro 2, as the shin is connected to the thigh.

The state equations are continuous, but we implement a discrete time EKF. Furthermore, trigonometric terms require linearization of the state equations at each iteration. Following the procedure in [19], we approximate the discrete time matrix as

$${\mathrm{\Phi}}_{k}\approx I+F{T}_{S}$$

(7)

where *T _{S}* is the length of each step. This leads to a discrete time state space system as in [20]

$${x}_{k+1}={\mathrm{\Phi}}_{k}{x}_{k}+{w}_{k}$$

(8)

$${y}_{k}=H{x}_{k}+{v}_{k}$$

(9)

where *k* is the discrete time index, *x _{k}*

$$H=\left[\begin{array}{cccccccc}0& 0& 0& 1& 0& 0& 1& 0\\ 0& 0& 0& 1& 0& 1& 0& 1\end{array}\right].$$

The terms *w _{k}* and

$$Q=\left[\begin{array}{cccccccc}{\sigma}_{\mathit{xy}}& 0& 0& 0& 0& 0& 0& 0\\ 0& {\sigma}_{\mathit{xy}}& 0& 0& 0& 0& 0& 0\\ 0& 0& \frac{{\sigma}_{\theta}^{3}}{3}& \frac{{\sigma}_{\theta}^{2}}{2}& 0& 0& 0& 0\\ 0& 0& \frac{{\sigma}_{\theta}^{2}}{2}& {\sigma}_{\theta}& 0& 0& 0& 0\\ 0& 0& 0& 0& \frac{{\sigma}_{\theta}^{3}}{3}& \frac{{\sigma}_{\theta}^{2}}{2}& 0& 0\\ 0& 0& 0& 0& \frac{{\sigma}_{\theta}^{2}}{2}& {\sigma}_{\theta}& 0& 0\\ 0& 0& 0& 0& 0& 0& {\sigma}_{\beta}& 0\\ 0& 0& 0& 0& 0& 0& 0& {\sigma}_{\beta}\end{array}\right]$$

$$R=\left[\begin{array}{cc}{\sigma}_{1}& 0\\ 0& {\sigma}_{2}\end{array}\right].$$

The process noise matrix *Q* is constant with a block-diagonal structure. We model the process noise on the *x*, *y*, and *β _{i}* variables as independent, and the blocks for the

The EKF assumes that the state at the current time index evolves from the state from previous time index in a Markov process. The expected value of the state is derived from (8), providing the prediction stage of the EKF. It should also be noted that the state transition matrix must be updated at each time index. The equations corresponding to the prediction stage are given as

$${x}_{K+1|k}^{-}={\mathrm{\Phi}}_{k}{x}_{k-1}$$

(10)

$${P}_{k}^{-}={\mathrm{\Phi}}_{k}{P}_{k-1}{\mathrm{\Phi}}_{k}^{T}+Q$$

(11)

where *P _{k}* is the estimate of the error covariance matrix at time

$${K}_{k}={P}_{k}^{-}{H}^{T}{(H{P}_{k}^{-}{H}^{T}+R)}^{-1}$$

(12)

$${x}_{k}={x}_{k}^{-}+{K}_{k}\left({y}_{k}-H{x}_{k}^{-}\right)$$

(13)

$${P}_{k}=(I-{K}_{k}H){P}_{k}^{-}$$

(14)

where *K _{k}* is called the Kalman gain. Note that

The sensors are Telos motes with custom-designed sensor boards [21]. Each sensor consists of a 3-axis accelerometer (LIS3LV02DQ) and an integrated dual-axis gyroscope (IDG-300). The gyros have a a full scale range of ±500°/*sec* and a sensitivity of 2*mV*/°/*sec*. The sensors collect the data and transfer it wirelessly to a base station PC at 50*Hz*. Matlab is used to read and analyze the data. A median filter, over a window of 5 samples, is applied on the data to account for packet losses. While both the gyro and accelerometer data were collected, only the gyro data is used for this work.

For the experiment, two sensors are placed on the right leg of the subject. Sensor 1 is placed on the thigh and sensor 2 was placed on the shin . The sensors are placed on the front of the leg and aligned vertically as shown in Figure 2, and they are oriented to collect the angular velocities of the upper and lower leg. A third sensor was placed on the hip. Reflective markers were placed on the sensors to allow motion tracking using a Vicon system.

Each trial begins and ends with the subject standing with feet parallel. This leads to initial state estimates *x* = 0 m, *y* = 0 m,
${\theta}_{1}=-\frac{\pi}{2}$ radians, *θ*_{2} = 0 radians,
${\omega}_{1}=0\frac{\mathit{rad}}{\mathit{sec}}$,
${\omega}_{2}=0\frac{\mathit{rad}}{\mathit{sec}}$,
${\beta}_{1}={\mu}_{1}\frac{\mathit{rad}}{\mathit{sec}}$,
${\beta}_{2}={\mu}_{2}\frac{\mathit{rad}}{\mathit{sec}}$, where *μ*_{1} and *μ*_{2} are the average values of the thigh and shin gyroscopes respectively collected during initialization when the subject is not moving. The subjects walked between 3 and 4 meters with an average distance of 3.55 meters. Angular velocities are collected from the two sensors as the subjects walk in a straight line. As described in Section III, the measurement vector consists of angular velocities from the two gyroscopes.

In these trials, the hip and foot start and end aligned vertically. Therefore, we can assume the displacement of the hip is equivalent to that of the foot at the end of each trial. In the 2-link kinematic model, the origin frame, *F*_{0}, is assumed stationary. For the human leg, this would mean the hip does not move when the person walks. Additionally, the 2-link model only factors in distance to the heel of the foot. The distance gained by the ball of the foot pushing off, and the rear knee bending is not included in the current model. We acknowledge these errors in our model, which are a sacrifice for simplicity of the model.

To assess the performance of the system, the subject’s motion was also captured using an 8-camera Vicon Time (seconds) system and Vicon Nexus software (Vicon, Oxford, UK). The results using the proposed EKF and sensors are shown for one of the experiments and compared against the data collected from the Vicon system. Vicon systems are accurate within 1 millimeter and are considered one of the most accurate motion measurement systems. Figure 3 shows the estimate of the EKF vs the Vicon data for *θ*_{1}, the angle between the hip and thigh. The EKF estimate tracks well during forward motion of the leg (i.e. increasing angle) and the back swing phase of motion. Fig. 4 shows the the EKF estimate vs. the Vicon data for *θ*_{2}, the angle between the thigh and the shin. This angle has some ringing which occurs around 0 degrees and doesn’t track as well on the positive angles when compared to the Vicon data. The estimate also overshoots slightly at the negative extrema. This may be due to the foot pushing off of the ground at this time and the body moving forward. These motions won’t necessarily change the angle of the leg, but can add additional angular velocity to the sensors. Even with the differences discussed, the angles track well in time and magnitude in relation to the Vicon Data. Figures 5 and and66 show the estimates of the horizontal and vertical displacement of the foot relative to the hip.

To determine the distance covered during the walk, we accumulate all positive displacement in the x-axis of the foot frame. To estimate the additional distance from the foot and other model limitations, the vertical displacement estimate in the y-axis is accumulated and added to the x-axis displacement. Figure 7 compares the displacement estimate of the EKF and the Vicon displacement measurement. The results of the proposed sensors and EKF are very similar to the Vicon data. Our displacement estimate has longer plateaus due to our method of accumulation. The Vicon data is smoother because it is measuring the location of the sensor on the shin, which is stationary for less time than the foot when walking. Considering these differences, the average RMSE over the entire distance walked for all trials averaged 7.00 cm. The EKF distance estimate was, on average, within 3% of the Vicon measurement for linear displacement over all trials. Table II shows the average results for the trials.

The distance estimate had an average error of 6.89 cm where the subjects covered a total distance of 3.55 m on an average. We can see that the EKF estimates are accurate for determining walking distances.

In this work, we modeled the human leg as a two-link robot with an extended Kalman filter and exploited the kinematics to estimate linear distance walked. The EKF was used to estimate the displacement for a person walking in a straight line with high accuracy. We believe that this is an important initial step as we plan to extend this research for a person walking freely and over larger distances. Future efforts will seek to maintain accuracy while allowing for general walking patterns and activities beyond walking. Using accelerometer data in addition to the gyroscope data would allow for tracking of more complex movements such as running and jumping. Additionally, we can look into using IMUs on the feet and the other leg to get a more accurate model of the complete system.

This work was supported in part by the National Science Foundation, under grants CNS-1150079 and CNS-1138396, the National Institute of Health, under grant R15AG037971 and the STARnet, a Semiconductor Research Corporation program sponsored by MARCO and DARPA. Any opinions, findings, conclusions, or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the funding organizations.

1. Reuben D, Siu A. An objective measure of physical function of elderly outpatients: The physical performance test. Journal of the American Geriatrics Society. 1990;38(10):1105–1112. [PubMed]

2. Tinetti M, Speechley M, Ginter S. Risk factors for falls among elderly persons living in the community. New England Journal of Medicine. 1988;319(26):1701–1707. [PubMed]

3. Salarian A, Russmann H, Vingerhoets F, Dehollain C, Blanc Y, Burkhard P, Aminian K. Gait assessment in parkinson’s disease: Toward an ambulatory system for long-term monitoring. IEEE Transactions on Biomedical Engineering. 2004;518:1434–1443. [PubMed]

4. Hausdorff J, Cudkowicz M, Firtion R, Wei J, Goldberger A. Gait variability and basal ganglia disorders: Stride-to-stride variations of gait cycle timing in parkinson’s disease and huntington’s disease. Movement Disorders. 1998;13(3):428–437. [PubMed]

5. Novacheck T. The biomechanics of running. Gait and Posture. 1998;7(1):77–95. [PubMed]

6. Pohl M, Mehrholz J, Ritschel C, Ruckriem S. Speed-dependent treadmill training in ambulatory hemiparetic stroke patients: A randomized controlled trial. Stroke. 2002;33(2):553–558. [PubMed]

7. Gdeke T, Schmid J, Stork W, Mller-Glaser K. Pedestrian dead reckoning as a complementary method for wireless sensor network ad-hoc person localization. Proc of the International Conference on Sensor Networks; 2012.

8. Ojeda L, Borenstein J. Non-gps navigation for security personnel and first responders. Journal of Navigation. 2007:391–407.

9. Alvarez JC, Alvarez D, Lpez A, Gonzlez RC. Pedestrian navigation based on a waist-worn inertial sensor. Sensors. 2012;12(8):10536–10549. [PMC free article] [PubMed]

10. Lan K-C, Shih W-Y. Using simple harmonic motion to estimate walking distance for waist-mounted pdr. Wireless Communications and Networking Conference (WCNC), 2012 IEEE; Apr, 2012. pp. 2445–2450.

11. Tong K, Granat M. A practical gait analysis system using gyroscopes. Medical Engineering and Physics. 1999:87–94. [PubMed]

12. Aminian K, Najafi B, Bula C, Leyvraz P, Robert P. Spatio-temporal parameters of gait measured by an ambulatory system using miniature gyroscopes. Journal of Biomechanics. 2002:689–699. [PubMed]

13. Li MYQ, Naing V, Donelan JM. Walking speed and slope estimation using shank-mounted inertial measurement units. ICORR 2009. 2009:839–844.

14. Sabatini AM, Martelloni C, Scapellato S, Cavallo F. Assessment of walking features from foot inertial sensing. IEEE Transactions on Biomedical Engineering. 2005 Mar;52:486–494. [PubMed]

15. Alvarez JC, Gonzalez RC, Diego Alvarez AML, Rodriguezuria J. Multisensor approach to walking distance estimation with foot inertial sensing. Conference of the IEEE EMBS; Aug, 2007. pp. 5719–5722. [PubMed]

16. Bebek O, Suster M, Rajgopal S, Fu M, Huang X, Cavusoglu MC, Young D, Mehregany M, van den Bogert A, Mastrangelo C. Personal navigation via high-resolution gait-corrected inertial measurement units. Instrumentation and Measurement, IEEE Transactions on. 2010 Nov;59:3018–3027.

17. Nagarajan K, Gans N, Jafari R. Modeling human gait using a kalman filter to measure walking distance. Proc Wireless Health Conference; 2011.

18. Spong MW, Hutchinson S, Vidyasagar M. Robot Modelling and Control. John Whiley and Sons, Inc; 2006.

19. Zarchan P, Musoff H. Fudamentals of Kalman Filtering: A Practical Approach. Third Edition. AIAA; 2009.

20. Welch GBG. An Introduction to the Kalman Filter. University of North Carolina; Chapel Hill, NC: 2006.

21. Polastre J, Szewczyk R, Culler D. Telos: enabling ultra-low power wireless research. Proceedings of the 4th international symposium on Information processing in sensor networks, IPSN ’05; 2005.

PubMed Central Canada is a service of the Canadian Institutes of Health Research (CIHR) working in partnership with the National Research Council's national science library in cooperation with the National Center for Biotechnology Information at the U.S. National Library of Medicine(NCBI/NLM). It includes content provided to the PubMed Central International archive by participating publishers. |