Next Article in Journal
Computational-Fluid-Dynamics-Based Optimization of Wavy-Slit Fin Geometry in Indoor Units of Air Conditioners Using Low-Global-Warming-Potential Refrigerants
Previous Article in Journal
Using Low-Cost Technology Devices for Monitoring Sleep and Environmental Factors Affecting It: A Systematic Review of the Literature
Previous Article in Special Issue
Emotion Estimation Using Noncontact Environmental Sensing with Machine and Deep Learning Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Indoor Walking Trajectory Estimation Using Mobile Device Sensors for Hand-Held and Hand-Swinging Modes †

by
Yuta Izutsu
1,‡ and
Nobuyoshi Komuro
2,*,‡
1
Graduate School of Science and Engineering, Chiba University, Chiba 263-8522, Japan
2
Digital Transformation Enhancement, Chiba University, Chiba 263-8522, Japan
*
Author to whom correspondence should be addressed.
This work is an extend version of a paper published in the proceeding of the IEEE International Conference on Consumer Electronics—Taiwan (ICCE-TW 2023), held in Pingtung, Kenting, Taiwan, 17–19 July 2023.
These authors contributed equally to this work.
Appl. Sci. 2025, 15(3), 1195; https://doi.org/10.3390/app15031195
Submission received: 16 November 2024 / Revised: 10 January 2025 / Accepted: 22 January 2025 / Published: 24 January 2025
(This article belongs to the Special Issue Trends and Prospects for Wireless Sensor Networks and IoT)

Abstract

:
We propose an indoor location estimation method using sensors of mobile devices. First, we perform attitude estimation using each sensor. This estimation is used to estimate the attitude of the mobile device with respect to the earth. Based on the acceleration and other information obtained from the attitude estimation, we then estimate the step detection, step length, and direction of the step. Finally, the location is calculated using all the estimation results. To eliminate the need to hold the mobile device in place during the estimation process, the method is configured so that estimates may be performed while walking, while looking at the screen, and while walking and holding the device in one hand. As the proposed method does not use indoor location fingerprinting or machine learning, real-time estimation can be performed. Although the accuracy could be higher, our experimental results show that the proposed method is able to effectively estimate the location and walking trajectory.

1. Introduction

With the spread of mobile devices such as smartphones and tablets in recent years, applications that provide users with location information obtained by using the devices’ sensors have become popular, and the demand for such applications has been increasing. In general applications, Global Positioning System (GPS) and Light Detection And Ranging (LiDAR) are mainly used for position estimation. However, because GPS uses the transmission time and reception of radio waves, accurate location estimation requires an outdoor location. On the other hand, LiDAR requires nonmoving objects and the presence of obstructions or objects in the vicinity. GPS is unreliable in underground and indoor facilities due to the presence of obstacles that block or attenuate radio waves. It can also be difficult to estimate position using LiDAR due to the presence of humans around the facility. Although there are methods that use machine learning, it is difficult to solve the problem of non-periodic geomagnetic interference from other devices, and the need for pretraining makes high introduction costs a challenge for general users.
In indoor location estimation, a method called Pedestrian Dead Reckoning (PDR) is particularly applicable to pedestrians. PDR is a method of calculating relative position from a certain point based on information such as acceleration, angular velocity, geomagnetism, and atmospheric pressure. There are various approaches to position estimation. Essentially, there are three steps: step number estimation, step length estimation, and direction estimation. In step count estimation, methods include record acceleration and determining the number of steps by the magnitude of the acceleration value [1,2,3]. In stride estimation, different methods use fixed values [4,5,6,7] or acceleration [8,9,10]. In direction estimation, methods use the acceleration, angular velocity, and geomagnetism [3]. A number of the above methods have actually already been implemented in factories and commercial facilities; however, these often require a dedicated terminal to be attached to the pedestrian. Previous studies have obtained measurements with an Inertial Measurement Unit (IMU) attached to the foot [11] or a PDR with a dedicated sensor unit attached to the belt [12,13]. Most of these methods require fixation to the body or the use of a dedicated terminal. As mentioned at the beginning of this paper, applications that provide location information to users have become popular because they are easy to operate and use, with no cost and no complicated operations. Therefore, these currently introduced applications are unlikely to be accepted by general users. In order for the system to be usable by anyone, it is necessary to eliminate restrictions such as the need for it to be fixed to the body or reliance on a dedicated terminal. Although PDR using mobile terminals has been studied in the past, it is difficult to perform unconstrained self-position estimation because it is necessary to perform estimation in hand-held walking and hand-swinging walking conditions. In addition, although geomagnetic sensors are suitable for estimating absolute direction, they are difficult to use in practical situations because other electronic devices and structures affect the geomagnetic field and cause errors. Device-based positioning estimation uses the geomagnetic values [10,11,14]. However, previous studies have often failed to consider the influence of structures and other electronic devices.
In a recent trend, indoor positioning fingerprints such as RSSI using BLE or WiFi are sometimes used to correct estimated positions [15,16,17,18]. However, when using BLE it is necessary to install beacons in the indoor environment where estimation is performed, and even WiFi-based methods require prior setup. Additionally, estimation methods that use markers or indoor images [13,19] require directing the camera to a specified position, and also require pretraining when utilizing machine learning. In all cases, these methods result in significant setup costs for general users and lead to loss of real-time performance capability due to increased computation time.
In this study, we propose an indoor location estimation approach using only mobile devices and perform trajectory estimation based on multiple data types obtained from the posture and sensors of the mobile device while the user is walking. The proposed approach has low deployment cost for general users. It does not use indoor location fingerprinting or machine learning, allowing for real-time estimation. In addition, it implements an algorithm that is insensitive to geomagnetic effects from other devices, meaning that it can be used in any environment. Based on the positional relationship between a pedestrian and a mobile terminal, we propose a walking trajectory and location estimation system that divides the walking method into walking while looking at a screen (hand-held walking) and walking while holding a mobile device by hand (hand-swinging walking). In particular, we implement the proposed algorithm for estimating the walking trajectory during walking, then evaluate the trajectory and errors by conducting actual experiments.

2. System

2.1. System Configuration

In this study, trajectory estimation is performed using a group of sensors: a triaxial acceleration sensor, triaxial angular rate sensor, and triaxial geomagnetic sensor. These sensors are commonly installed in mobile devices. This work is an extended and refined version of research initially presented at the IEEE International Conference on Consumer Electronics—Taiwan [20]. The findings presented here include additional analysis and expanded discussion that goes beyond the scope of the original conference presentation.
In this study, PDR is divided into five steps: attitude estimation, step detection, step length estimation, step direction estimation, and position estimation. The estimation method is varied based on whether the subject is walking with a mobile device held in front of the user’s body (hand-held walking) or walking while swinging their hands to the side (hand-swinging walking). Figure 1 shows an overview of the proposed system configuration. The alphabets in Figure 1 indicate the order of processing.
The process flow in Figure 1 is shown below.
A
Acquire acceleration, angular velocity, and geomagnetic data from sensors
B
Attitude estimation using acceleration, angular velocity, and geomagnetic data
C
Perform step detection based on acceleration, angular velocity, and attitude estimation results
D
Estimate step length based on acceleration, angular velocity, and step detection results
E
Estimate step direction based on step detection and attitude estimation results
F
Perform position estimation based on the results of step detection, step length estimation, and step direction estimation

Development Environment

The device used in this study was a Google Pixel 4 with Android version 12. Each estimation was performed by an application developed using Unity. The sampling frequency of each sensor was 60 Hz. While some terminals can be set to a sampling frequency higher than 60 Hz, due to the specification that Unity processes at each drawing timing, we set the sampling frequency to 60 Hz, which is a common frame rate. Noise and offsets are problematic during the actual estimation process using sensors; thus, it is necessary to adjust the obtained data before performing each estimation.

2.2. Adjustment of Data Obtained from Sensors

2.2.1. Acceleration Sensor

The values obtained from the acceleration sensor require offset and coefficient adjustments.

