Abstract

Without any preinstalled infrastructure, pedestrian dead reckoning (PDR) is a promising indoor positioning technology for pedestrians carrying portable devices to navigate. Step detection and step length estimation (SLE) are two essential components for the pedestrian navigation based on PDR. To solve the overcounting problem, this study proposes a peak-valley detection method, which can remove the abnormal values effectively. The current step length models mostly depend on individual parameters that need to be predetermined for different users. Based on fuzzy logic (FL), we establish a rule base that can adjust the coefficient in the Weinberg model adaptively for every detected step of various human shapes walking. Specifically, to determine the FL rule base, we collect user acceleration data from 10 volunteers walking under the combination of diverse step length and stride frequency, and each one walks 49 times at all. The experimental results demonstrate that our proposed method adapts to different kinds of persons walking at various step velocities. Peak-valley detection can achieve an average accuracy of 99.77% during 500 steps of free walking. Besides, the average errors of 5 testers are all less than 4 m per 100 m and the smallest one is 1.74 m per 100 m using our coefficient self-determined step length estimation model.

1. Introduction

Serving as a requisite part for the pedestrian of this era, Location-Based Service (LBS) has been widely provided by portable devices [1], due to the miniaturization, low energy, and low cost of Micro-Electro-Mechanical System (MEMS) sensors. Localization is the basic precondition to realize LBS in both outdoor and indoor environments. Global Positioning System (GPS) has been universally used for outdoor positioning but does not work well for indoor positioning since GPS signals can be seriously blocked and influenced by reinforced concrete buildings [2]. Due to the limitation of positioning accuracy, cost, the complexity of indoor space, and other factors, LBS for a pedestrian in the indoor environments has not been popularized [3]. Existing indoor positioning technologies include Bluetooth [4], ultrawideband (UWB) [5], and Wi-Fi [6]. Despite the great performance achieved, these methods are infrastructure-based, which require equipment predeployment. In addition, the expense of deployment is proportional to the size of the indoor area, which prevents the widespread application of these solutions.

Different from the infrastructure-based technologies, pedestrian dead reckoning (PDR) obtains the measurement and statistics of pedestrian steps, step length, and direction by using sensor data [7]. Binding the sensor to a certain part of body, several body locations have already been tested, e.g., foot [8], chest [9], legs [10], and waist [11]. To check the data characteristic of an accelerometer attached to different parts of the body in the same motion state, Wu et al. [12] compared the acceleration data where the accelerometer is bound at the feet, legs, and waist, respectively; then, the results indicated that the foot-mounted data has the strongest periodicity and regularity, while the waist gives the accelerometer a more stable measurement environment. Different from attaching sensors to a part of body directly, the position information obtained through the inertial measurement unit (IMU) built in the commodity smartphones or tablets contains a large error. The reasons are as follows: firstly, it is a problem to detect every change of pedestrian behaviour precisely, since the device is not an accessory fixed on the highly dynamic human body. Furthermore, the step length varies from person to person, even if the same individual in different states (when walking fast, the step is larger, and when walking slowly, the step is smaller). Therefore, the accuracy of positioning based on PDR depends essentially on step detection and step length estimation (SLE).

A great many of step detection methods are mainly based on the peak detection and threshold detection [13, 14]. The peak detection method counts steps in line with the appearance of wave peak, while the threshold method detects the step according to whether the signals reach the threshold or not. However, these two ways cannot remove the noise well, which leads to the problems of overcounting and false counting. Some researches proposed features based on the acceleration to reduce the error of step detection [1519]. In reference [15], the authors combined peak detection with four features (minimal peak distance, minimal peak prominence, dynamic thresholding, and vibration elimination) and their method detects the number of steps with an ultrahigh accuracy, but it is computationally complex. Kang et al. [16] proposed to extract frequency domain features of the three-dimensional (3D) angular velocities returned by the gyroscope through FFT (Fast Fourier Transform). However, this method is not applicable for fast walking. Gu et al. [17] come up with three features (periodicity, similarity, and continuity) considering users’ false walking state. Nevertheless, it may lead to undercounting problem. Various features have been presented in the literature [18] which are split into three groups, including time domain, frequency domain, and others.

