Estimation of Gait Parameters based on Motion Sensor Data
Kaitai Li
1
and Cong-Cong Zhou
2,*
1
Fuzhanghuanzhou BioTech Company, Guoxia Road.258, Yangpu District, Shanghai, P.R. China
2
College of Biomedical Engineering and Instrument Science, Biosensor National Special Laboratory, Zhejiang University,
Hangzhou 310027, P.R. China
Keywords: IMU, Stride Parameters, Gait Analysis.
Abstract: Recently, the spreading application of intelligent mobile devices with integrated sensors such as inertial
measurement units (IMU) has attracted the interest of the researchers for designing gait analysis methods
based on the captured sensor data. This paper focuses on designing a system which can evaluate the walking
ability and the physical agility level of normal people and people with Parkinson’s disease or stroke. The
motion signal is collected by three wearable MPU9250 sensors located on both ankles and the center of the
waist. Three test scenarios, including 10 meters walking test (10MWT), Time up and go test (TUGT) and
Dual-task walking (DTW), are designed in this paper. The results, which concluded time parameters such as
standing up time and turning back time as well as walking parameters such as stride length and stride
frequency, showed good consistency and high accuracy with Vicon device.
1 INTRODUCTION
Wireless motion sensors can be placed on different
positions of people to evaluate walking ability and
physical agility. The analyzed features can be
delivered to the scale assessment module to quantify
the physical condition (Hanson et al., 2009).
Currently, the unified Parkinson's disease rating scale
(UPDRS) and the Glasgow coma scale (GCS) are
widely used methods to do the assessment to
Parkinson’s and stroke patients (Mov, 2003).
Normally, evaluators can assess the body
condition of patients by experience. However, this
method is not objective enough and it is the reason for
the extensive attention of using data collected from
sensors to quantify the body condition. Moreover,
according to the normal algorithm designed to
process the motion signal, there is still improvement
should be done to get better performance. Different
division methods for movement periods and different
data fusion methods for transformation of axes were
discussed and developed. For example, Madgwick
(Madgwick, 2010) developed an attitude and heading
reference system (AHRS) algorithm. Besides, classic
data fusion modules, such as Kalman filter and
 