Offset Adjustment

Let g = 9.798 be the acceleration of gravity in Japan. When the sensor is placed on a plane, the value of acceleration should be ( x , y , z ) = ( 0 , 0 , g ) . In reality, the values obtained from the sensor are not ( x , y , z ) = ( 0 , 0 , g ) due to the presence of errors in either the positive or negative direction. Therefore, it is necessary to set the value of the error and the opposite sign as the offset value. For example, if the measured value is ( x , y , z ) = ( 0.1 , 0.2 , 9.95 ) when placed on a horizontal plane, then the offset value ( x o f f s e t , y o f f s e t , z o f f s e t ) is as follows:
( x o f f s e t , y o f f s e t , z o f f s e t ) = ( 0 , 0 , g ) ( 0.1 , 0.2 , 9.95 ) = ( 0.1 , 0.2 , 0.152 ) .

Coefficient Adjustment

The value after the offset adjustment should be g for the axis pointing in the direction of gravitational acceleration; in fact, however, it may be larger or smaller than g. Therefore, it is necessary to obtain the coefficients by making measurements with each axis of the sensor pointing vertically upward and downward. For example, if the x-axis is placed vertically upward and downward and the measured values are x = 9.514 , x = 10.501 , then the coefficient values in the positive and negative directions of the x-axis x P c o e f f , x N c o e f f are as follows:
x P c o e f f = g 9.514 1.030 x N c o e f f = g 10.501 0.933 .

2.2.2. Angular Velocity Sensor

The values obtained from the angular velocity sensor require offset adjustment.

Offset Adjustment

When the sensor is placed and kept stationary, all the values of the angular rate sensors should be 0. In practice, however, a deviation exists in either the positive or negative direction. Therefore, the offset must be set to a value with the opposite sign to the deviated value. The method for determining the offset is the same as in the case of acceleration (Section 2.2.1).

2.2.3. Geomagnetic Sensor

The values obtained from the geomagnetic sensor require offset adjustment. When the values obtained from a three-axis geomagnetic sensor are plotted in three-dimensional space, they should ideally be distributed on the surface of a sphere or an ellipsoid. The center of this point cloud should correspond to the origin at ( x , y , z ) = ( 0 , 0 , 0 ) . However, if there are magnetic objects or iron products in the surrounding environment, the center may deviate significantly from the origin. Therefore, it is necessary to calculate the center of the point cloud obtained from the geomagnetic sensor and set it as the offset. To determine the offset, the geomagnetic sensor should be rotated in all directions while collecting and storing N sets of 3D point cloud data. In the following, the calculation method is explained, with the n-th 3D point cloud data for offset calculation represented as ( x n , y n , z n ) .

Offset Adjustment

As mentioned earlier, the values obtained from the geomagnetic sensor are distributed on the surface of a sphere or an ellipsoid, making it necessary to calculate the center. The equation of an ellipsoid is expressed as follows:
x 2 a 2 + y 2 b 2 + z 2 c 2 = 1 .
In the Equation (1), when a = b = c , the shape becomes a sphere; in other words, if the center can be determined based on the equation of an ellipsoid, then the center of a sphere can also be obtained using the same approach.
In this study, the point cloud obtained from the geomagnetic sensor is fitted to an ellipsoid, then the center coordinates are calculated by determining the equation of the ellipsoid using the least squares method. While the equation of the ellipsoid is expressed as shown in Equation (1), this assumes that the x, y, and z axes are the principal axes. However, because the principal axes of the point cloud are often rotated, the following equation must be used instead:
A x 2 + B y 2 + C z 2 + D x y + E y z + F z x + G x + H y + I z K = 0 .
Here, because K does not affect any of the variables x, y, or z, both sides of Equation (2) are divided by K. The parameters obtained after division are re-expressed using the same symbols:
A x 2 + B y 2 + C z 2 + D x y + E y z + F z x + G x + H y + I z 1 = 0
where J is defined as the least squares evaluation function. If we define the left-hand side of Equation (3) as f ( x , y , z ) , then f ( x n , y n , z n ) = 0 should hold for a point ( x n , y n , z n ) on the ellipsoid surface. In reality, there will be some deviation, meaning that it will not be exactly zero; nonetheless, we seek a constant that approaches zero as closely as possible for N points. Thus, the least squares evaluation function J is defined as in Equation (4).
J = n = 0 N f ( x n , y n , z n ) 2
To calculate this in such a way that the evaluation function J is minimized, it is necessary to solve the system of nine simultaneous equations formed by setting the partial derivatives concerning the nine parameters from A to I equal to zero in order to find the parameters. The equations obtained by partially differentiating the evaluation function J with respect to each parameter are shown below.
J A = n = 0 N f ( x , y , z ) · x n 2 = n = 0 N A x n 4 + B y n 2 x n 2 + C z n 2 x n 2 + D x n 3 y n + E y n z n x n 2 + F z n x n 3 + G x n 3 + H y n x n 2 + I z n x n 2 x n 2 = 0
J B = n = 0 N f ( x , y , z ) · y n 2 = n = 0 N A x n 2 y n 2 + B y n 4 + C z n 2 y n 2 + D x n y n 3 + E y n 3 z n + F z n x n y n 2 + G x n y n 2 + H y n 3 + I z n y n 2 y n 2 = 0
J C = n = 0 N f ( x , y , z ) · z n 2 = n = 0 N A x n 2 z n 2 + B y n 2 z n 2 + C z n 4 + D x n y n z n 2 + E y n z n 3 + F z n 3 x n + G x n z n 2 + H y n z n 2 + I z n 3 z n 2 = 0
J D = n = 0 N f ( x , y , z ) · x n y n = n = 0 N A x n 3 y n + B y n 3 x n + C z n 2 x n y n + D x n 2 y n 2 + E y n 2 z n x n + F z n x n 2 y n + G x n 2 y n + H y n 2 x n + I z n x n y n x n y n = 0
J E = n = 0 N f ( x , y , z ) · y n z n = n = 0 N A x n 2 y n z n + B y n 3 z n + C z n 3 y n + D x n y n 2 z n + E y n 2 z n 2 + F z n 2 x n y n + G x n y n z n + H y n 2 z n + I z n 2 y n y n z n = 0
J F = n = 0 N f ( x , y , z ) · z n x n = n = 0 N A x n 3 z n + B y n 2 z n x n + C z n 3 x n + D x n 2 y n z n + E y n z n 2 x n + F z n 2 x n 2 + G x n 2 z n + H y n z n x n + I z n 2 x n z n x n = 0
J G = n = 0 N f ( x , y , z ) · x n = n = 0 N A x n 3 + B y n 2 x n + C z n 2 x n + D x n 2 y n + E y n z n x n + F z n x n 2 + G x n 2 + H y n x n + I z n x n x n = 0
J H = n = 0 N f ( x , y , z ) · y n = n = 0 N A x n 2 y n + B y n 3 + C z n 2 y n + D x n y n 2 + E y n 2 z n + F z n x n y n + G x n y n + H y n 2 + I z n y n y n = 0
J I = n = 0 N f ( x , y , z ) · z n = n = 0 N A x n 2 z n + B y n 2 z n + C z n 3 + D x n y n z n + E y n z n 2 + F z n 2 x n + G x n z n + H y n z n + I z n 2 z n = 0
From Equations (5) to (13), by moving the last term with a negative sign to the right-hand side, we obtain the system of simultaneous equations shown below.
n = 0 N A x n 4 + B y n 2 x n 2 + C z n 2 x n 2 + D x n 3 y n + E y n z n x n 2 + F z n x n 3 + G x n 3 + H y n x n 2 + I z n x n 2 = n = 0 N x n 2 n = 0 N A x n 2 y n 2 + B y n 4 + C z n 2 y n 2 + D x n y n 3 + E y n 3 z n + F z n x n y n 2 + G x n y n 2 + H y n 3 + I z n y n 2 = n = 0 N y n 2 n = 0 N A x n 2 z n 2 + B y n 2 z n 2 + C z n 4 + D x n y n z n 2 + E y n z n 3 + F z n 3 x n + G x n z n 2 + H y n z n 2 + I z n 3 = n = 0 N z n 2 n = 0 N A x n 3 y n + B y n 3 x n + C z n 2 x n y n + D x n 2 y n 2 + E y n 2 z n x n + F z n x n 2 y n + G x n 2 y n + H y n 2 x n + I z n x n y n = n = 0 N x n y n n = 0 N A x n 2 y n z n + B y n 3 z n + C z n 3 y n + D x n y n 2 z n + E y n 2 z n 2 + F z n 2 x n y n + G x n y n z n + H y n 2 z n + I z n 2 y n = n = 0 N y n z n n = 0 N A x n 3 z n + B y n 2 z n x n + C z n 3 x n + D x n 2 y n z n + E y n z n 2 x n + F z n 2 x n 2 + G x n 2 z n + H y n z n x n + I z n 2 x n = n = 0 N z n x n n = 0 N A x n 3 + B y n 2 x n + C z n 2 x n + D x n 2 y n + E y n z n x n + F z n x n 2 + G x n 2 + H y n x n + I z n x n = n = 0 N x n n = 0 N A x n 2 y n + B y n 3 + C z n 2 y n + D x n y n 2 + E y n 2 z n + F z n x n y n + G x n y n + H y n 2 + I z n y n = n = 0 N y n n = 0 N A x n 2 z n + B y n 2 z n + C z n 3 + D x n y n z n + E y n z n 2 + F z n 2 x n + G x n z n + H y n z n + I z n 2 = n = 0 N z n
In Equation (14), by expanding the left-hand side and factoring out the nine parameters A to I from the summation, it can be expressed as the following matrix using A to I. Note that the summation n = 0 N applies to all elements in the matrix shown below; however, it is omitted here for simplicity.
x n 4 y n 2 x n 2 z n 2 x n 2 x n 3 y n y n z n x n 2 z n x n 3 x n 3 y n x n 2 z n x n 2 x n 2 y n 2 y n 4 z n 2 y n 2 x n y n 3 y n 3 z n z n x n y n 2 x n y n 2 y n 3 z n y n 2 x n 2 z n 2 y n 2 z n 2 z n 4 x n y n z n 2 y n z n 3 z n 3 x n x n z n 2 y n z n 2 z n 3 x n 3 y n y n 3 x n z n 2 x n y n x n 2 y n 2 y n 2 z n x n z n x n 2 y n x n 2 y n y n 2 x n z n x n y n x n 2 y n z n y n 3 z n z n 3 y n x n y n 2 z n y n 2 z n 2 z n 2 x n y n x n y n z n y n 2 z n z n 2 y n x n 3 z n y n 2 z n x n z n 3 x n x n 2 y n z n y n z n 2 x n z n 2 x n 2 x n 2 z n y n z n x n z n 2 x n x n 3 y n 2 x n z n 2 x n x n 2 y n y n z n x n z n x n 2 x n 2 y n x n z n x n x n 2 y n y n 3 z n 2 y n x n y n 2 y n 2 z n z n x n y n x n y n y n 2 z n y n x n 2 z n y n 2 z n z n 3 x n y n z n y n z n 2 z n 2 x n x n z n y n z n z n 2 · A B C D E F G H I = x n 2 y n 2 z n 2 x n y n y n z n z n x n x n y n z n
In Equation (15), let the coefficient matrix be A , the matrix of parameters from A to I (the solution) be x , and the right-hand side matrix be b . Then, we have
A x = b .
By using the inverse matrix of A , we can solve for the parameters from A to I as follows:
x = A 1 b .
If the center coordinates are ( x 0 , y 0 , z 0 ) , then the parameters from A to I can be expressed as follows:
2 A D F D 2 B E F E 2 C · x 0 y 0 z 0 = G H I .
Thus, the center coordinates of the point cloud obtained from the geomagnetic sensor can be calculated as follows:
x 0 y 0 z 0 = 2 A D F D 2 B E F E 2 C 1 · G H I .

