A Knowledge-Based Step Length Estimation Method Based on Fuzzy Logic and Multi-Sensor Fusion Algorithms for a Pedestrian Dead Reckoning System

The demand for pedestrian navigation has increased along with the rapid progress in mobile and wearable devices. This study develops an accurate and usable Step Length Estimation (SLE) method for a Pedestrian Dead Reckoning (PDR) system with features including a wide range of step lengths, a self-contained system, and real-time computing, based on the multi-sensor fusion and Fuzzy Logic (FL) algorithms. The wide-range SLE developed in this study was achieved by using a knowledge-based method to model the walking patterns of the user. The input variables of the FL are step strength and frequency, and the output is the estimated step length. Moreover, a waist-mounted sensor module has been developed using low-cost inertial sensors. Since low-cost sensors suffer from various errors, a calibration procedure has been utilized to improve accuracy. The proposed PDR scheme in this study demonstrates its ability to be implemented on waist-mounted devices in real time and is suitable for the indoor and outdoor environments considered in this study without the need for map information or any pre-installed infrastructure. The experiment results show that the maximum distance error was within 1.2% of 116.51 m in an indoor environment and was 1.78% of 385.2 m in an outdoor environment.


Introduction
Mobile devices, including wearable items, are increasingly popular and affordable, and are widely used in various fields and for various applications, such as sports monitoring and management, healthcare, Location-Based Services (LBS), and navigation [1,2].The demand for LBS for pedestrians in both indoor and outdoor environments has also increased dramatically.Location and navigation technologies using the Global Navigation Satellite Systems (GNSS) are highly reliable and accurate in open, outdoor spaces.However, GNSS signals are not always available, especially in GNSS-denied environments, such as indoor environments, underground, and in urban areas.The problem of navigation in urban areas can be mitigated by integrating GNSS with the Inertial Navigation System (INS) [3,4].Nevertheless, since GNSS signals are not available indoors, various navigation methods relying on different technologies, such as proximity, triangulation, fingerprinting, and dead reckoning, have been proposed [5].Since the dead reckoning method requires little or no infrastructure to be pre-installed in buildings, Pedestrian Dead Reckoning (PDR) systems have become a popular solution to indoor positioning and navigation [6,7].
Dead reckoning methods use inertial sensors, accelerometers, and gyroscopes to estimate a relative location and derive a current location by adding the estimated displacement based on data for distance and heading in relation to a previously estimated location.The moving distance and heading of the user can be acquired from an INS or Step-and-Heading System (SHS) [2].An INS is a self-contained system [7], which means no other external signal is required, and it continuously calculates the position, orientation, and velocity of a moving object by integrating data from an accelerometer, gyroscope, and magnetometer.However, the inertial sensors have a drifting problem, in which errors accumulate over time.Moreover, most high-end inertial sensors are expensive and over-sized for most consumers.This larger size makes it more difficult to carry or wear.Meanwhile, a SHS is also a self-contained system that is used by pedestrians.It simplifies the complex computing of an INS and uses only an accelerometer and gyroscope to estimate the step count, step distance, and heading of the user.Both a gyroscope and a magnetometer can be used to derive the heading of the user, but these two sensors have drawbacks with regard to indoor positioning and navigation.A heading derived from a gyroscope suffers from the drifting problem and ends up accumulating errors over time.The drifts of a gyroscope can be reduced with the use of a rigorous calibration procedure or corrected via other methods such as fingerprinting [8] or map-matching [9][10][11].A magnetometer measures the magnitudes of the Earth's magnetic field to estimate the heading of a user, but indoors this is influenced by natural and man-made sources of magnetism.Magnetic field variations inside buildings can be found in iron, cobalt, or nickel.It could also occur from other manmade sources such as steel structures, electric power systems, and electronic appliances [12,13].This is the main reason why magnetometers were not adopted to aid with heading estimation.However, there are some studies that have adopted magnetic fingerprints and utilized the anomalies in the magnetic field inside a building, which are assumed to be static and have sufficient local variability, to achieve global indoor self-localization [13,14].
With the rapid progress in mobile and wearable devices, inertial sensors are now commonly used in high-end devices like smartphones, which are theoretically suitable for PDR systems.The position of the inertial sensors on the body, such as a user's hand [15], waist [16], pocket [17], and foot [18,19], has a significant influence on the accuracy, reliability, and usage of the PDRs.Moreover, due to advances in Micro Electro Mechanical Systems (MEMS) technology, wearable and miniature inertial sensors based on this have become the main sensors used for PDR.However, due to cost considerations, most consumer electronics adopt low-cost MEMS sensors, which have lower performance and generate more noise as compared to more expensive devices.Therefore, the integration and combination of different sensors and algorithms are required to enhance the accuracy and usability of PDR with low-cost sensors.Moreover, the sensor errors of low cost sensors also need to be calibrated [20,21].
Regarding the moving distance of the user, Step Length Estimation (SLE) algorithms based on accelerometers have been successfully implemented in PDR in many studies [21][22][23].The SLE algorithms can be divided into model-and knowledge-based methods.The former can be categorized into two groups, one being based on biomechanical models and the other being based on empirical relationships [21].An inverted pendulum model for the motion of the pelvis during a step was proposed by Zijlstra et al. [24,25].However, this model requires details of leg length and is sensitive to user calibrations.To overcome these drawbacks, an approximated model which does not require leg length information was proposed by Weinberg et al. [26].It estimates the dynamic step length from the vertical displacement of the pelvis.However, the results they reported show that step length can vary by as much as 40% between pedestrians walking at the same speed, and up to 50% across the range of walking speeds of individuals [2].Weinberg et al. presented a strap-down waist-worn PDR system based on the model they proposed; experimental results showed that the maximum relative errors were between 4.23% to 18.44%, and the average errors were between 3% and 8% [16].Now, with regard to the knowledge-based methods, Artificial Neural Networks (ANN) and Fuzzy Logic (FL) are the primary algorithms employed [27].A GNSS/INS navigation system was proposed using a knowledge-based method to model human locomotion, and the adopted sensors of this system are continuously calibrated when GNSS signals are available [28].There are six parameters that contain the information about a step length.They are step frequency, peak-to-peak mean acceleration, peak-to-peak variation in acceleration, terrain slope, change in barometric height during a single gait cycle, and subject's height [28].The results showed that the accuracy of this system is 3-5 m CEP (circular error probable) 50%.However, the study in [28] required high-performance GNSS and INS devices to calibrate its models, and the computing load of the proposed algorithms would simply not be feasible for low-cost embedded systems.
The objective of this study is to develop an accurate and usable SLE method for PDR system with the features of a wide range of SLE, a self-contained system, and real-time computing.In order to achieve a self-contained capability, an inertial sensor module has been developed, and the sensor errors of this module are calibrated with a sensor calibration procedure based on the scalar calibration as well as the least squares method to improve the accuracy of the inertial sensors [29].The applied parameters in this study are scale factors, biases, and orthogonalization angles.Other generalized calibration schemes for low-cost Inertial Measurement Unit (IMU) and smartphone sensors can be found in the studies [30,31].With this calibrated inertial data in hand, a PDR system based on multi-sensor fusion and FL SLE algorithms has been developed.Essentially, the strengths of FL are its reduction of the depth and complexity of computations, and its improvement of accuracy and simplification of the positioning algorithm through the use of a relatively simple heuristic, which determines a combination of the most appropriate rules.Keep in mind that an advanced indoor navigation system attempting to determine the necessary information through pure number crunching, with a required high computational complexity, would likely cause a complete battery drain within a few hours, especially for portable and wearable devices.Additionally, since FL is comprised of linguistic rules, it can be easily implemented into most Micro Processing Units (MCUs) to fulfill the requirement of real-time computing.These are the reasons why FL has been chosen to be the SLE method in this study.With the advantages of FL and PDR, the method proposed herein is easy to implement on waist-mounted wearable devices in real time and is suitable for the indoor and outdoor environments considered in this study without the need for map information and any pre-installed infrastructure.