*
Corresponding author
Complementary filter, are also extensively used and
developed. Generally speaking, data fusion modules
need to achieve different requirements to obtain the
ideal result, such as Kalman filter needs to establish a
complicated prediction model, in which the
covariance matrix is difficult to establish and the
signal processed must be linear.
In this paper, we aim at designing a system to
quantify some parameters used in the scale
assessment module which are hard to quantify by
observation methods. New methods used to divide
motion periods and fuse the 6 axis data are discussed
and tested. Specifically, three test scenarios, 10 MWT,
TUGT and DTW, are designed. During the test
process, three data acquisition modules with IMU
units are placed on two ankles and the center of the
waist. The collected motion data is pre-processed by
a digital signal processor integrated in the data
acquisition module and then transmitted wirelessly to
the stationary computer. Three data processing
functions are designed on stationary computer
corresponding to the three test scenarios mentioned
above. The designed motion periods division
methods used in the three functions should be able to
eliminate the effect of slight shaking or movement of
sensors (select profit axis). Firstly, the up and down
Li, K. and Zhou, C.
Estimation of Gait Parameters based on Motion Sensor Data.
DOI: 10.5220/0008963901290135
In Proceedings of the 13th International Joint Conference on Biomedical Engineering Systems and Technologies (BIOSTEC 2020) - Volume 1: BIODEVICES, pages 129-135
ISBN: 978-989-758-398-8; ISSN: 2184-4305
Copyright
c
2022 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
129
function divides standing up and sitting down periods
and outputs standing up time and sitting down time.
Secondly, the turn back function divides turn back
periods during the walking process and outputs
turning back time with turning back angle. Thirdly,
the walking calculation function divides gait periods
and outputs stride length as well as relevant
parameters.
To validate the efficiency of functions, reference
outputs calculated by the Vicon device are recorded
and compared with the results calculated by the
proposed functions. Vicon is an optical motion
capture system produced by OML Company. The
accuracy rates are shown by tables and the advantages
and disadvantages of the designed method is
discussed in this work.
2 EXPERIMENTS AND
METHODS
The system can be divided into two main modules:
the data acquisition module and the data processing
module. According to the data acquisition module, a
hardware system is designed to collect 9 degree of
freedom motion signals of individuals. Two data
acquisition modules are placed on both ankle joints
and one data acquisition module is placed on the
center of the waist. As for the data processing module,
a reliable and promoted algorithm which is used to
obtain features during the gait process of participants
is designed. The following figure shows the simple
system flow,
Figure 1: System flow chart.
2.1 Data Acquisition Module
The multi-chip module, MPU9250, which concludes
a 3-axis gyroscope, a 3-axis accelerometer and a 3-
axis magnetometer, is applied in the data acquisition
module. The initial motion signals are amplified and
digitalized in the module and transmitted to the
stationary computer wirelessly.
2.2 Sensors Wearing
As is shown in Figure 1, the data acquisition modules
are adhered to the elastic bandages with adhesive
tapes and then the bandages are wore on two ankle
joints and the center of the waist of the user.
Considering there might be trembles or waggles
during the process of experimental paradigms,
positions of the first two data acquisition modules are
not required to be precisely placed on the center of
feet. The third module is required to be placed on the
center of the waist as much as possible. The impacts
of trembles and waggles are designed to be tackled in
algorithms.
2.3 Test Scenarios
The tests aim at evaluating the walking ability and the
physical agility level of normal people, Parkinson’s
disease patients and stroke patients. Three designed
test scenarios are shown as below:
10 Meters Walking Test (10MWT): The
participant is wore with three data acquisition
modules and asked to walk straightly on a 14
meters’ walkway with normal speed. The
walkway is marked on two meters and 12 meters.
The data collected from the in-between 10 meters
test will be used.
Time Up and Go Test (TUGT): The participant
is wore with three data acquisition modules and
asked to stand up from a chair, walk 3 meters in a
straight line, turn around, and then walk 3 meters
back to sit down.
Dual-Task Walking (DTW): The test aims at
Parkinson’s disease and stroke patients. Based on
the 10WMT, the patient is required to calculate
100 keeps subtracting 2 as the walking process.
Times of correct answers and wrong answers
should be noted down.
2.4 Data Processing Module
The signal collected from the data acquisition module
is wirelessly transmitted to the stationary computer.
The accelerometer signal unit is converted to
,
the
gyroscope signal unit is converted to