Typical SLE models are divided into four categories: constant model [20], linear models [21], nonlinear models [2224], and neural network models [25, 26]. One of the most popular SLE models was presented by Weinberg [22], which estimates each step of a pedestrian dynamically by establishing the relationship between step length and acceleration with a constant to adjust. But the -value needs to be predetermined for different individuals and changes from step to step. In this regard, several researches have improved the model [2729]. Based on the waist-mounted type, Lai et al. [27] designed a fuzzy rule base for personalized SLE with step strength, and frequency as input variables and step length as an output variable. Nevertheless, it is not flexible enough for different individuals and has no universality due to the rule base needs to be adjusted for different subjects. Ho et al. [28] derived a -factor as a polynomial function of the average step velocity, but the estimation results contain large errors under long-distance walking. Strozzi et al. [29] developed a formula about -value with a per-subject constant . This method had good performance in the case of normal walking speed. However, the errors became excessively large when the subject is walking at high or low speed.

The objective of this study is to propose a peak-valley detection method that detects the pair of peak-valley to overcome the problem of overcounting. Based on the fuzzy logic (FL) algorithm, this paper designs a fuzzy controller to make the constant coefficient in the Weinberg [22] nonlinear SLE model adjusted adaptively to each detected step, which is suitable for different kinds of people walking at various velocities. Beyond that, it is possible to estimate pedestrian walking distance accurately by accumulating every estimated step length.

The remainder of this paper is arranged as follows: in Section 2, we describe peak-valley detection, including data collection and preprocessing. In Section 3, a coefficient self-determined step length estimation method is proposed. In Section 4, the experimental results are described in detail and we compare our proposed method with other five similar SLE algorithms. In Section 5, we discuss the deficiency of our method and the research in the future. Finally, the conclusion is presented in Section 6.

2. Peak-Valley Detection

Step detection is an issue in PDR that will cause substantial errors in the final positioning results because of overcounting, undercounting, and false detection [15]. The acceleration signal is usually used to detect the pedestrian steps. The three-axis accelerometer built in iPad Air 2 (iOS 12.1.4) is utilized for step detection in this paper. The developer can access both the raw values recorded by the hardware and a processed version of those values through the Core Motion framework [30]. In this paper, steps are calculated based on the user acceleration, a processed accelerometer value that reflects only the acceleration caused by the user and not the acceleration caused by gravity.

Figure 1 illuminates the amplitude of three-axis user acceleration collected from the iPad held in hand during normal walking and the Signal Vector Magnitude (SVM) [27]. SVM is defined as the root square of the sum of the squared acceleration signal of each axis: where , , and denote the measured user acceleration in the -axis, -axis, and -axis, respectively, of the accelerometer triad at the th epoch. The unit g is the gravity acceleration.

As seen in Figure 1, the results of the walking data indicate that user acceleration contains evident noise, especially in the -axis. User acceleration along the -axis is more periodic, symmetric, and stable than the other two axes and SVM, which represents that the pedestrian has a more obvious periodic fluctuation in the vertical axis when walking. Therefore, based on the -axis user acceleration, we propose to detect the pair of peak-valley to improve the accuracy of peak detection. Figure 2 shows the flow chart of peak-valley detection.

First, we obtain the -axis user acceleration after a low-pass filter with 3 Hz cut-off frequency. The -axis user acceleration before and after using a low-pass filter is shown in Figure 3, collected by a volunteer holding an iPad walking along a straight path, from which we can observe that the data filtered fluctuates much more smoothly. The cut-off frequency 3 Hz is determined by walking frequency range. To conclude the range of walking frequency, we set a 16 m long straight test path and ask 10 healthy volunteers (5 male and 5 female, age from 22 to 28, height from 1.58 m to 1.82 m, weight from 47 kg to 88 kg) to walk along the path three times at different speeds (slow, normal, and fast) and count the number of steps in each time. Meanwhile, we use a stopwatch to record the walking time of every volunteer in each walk and a tape to measure the actual walking distance. Therefore, we can know that the walking frequency of pedestrians does not exceed 3 Hz. Besides, we also get the common walking step length which ranges from 0.4 m to 0.8 m.

Then, the peak and valley values both in the static and walking states are identified, while ignoring the negative peaks and positive valleys, as shown in Figure 4(a). Figure 4(b) shows the next step of extracting walking signals. Specifically, to keep the peaks and valleys in the walking state completely, the value or is considered to be the static one if it meets the following condition: where and are the identified peaks and valleys, and represent the sequence number, and are the number of the detected peaks and valleys after the stage of peak and valley identification, and 0.01 and -0.01 are the maximum and minimum amplitude of the -axis user acceleration in the static. After removing most of the static values by formula (2), we mark the peaks and valleys reserved in the order as and .