Pedestrian Navigation Scheme
A pedestrian PDR system was designed and implemented in this study to demonstrate the viability of the above proposed methods, with the system block diagram shown in Figure 1.In this figure, the block diagram is composed of two parts, the Sensor Calibration and Fusion Algorithm as well as the Dead Reckoning Algorithm.The data flow of the system block diagram is as follows.In the sensor calibration and fusion part, after the sensor module was set up, the inertial sensors were calibrated by using the proposed calibration procedure.Then, the obtained calibration parameters of the inertial sensors were used in the Multi-Sensor Fusion Algorithm block to calibrate the acceleration and angular rate as measured from the inertial sensors.The Multi-Sensor Fusion Algorithm block performs the sensor calibration, signal processing, and orientation estimation of the sensor module.In order to obtain more reliable moving information of a user, the acceleration data are transferred from their body frame to a local horizontal frame by using the rotation matrix with an estimated orientation.In the dead reckoning part, with the calibrated data and the estimated orientation of the sensor module, the Step Counting block provides the step count, step frequency, and step strength to the Knowledge-Based SLE block, which estimates the step length of the user using the proposed FL SLE method.The Heading Estimation block utilizes the calibrated data to calculate the walking direction of the user.With the estimated step length and heading, the Pedestrian Dead Reckoning block uses the step-and-heading-based dead reckoning algorithm to estimate a user's location over time.

System Configuration and Setup
The system configuration and setup of the proposed PDR is based on a system block diagram, as mentioned previously.With regard to the flexibility and computing power of the system, the PDR is designed to be a distributed computing scheme with two devices, including one sensor module and one monitoring device, as presented in Figure 2. The sensor module is composed of two inertial sensors, a Bluetooth module, and a MCU.The MCU used on the sensor module is a 32-bit ARM Cortex-M4 processor produced by STMicroelectronics.The sensor module executes the proposed PDR system running on the MCU in real time, and it is capable of transmitting the estimated step length and heading via Bluetooth to the monitor, which could be a mobile device such as a laptop, smartphone, or tablet.The monitoring device displays the user location on a preloaded map.In this study, one Android mobile device was adopted as the monitoring device, and a self-developed Android app was installed in said mobile device to display the user's present location in real time.
The used sensors in the sensor module are a low-cost MEMS accelerometer and gyroscope.These sensors are widely used in various applications, such as human body motion tracking and the flight control of consumer drones.The inertial sensors transduce inertial motion into analog or digital signals.The advantages of MEMS sensors are their low-cost, light weight, and small size, but this also suggests that they have a lower performance compared to more expensive devices.Indeed, the major drawbacks of low-cost sensors are their high noise and measurement errors.This is the reason why calibration and verification of the sensor module are critical to enhance its accuracy and performance before its use.In regard to the measurements of the inertial sensors, the accelerometer transfers the objective acceleration into physical values with units in m/s 2 or g, the latter of which is the magnitude of the Earth's gravitational field.The gyroscope transfers the objection rotation into physical values with the unit in deg/s.One tri-axis accelerometer and one tri-axis gyroscope are used in the developed sensor module.In this study, the accelerometer used was a KXR94-2050 accelerometer with a full-

System Configuration and Setup
The system configuration and setup of the proposed PDR is based on a system block diagram, as mentioned previously.With regard to the flexibility and computing power of the system, the PDR is designed to be a distributed computing scheme with two devices, including one sensor module and one monitoring device, as presented in Figure 2. The sensor module is composed of two inertial sensors, a Bluetooth module, and a MCU.The MCU used on the sensor module is a 32-bit ARM Cortex-M4 processor produced by STMicroelectronics.The sensor module executes the proposed PDR system running on the MCU in real time, and it is capable of transmitting the estimated step length and heading via Bluetooth to the monitor, which could be a mobile device such as a laptop, smartphone, or tablet.The monitoring device displays the user location on a preloaded map.In this study, one Android mobile device was adopted as the monitoring device, and a self-developed Android app was installed in said mobile device to display the user's present location in real time.

System Configuration and Setup
The system configuration and setup of the proposed PDR is based on a system block diagram, as mentioned previously.With regard to the flexibility and computing power of the system, the PDR is designed to be a distributed computing scheme with two devices, including one sensor module and one monitoring device, as presented in Figure 2. The sensor module is composed of two inertial sensors, a Bluetooth module, and a MCU.The MCU used on the sensor module is a 32-bit ARM Cortex-M4 processor produced by STMicroelectronics.The sensor module executes the proposed PDR system running on the MCU in real time, and it is capable of transmitting the estimated step length and heading via Bluetooth to the monitor, which could be a mobile device such as a laptop, smartphone, or tablet.The monitoring device displays the user location on a preloaded map.In this study, one Android mobile device was adopted as the monitoring device, and a self-developed Android app was installed in said mobile device to display the user's present location in real time.
The used sensors in the sensor module are a low-cost MEMS accelerometer and gyroscope.These sensors are widely used in various applications, such as human body motion tracking and the flight control of consumer drones.The inertial sensors transduce inertial motion into analog or digital signals.The advantages of MEMS sensors are their low-cost, light weight, and small size, but this also suggests that they have a lower performance compared to more expensive devices.Indeed, the major drawbacks of low-cost sensors are their high noise and measurement errors.This is the reason why calibration and verification of the sensor module are critical to enhance its accuracy and performance before its use.In regard to the measurements of the inertial sensors, the accelerometer transfers the objective acceleration into physical values with units in m/s 2 or g, the latter of which is the magnitude of the Earth's gravitational field.The gyroscope transfers the objection rotation into physical values with the unit in deg/s.One tri-axis accelerometer and one tri-axis gyroscope are used in the developed sensor module.In this study, the accelerometer used was a KXR94-2050 accelerometer with a full- The used sensors in the sensor module are a low-cost MEMS accelerometer and gyroscope.These sensors are widely used in various applications, such as human body motion tracking and the flight control of consumer drones.The inertial sensors transduce inertial motion into analog or digital signals.The advantages of MEMS sensors are their low-cost, light weight, and small size, but this also suggests that they have a lower performance compared to more expensive devices.Indeed, the major drawbacks of low-cost sensors are their high noise and measurement errors.This is the reason why calibration and verification of the sensor module are critical to enhance its accuracy and performance before its use.