and the
magnetometer signal unit is converted to µT based on
BIODEVICES 2020 - 13th International Conference on Biomedical Electronics and Devices
130
the range of data collection. Afterwards, the signals
are filtered by a Butterworth band pass filter.
The algorithms are developed and tested in
Matlab 2015b (www.mathworks.com), the data
obtained and figures used in this paper are produced
in this software as well. According to the engineering
landing of the algorithms, the software which
integrates all algorithms is developed by C# in
Microsoft Visual Studio 2017
(visualstudio.microsoft.com). Specifically, there are
three algorithm modules that correspond to the three
test scenarios. Figure 2 describes the flow diagram for
the developed gait analysis algorithm.
Figure 2: Flow diagram of the algorithm.
2.4.1 Up and Down Algorithm
The algorithm in this function corresponds with the
up and go test scenario. Output features contain
standing up time and sitting down time. The core part
of the algorithm is to find out the suitable axis that
contains enough information to figure out the
standing up and sitting down periods. As participators
are not required to wear data acquisition modules
with a standard direction, which means the sensors
might slide the location or skew with an angle,
selecting the applicable axis can help us eliminate the
effect caused by these issues. According to the up and
down function, the algorithm is designed with the
following steps,
Find the Applicable Axis:
According to the physical movement situation of
sitting down and standing up, the sensors should have
vertical shifts. On the other hand, along with the
sitting down and standing up process, body leans back
and forward, thereby the angular velocity of forward
axis changes. As a result, the changes of vertical
accelerated speed and the forward angular velocity
can be considered as features used to define the
suitable axis.
When the variation of angular velocity is used as
the feature, the suitable axis should be the axis with
the maximum variance, which means the axis has
maximum changes during the test process. If a
window is added to the signal of the suitable axis, it
can be found that the variance is higher during
standing up and sitting down process. Considering
that the algorithm should be applicable to Parkinson’s
disease and stroke patients who might have tremor on
the forward direction, the axis with the lowest
accelerate speed variance is selected to use.
Interval Divisions:
The standing up and sitting down intervals are half
sine waves at the beginning and the end of the test.
Peaks on the axis are found by using a developed
peaks finding algorithm. The threshold height value
of peaks is set as E (the expectation of signal) +
(weight value) x
2 Vthevarianceofsignal
;
thus giving:
T1E 0.6
2∗
(1)
The formula (1) comes from 3 sigma principle
(Marilyn et al., 2007) and be modified according to
actual signal condition. The maximum distance
between two peaks is set as,
Maxdistancemeandistance/2
(2)
It is also necessary to confirm that the peak has
the largest value within certain range, which is set as
[-Max distance, Max distance]. The zero crossing
points nearby the peaks are considered as the border
of getting up and sitting down periods. The getting up
and sitting down time can be obtained by calculating
the length of two intervals.
2.4.2 Turn Back Algorithm
Output features of this function are turning time and
Estimation of Gait Parameters based on Motion Sensor Data
131
turning back angle. The applicable axis of the
gyroscope signal is found and output features are
calculated based on this. The algorithm is designed
with the following steps,
Find the Suitable Axis:
The turning mainly happens around the vertical axis
of the body. The angle around the vertical axis
changes apparently thereby the variation of angular
velocity is considered to be the feature used to define
the axis. Actually, the axis we use here should be as
same as the axis we use in the standing up and sitting
down function. However, considering about the
physical significance, the axis with the maximum
angular rate variance is selected.
Turning Back Interval Division:
The turning back interval might be a half sine wave,
a half cosine wave, a whole sine wave or a whole
cosine wave. This depends on how an individual turns.
For example, if an individual turns back with an
almost 360 degree angle, the interval should be a
whole sine wave. To figure out the intervals turning
back period during test process, firstly the threshold
height value of peaks is set with the formula below,
T2E
2∗∗1.5
(3)
The maximum distance between two peaks and
the certain range that contains one largest peak value
are set as same as the standing up and sitting down
function. The number of zero crossing points between
two peaks should be two. The turning back angle is
obtained by integrating the angular rate in the turning
back period and the turning back time is the length of
the turning period.
As a result, if there is a turning during the test
process, and the turning angle is larger than 90 degree,
the turning is considered as a real turning and counted.
2.4.3 Walking Algorithm
Walking algorithm function is called in all three test
scenarios, which makes it the core part of the project.
In the walking algorithm function, the output objects
are stride length and relevant parameters such as
stride speed and stride frequency. The gait time
periods should be classified firstly and then output
parameters can be calculated. The function can be
divided into the following two sections,
Gait Time Periods Classification:
Gait time periods can be divided into swing phase and
stance phase roughly. It is common to use the variance
of accelerometer values of the forward axis as the
feature to classify gait periods. On account of there
should be no significant change of the acceleration
during the stance phase, the variance value in stance
phase should be almost zero. On the other hand,
during the swing phase, the variance value should
fluctuate with a non-zero value. However, the
classification method is limited in a series of
conditions. For example, the threshold of the
acceleration variance is nearly impossible to be
applicable to all gait periods even though an adaptive
threshold is used.
Considering about the disadvantages of previous
methods, a developed method is designed to classify
gait time periods precisely. Specifically, the
developed method contains two parts,
Selection of Reference Axis:
The gyroscope data can be used to divide the gait time
periods as stated by Koichi (Koichi et al., 2000). In
the developed method, the appropriate gyroscope axis
is selected with a new combined feature T3, which
comes from a combination of features on time domain.
The axis of gyroscope that we need is the one has the
most obvious and periodic signal feature on the time
domain. Specifically, the selected axis should have
three typical time domain characteristics: the extent
of the fluctuation of peak values is smaller, the
number of peaks after filtered (with the method
introduced in 2.4.1) is larger and the data of the axis
is with good symmetry.
T3 is obtained by adding weights to above three
features, which is shown below,
T3
E
difference
peaks
E
peaks
∗Number


E
difference
valleys
E
valleys
∗Number


∗ABS
Number


Number