2.3. Attitude Estimation

In conventional studies, only the Y a w axis value necessary to calculate the number of steps is obtained; however, we always perform estimation in all axes of R o l l , P i t c h , and Y a w using all of the acceleration, angular velocity, and geomagnetism sensors, and always obtain the direction in which the sensor is facing in the world coordinate system. This has the advantage that the acceleration in the x , y direction can be separated from the acceleration in the z direction no matter what state the sensor is in, which facilitates the estimation procedure.
There are several methods for attitude estimation, including methods using the extended Kalman filter [21] and the Madgwick filter [22]. However, the extended Kalman filter is computationally expensive, while the Madgwick filter is slow in convergence. Both of these filters require time to obtain an accurate attitude. Therefore, we use the complementary filter in this study. In addition, because the use of Euler angles in calculating angles results in the appearance of many trigonometric functions and requires a great deal of computation time, calculations are performed using quaternions.

2.3.1. Complementary Filter Using Quaternions [23]

The complementary filter used in this study is based on the values estimated by the angular rate sensor and modified by the accelerometer and the geomagnetic sensor.
We define a = ( a x , a y , a z ) [ m/s 2 ] as the value obtained from the acceleration sensor, ω = ( ω x , ω y , ω z ) [rad/s] as the value obtained from the geomagnetic sensor, m = ( m x , m y , m z ) [T] as the value obtained from the geomagnetic sensor, R ( q ) as the rotation matrix that rotates a vector by a quaternion q, Δ T [ s ] as the difference between the previous processing time t 1 and the current processing time t, g = 9.798 m/s 2 as the gravitational acceleration, q t = [ q t , 0 , q t , 1 , q t , 2 , q t , 3 ] T as the quaternion representing the attitude at time t, and q t 1 = [ q t 1 , 0 , q t 1 , 1 , q t 1 , 2 , q t 1 , 3 ] T as the quaternion representing the attitude at time t 1 . The initial value for a quaternion is q = [ 1 , 0 , 0 , 0 ] T .

2.3.2. Attitude Estimation Using Angular Velocity Sensor

Let q ˙ = [ q ˙ 0 , q ˙ 1 , q ˙ 2 , q ˙ 3 ] T be the quaternion that changed during Δ T , which can be calculated as in Equation (20).
q ˙ 0 q ˙ 1 q ˙ 2 q ˙ 3 = 1 2 q t 1 , 1 q t 1 , 2 q t 1 , 3 q t 1 , 0 q t 1 , 3 q t 1 , 2 q t 1 , 3 q t 1 , 0 q t 1 , 1 q t 1 , 2 q t 1 , 1 q t 1 , 0 · ω x ω y ω z · Δ T
The attitude q t at time t can be calculated as in Equation (21).
q t , 0 q t , 1 q t , 2 q t , 3 = q t 1 , 0 q t 1 , 1 q t 1 , 2 q t 1 , 3 + q ˙ 0 q ˙ 1 q ˙ 2 q ˙ 3

2.3.3. Correction of Attitude Estimates Using an Acceleration Sensor