Dead Reckoning Algorithm Sensor Calibration and Fusion Algorithm
In regard to the measurements of the inertial sensors, the accelerometer transfers the objective acceleration into physical values with units in m/s 2 or g, the latter of which is the magnitude of the Earth's gravitational field.The gyroscope transfers the objection rotation into physical values with the unit in deg/s.One tri-axis accelerometer and one tri-axis gyroscope are used in the developed sensor module.In this study, the accelerometer used was a KXR94-2050 accelerometer with a full-scale output range of ˘2 g (19.6 m/s 2 ), produced by Kionix, Inc. (Ithaca, NY, USA).The gyroscope used was an A3G4250D gyroscope with a full-scale output range of ˘245 deg/s, produced by STMicroelectronics.The basic specifications of the two sensors used are listed directly below in Table 1.The sensor module has been designed to be either waist-mounted or handheld, as shown in Figures 3 and 4 below.After some preliminary tests, the results showed that in the same experiment the standard deviation of the estimated pitch angle was 1.09 deg measured from the waist-mounted type and 5.62 deg measured from the handheld type.Therefore, the waist-mounted type was selected to implement the PDR in this study due its higher accuracy and reliability than the handheld type.The waist-mounted type has the capability of describing the motions and actions of the lower limbs more precisely.In contrast, the handheld type is affected by how the user holds the device and whether the user is reading a message on the screen.Therefore, the following tests and experiments were based on the waist-mounted type, and the sensor module was attached to the back of the user's waist, as seen in Figure 3.The sensor module has been designed to be either waist-mounted or handheld, as shown in Figures 3 and 4 below.After some preliminary tests, the results showed that in the same experiment the standard deviation of the estimated pitch angle was 1.09 deg measured from the waist-mounted type and 5.62 deg measured from the handheld type.Therefore, the waist-mounted type was selected to implement the PDR in this study due its higher accuracy and reliability than the handheld type.The waist-mounted type has the capability of describing the motions and actions of the lower limbs more precisely.In contrast, the handheld type is affected by how the user holds the device and whether the user is reading a message on the screen.Therefore, the following tests and experiments were based on the waist-mounted type, and the sensor module was attached to the back of the user's waist, as seen in Figure 3.The sensor module has been designed to be either waist-mounted or handheld, as shown in Figures 3 and 4 below.After some preliminary tests, the results showed that in the same experiment the standard deviation of the estimated pitch angle was 1.09 deg measured from the waist-mounted type and 5.62 deg measured from the handheld type.Therefore, the waist-mounted type was selected to implement the PDR in this study due its higher accuracy and reliability than the handheld type.The waist-mounted type has the capability of describing the motions and actions of the lower limbs more precisely.In contrast, the handheld type is affected by how the user holds the device and whether the user is reading a message on the screen.Therefore, the following tests and experiments were based on the waist-mounted type, and the sensor module was attached to the back of the user's waist, as seen in Figure 3.

Sensor Error Model and Calibration Method
Due to the high noise and errors of low-cost MEMS sensors, which are the result of manufacturing imperfections and other errors, a calibration procedure is required before they can be effectively and reliably used.Such errors can basically be divided into two categories: random constant and time-correlated random process errors [32].Since the dynamic representation of random constant errors is simple, and these have a significant influence on the performance of the sensor, the selected calibration parameters for this study are the random constant errors that could result from a sensor triad of scale factors, biases, and orthogonalization angles.The sensor error model for the aforementioned specified sensor error triad is as follows [29]: where á y , á u , K, T, and Ñ b denote the sensor outputs, observed physical quantity, scale factor matrix, orthogonalization angles matrix, and bias vector, respectively.The details of K, T, and Ñ b are as follows [29]: T " » -- where α x , α y , and α z denote nonorthogonal angles.
The sensor model was applied to two different sensor triads, which are the accelerometer triad and gyroscope triad in this study.With this study's proposed sensor module, the calibration procedures for each sensor triad can be accomplished by rotating the sensors to various random or specified rotations.For each sensor triad, there are nine parameters to be determined: three scale factors, three biases, and three nonorthogonal angles.This means that nine or more orientations and rotations are required to determine these parameters.The calibrations for each sensor triad are accomplished by using the scalar calibration and the least squares methods [29].

Accelerometer Calibration
The calibration of the accelerometer triad can be accomplished by using the magnitude of the Earth's gravitational field, which is constant in a specified location without the influence of other disturbances.Therefore, the reference value of the accelerometer triad is the gravitational constant represented by 1 g.It is an empirical physical constant and is independent to the orientations of the sensor module when it is static.For this reason, the precise orientations of this sensor triad are not required, but it is necessary to keep the triad static when acquiring data.
The calibration of the accelerometer triad in this study was performed on a six-axis translation and rotation platform, as shown in Figure 5.By fixing the sensor triad to at least nine different orientations on the platform and applying the least squares optimization, the nine-parameter vector can be determined.The calibration results of the accelerometer triad are presented in Table 2. Figure 6 shows that the error margin of the accelerometer triad is 0.3% of gravitational acceleration.

Gyroscope Calibration
The calibration of the gyroscope triad can also be accomplished by applying scalar calibration to a rotation platform.In this study, a single-axis rotation platform was utilized to perform the calibration of the gyroscope triad.The platform held the sensor triad in a desired orientation and performed a specified rotation with a constant angular rate; thus, the reference value of the rotating sensor triad was able to be determined.For this study, the specified angular rate was set to 300 deg/s during the calibration.Moreover, the accuracy biases of the gyroscope triad were first determined by keeping the platform in a static condition.After the biases were determined, the remaining unknown parameters were reduced to six, and this required at least six different rotations of the platform with a constant angular rate to apply the least squares optimization.The results of the gyroscope calibration with this procedure are shown in Table 3.In addition, Figure 7 shows the errors of the gyroscope triad, with an error margin lower than 0.2% of the reference angular rate.

Gyroscope Calibration
The calibration of the gyroscope triad can also be accomplished by applying scalar calibration to a rotation platform.In this study, a single-axis rotation platform was utilized to perform the calibration of the gyroscope triad.The platform held the sensor triad in a desired orientation and performed a specified rotation with a constant angular rate; thus, the reference value of the rotating sensor triad was able to be determined.For this study, the specified angular rate was set to 300 deg/s during the calibration.Moreover, the accuracy biases of the gyroscope triad were first determined by keeping the platform in a static condition.After the biases were determined, the remaining unknown parameters were reduced to six, and this required at least six different rotations of the platform with a constant angular rate to apply the least squares optimization.The results of the gyroscope calibration with this procedure are shown in Table 3.In addition, Figure 7 shows the errors of the gyroscope triad, with an error margin lower than 0.2% of the reference angular rate.

Gyroscope Calibration
The calibration of the gyroscope triad can also be accomplished by applying scalar calibration to a rotation platform.In this study, a single-axis rotation platform was utilized to perform the calibration of the gyroscope triad.The platform held the sensor triad in a desired orientation and performed a specified rotation with a constant angular rate; thus, the reference value of the rotating sensor triad was able to be determined.For this study, the specified angular rate was set to 300 deg/s during the calibration.Moreover, the accuracy biases of the gyroscope triad were first determined by keeping the platform in a static condition.After the biases were determined, the remaining unknown parameters were reduced to six, and this required at least six different rotations of the platform with a constant angular rate to apply the least squares optimization.The results of the gyroscope calibration with this procedure are shown in Table 3.In addition, Figure 7 shows the errors of the gyroscope triad, with an error margin lower than 0.2% of the reference angular rate.

Multi-Sensor Fusion Algorithm
For the step-and-heading-based dead reckoning method, the accuracy of the estimated step count, the length, and the heading were determined by the quality of the measured acceleration and the angular rate.In order to enhance the quality of the measurements for the sensors and acquire information from them, a multi-sensor fusion algorithm was applied by using a second-order complementary filter [33].This multi-sensor fusion algorithm then output the calibrated acceleration, calibrated angular rates, and the estimated attitude, which is the roll and pitch angles, to the Dead Reckoning Algorithm part.
The preprocessing of the multi-sensor fusion algorithm consisted of acquiring the raw data from the sensor module, performing the sensor calibration, data filtering, and obtaining the attitude estimation from the accelerometer.The applied data filtering used was a low-pass filter with a 5 Hz cutoff frequency, and it was applied to the outputs of the accelerometer triad.The selected cutoff frequency was based on the frequencies of different movements, between 0.4 and 5 Hz, for regular human daily activity [34,35].The direct outputs of the sensors are the acceleration and angular rate of the target object, but these signals are not enough to describe the motion of the human body while walking.In order to extract more information about pedestrian activities, the multi-sensor fusion algorithm was applied to derive the reliable orientation of the sensor module.The orientation is information that can be used to indicate the spatial condition of the target object when performing various daily activities, such as walking, jogging, or cycling.In this study, the estimated attitude of the user is estimated by fusing the outputs of the accelerometer and gyroscopes with the secondorder complementary filter.The basic idea of the complementary filter is to fuse the roll and pitch angles derived from the gyroscope outputs through a high-pass filter, and those derived from the accelerometer through a low-pass filter, to obtain the estimated attitude, thus compensating for the drift of the gyroscope and the slow dynamics and high noise of the accelerometer.The cutoff frequencies of the adopted low-pass and high-pass filters were both set to 0.1 Hz.This number was determined by test data and was based on the frequencies of different movements of regular human