(4)
The axis with the smallest value of T3 is the axis
of gyroscope used to classify gait time periods.
Gait Time Periods Classification:
Gait time periods are divided on the selected
gyroscope axis by finding out appropriate peaks and
zero crossing points. Peaks are found with the
methods introduced in 2.4.1. During the stance period,
the gyroscope value should pass through zero
crossing points, therefore, the zero crossing points
nearby peak values can be considered as borders of
gait periods. With the developed method, gait time
periods is divided as the figure below,
Parameters Calculation:
Data
on the geodetic coordinate (GC) can be
BIODEVICES 2020 - 13th International Conference on Biomedical Electronics and Devices
132
Figure 3: Divisions of gait time periods.
transformed from data on sensor coordinate (SC) via
the transformation matrix


represented by
quaternion. To obtain the updated and accurate
quaternion matrix 
,
,
,
, the data fusion
algorithm is necessary. Normally speaking, there are
several types of data fusion algorithms, such as
Kalman filter, complementary filter and Mahony &
Madgwick Filter. While there are limitations for the
algorithms mentioned above, take Kalman filter as
example, it needs significant modeling assumptions
to reach its theoretical results (Reza, 2009). On the
other hand, the generalized complementary filter is
not as accurate as the Kalman Filter. Thus a
developed complementary filter is designed.
As the aimed outputs do not require knowing the
yaw angle, a six axes data fusion method is applied.
What is confirmed is that in the GC, the accelerate
data on two axes of horizontal plane should be zero
and the value on vertical axis should be close to 1
(after normalization). According to the basic rationale
of complementary filter, the updated gyroscope
values can be shown as a fusion of previous
gyroscope values and parameters calculated from the
errors of acceleration values. A new error
compensation model is designed in the developed
algorithm and the steps are shown as below,
Calculation the Error Parameter:
The reference acceleration vector is obtained by
multiply the acceleration vector [0, 0, 1] by the
transformation matrix represented by quaternion. By
doing the difference calculation of the reference
acceleration vector and the acceleration vector
collected from the sensor, the error parameter is
obtained. It can be estimated that the error parameter
can be used to support long time periods of time.
Data Fusion:
Considering wavelet transform can effectively
describe the time domain characteristics on high
frequency periods and the frequency domain
characteristics on low frequency periods, it is selected
to combine the gyroscope signal and the accelerate
signal, instead of the traditional proportional-plus-
integral (PI) control method. The selection of
appropriate PI control parameters is difficult. On
contrast, there are already a series of mature threshold
setting methods of wavelet transform.
A window whose length is 50 is added to
accelerate error signal and gyroscope signal to
calculate appropriate filtered values. The updated
angular rate values (ω
x,y,z
) are represented by the
combination of low pass filtered angular rate values
(ω
x,y,zlf
) and the weighted error parameters come
from high pass filtered acceleration values
(error
x,y,zhf
). The formula is shown as,
,,

,,

,,
(5)
Quaternion Update:
The updated quaternion (q
) can be represented by the
combination of previous quaternion ( q

) and
updated gyroscope values (ω
), which is shown in the
following formula (James, 2006),


