Abstract
Introduction
Many prior studies have demonstrated that age influences the clinical progression of neurological disorders, and gait disturbance is an early feature of brain disorders such as Parkinson's disease (PD), dementia, and stroke, which lead to apraxic gait patterns in which there is loss of ability to move properly. This is due to the disruption of the locomotion control and sensory feedback system, which controls balance and allows safe negotiation of the environment. Several prior studies have showed that how a person walks may predict whether he or she will develop Alzheimer's disease or PD. Some gait changes may appear before cognitive ability declines and can be detected by certain characteristics, such as gait speed and stride length. For example, Bridenbaugh et al. 1 found that slower walkers with a lower cadence and shorter stride length were more likely to have problems in cognitive, memory, and other processing functions, compared with their faster walking counterparts. These studies suggest that continuous monitoring of changes in gait characteristics may provide useful information for detecting motor changes associated with future cognitive declines.
Over the past decade smartphones have become increasingly popular, with more than 50% of U.S. mobile phone users having such devices and 500 million smartphones sold worldwide in 2012. 2 In parallel, the increasing availability of built-in (e.g., magnetometer, accelerometer, air pressure) and external sensors, capturing data on various different phenomena (e.g., magnetic, mechanical, thermal, and optical), enables development of new sensor systems to assess the status of a phone user and his or her surrounding environment. These sensors can thus be used to measure a user's psychophysiology and environmental conditions. Together with associated mobile applications, they can be used as a tool for gathering quality data for medical research or regular healthcare practices, as these data can be gathered from a subject unobtrusively for long periods of time and in the subject's natural environment.
In this work we propose a method that uses the accelerometer sensor in a smartphone to continuously monitor changes in the walking patterns of a potential patient who might be developing a brain disorder, such as PD. We considered the use of a pedestrian dead reckoning (PDR) system to capture the gait characteristics, like step length and frequency, of a person using a smartphone. Our idea was an extension of the study of Lan et al., 3 which estimated step length based on the height change and length of the leg using the Pythagorean Theorem (as described below). In this work we used the concept of simple harmonic motion 4 to find the zero velocity in the vertical direction, the so-called zero velocity update (ZUPT), 3 and applied this to avoid the accumulation of sensor drift errors. The accuracy of our step length estimation was about 98%. Using a binary classification method, namely, support vector machine (SVM), we also demonstrated the possibility of accurately identifying changes in the walking patterns of a patient using the gait data obtained from the phone. Note that although the idea of using multiple external inertial sensors (such as an accelerometer, gyroscope, and so on) to capture the gait characteristics of PD patients is not new, 5,6 our work is the first attempt to experimentally investigate the feasibility of using a single accelerometer embedded in a smartphone to identify a patient in the early stage of PD based on a 1-year dataset.
Related Work
In this work we estimated the step length based on the change in height and length of the leg using the Pythagorean Theorem, 3 which is similar to the “inverted pendulum model” proposed by Zijlstra and Hof. 7,8 However, they assumed that the subject was walking with a constant speed and that the change of the height remains the same to avoid the drift between consecutive steps, whereas in this work we use ZUPT to calibrate the drift errors.
Several prior studies tried to use multiple inertial sensors to capture some gait characteristics of a PD patient, such as freezing of gait, 5,6 physical tremors, 9 and so on, based on different classification algorithms. In this work we design a PDR-based algorithm that uses the inertial sensors embedded in smartphones to capture the gait characteristics of a potential PD patient. Unlike the prior work, in which PD patients were recruited as subjects, the aim of our study was to detect the transition from the state of being without PD to that of with PD, and thus it was inherently difficult for us to recruit many “appropriate” subjects. In addition, the duration of data collection in the prior studies ranged only from a few minutes to a couple of days, whereas our results are based on 1 year of data collection.
Materials and Methods
We implemented our PDR-based gait estimation algorithm on a variety of Android™ (Google, Mountain View, CA) phones from HTC (New Taipei City, Taiwan) and Samsung (Seoul, South Korea), with the sampling rate for the accelerometer data set at 50 Hz (the accelerometer range is±2 G). The phones were given to 17 elderly subjects (10 females and 7 males, with an average age of 72 years and a standard deviation of 6.8 years) in a senior center, and step counters were used to record their daily activity levels from May 2013 to June 2014. None of these seniors had a history of any neurological diseases. We manually measured the leg length and pocket position of each user. The collected data were also periodically uploaded to a server once an hour.
Lan et al. 3 proposed a waist-mounted method to estimate step length using the change in height. During walking, a person's body moves up and down. If we assume the length of the leg is L, the waistline will move up and down between L and (L – h) from the ground, where h is the change in the height of the waist. Consider the triangle in Figure 1, formed by the person's two feet and his or her step length D. Given that L is known, using the Pythagorean Theorem we can estimate D if we know the height of this triangle [i.e., (L – h)]. To obtain (L – h), we need to first calculate h, which is the change in height of the waist during walking. Therefore, if we mount an accelerometer on the user's waist, the readings can be used to estimate the height change h, which can then be used to calculate the step length D based on the Pythagorean Theorem (the length of the leg [i.e., L] and half of the step length [i.e., D/2] forms a right-angle triangle in which leg length is the hypotenuse).