To obtain the paired peak-valley accurately, the following stages are executed: (i)Dynamic threshold

The dynamic threshold is utilized to remove false values that are far from the true one. For , it will be retained if it meets two conditions:

Similarly, for , it will be reserved as long as the is satisfied as the conditions:

In our proposed method, we set , , and , based on experience. For the last 9 peaks and valleys, the dynamic thresholdin formula (3) andin formula (4) cannot be performed anymore, so they were replaced with the last 10th calculation result. (ii)Minimum sampling interval

Sampling interval means the sampling number between the current peak (valley) and the next one. The pedestrian stride frequency ranges from 1 Hz to 3 Hz according to the data collected from 10 volunteers walking at different speeds, while the sampling rate of the device is set to 50 Hz; then, the corresponding number of sampling for each step is between 17 and 50. Therefore, if the sampling interval is less than 16, the current peak (valley) is considered to be a suspected false peak (valley), which is then compared with the next peak (valley), and the one closer to zero is deleted. (iii)Neighboring difference

When people take large stride with low stride frequency, we detect abnormal values like the one that circled in Figure 5, which always appear between two truth values. Neighboring difference refers to the following formula: where denotes the difference between the current value and the previous one and represents the difference between the current value and the next one . For peaks, if is smaller than and , while , the current peak value is considered to be abnormal. Analogously, for valleys, if is greater than and , while , then the current valley value is regarded as the false one. Threshold values 0.1 and -0.15 are determined by the experiments in this paper. (iv)Peak-valley sequence

Peak-valley sequence means that the peak and valley corresponding to every step should occur in pair along sampling time. Eventually, we need to eliminate two sorts of unpaired outliers: two ends of data are not paired, as shown in Figure 6(a), so the redundant values need to be removed. Another case is that the middle part of data is not paired, as shown in Figure 6(b); hence, values closer to the zero line are removed.

After eliminating the abnormal peaks and valleys, we can acquire the number of steps that is equal to the number of detected peak-valley pairs.

3. A Coefficient Self-Determined Step Length Estimator

The step length is different from person to person, and each step of an individual also varies from moment to moment. In the majority of parameter-dependent SLE models, acceleration is the most common feature to use, among which the popular Weinberg model [22] is defined as where is a constant, and are the maximum and minimum vertical acceleration in a single stride, respectively.

Kim et al. [23] proposed a method based on the average of the acceleration in each step during walking: where is the user parameter, is the number of sampling points in a step, and is the vertical acceleration of ith points.

Scarlet [24] developed an empirical model:

The explanations for parameters are the same as above.

However, the parameter in the step length formula above is a calibrated constant and needs to be predetermined for an individual to use, which is inconvenient and results in poor accuracy. Several studies have proposed to automatically correct the -value in formula (6). Ho et al. [28] derived a -factor as a polynomial function of the average step velocity. The adaptive -value was obtained as follows: where was computed as the magnitude of the average velocities on three dimensional axes, , , and in each step. The speeds in the three axes are obtained using acceleration double integral. Therefore, an additional filtering process is required to reduce the cumulative error caused by double integral. Strozzi et al. [29] developed the following formula to calibrate the Weinberg step length estimator: where is a per-subject estimated constant and is the maximum acceleration magnitude during the considered th step. Although this method dynamically estimates the value of when the pedestrian is walking, the constant still needs to be precalibrated for different users. Therefore, we design a fuzzy controller to adjust the -value in Equation (6) adaptively for different kinds of pedestrians walking at various speeds, only using a simple low-pass filter.

Under static, low-speed, normal-speed, and fast-speed walking, the collected data change of the -axis user acceleration amplitude is shown in Figure 7(a), after the low-pass filter. It can be seen from Figure 7(a) that the waveform changes from sparse to dense and the acceleration amplitude changes from small to large. From this fact, we can conclude that as the stride frequency increases, walking fluctuation in the vertical axis will become more obvious, and the amplitude reflected in the -axis will be larger.

Besides, when walking in steps of 0.5 m, 0.6 m, 0.7 m, and 0.8 m at a stride frequency of 1.5 Hz, the amplitude change in the -axis user acceleration is expressed in Figure 7(b). To make the step length coincide with a certain length, a white cloth strip is laid on the floor and all foot stepping points are marked with black on the strip. To adjust the stride frequency to 1.5 Hz, a metronome app is utilized. As can be seen from Figure 7(b), when the step length increases, the acceleration amplitude of the -axis becomes lager.