Multi-Sensor Fusion Algorithm
For the step-and-heading-based dead reckoning method, the accuracy of the estimated step count, the length, and the heading were determined by the quality of the measured acceleration and the angular rate.In order to enhance the quality of the measurements for the sensors and acquire information from them, a multi-sensor fusion algorithm was applied by using a second-order complementary filter [33].This multi-sensor fusion algorithm then output the calibrated acceleration, calibrated angular rates, and the estimated attitude, which is the roll and pitch angles, to the Dead Reckoning Algorithm part.
The preprocessing of the multi-sensor fusion algorithm consisted of acquiring the raw data from the sensor module, performing the sensor calibration, data filtering, and obtaining the attitude estimation from the accelerometer.The applied data filtering used was a low-pass filter with a 5 Hz cutoff frequency, and it was applied to the outputs of the accelerometer triad.The selected cutoff frequency was based on the frequencies of different movements, between 0.4 and 5 Hz, for regular human daily activity [34,35].The direct outputs of the sensors are the acceleration and angular rate of the target object, but these signals are not enough to describe the motion of the human body while walking.In order to extract more information about pedestrian activities, the multi-sensor fusion algorithm was applied to derive the reliable orientation of the sensor module.The orientation is information that can be used to indicate the spatial condition of the target object when performing various daily activities, such as walking, jogging, or cycling.In this study, the estimated attitude of the user is estimated by fusing the outputs of the accelerometer and gyroscopes with the second-order complementary filter.The basic idea of the complementary filter is to fuse the roll and pitch angles derived from the gyroscope outputs through a high-pass filter, and those derived from the accelerometer through a low-pass filter, to obtain the estimated attitude, thus compensating for the drift of the gyroscope and the slow dynamics and high noise of the accelerometer.The cutoff frequencies of the adopted low-pass and high-pass filters were both set to 0.1 Hz.This number was determined by test data and was based on the frequencies of different movements of regular human ISPRS Int.J. Geo-Inf.2016, 5, 70 9 of 21 daily activity to recognize stationary from moving activity.The estimated attitudes would thus have both short-and long-term accuracy.
Figure 8 presents the estimated roll and pitch angles from different methods while the subject is walking.The data denoted as "acc," ''gyro," and "CF" are the roll and pitch angles derived from the accelerometer, the gyroscope, and the complementary filter methods, respectively.The data reveal that the accelerometer suffers from high noise during high dynamic motion, the gyroscope suffers from drift, and only the complementary filter can perform well in both the short and long terms.This figure also shows that the estimated roll and pitch angles from the CF method are more reliable than those from the other two estimation methods.The drift of the pitch angle is larger than the drift in the roll angle.The reason for this issue could be that the pitch angle contains larger errors in bias and initial value.Moreover, the results reflect that a walking motion is fairly complicated and consists of regular vertical and horizontal motion.daily activity to recognize stationary from moving activity.The estimated attitudes would thus have both short-and long-term accuracy.Figure 8 presents the estimated roll and pitch angles from different methods while the subject is walking.The data denoted as "acc," ''gyro," and "CF" are the roll and pitch angles derived from the accelerometer, the gyroscope, and the complementary filter methods, respectively.The data reveal that the accelerometer suffers from high noise during high dynamic motion, the gyroscope suffers from drift, and only the complementary filter can perform well in both the short and long terms.This figure also shows that the estimated roll and pitch angles from the CF method are more reliable than those from the other two estimation methods.The drift of the pitch angle is larger than the drift in the roll angle.The reason for this issue could be that the pitch angle contains larger errors in bias and initial value.Moreover, the results reflect that a walking motion is fairly complicated and consists of regular vertical and horizontal motion.

Pedestrian Dead Reckoning Algorithm
The proposed PDR in this study is based on the step-and-heading-based dead reckoning method.A current location is derived from a previous location by adding the displacement estimated from step length and heading.Therefore, the accuracy of the estimated step count, length, and heading is critical to the performance of the PDR.In this study, since the measurement of the magnetometer triad was influenced by both natural and man-made sources of magnetism in the indoor environment, the magnetometer triad was not adopted to aid with heading estimation.The Step Counting block detects a user's periodic motion while moving, and it outputs the detected steps and step time to the Knowledge-Based SLE block.The Knowledge-Based SLE block calculates step strength and frequency using estimated step count and step time.With an estimated step strength and frequency, the Knowledge-Based SLE block then uses the FL method to estimate every step length of a user.A user's heading or the direction they face is estimated by integrating the angular rates in the Heading Estimation block.Based on an initial position, a user's traveling distance, and continuous heading information, a user's location at any time is thus able to be estimated by the PDR algorithm.

Step Counting
Step detection and counting are fundamental with regard to knowing the displacement of a user.Accelerometers are widely used to detect a user's steps, and various methods to achieve this have been presented in many studies, with peak detection and zero-crossing detection widely applied to waist-mounted and handheld PDRs [10,16,36].The objective of the Step Counting block is to

Pedestrian Dead Reckoning Algorithm
The proposed PDR in this study is based on the step-and-heading-based dead reckoning method.A current location is derived from a previous location by adding the displacement estimated from step length and heading.Therefore, the accuracy of the estimated step count, length, and heading is critical to the performance of the PDR.In this study, since the measurement of the magnetometer triad was influenced by both natural and man-made sources of magnetism in the indoor environment, the magnetometer triad was not adopted to aid with heading estimation.The Step Counting block detects a user's periodic motion while moving, and it outputs the detected steps and step time to the Knowledge-Based SLE block.The Knowledge-Based SLE block calculates step strength and frequency using estimated step count and step time.With an estimated step strength and frequency, the Knowledge-Based SLE block then uses the FL method to estimate every step length of a user.A user's heading or the direction they face is estimated by integrating the angular rates in the Heading Estimation block.Based on an initial position, a user's traveling distance, and continuous heading information, a user's location at any time is thus able to be estimated by the PDR algorithm.