Using the values obtained from the acceleration sensor, the absolute angles of the P i t c h and R o l l axes with respect to the world coordinates can be obtained. This absolute angle is used to correct the attitude estimation.
Rotating the acceleration sensor value based on the attitude calculated from the angular velocity sensor should always result in ( a x , a y , a z ) = ( 0 , 0 , g ) . For example, if the sensor is rotated 90 degrees around the x-axis in world coordinates, then the sensor value is ( a x , a y , a z ) = ( 0 , g , 0 ) . If we know that the current attitude is rotated 90 degrees around the x-axis, then rotating the sensor value by 90 degrees around the x-axis in the opposite direction will result in ( a x , a y , a z ) = ( 0 , 0 , g ) . However, in reality the estimated attitude by the angular velocity sensor deviates slightly from ( 0 , 0 , g ) because of a small error in the attitude estimated by the angular rate sensor. Letting G = ( G x , G y , G z ) be the vector on which the error exists, it can be calculated as in Equation (22):
G = R ( q t ) a .
Then, by finding the quaternion to rotate from G to ( 0 , 0 , g ) and multiplying it by q t and rotating it, we can calculate the attitude corrected by the acceleration sensor. The quaternions that rotate from G to ( 0 , 0 , g ) can be calculated using inner and outer products. We define the reference ( 0 , 0 , g ) vector as a 0 = ( 0 , 0 , 1 ) , the rotation axis unit vector representing the direction of rotation in the quaternion as a n = ( a n , x , a n , y , a n , z ) , and the scalar representing the rotation angle as θ a . Then, a n and θ a are as follows:
a n = G × a 0 | G × a 0 | ,
θ a = arccos ( G · a 0 ) .
The corrected quaternion q a due to the acceleration can be calculated as in Equation (25).
q a , 0 q a , 1 q a , 2 q a , 3 = cos θ a 2 a n , x sin θ a 2 a n , y sin θ a 2 a n , z sin θ a 2 = G z + 1 2 G y 2 ( G z + 1 ) G x 2 ( G z + 1 ) 0
As shown in Equation (25), the z-axis component is 0, i.e., only the corrections to the P i t c h and R o l l axes are calculated. If the obtained correction quaternion q a is used as it is, it will be affected by all the effects of the noise from the acceleration sensor. Thus, it is necessary to use linear interpolation with the non-rotating quaternion q I = ( 1 , 0 , 0 , 0 ) . We define α as the value of the correction strength of the correction quaternion and set a new correction quaternion q a .
q a = α q a , 0 + ( 1 α ) α q a , 1 α q a , 2 α q a , 3
Although α can be a fixed value, in this study the correction intensity is adjusted according to the magnitude of the vectors obtained from the acceleration sensor. If the sensor is not accelerating or decelerating, the magnitude a x 2 + a y 2 + a z 2 of the acceleration vector obtained from the sensor should be equal to g. Therefore, we define the correction strength α as
α = α 0 · f ( e g ) ,
where α 0 is the fixed correction intensity and f ( e g ) is a function of the error with respect to the acceleration of gravity. We define e g and f ( x ) as follows.
e g = a g g
f ( x ) = 1 ( x e 1 ) e 2 x e 2 e 1 ( e 1 < x e 2 ) 0 ( x e 2 )
It is necessary to conduct experiments to obtain appropriate values for α 0 and e 1 , e 2 .
From the above, the quaternion representing the attitude corrected by the acceleration sensor can be calculated as in Equation (30):
q t = q a q t .

2.3.4. Correction of Attitude Estimates Using a Geomagnetic Sensor

Using the values obtained from the geomagnetic sensor, the absolute angles of the Y a w axes with respect to the world coordinates can be obtained.
By rotating the geomagnetic sensor values based on the attitude calculated from the acceleration and angular velocity, we can obtain the same values l = ( l x , l y , l z ) when the sensor is horizontal.
l = R ( q t ) m
Considering l x , l y , we can calculate the error concerning the direction at the beginning of the process. If the sensor was facing north at the beginning of the process, then the error concerning north can be obtained. As in the case of the accelerometer, the corrected quaternion q m from the geomagnetic sensor can be obtained as in Equation (32).
q m = ( l x 2 + l y 2 ) + l x l x 2 + l y 2 2 ( l x 2 + l y 2 ) 0 0 l y 2 ( l x 2 + l y 2 ) + l x l x 2 + l y 2
If the obtained correction quaternion q m is used as it is, it will be affected by all the effects of the noise from the geomagnetic sensor. Thus, it is necessary to use linear interpolation with the non-rotating quaternion q I = ( 1 , 0 , 0 , 0 ) . We define β as the value of the correction strength of the correction quaternion and set a new correction quaternion q m .
q m = β q m , 0 + ( 1 β ) β q m , 1 β q m , 2 β q m , 3
From the above, the quaternion representing the attitude corrected by the geomagnetic sensor can be calculated as in Equation (34):
q t = q m q t
where q t is the quaternion representing the corrected attitude in all axes, i.e., P i t c h , R o l l , and Y a w .

2.3.5. Dealing with Geomagnetic Sensor Disturbances

The value of the geomagnetic sensor is affected by magnets or other magnetizing objects contained in other devices or worn on the body. While disturbances are often not considered in conventional studies, they must be taken into account in practical applications. Because the geomagnetic sensor is the only sensor that can obtain the direction in world coordinates, it is important to deal with disturbances to estimate the direction of motion.
In this study, the value of β in Equation (33) is changed according to the magnitude of the error of the value obtained from the geomagnetic sensor compared with the normal condition. In addition, to accommodate changes in offset values caused by variations in surrounding structures, updates to the offset adjustment described in the geomagnetic sensor section (Section 2.2.3) are also performed. However, this update is not calculated when the value of β in Equation (35) is 0, as it is then affected by other devices.
We redefine the correction strength β as follows:
β = β 0 · f ( e m )
where β 0 is the fixed correction intensity and f ( e m ) is a function of the error concerning the geomagnetic sensor value M a under normal conditions. We define e m and f ( x ) as follows.
e m = l x 2 + l y 2 + l z 2 M a
f ( x ) = e c 1 x 2
It is necessary to conduct experiments to obtain appropriate values for β 0 and c 1 .

2.4. Step Detection

Step detection is performed based on the acceleration, angular velocity, and attitude estimation results. Previous studies have commonly used only the z-axis acceleration for estimation. However, because the magnitude of acceleration changes frequently depending on the way of walking, this introduces the possibility of a large error in the number of steps. Therefore, in this study estimation is performed using not only the acceleration along the z-axis but also the acceleration along the x , y -axis, walking interval, and magnitude of angular velocity. Based on the results of attitude estimation, we determine whether the subject is engaged in hand-held walking or hand-swinging walking. If the R o l l axis (y-axis) is tilted by more than a certain angle, the user is judged to be engaged in hand-swinging walking; otherwise, they are judged to be engaged in hand-held walking. If the angular velocity around the R o l l axis is larger than a certain value, this is considered to indicate a switch between hand-held walking and hand-swinging walking, and the number of steps is not counted.

2.5. Step Length Estimation

Step length estimation is calculated based on how much larger or smaller the stride length is compared to the reference stride length. When estimating the step length, it is necessary to determine the magnitude of the acceleration compared to that of normal walking. Let A z be the acceleration in the direction of gravitational acceleration and let A x and A y be the acceleration in the horizontal direction. These accelerations are a rotated value of the acceleration sensor value ( a x , a y , a z ) based on the result of attitude estimation. We define the maximum value of A z during step counting as A z , m a x and the minimum value as A z , m i n . In addition, we define the norm of the maximum absolute value A x , m a x , A y , m a x of A x , A y as A x y , m a x . The magnitude of acceleration A a v e is obtained using the average, defined as follows:
A a v e = ( A z , m a x A z , m i n ) + A x y , m a x 2 .
In addition, because we need to compare the acceleration to that of normal walking, we redefine it so that the magnitude of the acceleration during normal walking is 0:
A a d j u s t = A a v e C n o r m a l
where C n o r m a l is a constant that must be obtained by calculating the magnitude of acceleration during normal walking by experiment.
Let l be the estimated step length and l s the reference step length; then, l can be calculated by the following Equation (40):
l = l s + K l · g ( A a d j u s t ) .
The reference step length l s is calculated by the following Equation (41) [4] when the height is h [cm]:
l s = h 100
where K l is the maximum value of the step length adjustment, e.g., K l = 30 cm, and the function g ( x ) changes the value from 30 cm to + 30 cm, then is added to the standard step length l s to compute l. The function g ( x ) is defined as follows.
g ( x ) = 1 ( x 1 ) x 3 ( 1 < x < 1 ) 1 ( x 1 )
By cubing, even if there is some error in A a d j u s t , it will be small if the error is not large.
From Equations (40)–(42), l can be calculated as in Equation (43):
l = ( h 1 ) + K l · g ( A z , m a x A z , m i n ) + A x y , m a x 2 C n o r m a l .
Therefore, it is possible to estimate the step length by experimentally obtaining the constants K l and C n o r m a l for the cases of hand-held walking and hand-swinging walking, respectively.