According to the relationship described above, we develop a more detailed experiment to establish our fuzzy rule base. Under the fixed step length, stride frequency, and the number of steps, 10 healthy volunteers walk about 16 m holding the iPad to collect user acceleration data. The step length is set from 0.4 m to 0.82 m, every 0.07 m a group, and 7 groups in all, while the stride frequency is set from 1 Hz to 2.5 Hz, every 0.25 Hz a group, and 7 groups in all. Table 1 clarifies the number of steps that need to be performed under the combination of different step lengths and stride frequency, and each volunteer has to walk 49 times. As shown in Figure 8, for the control of fixed step length, we use a wide white cloth strip with black marks, and the volunteers stepped on the marks when walking. The red labels are marked on the cloth strips, which are aligned with the ground stamps, to avoid the error caused by each laying.

Figure 9 shows the fuzzy logic block diagram in this study. We determine the difference of the peak-valley pair obtained in Section 2 and stride frequency as input variables and the -value in Equation (6) as an output variable. The final output is brought into Equation (6) to estimate step length for each step detected. The following is the detail of FL: (i)Input variables and output variable

The input variables of FL are the stride frequency and the difference of the peak-valley pair: where is the time required for the pedestrian walking in a step and and are the peak and valley in the th step obtained by peak-valley detection.

The domain of is determined to be [1, 2.8], while is determined to be [0.12, 0.9] based on data collected by each volunteer walking 49 times. The output variable -value is calculated by the following formula: where is the step length that volunteers perform according to Table 1. Based on the walking data of 10 volunteers, the calculation result shows that the domain of output variable is [0.55, 1.0].

As the quantization level increases, the output accuracy will be improved, but the complexity of the calculation will also increase. Taking into account the complexity of the calculation and the accuracy of the output variables, the quantization levels of the input and output variables in this paper are all seven levels relative to experimental setup above, i.e., , as well as the fuzzy subsets adopted seven levels: NB, NM, NS, ZE, PS, PM, and PB (N: negative, B: big, M: middle, S: small, P: positive, ZE: zero). For membership function, we employ triangular function. (ii)Rule base

In this paper, the adopted fuzzy rules are Mamdani-based. The experimental data of one subject performing 49 times as shown in Figure 10, from which is changeable and significantly relevant to and . At the same step length, as increases, becomes larger and is smaller instead. Moreover, at the same stride frequency , as step length increases, both and get larger. We establish the fuzzy control rule base according to the commonality of these data changes, as shown in Table 2. (iii)Defuzzification

The center-of-gravity method is used as a defuzzification strategy in this paper, which has a smoother output inference control; i.e., corresponding to a small change in the input signal, the final output of its inference generally also changes to some extent [31].

4. Experiments and Results

4.1. Evaluation of the Peak-Valley Detection

To evaluate the performance of the peak-valley detection, we have used the following formula to estimate the error of the proposed method: where is the estimated number of steps by the peak-valley detection and is the true steps. We randomly select 2 volunteers in the experiment above and 5 additional volunteers (aged from 22 to 26, height from 1.65 m to 1.85 m, weight from 55 kg to 78 kg) to walk freely (not at a fixed stride frequency and step length) 500 steps. Table 3 shows the error of the peak-valley detection and peak detection method. It can be seen that step counting based on the peak detection is subject to overcounting problem. By calculating the mean error of seven people, the average accuracy of the peak-valley detection method is as high as 99.77%. Compared with the traditional peak detection method, the average accuracy is improved by 1.17%.

Figure 11 shows the results after executing 500 steps in free walking using the peak-valley detection and peak detection. 498/500 steps were detected based on the peak-valley detection method, and 515/500 steps based on peak detection. Comparing Figures 11(a) and 11(b), we can figure out that the emergence of the overcounting problem based on peak detection mainly occurs at the start walking phase and stop walking. Our proposed method can effectively overcome this issue.

4.2. Evaluation of Improved Step Length Estimation Model

To test the performance of our improved SLE model, we ask 5 testers to walk freely three times in a corridor and every time stop at approximately 100 m. The estimated distance is obtained by accumulating each step length. The following formula is used to calculate the error of the estimated distance: where is estimated distance and is the true walking distance.