Step Counting
Step detection and counting are fundamental with regard to knowing the displacement of a user.Accelerometers are widely used to detect a user's steps, and various methods to achieve this have been presented in many studies, with peak detection and zero-crossing detection widely applied to waist-mounted and handheld PDRs [10,16,36].The objective of the Step Counting block is to recognize each step and to detect its duration and strength.In order to increase the accuracy and reliability of the step counting method, in this study a static state detection method was applied to detect whether a user is moving or not.The Signal Vector Magnitude (SVM) is calculated every epoch as a feature of a user's movement.When a user is static, the detected SVM is approximately 1 g.If the SVM value deviates from 1 g and exceeds a pre-selected threshold, in this case 0.1 g, then that user is considered to be moving.For the kth epoch, SVM(k) is defined as the root square of the sum of the squared acceleration signal of each axis: where a x , a y , and a z denote the measured acceleration in the x-axis, y-axis, and z-axis, respectively, of the accelerometer triad at the kth epoch.Peak detection and zero crossing detection are the most common step detection methods.However, the results of some walking experiments, as shown in Figure 9, have indicated that the raw accelerometer data contain significant noise and inconsistences for each step, especially in the yand z-axes.This reflects the fact that human walking creates a reaction force when the feet hit the ground, which in technical terms is the heel strike phase of the gait cycle.The high noise of the acceleration information degrades the accuracy of step detection methods based on either peak detection or zero crossing detection.As shown in Figure 9, the acceleration in the x-axis is more regular and stable than that in the other two axes, and the x-axis acceleration is consistent with the forward displacement of the user when walking.Therefore, a step detection method was proposed in this study by using the periodic characteristics in the x-axis velocity, which represents forward and backward velocity.It is denoted as Vx and is integrated from the x-axis acceleration.When a pair of peaks and valleys in the x-axis velocity is detected, one step will be recognized in the Step Counting block.The detecting process of peaks (maxima) and valleys (minima) is done by determining the local extrema of Vx in real time.In this study, two thresholds were set to determine whether the local maxima or minima were reckoned.One was the difference between present Vx and nearby extremum, and this threshold value was set at 0.05 m/s.The other was the difference between the present time and the time when a previous extremum was detected, and its value was set at 0.15 s.The contention is that this threshold can prevent the influence of noise on step counting.The determination of these two thresholds was made according to the test data measured from different subjects.When these two thresholds were achieved at the same time, the local maxima or minima were determined.Theoretically, step time is equal to the time of two repeated walking signals.In this study, we used two continuous valley signals in the x-axis velocity to calculate the step time.Figure 10 shows the roll angle, pitch angle, and the x-axis velocity.The green dotted line of the top plot presents the results of static state detection, and the zero value represents the static state.The red asterisks of the bottom plot indicate the steps that are detected.recognize each step and to detect its duration and strength.In order to increase the accuracy and reliability of the step counting method, in this study a static state detection method was applied to detect whether a user is moving or not.The Signal Vector Magnitude (SVM) is calculated every epoch as a feature of a user's movement.When a user is static, the detected SVM is approximately 1 g.If the SVM value deviates from 1 g and exceeds a pre-selected threshold, in this case 0.1 g, then that user is considered to be moving.For the kth epoch, SVM(k) is defined as the root square of the sum of the squared acceleration signal of each axis: where   ,   , and   denote the measured acceleration in the x-axis, y-axis, and z-axis, respectively, of the accelerometer triad at the kth epoch.Peak detection and zero crossing detection are the most common step detection methods.However, the results of some walking experiments, as shown in Figure 9, have indicated that the raw accelerometer data contain significant noise and inconsistences for each step, especially in the y-and z-axes.This reflects the fact that human walking creates a reaction force when the feet hit the ground, which in technical terms is the heel strike phase of the gait cycle.The high noise of the acceleration information degrades the accuracy of step detection methods based on either peak detection or zero crossing detection.As shown in Figure 9, the acceleration in the x-axis is more regular and stable than that in the other two axes, and the x-axis acceleration is consistent with the forward displacement of the user when walking.Therefore, a step detection method was proposed in this study by using the periodic characteristics in the x-axis velocity, which represents forward and backward velocity.It is denoted as Vx and is integrated from the x-axis acceleration.When a pair of peaks and valleys in the x-axis velocity is detected, one step will be recognized in the Step Counting block.The detecting process of peaks (maxima) and valleys (minima) is done by determining the local extrema of Vx in real time.In this study, two thresholds were set to determine whether the local maxima or minima were reckoned.One was the difference between present Vx and nearby extremum, and this threshold value was set at 0.05 m/s.The other was the difference between the present time and the time when a previous extremum was detected, and its value was set at 0.15 s.The contention is that this threshold can prevent the influence of noise on step counting.The determination of these two thresholds was made according to the test data measured from different subjects.When these two thresholds were achieved at the same time, the local maxima or minima were determined.Theoretically, step time is equal to the time of two repeated walking signals.In this study, we used two continuous valley signals in the x-axis velocity to calculate the step time.Figure 10 shows the roll angle, pitch angle, and the x-axis velocity.The green dotted line of the top plot presents the results of static state detection, and the zero value represents the static state.The red asterisks of the bottom plot indicate the steps that are detected.

Knowledge-Based SLE Algorithm Based on Fuzzy Logic
There are several step length estimation methods that have been proposed for different applications in the past [21][22][23].A comparison of several popular methods has revealed that the one proposed by Weinberg et al. is best suited for a waist-mounted IMU [16,26].This method adopts an approximation of the inverted pendulum model described by Zijlstra et al. [24], yet it is a model that does not require information about the user's leg length.This approach applies an empirical equation, which estimates the step length, L, from the vertical displacement of the pelvis.From data gained from empirical experiments, the equation can be approximated as: where  max and  min are the maximum and minimum vertical acceleration during a step, respectively.K is a constant value that needs to be adjusted for different subjects.This empirical equation has been adopted in this study in order to compare its performance with that of the method proposed herein.The applied constant values for each test subject were obtained by using different step lengths measured by said test subjects.Therefore, the constant values of the adopted empirical equation will be changed based on the difference between the maximum and minimum vertical acceleration.
The fuzzy rules adopted in this study are the Mamdani-type, also called the max-min inference method, and the variables are two inputs and one output.The defuzzification strategy is the centerof-gravity method [37].The input variables of the adopted FL are step frequency and strength, and its output value is the estimated step length.The step frequency is derived from the step time, and the step strength is based on the summation of signal magnitude subtraction, calculated by subtracting the SVM from the magnitude of the gravitational field.The step frequency and strength of the nth step are determined as follows: where   represents the step time of nth step, and E is the detected epochs in the duration of the nth step.
The FL design is based on the results of a metrical analysis of a set of walking experiments.The target subject was asked to walk at different step lengths, 30, 60, and 90 cm, and different frequencies, 1, 1.5, 2, and 2.5 Hz.The adopted step lengths of the subjects were controlled by drawing markers on the ground for each given step length.After analyzing the resulting data, the membership functions of the frequency and strength inputs that were adopted are five and seven triangular functions,