2.6. Step Direction Estimation

Step direction estimation is performed based on the step detection and attitude estimation results. For both hand-held walking and hand-swinging walking, the direction in which the sensor was facing at the moment of the maximum acceleration during the step count is taken as the direction of the step. In the case of hand-held walking, the direction of the step is the direction when A d i f f , m a x is measured, while in the case of hand-swinging walking the direction of the step is the direction when A z , m a x is measured. In this case, the direction is the angle of rotation around the Y a w axis in world coordinates, i.e., the direction with respect to north.

2.7. Position Estimation

Position estimation is performed based on the results of step detection, step length estimation, and step direction estimation. Processing is performed when the number of steps is counted, and the position is computed by adding up the results based on the step length obtained from the step length estimation and the direction of travel obtained from the step direction estimation. We define the position at the count one step ago as P t 1 = ( P t , x , P t , y ) T , the current position as P t = ( P t 1 , x , P t 1 , y ) T , the estimated step length as l, and the step direction as θ . Then, P t can be obtained by the following Equation (44).
P t , x P t , y = P t 1 , x P t 1 , y + l cos θ l sin θ
Note that P t is the position where y-axis positive is north and x-axis positive is east. This can be changed in any direction by adding offsets.

3. Results

3.1. Summary

3.1.1. Device

The device used in this study was a Google Pixel 4 with Android version 12. Each estimation was performed by an application developed using Unity.

3.1.2. Experiment Goals

The goals of this experiment were threefold: to estimate walking trajectories using only sensors embedded in mobile devices, to handle geomagnetic disturbances, and to achieve accurate estimation in real-world environments. These goals correspond to Section 3.4.1, Section 3.4.2, and Section 3.4.3, respectively.

3.1.3. Implementation Method

Section 3.4.1 described the experiments to confirm the feasibility of trajectory estimation. These experiments were conducted in a relatively disturbance-free open space. The estimation was performed for both hand-held walking and hand-swinging walking scenarios. Hand-held walking refers to a state where the device is held in one hand while the user is looking at the screen, whereas hand-swinging walking refers to a state where the user holds the device in one hand with the arm relaxed and swinging back and forth while walking. Section 3.4.2 addresses estimation in scenarios where magnetic disturbances from other devices occur, simulating a crowded environment. Section 3.4.3 focuses on indoor positioning scenarios and performing estimation along complex trajectories in environments with numerous household appliances and other devices. In each experiment, walking is performed continuously without stopping at each step.

3.2. Result of Adjustment

3.2.1. Acceleration Sensor

The offset values were determined using the average of 500 data points obtained when the sensor was placed on a horizontal plane. Table 1 shows the average acceleration of the 500 data points obtained when the sensor was placed on a horizontal plane.
From Table 1, as calculated and explained in Section 2.2.1, ( a x o f f s e t , a y o f f s e t , a z o f f s e t ) = ( 0.0468 , 0.0295 , 0.1873 ) was determined.
The coefficient values were determined using the average of 500 data points obtained when each x, y, and z axis of the sensor was oriented vertically upward and vertically downward relative to the horizontal plane. Table 2 shows the average acceleration of 500 data points for each x, y, and z axis when oriented vertically upward and vertically downward.
From Table 2, as calculated and explained in Section 2.2.1, ( a x P c o e f f , a x N c o e f f ) = ( 1.0013 , 1.0007 ) , ( a y P c o e f f , a y N c o e f f ) = ( 1.0006 , 1.0018 ) , ( a z P c o e f f , a z N c o e f f ) = ( 1.0065 , 1.0086 ) was determined.

3.2.2. Angular Velocity Sensor

The offset values were determined using the average of 500 data points obtained when the sensor was placed on a flat surface and kept stationary. Table 3 shows the average angular velocity of 500 data points obtained when the sensor was placed on a flat surface and kept stationary.
From Table 3, as calculated and explained in Section 2.2.2, ( g x o f f s e t , g y o f f s e t , g z o f f s e t ) = ( 0.002672 , 0.003499 , 0.008724 ) was determined.

3.2.3. Geomagnetic Sensor

The offset values were determined by calculating the center from 3D point cloud data using the ellipsoid center calculation method based on the least squares method, as described in Section 2.2.3. As explained in Section 2.3.5, it should be noted that the offset is updated over time; therefore, the following data represent test data used to verify whether the calculations were correctly implemented. The following figure shows the 3D point cloud data obtained from the geomagnetic sensor before adjustment.
Because it is difficult to see in a 3D graph, the 3D point cloud data viewed from the x-y plane, x-z plane, and y-z plane are shown below.
As shown in Figure 2 and Figure 3, the values form a sphere displaced from the origin. As a result of using the least squares method to calculate the center, the coordinates ( x 0 , y 0 , z 0 ) = ( 39.6975 , 69.0510 , 105.0062 ) were obtained.
As explained in Section 2.2.3, the offset values were calculated and determined to be ( m x o f f s e t , m y o f f s e t , m z o f f s e t ) = ( 39.6975 , 69.0510 , 105.0062 ) .
Using the obtained offset values, when the values in Figure 2 and Figure 3 are corrected, the result is as shown in Figure 4 and Figure 5, confirming that the offset values have been correctly determined.

3.3. Results and Evaluation of Attitude Estimation

