1. Introduction
Gait analysis is an important topic in recent research because it provides an effective method for healthcare and medical treatment. The analysis and monitoring of gaits facilitate the development of useful applications in geriatrics [
1,
2], Parkinson’s disease [
3], and rehabilitation [
4]. The rapid development of inertial sensor technology has enhanced data collecting methods based on human movement. Thus, significant research has been undertaken to analyze the human gait cycle. Tong
et al. [
5] used uni-axial gyroscopes attached to the leg shank and thigh segment to record angular velocity for each segment. Using these velocities, they derived the segment inclination and knee angle to estimate stride length and gait phases. Pappas
et al. [
6] placed a gyroscope and three force sensitive resistors on the shoe sole to create a gait phase detection system that can detect in real-time four gait phases,
i.e., stance, heel-off, swing and heel-strike. Aminian
et al. [
7] attached gyroscope sensors into each shin and on the right thigh to collect angular speed data, and then estimated stride length and velocity based on wavelet analysis.
Recently, an emerging application of gait analysis is the measurement of human walking distance [
7,
8,
9,
10]. Walking distance is an important factor to calculate the energy consumption in healthcare applications [
11]. Moreover, walking distance estimation is also applied in creating Pedestrian Dead Reckoning (PDR) for indoor localization [
12,
13]. Hence, considerable research has been conducted to estimate walking distance [
9,
10,
14]. Specifically, Wang
et al. [
9] created the signal magnitude subtraction (SMS) feature of acceleration to detect gait phases. Then, they used a linear regression model to estimate the step velocity from the acceleration data and created second linear regression model to estimate the step length to calculate the walking distance. In [
14], Fortune
et al. proposed an adaptive threshold-based algorithm for step counting and cadence calculation using triaxial acceleration. Yun
et al. [
10] combined acceleration data with orientation estimated from three angular rate sensors and three orthogonal magnetometers to calculate walking and running distances. Based on the characteristic of zero velocity when the foot contacts the ground, the authors removed the drift error in the acceleration and then double-integrated the data to estimate the distance.
Table 1 summarizes recent results of walking distance estimation with different methods of attaching the sensors to the body. The body and leg attaching approaches provide high estimation results. The accuracy of walking distance measurement using the approach of attaching the sensors to the shoes is still low [
15]. The estimated results are significantly improved in a recent work [
16] with certain conditions.
These methods typically designed inertial sensor modules and then mounted them on the waist, thigh and/or ankle to collect biaxial/triaxial acceleration data. This approach has inherent disadvantages in real-life usage. One of the disadvantages is a serious inconvenience for users who must continuously wear these devices on their bodies during the experiment and data collection period.
Another approach of utilizing sensors to analyze gait is attaching the sensors to the insole of a shoe [
20,
21,
22,
23,
24,
25]. The advantage of this approach is that shoes are ubiquitous and typically worn on a continuous basis by humans. Therefore, attaching a sensor to the shoe’s insole does not cause inconvenience for the users, even over a long period. Moreover, installing measurement sensors in the insole of shoes can be an efficient method to track humans by walking distance measurement.
In this paper, we propose a novel method of walking distance estimation based on a precise stride counting and phase determination using an insole sensory module that consists of a triaxial accelerometer and eight pressure sensors. We incorporate pressure and acceleration information of healthy walkers to determine the swing and stance phases of their gaits. Evaluating experiments, we obtain the maximum error of the swing phase determination with respect to time being 0.08 s and 0.06 s for starting and stopping points of swing phases, respectively. The gait analysis results are then used to count the number of strides of walkers and estimate the walking distance. We apply a double integral to acceleration data to calculate the vertical displacement and the distance which the foot traces in the air. Based on this information, we estimate the walking distance in a straight line. The experimental results, which are conducted on various heights and ages of walkers, demonstrate the validity and accuracy of the measurement method. Specifically, we obtain error rates of 4.8% and 3.1% for experiments on a 16 m and 89 m walking distances, respectively.
The remainder of this paper is organized as follows.
Section 2 presents the measurement system and estimation method based on acceleration and pressure data. A gait phase analysis is also presented to explain the walking distance measurement method. In
Section 2, we also describe the process of determining the swing phase and the method of estimating the walking distance of the subjects.
Section 3 shows the experimental results of the proposed method. Some important points are discussed in
Section 4. Finally, conclusions are provided in
Section 5.
2. Stride Counting and Walking Distance Estimation
In this section, we present the method to count strides and estimate walking distance based on gait cycle analysis. We explain the fundamental phases of the gait cycle and the application of gait analysis to the walking distance calculation. We also describe the insole module that is used to collect acceleration and pressure data of walking. In our proposed method, the pressure data are used to determine the starting and stopping points of the swing phases during the walking motion. This process also provides information for efficiently counting the number of strides of a walker. Then, we extract the acceleration data on the swing phases to calculate the walking distance. The walking distance is estimated based on the tracing distance of the shoe in the air and the vertical displacement of the shoe.
2.1. Gait Phase Analysis
Typically, a gait cycle can be divided into seven phases [
26,
27,
28],
i.e., heel strike, foot flat, mid stance, heel off, toe off, mid swing and late swing. The phases of a gait cycle are depicted in
Figure 1. The heel strike indicates the period when the foot begins to contact the ground. The heel strike is the first phase of the gait cycle. The foot flat is the period where the body absorbs the impact of the foot by rolling in pronation. The mid stance phase begins when the other foot is lifted and continues until the body weight is pressed onto the forefoot. The heel off is the period where the heel begins to leave the ground. The toe off phase refers to the phase when the toe leaves the ground. In the toe off phase, the hip becomes less extended. In the mid swing, the adductors are contracted and the ankle is dorsiflexed by contraction of the tibialis anterior muscle. The late swing phase declares a locked extension of the knee and a neutral position of the ankle. A gait cycle ends at a new heel strike phase.
Using the right foot as a reference to apply the distance measurement, we categorize the gait cycle into two phases, i.e., the stance phase and swing phase. The stance phase includes heel strike, foot flat, mid stance and heel off phases, whereas, the swing phase includes toe off, mid swing and late swing. The stance phase represents the time interval where the right foot is flat on the ground. The stance phase begins from the heel strike phase and ends at the toe off phase. After the stance phase ends, the swing phase begins. The swing phase refers to the period of time where the right foot is moving in the air and does not contact the ground. It should be noted that the movement distance is primarily determined by the swing phase of the gait cycle; thus, in the proposed approach, we identify the swing phase and then calculate the distance from the acceleration information collected in this phase. Specifically, we utilize a hardware module integrated into the shoe to collect the pressure and acceleration data of walkers’ gaits.
2.2. Insole Sensor-Based Estimation System
In this study, we use the insole sensor module, which was designed and developed by the 3L Labs Co., Ltd. (Seoul, Korea), to collect the data from the gaits. The insole sensor module is commercially called the “Footlogger”. The insole sensor module includes a triaxial accelerometer, eight pressure sensors attached to the insole of the shoe, and an microcontroller (MCU) kit supporting Bluetooth connection to transmit the movement information.
Figure 2 illustrates the developed insole sensor module. In the experiments, the insole sensor module is connected to a smartphone to record the pressure and acceleration data from walkers. The sampling frequency of the insole sensor module is set to 50 Hz. Commonly, these sensors are sampled at frequency range of 20 Hz to 200 Hz [
29]. In posture and activity classification, a low sampling rate of accelerometer and pressure sensor possibly produces excellent recognition accuracy [
29,
30]. In [
30], pressure and acceleration data were sampled at 25 Hz by a 12-bit analog-to-digital converter to accurately identify sitting, standing and walking postures. In [
29], authors stated that reduction of sampling frequency of accelerometer and pressure sensor from 25 Hz to 1 Hz does not create significant lost of accuracy (98% to 93%). In estimation applications, Aminian
et al. [
31] record body acceleration at a sampled rate of 40 Hz to estimate walking speed. The experimental results showed that the maximum of speed-predicted error is 16%. In [
32], authors used the force transducers and inertial sensor in a shoe with the sampling rate of 50 Hz to estimate stride length. The root mean square (RMS) difference between the obtained stride length and the referenced stride length being 34.1 ± 2.7 mm. Based on the results of the related research, we believe that the sampling frequency of 50 Hz for accelerometer and pressure sensor in the system is possible to estimate walking distance.
To separate the gravity component from the raw acceleration signal, we first isolate the force of gravity with a low-pass filter. Then, we apply a high-pass filter to isolate the linear acceleration. The algorithm of extracting linear acceleration is as follows:
where
and
are gravity, raw acceleration and linear acceleration on
X-,
Y- and
Z-axes, respectively. Moreover, we select
for the low-pass filter.
The inertial triaxial accelerometer sensor is placed in the center of the insole. The pressure sensors are placed at the rear of the shoe. Each pressure sensor contains a two-bit value representing the pressing level on the sensor. To effectively detect the gait phases of walkers, we fuse the data from these eight pressure sensors into a pressure value. The incorporate pressure value on the shoe is determined by a 16-bit value created from these eight two-bit values of the sensors, where the two bits of the first sensor are the most significant bits and the two bits of the eighth sensor are the least significant bits, as shown in
Figure 3. This fusing method is designed to emphasize the importance of pressure on the first metatarsal area because this area is larger pressed compared with the fifth metatarsal area in straight walking.
Using this insole sensor and a smartphone, we created our portable and concise system for estimating walking distance. We attached the sensor module, which includes sensors and batteries, into an insole and then placed it inside a shoe. The insole used in the system is the off-the-shelf insole, whereas, the experimental shoe is user’s sneaker. This design is to make users feel comfortable during their experiments, and thus ensure that their gaits are not affected. Indeed, we did not receive any complaints from experimental subjects about the discomfort of the insole during experimentation. Thus, we can provisionally conclude that the insole sensor module is unlikely to affect users’ gaits. The insole sensor is connected to the smartphone through Bluetooth to continuously transfer collected data.
Figure 4 shows the flow of data in the estimation system. We use the sensor module in the insole of the shoe for the right foot and require walkers to wear this shoe to collect data during the walking period. The collected data are sent to a smartphone in the pocket of the walkers for storage and processing through the Bluetooth connection. We remove noise in the data received from the foot-worn sensors using a band-pass Butterworth filter with
= 5 Hz,
= 10 Hz. Finally, we apply our calculation method on these data to estimate the walking distance.
2.3. Stride Determination
It is clear that the number of walking strides equals the number of swing phases, which is the period immediately after a user pushes off his foot, releasing it from the ground until the foot again contacts the ground. Therefore, to detect swing phases, and thus possibly count the number of walking strides, we analyze the pressure under the walker’s shoes. We basically utilize the data received from pressure sensors to determine the time interval of the swing phase. When a walker releases his foot from the ground, the pressure value of the sensor under his foot will be virtually zero, whereas when the foot contacts the ground, the pressure value is not zero. Based on this fact, we create an on/off filter to detect swing phases of walking. If all pressure sensors point to “not press” state, the foot is defined as being in swing phase. However, we experimentally observed that Sensor 8 sometimes provides a level of “slightly pressed”, corresponding to the
value in the binary system, when users transit from late swing phase to heel strike phase and are still in the late swing phase. Therefore, to remove this effect, we set a threshold corresponding to the wrong case of Sensor 8,
i.e., threshold = 1. This threshold-based method works because the swing phase is only identified when all sensors are in “off” state. This means that all sensors should point to the “no press” state. Applying these analyses, we create a simple filter to detect the period of the swing phase in human walking:
where
p is the pressure data received from the foot logger at the
k sampling index.
Figure 5 illustrates the scenario of a pressure value received from walking in a 16 s walking period. The blue part represents the pressure data measured by the pressure sensor integrated under the users’ shoes. The red part shows the result
of the on/off filter presented in Equation (
1). In other words,
means the insole is in swing phase at the
k moment. Based on this pressure-based swing phase filter, we can determine the starting and stopping moments of swing phases as well as movement.
2.4. Human Walking Distance Estimation
Based on the estimation of the swing phases, a method based on double-integration of acceleration data is used to calculate the movement distance in the swing phase. We use a double integral to compute the vertical movement distance and the tracing distance of the foot in the air. Using these two values, we estimate the walking distance. The proposed calculation algorithm is generalized in
Figure 6.
2.4.1. Swing-Phase Acceleration Extraction
The pressure-based swing phase filter is used to extract the corresponding acceleration data of the walking cycle. A simple convolution is applied to extract feasible data from the acceleration data:
In Equation (
2),
,
, and
are the swing phase extracted acceleration on the
X-,
Y-, and
Z-axes, respectively, whereas
,
,
are the original collected acceleration on the
X-,
Y-, and
Z-axes, respectively, and
is the value of the filter at the
k sampling index.
Figure 7 shows a sample of the raw triaxial acceleration measured by the sensing module. The results of filtering the measured acceleration are depicted in
Figure 8. The filter allows acceleration data in swing phases to pass and removes acceleration components in stance phases on three axes.
Based on this filtering, we can determine the period of swing in the walking motion. Moreover, with this pressure-based filter, we can easily calculate the exact number of strides in the walking distance. After extracting acceleration in swing phases, we apply double integral-based calculation to estimate stride lengths. Therefore, the walking distance can be measured.
2.4.2. Distance Estimation with Continuous Data
To determine the walking distance, we measure the tracing distance of the shoe, and then multiply the result with a correction coefficient to estimate the movement distance of a walker in a straight line. First, we obtain the acceleration data in the swing phase. Then, we double-integrate the obtained acceleration data to calculate the tracing and vertical displacements during the swing phase. The tracing displacement mentioned is the curved line on which the foot traces in the air, whereas, the vertical displacement indicates the movement in the
Z-axis of the sensor frame. Based on these two values, we estimate the distance traveled in swing phase. Finally, we add the displacement caused by the foot length during walking into the result to obtain the estimated value. Basically, the distance is estimated from the acceleration data using the motion equation of the foot:
where
T,
N,
and
K are the time period of walking, the stride number, the constant foot length and an experimental coefficient, respectively, whereas
is the acceleration obtained in the swing phase.
2.4.3. Distance Estimation with Sampling Data
Applying the estimation method mentioned in
Section 2.4.2, we compute the acceleration magnitude:
Then, the distances traveled by the foot in the air and in the vertical direction of each stride are calculated as follows:
where
N and
are the number of sampling times and the time period of sampling, respectively.
Applying this result, the walking distance of the walker can be estimated in online mode using the experimental smartphone. The smartphone periodically receives sensors’ data from the insole sensor module under the user’s shoe to estimate the traveled distance. Specifically, the traveled distance at the
n stride index,
, can be calculated from the estimated distance at the previous stride index,
, and acceleration data in the
n stride index by:
where
and
are the distance obtained using magnitude and vertical acceleration in the time interval of the
n stride index, respectively. The coefficient
K is tuned to a value so that the mean value of estimated distances in each training set is equal to the reference distance.
2.5. Descriptive Analysis and Requirements
This section descriptively analyzes the experimental requirements and explains related features of subjects who joined the experiment. The experiments were conducted on totally seven healthy subjects consisting of two female and five male walkers, aged from 22 to 28 years old, with height varying from 160 cm to 185 cm.
Table 2 describes the baseline of individuals including personal information of each person,
i.e., height, age and sex. The average foot length is chosen as
= 0.26 m to estimate the distance traveled. In
Table 2, we also mark the specific distance each subject walks to create the walking databases. All seven subjects participated the 16 m distance walking, whereas three of them participated in the 89 m distance walking experiment. The experiments were conducted in an indoor environment,
i.e., a building of a university. Initially, subjects stood with both feet flat on the ground. Then, we asked them to step on the distances leading with the right foot. The subjects should lift up their right foot first from the initial state. During walking, subjects are required to lift their feet from the ground in each swing phase. The subjects are discouraged to drag their feet on the ground in swing phases, which can affect the pressure-based gait analysis.
The subjects were required to walk normally in the straight distances with the insole sensor module installed in their right shoes and an Android smartphone to collect the acceleration and pressure information from the insole sensors. The smartphone connected with the insole sensor using Bluetooth and seamlessly received the data from the insole sensor module. We collected 84 samples of data of walking on the 16 m distance from the seven subjects to create the short distance walking database. Similarly, the long distance database was created based on 30 walking samples of three subjects on the 89 m distance. This group of three subjects is a part of the group of seven subjects who conducted experiments of short distance walking. The specific participation of each subject in experiments is shown in the last two columns of
Table 2. The walking speed measured from all subjects varied in the range of 1 m/s to 1.6 m/s, specifically,
m/s.
Figure 9 shows the distribution of subjects’ average speeds in the experiments of walking on 16 m and 89 m distances. Different subjects are represented by different colors in experiments. The same color in the two subfigures illustrates the same subject in two databases.
4. Discussion
In our proposed method, we use a tuned coefficient K to obtain the final estimation results from calculated displacements. This coefficient is not only a unit converter, but also a correction for the estimation. Indeed, this tuned coefficient shifts the mean value of calculation results to the reference value. It can be said that the horizontal displacement and coefficient K play a role of projecting the tracing distance on each strides to the horizontal direction of the global frame.
The proposed method uses the merging pressure data to detect stance and swing phase. It should be noted that this pressure data is not the physical pressure obtained at the insole. Instead, the pressure data are the merging of pressure levels from eight pressure sensors. This merging ensures eight pressure levels separate in the final result. Furthermore, this merging technique facilitates data communication between the insole sensor module and smartphone. Instead of separately transferring eight pressure values, we only transfer one merging pressure value at each sampling moment. Currently, we just classify swing and stance phases; thus, only the on/off information is used. A lower value of merging pressure that is created as an 8-bit value with each bit for each sensor’s state can provide the same result. However, spending implementation time in smartphone for creating this lower value is unnecessary because the two-phase classification can be done directly from the 16-bit value. Moreover, for further gait analysis, such as detect heel-strike phase, this differentiation of level is necessary. In future works, we plan to use these pressure data to classify gait phases defined in
Section 2.1 to apply in other related applications such as, fall detection or rehabilitation.
Another important point to discuss is that the gait analysis presented in
Section 2.1 is only for a walking model. When a subject begins walking from standing state, his/her first gait is not corresponding to this gait analysis. The first gait starts from mid stance phases and ends at the heel strike phase. Its stance phase includes mid stance and heel off phases, but excludes heel strike and foot flat phases. In fact, the first gait is a step, not a stride. However, in our experimental requirement, walkers initially stand with both feet on the ground, and then step on the distances leading with the right foot. Moreover, our estimation method is created based on results of a double integral of acceleration data on swing phases. Using the presented pressure-based filter, we are still able to determine the swing phase of this first stride. Then, we can extract acceleration data and apply the proposed method to estimate the first stride length. Therefore, we consider the first step as a short stride. We assume the first gait is a short stride including stance and swing phases. With this assumption, the proposed method can be smoothly applied for walking distance estimation. The assumption is reasonable because the distance traveled is basically determined by the swing phase. The distance traveled in the swing phase is estimated based on tracing and vertical displacements. Technically, these displacements are dependent on acceleration data and walking period. The first stride period is shorter than other strides’ periods; thus, we believe that this assumption is practically applicable.
In this paper, we used the estimation system to detect stance and swing phases, and then estimate walking distance on healthy subjects. The experiments were conducted with a controlled initial state and a requirement during walking. These are subjects that should initially stand with both feet on the ground and walk without dragging their feet on the ground. If applying the method on subjects who suffer from gait disorders, the accuracy of the estimation can be reduced. A pathological gait can affect the proposed method by the following points.
Patients drag their foot on the ground;
Gait disorder can cause misunderstanding in stride determination;
Correlations between the tracing and horizontal displacements with the walking distance can be various.
To solve these problems, the pressure-based gait analysis should be improved. The band-pass Butterworth filter should be also edited. We think that, to better estimate walking distance for both healthy and pathological gaits, the estimation method should be combined with a classification of gait. Before applying the walking distance estimation, a gait classifier should be used to choose an appropriate model for estimation.
5. Conclusions
In this paper, using a sensor module consisting of an inertial triaxial accelerometer and eight pressure sensors, we proposed a novel method of walking distance estimation based on an accurate phase determination and precise stride counting. The sensor module was installed in the insole of the shoe to collect human walking information. The information was filtered and processed on the smartphone to remove high frequency noise. Using the pressure data, we accurately estimate the starting and stopping moments of swing phases and precisely count the number of walking strides of each subject in the experiments. Double-integrating the acceleration data in the swing phase provided the foot’s tracing displacement in the air and the vertical displacement of the foot in the sensor frame. Based on the tracing in the air and vertical displacements of the foot, we estimate the anterior walking distance of subjects on a straight line. The experimental results confirmed that the proposed method performed accurately with a mean walking distance estimation error of 4.8% and 3.1% for 16 m and 89 m walking distance.
Currently, the proposed method can only be applied on estimating walking distance of normal walking on level ground. In a future work, we will extend the proposed method with various walking patterns, such as stair climbing, jogging, and running. We also plan to estimate the walking directions with an integrated gyroscope sensor, and create a PDR system using the insole sensor integrated shoe. As stated previously, we plan to use the pressure data to classify gait phases defined in
Section 2.1 and expand the research into other areas such as, abnormal gait recognition, fall detection or rehabilitation.