Knowledge-Based SLE Algorithm Based on Fuzzy Logic
There are several step length estimation methods that have been proposed for different applications in the past [21][22][23].A comparison of several popular methods has revealed that the proposed by Weinberg et al. is best suited for a waist-mounted IMU [16,26].This method adopts an approximation of the inverted pendulum model described by Zijlstra et al. [24], yet it is a model that does not require information about the user's leg length.This approach applies an empirical equation, which estimates the step length, L, from the vertical displacement of the pelvis.From data gained from empirical experiments, the equation can be approximated as: where a max and a min are the maximum and minimum vertical acceleration during a step, respectively.K is a constant value that needs to be adjusted for different subjects.This empirical equation has been adopted in this study in order to compare its performance with that of the method proposed herein.The applied constant values for each test subject were obtained by using different step lengths measured by said test subjects.Therefore, the constant values of the adopted empirical equation will be changed based on the difference between the maximum and minimum vertical acceleration.The fuzzy rules adopted in this study are the Mamdani-type, also called the max-min inference method, and the variables are two inputs and one output.The defuzzification strategy is the center-of-gravity method [37].The input variables of the adopted FL are step frequency and strength, and its output value is the estimated step length.The step frequency is derived from the step time, and the step strength is based on the summation of signal magnitude subtraction, calculated by subtracting the SVM from the magnitude of the gravitational field.The step frequency and strength of the nth step are determined as follows: Strength pnq " pSV M pkq ´gq (7) where t n represents the step time of nth step, and E is the detected epochs in the duration of the nth step.
The FL design is based on the results of a metrical analysis of a set of walking experiments.The target subject was asked to walk at different step lengths, 30, 60, and 90 cm, and different frequencies, 1, 1.5, 2, and 2.5 Hz.The adopted step lengths of the subjects were controlled by drawing markers on the ground for each given step length.After analyzing the resulting data, the membership functions of the frequency and strength inputs that were adopted are five and seven triangular functions, respectively.
The range of the membership functions for the frequency input is from 0.6 to 3 Hz, and for the strength input is from 2 to 25 g.The adopted membership functions of the estimated step length output are seven triangular functions, and its range is from 20 to 105 cm.There are thus 35 rules in the applied FL, and the output surface of the FIS is shown in Figure 11.Due to the differences in height, weight, and leg length between every subject, the design of the FL, including the membership functions and the rule table, varied among the different subjects.For each subject, the design of the FL needed to be adjusted according to the test data.
respectively.The range of the membership functions for the frequency input is from 0.6 to 3 Hz, and for the strength input is from 2 to 25 g.The adopted membership functions of the estimated step length output are seven triangular functions, and its range is from 20 to 105 cm.There are thus 35 rules in the applied FL, and the output surface of the FIS is shown in Figure 11.Due to the differences in height, weight, and leg length between every subject, the design of the FL, including the membership functions and the rule table, varied among the different subjects.For each subject, the design of the FL needed to be adjusted according to the test data.The test results of the FL designed for a selected target subject are shown in Figure 12.The subject walked 50 steps with unconstrained speed, and the desired step length was 61 cm.The ground truth of the traveled distance was measured via a laser range finder.The results show that the detected step count matches the true count, and the estimated step lengths are close to the desired length.The results also show that the first few steps have greater errors than the others.The probable reason for this is that the subject started to walk from a standing position, and the first few steps were thus not stable.The mean error of the estimated step lengths is 1.36 cm, and the standard deviation is 4.27 cm.The test results of the FL designed for a selected target subject are shown in Figure 12.The subject walked 50 steps with unconstrained speed, and the desired step length was 61 cm.The ground truth of the traveled distance was measured via a laser range finder.The results show that the detected step count matches the true count, and the estimated step lengths are close to the desired length.The results also show that the first few steps have greater errors than the others.The probable reason for this is that the subject started to walk from a standing position, and the first few steps were thus not stable.The mean error of the estimated step lengths is 1.36 cm, and the standard deviation is 4.27 cm.respectively.The range of the membership functions for the frequency input is from 0.6 to 3 Hz, and for the strength input is from 2 to 25 g.The adopted membership functions of the estimated step length output are seven triangular functions, and its range is from 20 to 105 cm.There are thus 35 rules in the applied FL, and the output surface of the FIS is shown in Figure 11.Due to the differences in height, weight, and leg length between every subject, the design of the FL, including the membership functions and the rule table, varied among the different subjects.For each subject, the design of the FL needed to be adjusted according to the test data.The test results of the FL designed for a selected target subject are shown in Figure 12.The subject walked 50 steps with unconstrained speed, and the desired step length was 61 cm.The ground truth of the traveled distance was measured via a laser range finder.The results show that the detected step count matches the true count, and the estimated step lengths are close to the desired length.The results also show that the first few steps have greater errors than the others.The probable reason for this is that the subject started to walk from a standing position, and the first few steps were thus not stable.The mean error of the estimated step lengths is 1.36 cm, and the standard deviation is 4.27 cm.

Heading Estimation
In the Heading Estimation block of Figure 1, the estimated heading of the sensor module was derived from the integration of the calibrated angular rate measured from the gyroscope.In order to improve the accuracy of the heading estimation, the coordinate frame of the calibrated angular rates were transferred from the sensor body to local horizontal frames by using the attitude angles estimated from the multi-sensor fusion algorithm.The estimated heading is determined by Equation ( 8): ψ is the angular rate of the heading angle in a local horizontal frame, and .
ψ b is the bias of .
ψ. Due to the drifting problem of the gyroscope, it was vital to determine the biases of the gyroscope triad.The determination of the biases was carried out using the static condition of the sensor module before the user started to walk.The initialization of the estimated heading angles was to average the heading angles of the first few steps when a user walks straightly.Figure 13 presents the results of heading estimation, and it reveals that walking is partially composed of the swinging motion of the body when the subject walks in a straight line.After walking 50 steps, the subject faces the same direction as when they started to walk.The accumulative heading error of this test is within 1 deg after the subject walked for 40 s.The results demonstrate the short-term accuracy of the heading estimation.In terms of long-term accuracy, the map-matching method can be adopted to correct the heading errors [9,10].Another way to reduce the accumulating error of heading is to use more accurate gyroscopes, which can be high-performance fiber-optic gyroscopes.It should be noted that, in Figure 13, the swinging motion in heading is caused by the pelvic motion when the subjects were walking [38].

Heading Estimation
In the Heading Estimation block of Figure 1, the estimated heading of the sensor module was derived from the integration of the calibrated angular rate measured from the gyroscope.In order to improve the accuracy of the heading estimation, the coordinate frame of the calibrated angular rates were transferred from the sensor body to local horizontal frames by using the attitude angles estimated from the multi-sensor fusion algorithm.The estimated heading is determined by Equation ( 8): where  ̇ is the angular rate of the heading angle in a local horizontal frame, and  ̇ is the bias of  ̇.
Due to the drifting problem of the gyroscope, it was vital to determine the biases of the gyroscope triad.The determination of the biases was carried out using the static condition of the sensor module before the user started to walk.The initialization of the estimated heading angles was to average the heading angles of the first few steps when a user walks straightly.Figure 13 presents the results of heading estimation, and it reveals that walking is partially composed of the swinging motion of the body when the subject walks in a straight line.After walking 50 steps, the subject faces the same direction as when they started to walk.The accumulative heading error of this test is within 1 deg after the subject walked for 40 s.The results demonstrate the short-term accuracy of the heading estimation.In terms of long-term accuracy, the map-matching method can be adopted to correct the heading errors [9,10].Another way to reduce the accumulating error of heading is to use more accurate gyroscopes, which can be high-performance fiber-optic gyroscopes.It should be noted that, in Figure 13, the swinging motion in heading is caused by the pelvic motion when the subjects were walking [38].

Experiment Results and Discussion
Two types of experiments were conducted in this study to verify the performance and accuracy of the proposed PDR system.One was a step length estimation experiment, and the other was a pedestrian navigation experiment.The step estimation experiment was conducted by asking the subjects to walk at specific step lengths.The objective of this first experiment was to examine the reliability and accuracy of the proposed SLE method based on multi-sensor fusion and FL algorithms.The second experiment, the pedestrian navigation experiment, was conducted to examine the longterm performance of the proposed SLE for a PDR system.In the step length experiment, ten subjects (6 male and 4 female) took part.Their ages ranged from 21 to 40 years (mean: 28.0 years), their body masses ranged from 48 to 80 kg (mean: 61.7 kg), and their heights ranged from 157 to 177 cm (mean: 166.5 cm).One of the male subjects was selected as the target subject for all experiments, and the FL was calibrated based on the testing data of this individual.The height and body mass of the target subject were 170 cm and 65 kg, respectively.