As shown in Figure 12(a), among the 5 testers, the error of tester 2 is only 0.95 m in the walk of the second time, while the error of tester 5 in the walk of the third time is the largest, which is 5.27 m. Moreover, the average error is the mean error of each tester walking three times, from which we can see that the average error of 5 testers is all less than 4 m and the smallest one is 1.74 m. Therefore, the proposed method is adaptive for different people with free walking.

In daily walking, pedestrians cannot hold the device fully horizontally while navigating. We also test the accuracy of walking distance estimation when holding an iPad at an angle (about 20 degrees). Figure 12(b) indicates that the average error of a tester walking 8 times is 1.06 m per 60 m when tilting the iPad. Consequently, it is effective for pedestrians when holding the devices at an angle to estimate the walking distance based on the method proposed in this paper.

Figure 13 shows the distance estimation error (m) for a testerconducted walking experiments covering three distances (20 m, 40 m, and 60 m) at three different walking speeds (low, normal, and high) of six step length estimators. The results indicate that our proposed method can obtain better accuracy of distance estimation for various walking speeds. Particularly, as the walking distance rises, the distance estimation error of our proposed method increases slightly. However, the other five SLE models increase significantly; especially when walking 60 m at low speed, the distance estimation error is over 12 m. Ho et al.’s [28] method has a certain improvement on the Weinberg’s method [22], but the effect is weak. Strozzi et al.’s [29] method acquires the highest error when walking at low speed and high speed, which means that the parameter in formula (10) still needs to be dynamically adjusted at different walking speeds. Therefore, our proposed method can significantly reduce the estimation error and is suitable for the pedestrian walking at various speeds and long distance.

5. Discussion

Based on the proposed method, we conduct experiments on different walking surfaces (slope, downstairs, upstairs) and different movement modes (running, jogging, lateral walking, backward walking). Table 4 shows the results of walking on different surfaces. The experiment of the slope surface is carried out on a treadmill with the inclination angle of 9 degrees. The width of the stair is 27 cm and the true distance of stair experiment is the sum of all walked stairs and intermediate rest platform. From Table 4, we can conclude that our peak-valley detection method is still applicable, but the fuzzy rule base needs to be adjusted when walking on the slope or stairs. The case of undercounting occurs when the pedestrian is walking on the intermediate rest platform which is the plane, because the parameter in the stage of dynamic threshold is ineffective in this situation. Table 5 expresses the results of walking at different movement modes, from which we can know that our proposed method still applies to lateral walking and backward walking. However, there is a significant error when the pedestrian is running or jogging. The stride frequency of running or jogging exceeds 3 Hz, while the proposed method only considers the walking frequency ranging from 1 Hz to 3 Hz. Therefore, the stage of minimum sampling interval leads to the severe problem of undercounting.

In the future work, to expand the application scenarios of our method, we will classify and recognize pedestrian movement patterns (running, walking, upstairs, downstairs, slope, etc.) and self-adjust the fuzzy rule base to the corresponding patterns.

6. Conclusions

This paper proposes a coefficient self-determined step length estimation method based on the peak-valley detection. Employing the peak-valley detection, the abnormal values will be filtered out effectively. Especially, it is significantly effective for the overcounting problem in the peak detection. Based on the FL, a fuzzy controller is established, which can adjust the -value in Weinberg’s model adaptively for every step detected by the peak-valley detection. The experimental results confirm that our proposed method is universal for different types of pedestrians. Compared with three typical nonlinear models and two state-of-the-art methods, the proposed method has higher accuracy when walking at various step velocities and long distance.

Data Availability

The inertial data of the iPad used to support the results of this study can be obtained from the authors of this article (e-mail: [email protected] (Wenxia Lu); [email protected] (Hai Zhu)).

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper.

Acknowledgments

This research was supported by the team of Fusion Computing and Location Services. This research was funded by the Key Project of Science and Technology Commission of Shanghai Municipality (Grant No. 18511101600), the “Sailing Program” of Young Science and Technology Talents supported by Shanghai Science and Technology Commission (Grant No. 19YF1418200), the Young Scientists Fund of the National Natural Science Foundation of China (Grant No. 61902237), Natural Science Foundation of Shanghai (Grant no. 17ZR1411900), and the Opening Project of Shanghai Key Laboratory of Integrated Administration Technologies for Information Security (Grant no. AGK2015006).