In order to use the complementary filter, it is necessary to find appropriate values for four parameters: three parameters α 0 , e 1 , e 2 , and a parameter β for finding parameters β 0 , c 1 for magnetic disturbance. The α 0 , e 1 , e 2 parameters are only related to R o l l , P i t c h correction, while β is only related to Y a w correction. Therefore, we evaluated α 0 , e 1 , e 2 using the time until R o l l , P i t c h becomes stable and evaluated β using the time until Y a w becomes stable. In the complementary filter, increasing α 0 means increasing the considered value of the current acceleration. Because the acceleration should be 0 at the moment of stationary, larger α 0 indicates shorter time to stability. However, a larger considered value of the current acceleration value means that the estimation error during acceleration and deceleration becomes larger. This point can be somewhat mitigated by setting appropriate values of e 1 , e 2 ; however, if α 0 is set too large, then the error is considered to be unacceptable. Hence, we set a new criterion for evaluating the change in attitude during acceleration and deceleration based on the fact that no rotation around the R o l l , P i t c h axis occurs when the horizontal plane is moved. Figure 6 shows the results of R o l l , P i t c h estimation when the sensor is placed on the horizontal plane and moved back and forth.
From Figure 6, it can be seen that rotation around the R o l l , P i t c h axis should not occur when the sensor is moved back and forth in the horizontal plane; however, the error is caused by increasing α 0 , which is the considered value of the current acceleration value. In finding the values of e 1 , e 2 , we calculate the norm R P n o r m of the maximum value of the rotation around R o l l , P i t c h axis in the round-trip movement and find e 1 , e 2 such that R P n o r m becomes as small as possible. Table 4 shows the values of R P n o r m when e 1 is varied with α 0 = 0.4 , e 2 = 0.1 . Note that R P n o r m is the average of ten times.
From Table 4, it can be seen that the error R P n o r m becomes smaller by decreasing e 1 . Table 5 shows the values of R P n o r m when e 2 is varied with α 0 = 0.4 , e 1 = 0.0001 . Note that R P n o r m is the average of ten times.
From Table 5, it is found that the error R P n o r m becomes smaller by decreasing e 2 . The smaller e 1 , e 2 are, the smaller R P n o r m is; however, if e 2 is set too small from Equation (29), the value of acceleration is hardly taken into account during acceleration, and a large error is considered to occur in the estimation results during acceleration. Therefore, we use e 2 = 0.01 and set ( e 1 , e 2 ) = ( 0.0001 , 0.01 ) . Table 6 shows the ten averages of R P n o r m when ( e 1 , e 2 ) = ( 0.0001 , 0.01 ) is fixed and α 0 is varied.
From Table 6, it can be seen that the error R P n o r m becomes smaller by decreasing α 0 . However, the larger α 0 is, the shorter the time to stability becomes; thus, we set α 0 = 0.2 to improve the estimation results for both R P n o r m and t s t a b . From the above, the parameters for the correction of R o l l , P i t c h are determined to be α 0 = 0.2 , ( e 1 , e 2 ) = ( 0.0001 , 0.01 ) .
Next, we evaluated how the change in β affects the stability and obtained the parameters. Figure 7 shows the results of attitude estimation when β = 0.01 , 0.2 and the sensor is kept stationary.
As can be seen from Figure 7 (Right), the estimated value is not stable even after the sensor becomes stationary when β was increased.
Therefore, the parameter for the correction of Y a w is set to β = 0.01 .
Next, the parameters β 0 , c 1 for coping with magnetic disturbance are obtained. The value of Equation (37) takes a value from 0 to 1, and the final maximum value of Equation (35) must be β = 0.01 ; thus, we set β 0 = 0.01 . The value of c 1 should be determined by the magnitude of the difference between the measured geomagnetic field under normal conditions and that under disturbance. In the following Table 7, we show the measured values when an iPhone and an AppleWatch are placed close to the measured device. The measured values are averaged over 10 s. The measured geomagnetic field under normal conditions was averaged for 100 s, and the result of the measurement was 45.349 μ T.
From Table 7, the error is found to occur at a distance as close as 20 cm, and becomes very large when the distance is closer than 10 cm. In practical applications, smartwatches and similar devices may be closer than 10 cm; thus, errors that occur in such cases must be dealt with. In order to avoid large errors in the estimates, we do not consider the geomagnetic values when the absolute error is about 3 μ T. From the shape of the graph of e a x 2 , the value of c 1 is set to about 0.8 .
From the above results, the parameters of the correction in the complementary filter are determined as follows: α 0 = 0.2 , ( e 1 , e 2 ) = ( 0.0001 , 0.01 ) , β 0 = 0.01 , c 1 = 0.8 .
To evaluate how the geomagnetic sensor copes with disturbances, we compare the results between the cases with and without a geomagnetic sensor value as well as the cases with a fixed value of β and a variable value of β . Because the only error that can occur in each case is the Y a w value, only the Y a w value is considered for the error assessment. Each estimated value is the error from the initial state when the sensor is rotated in various directions for 10 s and then stopped.
The following Table 8 shows the error values of Y a w axis estimation without and with the geomagnetic sensor in addition to the angular velocity and acceleration sensors.
From Table 8, the errors are within 1 degree in each case when the geomagnetic sensor is used, whereas the errors are more than about 10 degrees in the case when the geomagnetic sensor is not used. This indicates that the geomagnetic sensor is important for attitude estimation.
The following Table 9 shows the error of the Y a w axis estimation with the AppleWatch in close contact both when the value of β is fixed and when it is changed dynamically to cope with the disturbance.
Table 9 shows that the error is within 2 degrees when β is changed dynamically, while the error is more than about 100 degrees when β is fixed. Thus, the dynamic change of β is very important to cope with the disturbance. Although the error is a little larger than in the case without disturbance (Table 8), if c 1 is set such that the geomagnetic field is not taken into account when there is even a small deviation from the normal geomagnetic field value, then even a small change in value due to changes in the surrounding environment will cause the geomagnetic field to not be considered. Therefore, we believe that the value set in this study is appropriate. If the error between the geomagnetic field and the normal geomagnetic field value becomes small, then the geomagnetic field value is referred to again to correct the correct attitude; thus, the error in Table 9 is not considered to be a problem.
Various estimations were performed using the complementary filters obtained from the above results.

3.4. Results and Evaluation of Trajectory Estimation

3.4.1. Trajectory Estimation in Environments with Minimal Disturbances

The evaluation trajectories consisted of a rectangular trajectory with ( x , y ) = ( 5 , 10 ) [m] and a circular trajectory with a radius of 3 m. These are shown in the figures below. This environment is on a ground floor with good visibility, providing an environment with minimal magnetic interference. The building is constructed with reinforced concrete.
The evaluation is conducted using the estimated trajectory during walking along the same rectangular and circular trajectories, as shown in Figure 8. The evaluation is based on the difference between the starting point and the endpoint. This difference is calculated as the distance between the final point of the estimated trajectory and the origin, as the origin is used as the starting point for the evaluation. Figure 9 and Figure 10 show the estimation results for hand-held walking and hand-swinging walking in rectangular trajectory, and Figure 11 and Figure 12 show the estimation results for hand-held walking and hand-swinging walking in circular trajectory.
The error between the starting point and the endpoint is shown in Table 10.

3.4.2. Trajectory Estimation in Environments with Significant Geomagnetic Disturbances

To evaluate whether the influence of geomagnetic fields from other devices is suppressed, an estimation was performed when other devices were located near the walking trajectory. Figure 13 below shows the actual walking trajectory and the positions of the other devices. Note that the other devices were installed at the same height as the measurement device and that the distance was varied from the walking trajectory at 0.5 m, 0.3 m, and 0.2 m. Walking started from the origin, passing beside Other Device 1 on the right and Other Device 2 on the left. To avoid collisions with the other devices, the minimum distance was set to 0.2 m. Other Device 1 was an iPhone 12 and Other Device 2 was an Apple Watch (Series 5). The estimation results shown in Figure 14 were obtained by simultaneously estimating with (proposed method) and without (conventional method) dynamically changing β while using exactly the same sensor values.
From Figure 14, it can be seen that there is no significant error when the distance is about 0.5 m. However, when the distance is reduced to below 0.3 m, the estimated trajectory deviates. In the case of 0.2 m, when β is fixed, there is a deviation of 0.258 m in the x-direction; when β is dynamically adjusted, the deviation is reduced to 0.083 m. Although there were only two other devices within a 4 m range in this experiment, in a real-world indoor environment there are likely to be even more devices passing by. Thus, the effectiveness of the proposed method in improving the estimation results is expected to be significant.

3.4.3. Trajectory Estimation in Real-World Environments

To evaluate whether estimation is feasible in an actual indoor environment, walking trajectory estimation was conducted during hand-held walking indoors. The environment used for estimation included desks, chairs, PCs, TVs, refrigerators, etc., inside a wooden structure. The following Figure 15 shows the actual walking trajectory and the environment. The arrows indicate the order in which the trajectory is walked. By following the arrows that are not opposite to the direction of movement, return to the starting point. The thin black lines in the figure are spaced at 50 cm intervals, the thick black lines represent walls, and the gray areas indicate places where desks or shelves are located so as to prevent walking.
Figure 16 shows the estimated results obtained by walking along the trajectory shown in Figure 15. In the figure, “S” represents the starting point and “G” represents the estimated position when returning. The estimation results shown in Figure 16 were obtained by simultaneously estimating with (proposed method) and without (conventional method) dynamically changing β while using exactly the same sensor values.
From the results shown in Figure 16, it is evident that preventing geomagnetic disturbances caused by other devices and equipment improves the accuracy of walking trajectory estimation. This is probably because the geomagnetic values vary slightly from room to room depending on the other devices, leading to the direction gradually deviating if this variation is not properly addressed.

4. Conclusions