Experiment Results and Discussion
Two types of experiments were conducted in this study to verify the performance and accuracy of the proposed PDR system.One was a step length estimation experiment, and the other was a pedestrian navigation experiment.The step estimation experiment was conducted by asking the subjects to walk at specific step lengths.The objective of this first experiment was to examine the reliability and accuracy of the proposed SLE method based on multi-sensor fusion and FL algorithms.The second experiment, the pedestrian navigation experiment, was conducted to examine the long-term performance of the proposed SLE for a PDR system.In the step length experiment, ten subjects (6 male and 4 female) took part.Their ages ranged from 21 to 40 years (mean: 28.0 years), their body masses ranged from 48 to 80 kg (mean: 61.7 kg), and their heights ranged from 157 to 177 cm (mean: 166.5 cm).One of the male subjects was selected as the target subject for all experiments, and the FL was calibrated based on the testing data of this individual.The height and body mass of the target subject were 170 cm and 65 kg, respectively.

Step Length Estimation Experiment and Results
In order to verify the reliability and accuracy of the proposed methods, the step estimation experiment was conducted by having the subjects walk in a straight line.The target subject was asked to walk 50 steps three different times, with different step lengths of 30.5, 61, and 91.5 cm each time.The ground truth of the traveled distance was measured via a laser range finder.The multi-sensor fusion and SLE algorithms were installed on the sensor module and ran in real time.The target subject walked three times for each different step length.
Table 4 shows the results of the step length estimation for the target subject.The step counting results show that only two steps out of 450 were missed and the accuracy of the proposed step counting method is thus 99.5%.Regarding the step length estimation, the maximum mean error of the FL method compared with required step lengths is 1.73 cm, which occurred in Test 7. The standard deviation of the estimated step lengths is from 2.18 to 4.45 cm.The 4th-r denotes the step length estimation of the empirical equation proposed by Weinberg et al.The value of K is determined by training with different step lengths of 30, 60, and 90 cm.The maximum mean error of the empirical equation compared with the required step lengths is 3.87 cm, which occurred in Test 9.The estimated lengths of the empirical equation in Test 2 and 7 are better than the FL method, but the total distance errors of the FL method are less than 1.4% of total reference distance, which is better than the empirical equation.Since the FL adopted in this study was customized for the target subject, nine other subjects were included to examine the usability of the FL with regard to non-target subjects.The first column of Table 5 denotes the subject number, height, and body mass of the subjects.The last four subjects, Subjects 7 to 10, are female.Table 5 shows the results of the step length estimation using the FL and empirical equation for all of the non-target subjects.The step counting results show that only one step out of 900 were missed, and the accuracy of the proposed step counting method is thus 99.89%.The results also reveal that the estimated step lengths of Subject 2 are close to those of the target subject and that both the height and body mass of the subjects have influences on the estimated step length based on the proposed method.The maximum estimated distance errors measured from the FL were about 0.6% to 12.3%, and the total estimated distance error was about 4.3%.The location errors of non-target subjects were from 0.27 to 2.75 m.These results reveal that the location errors were slightly larger than the accumulated walking distance errors in most tests after the heading errors were introduced.Moreover, the errors of the non-target subjects were larger than the error of the target subject since the FL was trained based on the data gathered from the target subject.Moreover, the estimated step lengths of the female and lighter subjects were larger than the others.Compared to the empirical equation, the FL also had a better performance for the non-target subjects, except for Test 13, 15, and 16.

Pedestrian Navigation Experiment and Results
The objective of this experiment was to examine the long-term performance of the proposed PDR system applied to the target subject.Two courses were selected to demonstrate the accuracy and reliability of the proposed system.One was in an indoor environment and the other was in an outdoor environment.In an indoor environment, the subjects walked twice around a selected course, with a total distance of around 116.51 m, which was measured via a laser range finder.Table 6 presents the results of the subjects walking on this course.The first two tests are the results when Subject 2 was asked to walk at a constant step length of approximately 60 cm, and the other two are the results when Subject 1 walked at self-selected step lengths and speeds.These results show that only two steps out of 731 were missed, and the accuracy of the proposed step counting method is thus 99.7%.The maximum distance error of the estimated distance was 1.39 m, which is less than 1.2% of the reference distance, despite the subjects walking at different step lengths and speeds.The total estimated distance error was about 0.17%.The S-E term denotes the distance error between the start and end points of the course, called the loop closure error.Figure 14     In the outdoor environment, the target subject walked on a path in a university campus covered with brick pavement for six rounds, with the total distance of each round being around 385.2 m, which was measured using Google Maps, as shown in Figure 15.The biases of the gyroscope were initialized by collecting the values when the sensor module was static prior to every test.The subject took about 5 min to complete each round.Expect for the designed trajectory, the subject decided the step lengths and speed naturally.The results show that the estimated distance errors were from 0.19 to 6.85 m, and the loop closure errors were from 1.49 to 10.15 m, as shown in Table 7.The maximum heading error occurred in Test 4 was 4.27 deg.Moreover, the step counting results show that only two steps out of 3289 steps was missed, and the accuracy of the proposed step counting method was 99.9%.The maximum distance error of the estimated distance was 6.85 m, which is less than 1.78% of the reference distance, despite the walking at different step lengths and speeds on brick pavement.These results verify the accuracy and reliability of the proposed methods and the dead reckoning algorithm applied to the target subject.In the outdoor environment, the target subject walked on a path in a university campus covered with brick pavement for six rounds, with the total distance of each round being around 385.2 m,

Results and Discussion
The results of the experiments using the proposed multi-sensor and FL step length estimation algorithms demonstrate the high accuracy and reliability of the SLE method for the PDR system developed in this study.The proposed SLE based on the FL has been shown to have the capability of estimating a wide range of step lengths for a target subject.The results show that the proposed SLE method has a better performance than the empirical equation proposed by Weinberg et al. [26] with the varying constant value K training with three different step lengths, 30, 60, and 90 cm.Moreover, for the non-target subjects, the estimation accuracy of the FL method was better than the empirical equation.In particular, it has been observed that, when the height and body mass of a non-target subject is the same as the target subject, the accuracy of the FL method for those two individuals are similar.The results show that the height and body mass of the subjects both had an influence on the estimated step length based on the FL.The maximum estimated distance errors measured from the FL were about 0.6% to 12.3%, and the total estimated distance error was about 4.3%.The maximum estimated error in this study is thus better than that reported in the study in [16].From the experiment results of this study, it is revealed that the errors of the non-target subjects were larger than the error of the target subject since the FL was trained based on the data measured from the target subject.This shows the disadvantage of the proposed SLE method, which has a higher accuracy only for the target subject or subjects with similar height and body mass to the target subject.
The results of the pedestrian navigation experiment show that the proposed method had the performance with acceptable accuracy.In the indoor environment, the maximum distance error of the walking distance was 1.2% of 116.51 m, and the errors of the loop closure were less than 2.2 m.However, with regard to the drifting problem of the gyroscope, the results of the first course show that the errors of the distance between the start and end points became larger from Test 1 to 4, as seen in Table 6.In the outdoor environment, the test duration of every round was about 5 min.The maximum distance error of the walking distance was 1.78% out of 385.2 m, and the errors of the loop closure were less than 5.8 m.Due to the drifting problem of the gyroscope triad, which has significant influence on the heading estimation, a rigorous process was conducted to determine the biases of the gyroscope triad.The design of this process was based on the experimental results as shown in Figure 16.In this test, the gyroscope triad was kept static for 3 h.After 25 min, the outputs became steady, especially for z axis.Therefore, the tests in Figure 15 were conducted after the gyroscope outputs became steady.Then, the biases of the gyroscope triad were carefully acquired at the beginning of every test when the sensor module was static.With this process, the maximum heading error occurred in Test 4 of the second course and was 4.27 deg.
The calibrating procedure adopted in this study was easily able to compensate for the random constant errors, but the time-correlated random process errors, such as the stochastic error and temperature effects [20,39], were not solved.There are many possible ways to solve the drifting problem of the gyroscope, such as using complex compensation-control methods to compensate for the errors of the sensor for one [40], or adopting the map-matching algorithm to the pedestrian navigation systems for another [9,10].For indoor environments, the radio-frequency beacon-based positioning, such as Wi-Fi or Bluetooth, is a good solution to overcome the drifting problem when the user travels a long distance.A motion-assisted Wi-Fi localization, which fused Wi-Fi fingerprint and inertial sensors, has been studied and discussed in [41].In order to enhance the long-term accuracy and reliability, the infrastructures are required for a PDR system.Moreover, due to the growth of dead reckoning error, different levels of integrity monitoring and reliability assessment are required to constrain the accumulating error for long-term applications or complex environments [42].
the varying constant value K training with three different step lengths, 30, 60, and 90 cm.Moreover, for the non-target subjects, the estimation accuracy of the FL method was better than the empirical equation.In particular, it has been observed that, when the height and body mass of a non-target subject is the same as the target subject, the accuracy of the FL method for those two individuals are similar.The results show that the height and body mass of the subjects both had an influence on the estimated step length based on the FL.The maximum estimated distance errors measured from the FL were about 0.6% to 12.3%, and the total estimated distance error was about 4.3%.The maximum estimated error in this study is thus better than that reported in the study in [16].From the experiment results of this study, it is revealed that the errors of the non-target subjects were larger than the error of the target subject since the FL was trained based on the data measured from the target subject.This shows the disadvantage of the proposed SLE method, which has a higher accuracy only for the target subject or subjects with similar height and body mass to the target subject.The results of the pedestrian navigation experiment show that the proposed method had the performance with acceptable accuracy.In the indoor environment, the maximum distance error of the walking distance was 1.2% of 116.51 m, and the errors of the loop closure were less than 2.2 m.However, with regard to the drifting problem of the gyroscope, the results of the first course show