Walking diagram.
In this study we extended the above-mentioned waist-mounted method for a smartphone. When implementing a PDR system on a smartphone, two cases can be considered. The first is when the user holds the phone (e.g., talking on the phone), and the other is when the phone is put in a pocket or a bag. Su et al. 10 demonstrated the feasibility of using a waist-mounted method for the first case. We thus focused on how to extend the results of a waist-mounted method for the second case. To implement a waist-mounted method on a phone, one must consider both its orientation and placement.
The orientation of the phone may change from time to time when it is put in a pocket or a bag during walking. Therefore, we needed to determine the orientation of the phone with respect to the walking direction to estimate the height change. We used the technique proposed in an earlier work
11
to reorient the three axes of the accelerometer. In addition, we adopted a method similar to that used by Su et al.
10
(which used a gyroscope to record changes in orientation) to estimate the height change, as shown in Eq. 1. Here θ is the orientation of the device in relation to the direction of gravity and is between 0° and 90°, while N is the acceleration, which is caused by external force:
Next, in a waist-mounted method, the vertical movement displacement of the phone was the key parameter to estimate the step length. When the phone is positioned above the waistline, its vertical displacement during walking will be the same as when it is mounted on the waist. When the phone is placed below the waistline (e.g., in a pants pocket), we can estimate the vertical displacement of the waist as follows. Assuming the leg length (L) and the pocket position from the ground (L′) are already known, we can find two similar triangles, ΔABC and ΔPQR (as shown in Fig. 2). Based on the Pythagorean Theorem, we can obtain

Use of the Pythagorean Theorem for computing the step length when the device is mounted on the lower body.
Noise Filtering
During walking, some unexpected and unpredictable body vibrations might cause some higher-frequency noise in the sensor readings. One can use a low-pass filter and preset a cutoff frequency to filter the noise, and some prior step recognition systems use 3 Hz as their cutoff frequency to detect a step event. 12 However, we found that although a 3 Hz threshold can detect a new step event, it is too low for our purposes and will remove data that are not noise. Chen and Bassett 13 analyzed the acceleration of the waist during walking and found the maximum acceleration is 8 Hz. To examine whether 8 Hz can produce the best results, we performed a set of experiments using different frequencies for the low-pass filter, ranging from 3 Hz to 12 Hz, and compared their accuracies in estimating step length. The use of 8 Hz as the cutoff frequency produces the most accurate results (as shown in Fig. 3).

The accuracy of estimating step length using different cutoff frequencies for the low-pass filter.
Therefore, we set our cutoff frequency at 8 Hz to filter the noise, and this threshold worked well under 10 repeated experiments using 3 different subjects with various leg lengths, ranging from 68 cm to 95 cm.
In addition, given that the phone can bounce around in the pocket and create many false peaks in the acceleration waveform, 14 we further applied two filters to reduce these acceleration jitters. The first was the minimum and maximum changes in acceleration magnitudes during one step (after analyzing our data, we set the thresholds to 0.3 g and 1.8 g, respectively). For the second filter, we adopted the dynamic time warping technique to detect false peaks based on the assumption that the waveforms of each step are similar. 15
Avoid Accumulation of Sensor Drift Error
In order to recognize a step, we first analyze the components of one step that can cause vertical changes to the body. Assuming the phone is in the pants pocket, there are three major events that may affect the height of the phone. The first is a heel-touching-ground event, which happens when the heel just hits the ground, and the phone is in its lowest position during the entire step. The event that comes after this is the stance, which occurs when the foot is flat on the ground. Finally, the heel-off-ground event occurs right after the stance. Generally, as shown in Fig. 4, the vertical acceleration of a heel-touching-ground event is the local minimum within a step. Once a new step is identified, the sensor data between two consecutive heel-touching-ground events will be used to estimate the step length.