1
2
∗
∗∆
(6)
The corresponding accelerate signal on GC can be
obtained by multiplying the accelerate signal on SC
by the transformation matrix which is composed by
quaternion.
The transformed accelerate signal on x axis is
shown as below,
Figure 4: Original and fused accelerate signals on X axis.
0 500 1000 1500 2000 2500
Sampling numbers
-100
-80
-60
-40
-20
0
20
40
60
80
100
Periods Divisions
Gyroscope Signal
Fused Accelerate Signal
Accelerate Signal(m/s
2
)
Estimation of Gait Parameters based on Motion Sensor Data
133
3 RESULTS AND DISCUSSIONS
3.1 Performance of Up and Down
Function
10 participants who signed the Informed Consent
Form were randomly selected to do the TUGT test,
which means the external factors such as height and
weight were not considered. Each of them was asked
to do the TUGT test for 5 times. The calculated
outputs were recorded as the mean values of the 5
times’ tests of each participant. The reference
outputs were mean values recorded by a second
chronograph. The comparison was shown in the
following Bland-Altman figure,
Figure 5: Bland-Altman figure of the standing up time.
The up and down time obtained by the two
methods mentioned above showed a good consistency.
However, the up and down time was not an absolutely
objective value, the standard of border of up and
down periods was without an authoritative standard.
Moreover, there might be errors during recording
process.
3.2 Performance of Turn Back
Function
During the 10 groups of up and down tests introduced
above, the turn back process was also filmed. The
videos were replayed and the turn back time was
recorded as reference. The comparison was shown in
the following Bland-Altman figure, which
demonstrated the consistency is good.
Figure 6: Bland-Altman figure of the Turning back time.
3.3 Performance of Walking Function
According to walking function, the outputs were
based on the step length factor. A contrast test was
designed to figure out the difference between the
proposed method and gold standard. A Vicon device
with the pressure trail was used to obtain relatively
precise reference stride length values as gold standard.
10 Participants were asked to do the 10MWT test and
the accurate rate was defined as the absolute value of
1- calculated values/recorded values. The comparison
was shown as below:
Table 1: The comparison between calculated and recorded
values of stride length.
Left / Right
Leg
Mean Value of Stride
Length (m)
Accurate
Rate
Calculated Recorded
1 1.55/1.86 1.5/1.73 89.6%
2 1.59/1.66 1.5/1.57 91.4%
3 1.51/1.41 1.53/1.53 95.4%
4 1.82/1.71 1.55/1.41 83.8%
5 1.04/1.65 1.00/1.48 92.9%
6 1.22/1.42 1.26/1.32 94.9%
7 1.16/1.48 1.25/1.35 92.0%
8 0.78/1.53 0.92/1.38 87.5%
9 1.43/1.29 1.29/1.32 94.0%
10 1.16/1.33 1.20/1.20 93.5%
Calculated time-Reference time(s)
BIODEVICES 2020 - 13th International Conference on Biomedical Electronics and Devices
134
The results showed the mean accuracy rate is
around 91.5% and thus the error rate is around 8.5%.
It is interesting to make a comparison with the result
reported in (Benoît et al., 2015), obtained on a similar
database collected from inertial sensors during
walking process. On one hand, the error rate was
around 5.5%, which got better results than the
promoted algorithm. On the other hand, the promoted
algorithm did not have a strict sensors wearing
requirement.
4 CONCLUSIONS
This paper represented a system which could assess
the body condition of normal people as well as
Parkinson’s and Stroke’s patients based on the data
collected from IMU placed on two ankles and the
center of waist. New motion periods division method
and data fusion method were discussed. The
validation was conducted by comparing the
calculated values with the reference values which
were collected from camera videos and Vicon device.
The results showed that the three functions processed
the motion signal and calculated the output values
precisely. At present, the system was tested by normal
people, however, in the near future, the system can be
applied to patients and help them recover from
diseases.
REFERENCES
Hanson M, Powell H, Barth A, et al., 2009, Body area
sensor networks: Challenges and opportunities, IEEE
Computer, 42(1):5865.
Mov Disord, 2003, Movement disorder society task force
on rating scales for Parkinson's disease, The unified
parkinson's disease rating scale (UPDRS): status and
recommendations, 18:738
Sebastian Madgwick, 2010, An efficient orientation filter
for inertial and inertial/magnetic sensor arrays (internal
report on his thesis and MARG).
Marilyn K. Hart, Ph.D. & Robert F. Hart, Ph.D, 2007,
Statistical process control Techniques, Statit Software,
Inc., 1128 NE 2nd Street, Corvallis, Oregon 97330.
Koichi S, Hikaru I, Yut Aka S, Non-restricted measurement
of walking distance, Proceedings of 2000 IEEE
International Conference on System, man, and
Cybernetics. Nashville: IEEE, 2000: 1847-1852.
Reza Olfati-Saber, 2009, Kalman-Consensus Filter:
Optimality, stability, and performance. Proceedings of
the 48h IEEE Conference on Decision and Control
(CDC) held jointly with 2009 28th Chinese Control
Conference.
James Diebel, 2006, Representing Attitude: Euler Angles,
Unit Quaternions, and Rotation Vectors, Stanford
University, Stanford, California 94301–9010.
Benoît S, Mourad B, Jennifer D, Roger P-G, Christian G, et
al., Implementation and Validation of a Stride Length
Estimation Algorithm, Using a Single Basic Inertial
Sensor on Healthy Subjects and Patients Suffering from
Parkinson's Disease, Electronic Healthcare, 2015,
704-714.
Estimation of Gait Parameters based on Motion Sensor Data
135