Conclusions
An accurate and usable SLE method for the PDR system with the features of a wide range of step lengths, a self-contained system, and real-time computing, based on the multi-sensor fusion and FL algorithms, has been proposed in this study.In order to achieve a self-contained capability, a portable and wearable inertial sensor module was developed using low-cost inertial sensors, a gyroscope, and an accelerometer, and it was based on the MEMS.Since the low-cost MEMS sensors suffer from various errors, the sensor errors of this module were calibrated with a sensor calibration procedure to improve the accuracy of the inertial sensors.
To enhance the reliability and stability of the PDR system, the adopted sensor module selected in this study was waist-mounted.In order to extract more information about pedestrian activities, a multi-sensor fusion algorithm was applied using a second-order complementary filter to derive the reliable orientation of the sensor module.To achieve accurate step counting and step time calculation, a step detection method was adopted that utilized velocity in the x-axis that was derived from acceleration along the x-axis.These results show the accuracy of the step counting method to be 99.5% for all tests.The wide-range SLE method for the PDR system was accomplished by using the FL method.The input variables of the adopted FL were step strength and frequency, and the output value was estimated step length.The FL design was based on the data acquired from the walking experiments of the target subject.The results of the proposed SLE for the target subject, who walked at different step lengths, showed distance errors that were within 1.2% of 116.51 m in the indoor environment, even for the non-target subject with the same height and body mass, and were within 1.78% of 385.2 m in the outdoor environment.The results of the experiment demonstrate that the proposed SLE had good navigation performance when the user was walking in an indoor environment.The SLE method and sensor calibration procedure could be applied to waist-mounted wearable devices with low-cost sensors to enhance the PDR and attitude estimation solutions.From the experiment's results, the proposed SLE method and the PDR scheme demonstrate the ability to be implemented on waist-mounted wearable devices in real time and are suitable for the indoor and outdoor environments considered in this study without the help of map information or a pre-installed infrastructure.

Figure 1 .
Figure 1.System block diagram of the proposed Pedestrian Dead Reckoning (PDR).

Figure 2 .
Figure 2. The self-developed ARM-based sensor module and an Android mobile device.

Figure 1 .
Figure 1.System block diagram of the proposed Pedestrian Dead Reckoning (PDR).

Figure 1 .
Figure 1.System block diagram of the proposed Pedestrian Dead Reckoning (PDR).

Figure 2 .
Figure 2. The self-developed ARM-based sensor module and an Android mobile device.

Figure 2 .
Figure 2. The self-developed ARM-based sensor module and an Android mobile device.

Figure 6 .
Figure 6.The calibration results of the total acceleration measured from the accelerometer triad.

Table 2 .Figure 6 .
Figure 6.The calibration results of the total acceleration measured from the accelerometer triad.

Figure 6 .
Figure 6.The calibration results of the total acceleration measured from the accelerometer triad.

Figure 7 .
Figure 7.The calibration results of the total rotation measured from the gyroscope triad (the red line is the reference).

Figure 7 .
Figure 7.The calibration results of the total rotation measured from the gyroscope triad (the red line is the reference).

Figure 8 .
Figure 8.The roll and pitch angles estimated from the three different methods.

Figure 8 .
Figure 8.The roll and pitch angles estimated from the three different methods.

Figure 9 .
Figure 9. Acceleration signals in each axis and the Signal Vector Magnitude (SVM) value of the user.

Figure 9 .
Figure 9. Acceleration signals in each axis and the Signal Vector Magnitude (SVM) value of the user.

Figure 10 .
Figure 10.Roll angle, pitch angle, and the velocity in the x-axis of a user while walking.

Figure 10 .
Figure 10.Roll angle, pitch angle, and the velocity in the x-axis of a user while walking.

Figure 11 .
Figure 11.Rule table design of the proposed PDR system.

Figure 12 .
Figure 12.The test results of the Fuzzy Logic (FL) designed for a target subject.

Figure 11 .
Figure 11.Rule table design of the proposed PDR system.

Figure 11 .
Figure 11.Rule table design of the proposed PDR system.

Figure 12 .
Figure 12.The test results of the Fuzzy Logic (FL) designed for a target subject.

Figure 12 .
Figure 12.The test results of the Fuzzy Logic (FL) designed for a target subject.

Figure 13 .
Figure 13.Estimated heading of a user walking 50 steps.

Figure 13 .
Figure 13.Estimated heading of a user walking 50 steps.

Figure 15 .
Figure 15.The trajectories of the subject walking on brick pavement.

Figure 15 .
Figure 15.The trajectories of the subject walking on brick pavement.

Figure 16 .
Figure 16.Static test of the adopted gyroscope triad.

Figure 16 .
Figure 16.Static test of the adopted gyroscope triad.

Table 1 .
The basic specifications of each sensor.

Table 1 .
The basic specifications of the two sensors used are listed directly below in Table1.The basic specifications of each sensor.

Table 1 .
Inc. (Ithaca, NY, USA).The gyroscope used was an A3G4250D gyroscope with a full-scale output range of ±245 deg/s, produced by STMicroelectronics.The basic specifications of the two sensors used are listed directly below in Table1.The basic specifications of each sensor.

Table 2 .
Calibrated parameters of the accelerometer triad.

Table 2 .
Calibrated parameters of the accelerometer triad.

Table 3 .
The calibrated parameters of the gyroscope triad.

Table 3 .
The calibrated parameters of the gyroscope triad.

Table 4 .
The experiment results of the Step Length Estimation (SLE) for the target subject.

Table 5 .
The results of the step length estimation for non-target subjects.

Table 7 .
The results of the target subject walking on brick pavement.

Table 6 .
The results of the subjects walking around selected course.

Table 7 .
The results of the target subject walking on brick pavement.

Table 7 .
The results of the target subject walking on brick pavement.