In this study, we used an acceleration sensor, angular velocity sensor, and geomagnetic sensor to estimate attitude, step count, step length, step direction, and position. As a result of our experiments, we conclude the following:
  • For attitude estimation, our proposed approach is able to cope with disturbance of the geomagnetic sensor and counteract the influence of other devices when estimating the attitude in a real environment.
  • For step detection, although some errors may occur at the beginning and the end of walking, the estimation procedure was sufficiently accurate during walking.
  • For step length estimation, the error was limited to about ± 10 cm at the maximum, and the accuracy was about ± 5 cm under normal conditions.
  • For step direction estimation, the error during hand-swinging walking was about ±6 degrees, while the error in hand-held walking was estimated with an accuracy of about ±2 degrees.
  • For position estimation, although it was not possible to estimate the position precisely, it was possible to estimate the position with an accuracy of about 1.5 m for the trajectory evaluated in this study. In addition, the shape of the trajectory could be discriminated sufficiently.
  • For the position estimation with disturbances from other devices, although the influence could not be completely eliminated, the error in the estimation results was significantly reduced.
In conclusion, we found that trajectory estimation is approximately feasible for hand-held walking and hand-swinging walking, and we believe that our results are a sufficient, if not perfect, solution for the problem of unconstrained self-position estimation.
The following are among of the issues to be addressed in future research:
  • Algorithm for determining the number of steps taken at the beginning and end of a walk.
  • Modification of the algorithm for estimating step length during hand-held walking.
  • Relationship between acceleration and step direction during step direction estimation and related modification of algorithm.
  • Investigation of estimation algorithms for walking methods other than hand-held walking and hand-swinging walking.
  • Estimation of errors due to individual differences and adjustment of parameters (experiments with multiple participants).

Author Contributions

Conceptualization, Y.I. and N.K.; methodology, Y.I. and N.K.; software, Y.I.; validation, Y.I. and N.K.; formal analysis, Y.I. and N.K.; investigation, Y.I. and N.K.; resources, Y.I.; data curation, Y.I.; writing—original draft preparation, Y.I.; writing—review and editing, Y.I. and N.K.; visualization, Y.I.; supervision, N.K.; project administration, Y.I. and N.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Levi, R.W.; Judd, T. Dead Reckoning Navigational System Using Accelerometer to Measure Foot Impacts. U.S. Patent No. 5,583,776, 10 December 1996. [Google Scholar]
  2. Murata, Y.; Kaji, K.; Kawaguchi, N. Investigation of Pedestrian Dead Reckoning based on Human Activity Knowledge. In Proceedings of the 76th National Convention of IPSJ, Tokyo, Japan, 11–13 March 2014. [Google Scholar]
  3. Endo, I.; Fujita, S. Indoor Tracking Method Using Multiple Sensors in Devices. In Proceedings of the Multimedia, Distributed, Cooperative, and Mobile Symposium, Hokkaido, Japan, 10–12 July 2013; pp. 188–195. [Google Scholar]
  4. Kamisaka, D.; Muramatsu, S.; Iwamoto, T.; Yokoyama, H. Dead Reckoning Method by Hand for Pedestrian Navigation System. J. Inf. Process. Soc. Jpn. 2011, 52, 558–570. [Google Scholar]
  5. BenAbdelkader, C.; Cutler, R.; Davis, L. Stride and Cadence as as Biometric in Automatic Person Identification and Verification. In Proceedings of the Fifth IEEE International Conference on Automatic Face Gesture Recognition, Washington, DC, USA, 21–21 May 2002. [Google Scholar]
  6. Tanawongsuwan, R.; Bobick, A. Performance Analysis of Time-Distance Gait Parameters under Different Speeds. In Audio- and Video-Based Biometric Person Authentication; Springer: Berlin/Heidelberg, Germany, 2003; pp. 715–724. [Google Scholar]
  7. Yamasaki, M.; Sato, H. Human Walking: With Reference to Step Length, Cadence, Speed and Energy Expenditure. J. Anthropol. Soc. Nippon. 1990, 98, 385–401. [Google Scholar] [CrossRef]
  8. Weinberg, H. Using the ADXL202 in Pedometer and Personal Navigation Applications; Analog Devices An-602 Application Note; Analog Devices, Inc.: Norwood, MA, USA, 2002. [Google Scholar]
  9. Diaz, E.M.; Gonzalez, A.L.M. Step Detector and Step Length Estimator for an Inertial Pocket Navigation System. In Proceedings of the 2014 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Busan, Republic of Korea, 27–30 October 2014. [Google Scholar]
  10. Poulose, A.; Eyobu, O.S.; Han, D.S. An Indoor Position-Estimation Algorithm Using Smartphone IMU Sensor Data. IEEE Access 2018, 7, 11165–11177. [Google Scholar] [CrossRef]
  11. Jimenez, A.R.; Seco, F.; Preito, C.; Guevara, J. A Comparison of Pedestrian Dead-Reckoning Algorithms using a Low-Cost MEMS IMU. In Proceedings of the 2009 IEEE International Symposium on Intelligent Signal Processing, Budapest, Hungary, 26–28 August 2009. [Google Scholar]
  12. Fang, L.; Antsakilis, P.J.; Montestruque, L.A.; McMickell, M.B.; Lemmon, M.; Sun, Y.; Fang, H.; Koutroulis, I.; Haenggi, M.; Xie, M.; et al. Design of a Wireless Assisted Pedestrian Dead Reckoning System—The NavMote Experience. IEEE Trans. Instrum. Meas. 2005, 54, 2342–2358. [Google Scholar] [CrossRef]
  13. Ogata, K.; Tanaka, H. Real-Time Self-Positioning with the Zero Moment Point Model and Enhanced Position Accuracy Using Fiducial Markers. Computers 2024, 13, 310. [Google Scholar] [CrossRef]
  14. Kang, W.; Han, Y. SmartPDR: Smartphone-Based Pedestrian Dead Reckoning for Indoor Localization. IEEE Sens. J. 2015, 15, 2906–2916. [Google Scholar] [CrossRef]
  15. Dinh, T.M.T.; Duong, N.S.; Sandrasegaran, K. Smartphone-Based Indoor Positioning Using BLE iBeacon and Reliable Lightweight Fingerprint Map. IEEE Sens. J. 2020, 20, 10283–10294. [Google Scholar] [CrossRef]
  16. Li, P.; Yang, X.; Yin, Y.; Gao, S.; Niu, Q. Smartphone-Based Indoor Localization with Integrated Fingerprint Signal. IEEE Access 2020, 8, 33178–33187. [Google Scholar] [CrossRef]
  17. Ciabattoni, L.; Foresi, G.; Monteriù, A.; Pepa, L.; Pagnotta, D.P.; Spalazzi, L.; Verdini, F. Real time indoor localization integrating a model based pedestrian dead reckoning on smartphone and BLE beacons. J. Ambient. Intell. Humaniz. Comput. 2019, 10, 1–12. [Google Scholar] [CrossRef]
  18. Mottakin, K.; Davuluri, K.; Allison, M.; Song, Z. SWiLoc: Fusing Smartphone Sensors and WiFi CSI for Accurate Indoor Localization. Sensors 2024, 24, 6327. [Google Scholar] [CrossRef] [PubMed]
  19. Labinghisa, B.A.; Lee, D.M. Indoor localization system using deep learning based scene recognition. Multimed. Tools Appl. 2022, 81, 28405–28429. [Google Scholar] [CrossRef]
  20. Izutsu, Y.; Komuro, N. Indoor Walking Trajectory Estimation Method using Mobile Device Sensors. In Proceedings of the 2023 International Conference on Consumer Electronics—Taiwan (ICCE-Taiwan), Pingtung, Taiwan, 17–19 July 2023. [Google Scholar]
  21. Suzuki, S.; Tawara, M.; Nakazawa, D.; Nonami, K. Research on Attitude Estimation Algorithm under Dynamic Acceleration. J. Robot. Soc. Jpn. 2008, 26, 626–634. [Google Scholar] [CrossRef]
  22. Madgwick, S.O.H. An Efficient Orientation Filter for Inertial and Inertial/Magnetic Sensor Arrays; Report x-io and University of Bristol (UK); x-io Technologies Limited: Bristol, UK, 2010; Volume 25. [Google Scholar]
  23. Valenti, R.G.; Dryanovski, I.; Xiao, J. Keeping a Good Attitude: A Quaternion-Based Orientation Filter for IMUs and MARGs. Sensors 2015, 15, 19302. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Position estimation system.