The vertical acceleration of walking.
Once each step was identified, we could then apply the double integral to calculate the change in height of the phone and use this information to estimate the length of each stride based on the Pythagorean Theorem. However, if the system only naively applied the double integral to the accelerometer data, the sensor drift errors could accumulate from one step to the next. To avoid this, we proposed a ZUPT method to calibrate the sensor data: when a person is walking the trajectory of the sensor in the phone can be approximated by simple harmonic motion. 4 In addition, given that the velocity of the highest and lowest points of the sensor will be 0, we could use these characteristics to detect when the user started a new step. Finally, once the points with zero velocity in the vertical direction (where the vertical acceleration reaches its local minimum and local maximum [i.e., points A and B in Fig. 4]) are identified, we can then reset the vertical velocity to 0 before using the double integral to calculate the change in height of the phone. Specifically, when the stance and heel-touching-ground events occur, the waist has the largest displacement from its equilibrium position. Therefore, we reset the vertical velocity to 0 at these points (the so-called “ZUPT”).
Results
Step Length Estimation
Some of the state-of-the-art pedometers 16 on the market can also output walking distance. As shown in Table 1, we compared our method with these devices and found that they only achieve up to 90% accuracy, which is significantly lower than the 98% our approach is able to achieve. Note that this 2% inaccuracy might be due to other sensor errors (such as sensor bias, leveling, and so on), as well as the imperfect estimation of leg length. Furthermore, as discussed previously, our approach is based on the idea of using the change in height of the phone to estimate step length, which is similar to the method used by Weinberg. 17 We thus implemented Weinberg's method and found that its accuracy is about 96.7%.
Comparison with Other Waist-Mounted Methods and the Influence of the Mechanism
We used a low-pass filter to filter out the noise and ZUPT to address the drift error of the accelerometer. To understand the effects of these mechanisms, we used each, one at a time. ZUPT has a greater impact on the system performance than the implementation of the low-pass filter; when ZUPT is disabled, the accuracy drops from 98.25% to 84.1% (whereas the system's accuracy can be still up to 95.3% without low-pass filter).
The possibility of using the smartphone sensor data to detect development of PD was observed by a recent event. One of the seniors who used our phone was diagnosed with PD in early 2014. We found that his step length (in cm) and step frequency (number of steps per second) decreased over time by examining the collected smartphone data. With a binary classification method, like SVM, as shown in Figure 5, we can identify such changes in his walking patterns (classification accuracy of 94%, which suggests most of the after-PD data can be separated from before-PD data in Fig. 5). Every point in Figure 5 is the average of the data sample collected in 1 day.

Using support vector machine to detect the occurrence of Parkinson's disease (PD).
Note that it is inherently difficult to collect data that records the transition from the state of without-PD to the state of with-PD because there is no way to foresee which subject is going to develop PD when the experiment begins. As far as we know, we are the first to have observed the changing gait characteristics of a PD patient based on a year-long dataset collected from a smartphone. In practice, one can implement a PD detection system over the smartphone by comparing the new data and old data periodically (e.g., once a month) to see how “separable” they are using a binary classification method like SVM. If the level of separability is high (e.g., >90%), the system can then issue a warning to the user.
Discussion
We compared the performance of our system when placing the phone on different locations of the body (as shown in Table 2). The performance of our system degrades when the phone is in the pocket compared with on the waist (note that our phone-in-the-pocket results are still better than the results of Weinberg, 17 which were based on waist-mounted devices). This is not surprising because a phone generally has less acceleration jitter when it is mounted on the waist compared with when it is in a pocket. Compared with prior studies, 5,6 our system is easier to use because it does not require that sensors be mounted on some particular positions of the body and can achieve similar accuracy in capturing gait characteristics.
Performance of Different Phone Placements
Furthermore, as shown in Figure 4, when one walks at a normal speed, the stance event generally occurs as the first peak after the heel-touching-event. However, during high-speed movement (which is defined as when the step frequency is greater than 1.6 Hz), we observe that the counterforce from the ground could introduce an extra pulse between the heel-touching-ground and stance events, as shown in Figure 6 (points A′ and B′). Without taking this into consideration, our system could reset the velocity at the wrong point. Kinesiology studies 18,19 show that the duration from the heel-touching-ground event to the stance event normally accounts for at least 16.7% of the time in a step. Based on this observation, we can identify the point where the stance event occurs and reset the velocity when calculating the step length.

The effect of counterforce when walking at a high speed.
Finally, when one is moving in place the acceleration data should not be considered in the calculation of step length. Therefore, we use a threshold-based filter to detect this phenomenon by looking at whether the acceleration data in all three directions (vertical, horizontal, and lateral) are lower than a certain threshold ɛ and then reset the vertical acceleration accordingly (in our implementation, ɛ is set to 1 m/s 2 ).
Conclusions
Diagnosing neurological disorders, such as PD, is often difficult, especially in its early stages. It has thus been estimated that nearly 40% of people with PD may not be diagnosed. Traditionally, the diagnosis of PD often requires a doctor to observe the patient over time to recognize signs of rigidity in movement. In this work we propose a PDR-based method to continuously monitor and record the patient's gait characteristics using a smartphone. On average, the accuracy of our step-length estimation is about 98%. Using a binary classification method, namely, SVM, in this preliminary study we show that it is feasible to identify the changes in walking patterns of a PD patient with reasonable accuracy, based on the 1-year data obtained from the phone. Although our data are too limited to derive strong conclusions, our work provides a first step to show it is possible to use smartphone sensors to provide early warnings to potential PD patients.
As discussed previously, to capture the changing gait characteristics of a potential PD patient is inherently difficult, so that we only consider this work as an observational study to inspire further research on the feasibility of using smartphones for early PD detection. In the future, we plan to work with more senior centers and hospitals to collect such data and further evaluate the usefulness of the proposed approach.
Footnotes
Acknowledgments
This work was supported by the National Science Council, Taiwan (R.O.C.) under grant NSC 103-2221-E-006-154.
Disclosure Statement
No competing financial interests exist.