Figure 1. Position estimation system.
Applsci 15 01195 g001
Figure 2. The 3D point cloud data obtained from the geomagnetic sensor.
Figure 2. The 3D point cloud data obtained from the geomagnetic sensor.
Applsci 15 01195 g002
Figure 3. The values of the geomagnetic sensor in each plane (Left:  x y ; Center: x z ; Right: y z ).
Figure 3. The values of the geomagnetic sensor in each plane (Left:  x y ; Center: x z ; Right: y z ).
Applsci 15 01195 g003
Figure 4. The corrected 3D point cloud data obtained from the geomagnetic sensor.
Figure 4. The corrected 3D point cloud data obtained from the geomagnetic sensor.
Applsci 15 01195 g004
Figure 5. The corrected values of the geomagnetic sensor in each plane (Left:  x y ; Center: x z ; Right: y z ).
Figure 5. The corrected values of the geomagnetic sensor in each plane (Left:  x y ; Center: x z ; Right: y z ).
Applsci 15 01195 g005
Figure 6. R o l l , P i t c h when the sensor is placed on the horizontal plane and moved back and forth.
Figure 6. R o l l , P i t c h when the sensor is placed on the horizontal plane and moved back and forth.
Applsci 15 01195 g006
Figure 7. Estimation results after the sensor becomes stationary when β is varied (Left: β = 0.01 ; Right: β = 0.2 ).
Figure 7. Estimation results after the sensor becomes stationary when β is varied (Left: β = 0.01 ; Right: β = 0.2 ).
Applsci 15 01195 g007
Figure 8. The evaluation trajectories used for position estimation.
Figure 8. The evaluation trajectories used for position estimation.
Applsci 15 01195 g008
Figure 9. Position estimation results for hand-held walking (rectangular trajectory).
Figure 9. Position estimation results for hand-held walking (rectangular trajectory).
Applsci 15 01195 g009
Figure 10. Position estimation results for hand-swinging walking (rectangular trajectory).
Figure 10. Position estimation results for hand-swinging walking (rectangular trajectory).
Applsci 15 01195 g010
Figure 11. Position estimation results for hand-held walking (circular trajectory).
Figure 11. Position estimation results for hand-held walking (circular trajectory).
Applsci 15 01195 g011
Figure 12. Position estimation results for hand-swinging walking (circular trajectory).
Figure 12. Position estimation results for hand-swinging walking (circular trajectory).
Applsci 15 01195 g012
Figure 13. Measurement trajectory of geomagnetic disturbance caused by other devices (Left: 0.5 m; Center: 0.3 m; Right: 0.2 m).
Figure 13. Measurement trajectory of geomagnetic disturbance caused by other devices (Left: 0.5 m; Center: 0.3 m; Right: 0.2 m).
Applsci 15 01195 g013
Figure 14. Measurement results of geomagnetic disturbance caused by other devices (Left: 0.5 m; Center: 0.3 m; Right: 0.2 m).
Figure 14. Measurement results of geomagnetic disturbance caused by other devices (Left: 0.5 m; Center: 0.3 m; Right: 0.2 m).
Applsci 15 01195 g014
Figure 15. Trajectory and environment used for estimation.
Figure 15. Trajectory and environment used for estimation.
Applsci 15 01195 g015
Figure 16. Estimation R = results of walking trajectory.
Figure 16. Estimation R = results of walking trajectory.
Applsci 15 01195 g016
Table 1. The average of 500 data points from the accelerometer when placed on a horizontal plane.
Table 1. The average of 500 data points from the accelerometer when placed on a horizontal plane.
ax ave ay ave az ave
Average [ m/s 2 ]0.04680.02959.9853
Table 2. The average of 500 data points from the accelerometer for each x, y, and z axis when oriented vertically upward and downward.
Table 2. The average of 500 data points from the accelerometer for each x, y, and z axis when oriented vertically upward and downward.
ax ave ay ave az ave
UpwardDownwardUpwardDownwardUpwardDownward
Average [ m/s 2 ]9.7850−9.79149.7922−9.78079.7352−9.7143
Table 3. The average of 500 data points from the angular velocity sensor when kept stationary.
Table 3. The average of 500 data points from the angular velocity sensor when kept stationary.
gx ave gy ave gz ave
Average   10 3 [rad/s]−2.672−3.4998.724
Table 4. Average of R P n o r m when e 1 of the complementary filter is varied.
Table 4. Average of R P n o r m when e 1 of the complementary filter is varied.
e 1 RP norm [rad]
0.010.282
0.0010.222
0.00010.212
Table 5. Average of R P n o r m when e 2 of the complementary filter is varied.
Table 5. Average of R P n o r m when e 2 of the complementary filter is varied.
e 1 RP norm [rad]
0.10.212
0.010.179
0.0010.073
Table 6. Average of R P n o r m when α 0 of the complementary filter is varied.
Table 6. Average of R P n o r m when α 0 of the complementary filter is varied.
α 0 RP norm [s]
0.10.072
0.20.103
0.30.166
0.40.179
Table 7. Geomagnetic readings when other devices are close by.
Table 7. Geomagnetic readings when other devices are close by.
Distance [cm] Devices
Device Affecting the Geomagnetic Field (iPhone)Device Affecting the Geomagnetic Field (AppleWatch)
Measured Value [μT]Absolute Error [μT]Measured Value [μT]Absolute Error [μT]
4045.30.0545.20.11
3045.30.0445.30.03
2045.80.4545.20.15
1055.29.8548.63.22
02395.32349.95215.2169.85
Table 8. Error in Y a w axis estimation with and without geomagnetic sensor.
Table 8. Error in Y a w axis estimation with and without geomagnetic sensor.
Absolute Error When Not Used [deg]Absolute Error When Used [deg]
110.510.47
215.210.65
311.420.13
410.150.35
513.320.08
614.230.12
710.570.88
810.910.43
911.250.12
1012.890.78
Ave.12.040.40
Table 9. Error in Y a w axis estimation with and without change in β .
Table 9. Error in Y a w axis estimation with and without change in β .
Absolute Error at Fixed β [deg]Absolute Error When β Changes Dynamically [deg]
196.261.78
273.120.63
3102.660.82
480.290.91
5161.811.21
689.111.98
7133.121.03
8148.990.91
9103.311.87
10129.730.22
Average111.841.13
Table 10. Absolute error between the starting point and endpoint during position estimation.
Table 10. Absolute error between the starting point and endpoint during position estimation.
Rectangular TrajectoryCircular Trajectory
First Time (L)Second Time (R)First Time (L)Second Time (R)
Absolute error of hand-held [cm]70.1110.5101.7115.3
Absolute error of hand-swinging [cm]46.0138.7135.057.9
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Izutsu, Y.; Komuro, N. Indoor Walking Trajectory Estimation Using Mobile Device Sensors for Hand-Held and Hand-Swinging Modes. Appl. Sci. 2025, 15, 1195. https://doi.org/10.3390/app15031195

AMA Style

Izutsu Y, Komuro N. Indoor Walking Trajectory Estimation Using Mobile Device Sensors for Hand-Held and Hand-Swinging Modes. Applied Sciences. 2025; 15(3):1195. https://doi.org/10.3390/app15031195

Chicago/Turabian Style

Izutsu, Yuta, and Nobuyoshi Komuro. 2025. "Indoor Walking Trajectory Estimation Using Mobile Device Sensors for Hand-Held and Hand-Swinging Modes" Applied Sciences 15, no. 3: 1195. https://doi.org/10.3390/app15031195

APA Style

Izutsu, Y., & Komuro, N. (2025). Indoor Walking Trajectory Estimation Using Mobile Device Sensors for Hand-Held and Hand-Swinging Modes. Applied Sciences, 15(3), 1195. https://doi.org/10.3390/app15031195

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop