Next Article in Journal
An Intelligent System for Pigeon Egg Management: Integrating a Novel Lightweight YOLO Model and Multi-Frame Fusion for Robust Detection and Positioning
Previous Article in Journal
Multimedia Transmission over LoRa Networks for IoT Applications: A Survey of Strategies, Deployments, and Open Challenges
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Arithmetic Optimization PDR Algorithm for Smartphones

School of Geomatics, Liaoning Technical University, Fuxin 123000, China
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(23), 7129; https://doi.org/10.3390/s25237129
Submission received: 17 September 2025 / Revised: 3 November 2025 / Accepted: 20 November 2025 / Published: 21 November 2025
(This article belongs to the Section Intelligent Sensors)

Abstract

In order to accurately and reasonably set the Pedestrian Dead Reckoning (PDR) system parameters, a novel arithmetic optimization PDR algorithm (AO-PDR) for smartphones is proposed. Firstly, the AO-PDR sets system parameters such as the binary threshold, sliding window size, step length estimation coefficient, and motion state judgment threshold. Based on the positioning error, step deviation, and step length deviation the fitness function of Arithmetic Optimization Algorithm (AOA) is established. Secondly, throughout the initial exploration and development stages, the AOA efficiently searches for the minimum fitness and obtains the optimal system parameters, which are then applied to step detection, step length estimation, and heading correction to solve the pedestrian gait, step length, and heading. Based on the pedestrian motion state, the heading correction mechanism is established. Finally, the pedestrian coordinates are calculated based on the step length and heading. In order to comprehensively evaluate the performance of AO-PDR, four experimenters walked around two experimental sites with three smartphones, respectively, and collected 24 sets of data. The parameter optimization and pedestrian positioning experiments were designed. The experimental results show that AO-PDR can obtain the optimal parameters efficiently and accurately. The mean optimal fitness is 1.352, and the mean running time is 164.85 s. The AO-PDR has high adaptability, efficiency, and stability for different pedestrians and smartphones. The mean positioning error is 0.2893 m, and the standard deviation of positioning error is 0.341 m, which meets the accuracy requirements of pedestrian location-based services.

1. Introduction

Location-based service (LBS) has always played an important role in people’s daily lives. Among them, the Global Navigation Satellite System (GNSS) has provided all-weather, high-precision navigation information for global users, and greatly changed people’s lifestyles since it was initially proposed in the 1970s [1,2]. Nevertheless, buildings are becoming taller and taller, and indoor and underground spaces are becoming increasingly abundant. In large indoor and shaded environments, GNSS cannot be effectively positioned [3]. At the same time, some studies have pointed out that people spend 70% to 90% of their time indoors, and the demand for indoor LBS is strong [4,5]. Therefore, the accurate and reliable indoor positioning technology is the current research hotspot of LBS.
BLE [6,7], UWB [8,9,10] and Wi-Fi [11,12,13] have high accuracy in indoor positioning. However, in practical applications, the above indoor positioning technologies require a pre-built database in order to function. Thus, it is difficult to implement accurate positioning indoors without existing infrastructure. The cost of this is high. Visual Grounding (VG) [14,15,16], Geomagnetic Matching (GM) [17,18,19] and Pedestrian Dead Reckoning (PDR) [20,21,22] have strong autonomy. Pedestrian positioning can be completed only by using image, geomagnetic field or inertial information. However, VG is susceptible to light, and its image-matching algorithms are computationally intensive. Similarly, GM is affected by metal equipment, and the mismatches are more serious. In contrast, with the continuous advancements of Micro-Electro-Mechanical System (MEMS), smartphone-based PDR has emerged as the mainstream research of indoor positioning [23,24]. PDR can output high-precision position information in a short time, but due to the low accuracy of smartphone built-in MEMS sensors, the positioning error would accumulate over time [25,26]. Consequently, building a stable and reliable PDR system is still the key focus of research on pedestrian indoor positioning.
The PDR needs to collect tri-axial acceleration and angular velocity during pedestrian movement. It then calculates gait, step length, and heading through step detection, step length estimation, and heading correction, ultimately computing pedestrian coordinates [27,28,29]. To enhance the positioning performance of PDR, some scholars have proposed step detection algorithms such as peak detection [30], Finite State Machine (FSM) [31], and Fast Fourier Transform (FFT) [32] by using the periodic variation in the tri-axial acceleration and angular velocity. In addition, some scholars have proposed nonlinear step length estimation algorithms, such as the Weinberg model, the Scarlet model, and the Kim model, using the physical relationship between step length and acceleration [30,33]. At the same time, other scholars have proposed Kalman Filter (KF) [34], Extended Kalman Filter (EKF) [35], Unscented Kalman Filter (UKF) [36], Particle Filter (PF) [37], and Heuristic Drift Elimination (HDE) [38] by using tri-axial acceleration, angular velocity, and geomagnetic field. In the above algorithms, the parameters are generally set as fixed empirical values or determined by a large number of experiments. However, experimental factors such as pedestrians and smartphones will significantly affect the parameter setting. As a result, reasonable and accurate setting of system parameters can improve the positioning accuracy of PDR.
In order to set the PDR system parameters reasonably and accurately, this paper proposes a novel arithmetic optimization PDR algorithm (AO-PDR) for smartphone. The contributions of this paper are summarized as follows: (1) to establish a comprehensive optimization mechanism, six system parameters—binary threshold, sliding window size, step length estimation coefficient and motion state judgment threshold—were set to cover the three stages of PDR. Based on the positioning error, step deviation and step length deviation, the fitness function of Arithmetic Optimization Algorithm (AOA) was established. (2) Through the initial, exploration and development stages, the multiplication and division operator were used to enhance the dispersion of global search, and then the addition and subtraction operator were used to enhance the accuracy of local development. The AOA can effectively balance the global search and local development capabilities and efficiently obtains the optimal system parameters. (3) The optimal system parameters were applied to step detection, step length estimation, and heading correction. The binary threshold was used to detect pedestrian gait information, and a sliding window was established to eliminate false steps. Furthermore, the Weinberg model was used to estimate the pedestrian step length. Based on quaternion, the heading was solved to judge the pedestrian motion state, and the heading correction mechanism was established. Finally, pedestrian coordinates were calculated using step length and heading.
The remainder of the paper is organized as follows: Section 1 introduces the smartphone-based PDR system, including step detection, step length estimation and heading correction. In Section 2, the novel smartphone-based AO-PDR is introduced. The specific process of system parameter and AOA optimization is introduced in detail. Section 3 introduces the experimental design and analyzes the experimental results. We present the conclusions and reveal some potential research topics for the future in Section 4.

2. The Smartphone-Based PDR System

With the rapid innovation and development of MEMS, the smartphone-based PDR system has emerged as the mainstream research of indoor positioning. This system uses the smartphone built-in MEMS sensors to collect the acceleration and angular velocity. Based on this, the step length and heading are estimated to calculate the pedestrian coordinates. The positioning process of PDR system is shown in Figure 1.
Supposing that the position coordinates of step k 1 are X k 1 , Y k 1 , the step length and heading of step k are L k and φ k , respectively. Then, the position coordinates of step k are calculated as follows:
X k = X k 1 + L k sin ( φ k ) Y k = Y k 1 + L k cos ( φ k )

2.1. Step Detection and Step-Length Estimation

As the first stage of PDR system, step detection provides gait information for step length estimation and heading correction, which affects the accuracy of step length and heading. At present, most step detection algorithms detect gait information based on the variation characteristics of resultant acceleration. During movement, the pedestrians’ legs are highly symmetrical, and the velocity and position change regularly with the center of gravity. A gait period is defined as the period from heel-off to foot-flat. Each gait period includes acceleration and deceleration stages, as shown in Figure 2. At the beginning of the gait period, the pedestrian lifts the foot and the resultant acceleration gradually increases. When the foot is raised to the highest point, the resultant acceleration is at its largest. Then, the lifted foot falls, and the resultant acceleration decreases. Subsequently, the pedestrian enters the next gait period, and the acceleration stage and the deceleration stage will alternate periodically.
Therefore, there is always a binary threshold A f to reasonably divide each gait period into the acceleration and deceleration stages. Using A f to judge the resultant acceleration a k , a binary state array S t a t e is obtained as follows:
S t a t e = 1 ,   a k > A f 0 ,   a k A f
where S t a t e = 1 indicates that the gait period is in the acceleration stage, and S t a t e = 0 indicates that the gait period is in the deceleration stage.
On this basis, it is judged whether the time interval t k 1 , k of the gait period meets the pedestrian motion characteristics. If the time interval t k 1 , k is too long or too short, the gait period will be considered as false step. To this end, a backward sliding window of size w is established, and the binary state array S t a t e is optimized by mean smoothing and rounding, Then, a new binary state array S t a t e is obtained as follows:
S t a t e = round S t a t e i + S t a t e i 1 + S t a t e i 2 + + S t a t e i w + 1 / w
where round represents the rounding function.
Figure 3 shows an example of the binary state array S t a t e .
As shown in Figure 3, there are still a small number of false steps. Therefore, the temporary variable m is set to count the number of binary states “1”, and the false steps are further detected and eliminated. The m is counted as follows:
m = m + 1 , S t a t e = 1 0 , S t a t e = 0   &   m < w / 2 m + 1 , S t a t e = 0   &   m w / 2  
when m > w , the current gait period detection is completed. Gait information such as the start/end time and resultant acceleration of the current gait period are recorded.
The Weinberg model estimates the step length based on the nonlinear relationship between step length and resultant acceleration. The model is established as:
L = K a max a min 4
where a max and a min are the maximum and minimum values of the resultant acceleration in a gait period, respectively, and K is the step length estimation coefficient.

2.2. Heading Correction

Step 1: Heading solution.
The direction cosine, Euler angle, and quaternion are often used to update the attitude. Among them, the quaternion requires few calculations and is easy to implement. Therefore, in this paper, we use it the quaternion to update the pedestrian attitude and calculate the heading. The quaternion q 0   q 1   q 2   q 3 T is updated as follows:
q 0 q 1 q 2 q 3 k + 1 = q 0 q 1 q 2 q 3 k + d t 2 0 ω x ω y ω z ω x 0 ω z ω y ω y ω z 0 ω x ω z ω y ω x 0 k q 0 q 1 q 2 q 3 k
where [ · ] k represents the information at time k , [ ω x   ω y   ω z ] T represents the tri-axial angular velocity, and d t is the sampling period, d t = 0.01.
The heading φ k at time k is calculated as follows:
φ k = a r c t a n 2 ( q 1 q 2 q 0 q 3 ) q 0 2 q 1 2 + q 2 2 q 3 2
Eight main headings are set, and the offset E k of the heading φ k relative to the main headings is calculate as follows:
E k = Δ 2 m o d φ k , Δ
where m o d represents modulus function, and Δ represents main heading interval, Δ = 45°.
When E k > 0, it shows that the heading φ k is left compared with the main heading, and a correction c k needs to be added. On the contrary, it shows that the heading φ k is right compared with the main heading, and a correction c k needs to be subtracted. Therefore, the signum function sgn E k can be constructed as follows:
sgn E k = 1 ,   E k > 0 0 ,   E k = 0 1 ,   E k < 0
The heading φ k at time k is corrected as follow:
φ k = φ k + sgn E k × c k
where c k is related to the performance of the smartphone built-in gyroscope.
Step 2: Motion state judgment.
When pedestrians move or turn along the non-main heading, the heading is prone to overcorrection. Therefore, based on the continuous headings φ k 2 , φ k 1 and φ k , the pedestrian motion state is determined to establish the heading correction mechanism. The first two steps of the pedestrian are identified as moving straight along the main heading, and then the heading is judged from the third step.
Straight/turning: To determine whether the continuous headings φ k 2 , φ k 1 , and φ k meet the threshold, the judgment conditions are as follows:
  J 1 = ( φ k φ k 1 ) × ( φ k 1 φ k 2 ) J 2 = φ k φ k 1   J 3 = φ k φ k 1 + φ k 1 φ k 2
Z k 1 = 0 , J 1 < 0   &   J 2 < S J 1 | | J 3 < S J 2 1 , o t h e r w i s e
where J 1 , J 2 , and J 3 are three different judgment conditions of the continuous heading, S J 1 and S J 2 are the thresholds for judging the straight/turning.
When Z k 1 = 0, the pedestrian walks straight ahead and keeps the correction c k . When Z k 1 = 1, the pedestrian turns and adjusts the correction c k .
The main heading/the non-main heading: The mean heading of three continuous steps is mapped to the interval [0, Δ ], and then the angle between the mean heading and the main heading is calculated. The judgment conditions are as follows:
φ k = m o d φ k + φ k 1 + φ k 2 / 3 , Δ
Z k 2 = 0 , m i n φ k , Δ / 2 φ k < M J 1 , o t h e r w i s e  
where φ k is the mean heading of continuous heading, M J is the threshold for judging the main heading/non-main heading, m i n is the minimum function.
When Z k 1 = 0, the pedestrian moves along the main heading and keeps the correction c k . When Z k 1 = 1, the pedestrian moves along the non-main heading and adjusts the correction c k .
Step 3: Heading correction mechanism.
When Z k 1 =1 || Z k 2 = 1, the difference Δ φ k between the heading φ k and the mean heading of φ k , φ k 1 , φ k 2 is calculated as follows:
Δ φ k = φ k φ k + φ k 1 + φ k 2 3
A size 5 sliding window is established to calculate the variance of the difference Δ φ k , and the correction c k is dynamically adjusted as follows:
c k = 5 c k i = n 4 n Δ φ k Δ φ ¯ 2
where Δ φ ¯ is the mean heading of Δ φ k in the sliding window.
The heading φ k at time k is corrected as follows:
φ k = φ k + sgn E k × c k
when Z k 1 = 0 || Z k 1 1 = 1, the heading φ k is corrected as follows:
φ k + m = { φ k + m φ k + Δ , Δ φ k > Δ / 2 φ k + m φ k , o t h e r w i s e
where m = 0, 1, 2…end, that is, all the current and future headings are corrected.

3. The Smartphone-Based AO-PDR System

The smartphone-based PDR system sets the binary threshold A f and the sliding window size w in the step detection stage. In the step length estimation stage, the coefficient K is set. In the heading correction stage, the straight judgment thresholds S J 1 , S J 2 and the main heading judgment threshold M J are set. The PDR system parameters are shown in Table 1. Due to the differences in pedestrians and smartphones, the system parameters need to be continuously optimized to obtain more accurate positioning results. However, manual optimization of parameters requires extensive experiments and experience, with subjective bias, and it is difficult to obtain the global optimal parameters.
Therefore, this paper introduces AOA into the smartphone-based PDR system and establishes a novel arithmetic optimization PDR system (AO-PDR). The system framework is shown in Figure 4.
The AOA is a metaheuristic optimization algorithm which has been proposed by Faramarzi et al. in 2020 [39]. The algorithm performs global search and local development according to the distribution characteristics of operators “addition, subtraction, multiplication and division”. The multiplication and division operator are used to enhance the dispersion of global search, and then the addition and subtraction operator are used to enhance the accuracy of local development. Consequently, the AOA can prevent the optimization from falling into local optimal parameters. It also reduces the time and cost of manual optimization and efficiently obtains the global optimal parameters.
The AOA is divided into the initial, exploration, and development stages. The adaptive transformation between the exploration and development stages can help AOA efficiently search for the optimal parameters. The diversity of potential parameters is maintained, enabling a wider search. The specific steps are as follows:
Step 1: The initial stage.
Define the fitness function: the positioning error P E , step deviation S D and step length deviation S L D are calculated as:
P E = k = 1 n X k x k 2 + Y k y k 2 n
S D = R e a l S t e p S t e p R e a l S t e p
S L D = k = 1 n R e a l L k L k n
where ( X k , Y k ) represent the real pedestrian coordinates, ( x k , y k ) represent the solution pedestrian coordinates, R e a l S t e p represents the real step number, S t e p represents the solution step number, R e a l L k represents the real step length, and L k represents the solution step length.
In order to comprehensively establish the optimization mechanism, based on the positioning error P E , step deviation S D and step length deviation S L D , the fitness function F i t is established as follows:
F i t = P E + S D + S L D
Define the math optimizer accelerated ( M O A ): M O A updates the control coefficients of the exploration stage and the development stage, dynamically adjusts the step length and direction of the optimization, and focuses the candidate parameters on a more accurate area. The M O A is calculated as follows:
M O A = M i n + C u r I × M a x M i n M a x I
where M a x and M i n represents the maximum and minimum values of MOA, respectively, C u r I represents the current number of iterations, and M a x I represents the maximum number of iterations.
Define the math optimizer probability ( M O P ): M O P avoids over-reliance on specific operators by controlling the usage frequency of different operators. The effects of different operators are balanced to improve the stability of optimization. The M O P is calculated as follows:
M O P = 1 C u r I 1 / α M a x I 1 / α
where α represents the effective accuracy of the iterative process, α = 5.
Step 2: The exploration and development stages.
r 1 , r 2 and r 3 are random numbers between [0, 1].
When r 1 M O A , the AOA enters the exploration stage. In this stage, AOA uses multiplication and division operators to carry out global search, improve the dispersion of system parameters, and realize global optimization. The exploration stage is written as follows:
K T i , j = B j / M O P + ε × u b l b × μ + l b , r 2 < 0.5 B j × M O P × u b l b × μ + l b , r 2 0.5
where B j represents the location of the current optimal parameter, and ε represents the minimum constant.
When r 1 > M O A , the AOA enters the development stage. In this stage, AOA uses addition and subtraction operators to reduce the dispersion of parameters, improve the local development ability, and approach the optimal parameters faster. The development stage is written as follows:
K F i , j = B j M O P × u b l b × μ + l b ,   r 3 < 0.5 B j + M O P × u b l b × μ + l b ,   r 3 0.5
In summary, the pseudo-code of smartphone-based AO-PDR system is shown in Algorithm 1.
Algorithm 1: Smartphone-based AO-PDR system
Inputs: a , ω , t , N , n , M a x I , α , μ , μ b , l b
AOA system
    While C u r I < M a x I do
        Calculate F i t , M O A , and M O P by Equations (19)–(24)
    Exploration phase
        If   r 2 < 0.5 then
             K T i , j = B j / M O P + ε × u b l b × μ + l b
        Else
             K T i , j = B j M O P × u b l b × μ + l b
        End if
    Exploitation phase
        If  r 3 < 0.5 then
             K F i , j = B j M O P × u b l b × μ + l b
        Else
             K F i , j = B j + M O P × u b l b × μ + l b
        End if
PDR system
    Update A f , w , K , S J 1 , S J 2 , M J
    Calculate S t a t e , L k , φ k by Equations (2)–(10)
    For i := 3 To num do
        Calculate Z k 1 , Z k 2 by Equations (11) and (14)
    If Z k 1 = 1 || Z k 2 = 1 do
         φ k = φ k + sgn E k × 5 c k k = n 4 n Δ φ k Δ φ ¯ 2
    else
φ k + m = φ k + m Δ φ k + Δ , Δ φ k > Δ / 2 φ k + m Δ φ k o t h e r w i s e
    End if
    End for
    Update X , Y by Equation (1)
Output: L , φ , X , Y

4. Experimental Verification and Analysis

In order to comprehensively verify and analyze the performance of the AO-PDR, this study sets up a parameter optimization experiment and a pedestrian positioning experiment. Four experimenters walked around two experimental sites while holding three smartphones in their hands and collected acceleration and angular velocity at 100 HZ, as shown in Figure 5. The whole collection process was continuous without pause when turning the corner. There were two males and two females, and their specific information is shown in Table 2. The three smartphones used were Xiaomi 10S, Huawei Mate 60 Pro and iPhone 14 Plus, and their specific information is shown in Table 3. The two experimental sites were an outdoor football ground and an indoor corridor. The football ground (A→B→C→D) was a closed rectangle with 105 m × 68 m. The indoor corridor (a→b→c→d) was composed of three corridors, measuring 39 m, 50.6 m and 46.2 m, respectively. The dataset “SmartPhone-AccGyroData-PDR” contains 24 sets of data and has been shared on Github (https://github.com/Wx10101/Smartphone-AccGyroData-PDR (accessed on 22 October 2025)).

4.1. Parameter Optimization Experiment

In order to comprehensively verify and analyze the parameter optimization ability of the AO-PDR, Bayesian Optimization (BO) [40], Bald Eagle Search (BES) [41] and Equilibrium Optimizer (EO) [39] are selected as comparative algorithms. BO is an automatic tuning algorithm proposed by J.Snoek in 2012, BES is a metaheuristic algorithm proposed by Faramarzi in 2020, and EO is a swarm intelligence algorithm proposed by Alsatter in 2020. For the AOA and three comparison algorithms, the fitness function is established based on the positioning error, step deviation, and step length deviation, as shown in Equations (19)–(22).
Case 1: In order to eliminate the contingency of AOA optimization, the four intelligent optimization algorithms are optimized 50 times repeatedly. Taking the Experimenter 3 flat-end Huawei Mate 60 Pro walking in the corridor as an example, we analyze the optimization results. The optimal fitness is shown in Figure 6, and the running time is shown in Figure 7. To deeply analyze the optimal fitness and running time, CDFs are shown in Figure 8 and Figure 9, and then the mean value, standard deviation, minimum value and maximum value are shown in Table 4.
From Figure 6, Figure 7, Figure 8 and Figure 9 and Table 4, for 50 optimizations, the mean value and standard deviation of optimal fitness of AOA are 0.2354 and 0.0858, and then the mean value and standard deviation of the running time of AOA are 118.61 s and 9.28 s. This shows that the AOA has high efficiency and stability. Compared with BO, BES and EO, the AOA has advantages in terms of parameter optimization and running time. The mean value of optimal fitness is reduced by 0.2064, 0.3788, and 0.3023, and then the mean value of the running time is reduced by 131.64 s, 234.95 s, and 13.76 s.
Case 2: In order to analyze the adaptability of AOA to different pedestrians and smartphones, four intelligent optimization algorithms were used to optimize the 24 sets of data, we analyze the optimization results. The optimal fitness is shown in Figure 10, and the running time is shown in Figure 11. To deeply analyze the optimal fitness and running time, CDFs are shown in Figure 12 and Figure 13, and the mean value, standard deviation, minimum value and maximum value are shown in Table 5.
From Figure 10, Figure 11, Figure 12 and Figure 13 and Table 5, for different pedestrians and smartphones, the mean value and standard deviation of optimal fitness of AOA are 2.4685 and 2.3277, and then the mean value and standard deviation of running time of AOA are 211.09 s and 83.58 s. This shows that the AOA has high adaptability, efficiency and stability. Compared with BO, BES and EO, the AOA has advantages in terms of parameter optimization and running time. The mean value of optimal fitness is reduced by 0.4047, 0.3801 and 0.5034, and then the mean value of running time is reduced by 60.09 s, 414.9 s, and 9.56 s.

4.2. Pedestrian Positioning Experiment

In order to comprehensively verify and analyze the pedestrian positioning ability of the AO-PDR, Fixed Correction-PDR (FC-PDR) and Fixed Parameter-PDR (FP-PDR) are selected as comparative algorithms, and the specific information is shown in Table 6. The step detection and step length estimation of three algorithms are based on binary detection and the Weinberg model, as shown in Equations (2)–(5). The parameters of AO-PDR are obtained by the AOA, and the parameters of comparison algorithms are set according to the references and experience.
Case3: Taking Experimenter 3 flat-end Huawei Mate 60 Pro walking in the corridor as an example, the pedestrian positioning results are displayed. The optimal system parameters are obtained by the AOA and then input into the PDR system to calculate the gait, step length, and heading, as shown in Figure 14, Figure 15 and Figure 16.
Case4: In order to analyze the adaptability of AO-PDR to different pedestrians and smartphones, three PDR systems were used to locate the 24 sets of data. The pedestrian positioning results were analyzed, and the pedestrian trajectories are shown in Figure 17 and Figure 18, and the positioning errors are shown in Figure 19 and Figure 20. To deeply analyze the positioning error, the CDF is shown in Figure 21, and the mean value, standard deviation, minimum value and maximum value are shown in Table 7.
From Figure 17, Figure 18, Figure 19, Figure 20 and Figure 21 and Table 7, for different pedestrians and smartphones, the mean value, standard deviation, minimum value, and maximum value of positioning error of AO-PDR are 0.3864 m, 0.341 m, 0.0821 m and 1.4416 m, respectively. This shows that the AO-PDR has high adaptability, efficiency, and stability. Compared with FC-PDR and FP-PDR, the AO-ODR has advantages in pedestrian positioning. The mean value of positioning error was reduced by 4.9411 m and 2.4539 m, and the standard deviation of positioning error was reduced by 2.5676 m and 2.0855 m.

5. Conclusions

In order to accurately and reasonably set the PDR system parameters and improve pedestrian positioning accuracy and adaptability, a novel arithmetic optimization PDR algorithm (AO-PDR) for smartphones is proposed. The AO-PDR uses the positioning error, step deviation, and step length deviation to establish the fitness function, and efficiently obtain the optimal system parameters such as binary threshold, sliding window size, step length estimation coefficient, and motion state judgment threshold. The optimal parameters are applied to step detection, step length estimation and heading correction to calculate pedestrian coordinates. In order to comprehensively evaluate the performance of AO-PDR, a parameter optimization experiment and a pedestrian positioning experiment are designed. (1) For the parameter optimization experiment, AOA is better than BO, BES, and EO. The mean value of optimal fitness was reduced by 0.3056, 0.3795, and 0.4029, and then the mean value of running time was reduced by 95.87 s, 324.93 s and 11.66 s. (2) For the pedestrian positioning experiment, AO-PDR is better than FC-PDR and FP-PDR. The mean value of positioning error was reduced by 4.9411 m and 2.4539 m, and then the standard deviation of positioning error was reduced by 2.5676 m and 2.0855 m. (3) On the whole, the AO-PDR can obtain the optimal parameters efficiently and accurately. The mean value of optimal fitness was 1.352, and the mean value of running time was 164.85 s. The AO-PDR has high adaptability, efficiency, and stability for different pedestrians and smartphones. The mean value of positioning error was 0.2893 m, and the standard deviation of positioning error was 0.341 m, which meets the accuracy requirements of pedestrian location-based services. In the future, we plan to add geomagnetic and visual features to further improve the accuracy and adaptability of the AO-PDR.

Author Contributions

A.X. and M.Z. conceived and designed the experiments; M.Z. performed the experiments; M.Z. wrote the paper; A.X. and M.Z. analyzed the data; and M.Z. revised the paper. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (NSFC), grant numbers 42030109, 42074012 and the APC was funded by the National Natural Science Foundation of China (NSFC), grant numbers 42030109, 42074012.

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. Shu, Y.; Xu, P.; Niu, X.; Chen, Q.; Qiao, L.; Liu, J. High-rate attitude determination of moving vehicles with GNSS: GPS, BDS, GLONASS, and Galileo. IEEE Trans. Instrum. Meas. 2022, 71, 1–13. [Google Scholar] [CrossRef]
  2. Cheng, S.; Wang, F.; Li, G.; Geng, J. Single-frequency multi-GNSS PPP-RTK for smartphone rapid centimeter-level positioning. IEEE Sens. J. 2023, 23, 21553–21561. [Google Scholar] [CrossRef]
  3. Niu, X.; Liu, T.; Kuang, J.; Li, Y. A novel position and orientation system for pedestrian indoor mobile mapping system. IEEE Sens. J. 2020, 21, 2104–2114. [Google Scholar] [CrossRef]
  4. Zhou, Z.; Feng, W.; Li, P.; Liu, Z.; Xu, X.; Yao, Y. A fusion method of pedestrian dead reckoning and pseudo indoor plan based on conditional random field. Measurement 2023, 207, 112417. [Google Scholar] [CrossRef]
  5. Zhang, L.; Jiao, K.; He, W.; Wang, X. Anchor deployment optimization for range-based indoor positioning systems in non-line-of-sight environment. IEEE Sens. J. 2024, 24, 24405–24420. [Google Scholar] [CrossRef]
  6. You, Y.; Wu, C. Hybrid indoor positioning system for pedestrians with swinging arms based on smartphone IMU and RSSI of BLE. IEEE Trans. Instrum. Meas. 2021, 70, 1–15. [Google Scholar] [CrossRef]
  7. 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]
  8. Zhang, Y.; Wang, N.; Weng, S.; Li, M.; Mou, D.; Han, Y. Emergency Positioning Method of Indoor Pedestrian in Non-Cooperative Navigation Environment Based on Virtual Reference Node Array/INS. IEEE Sens. J. 2020, 20, 10913–10923. [Google Scholar] [CrossRef]
  9. Zhu, X.; Yi, J.; Cheng, J.; He, L. Adapted error map based mobile robot UWB indoor positioning. IEEE Trans. Instrum. Meas. 2020, 69, 6336–6350. [Google Scholar] [CrossRef]
  10. Yang, Y.; Wang, X.; Li, D.; Chen, D.; Zhang, Q. An improved indoor 3-D ultrawideband positioning method by particle swarm optimization algorithm. IEEE Trans. Instrum. Meas. 2022, 71, 1–11. [Google Scholar] [CrossRef]
  11. Tao, Y.; Zhao, L. A novel system for WiFi radio map automatic adaptation and indoor positioning. IEEE Trans. Veh. Technol. 2018, 67, 10683–10692. [Google Scholar] [CrossRef]
  12. Feng, X.; Nguyen, K.A.; Luo, Z. A wi-fi rss-rtt indoor positioning model based on dynamic model switching algorithm. IEEE J. Indoor Seamless Position Navig. 2024, 2, 151–165. [Google Scholar] [CrossRef]
  13. Sun, M.; Wang, Y.; Zheng, N.; Chen, G.; Li, Z.; Bi, J. Smartphone based indoor localization system using Wi-Fi RTT/Magnetic/PDR based on an improved particle filter. IEEE Trans. Instrum. Meas. 2025, 74, 1–16. [Google Scholar] [CrossRef]
  14. Tang, C.; Sun, W.; Zhang, X.; Zheng, J.; Wu, W.; Sun, J. A novel fingerprint positioning method applying vision-based definition for wifi-based localization. IEEE Sens. J. 2023, 23, 16092–16106. [Google Scholar] [CrossRef]
  15. Yan, J.; He, G.; Basiri, A.; Hancock, C. 3-D passive-vision-aided pedestrian dead reckoning for indoor positioning. IEEE Trans. Instrum. Meas. 2019, 69, 1370–1386. [Google Scholar] [CrossRef]
  16. Jia, S.; Ma, L.; Yang, S.; Qin, D. A novel visual indoor positioning method with efficient image deblurring. IEEE Trans. Mob. Comput. 2022, 22, 3757–3773. [Google Scholar] [CrossRef]
  17. De Angelis, G.; Pasku, V.; De Angelis, A.; Dionigi, M.; Mongiardo, M.; Moschitta, A.; Carbone, P. An indoor AC magnetic positioning system. IEEE Trans. Instrum. Meas. 2014, 64, 1267–1275. [Google Scholar] [CrossRef]
  18. Yeh, S.-C.; Hsu, W.-H.; Lin, W.-Y.; Wu, Y.-F. Study on an indoor positioning system using Earth’s magnetic field. IEEE Trans. Instrum. Meas. 2019, 69, 865–872. [Google Scholar] [CrossRef]
  19. Kusche, R.; Schmidt, S.O.; Hellbrück, H. Indoor positioning via artificial magnetic fields. IEEE Trans. Instrum. Meas. 2021, 70, 1–9. [Google Scholar] [CrossRef]
  20. Lin, F.; Cai, Q.; Liu, Y.; Chen, Y.; Huang, J.; Peng, H. Pedestrian dead reckoning method based on array imu. IEEE Sens. J. 2024, 24, 37753–37763. [Google Scholar] [CrossRef]
  21. Shi, L.-F.; Zhao, Y.-L.; Liu, G.-X.; Chen, S.; Wang, Y.; Shi, Y.-F. A robust pedestrian dead reckoning system using low-cost magnetic and inertial sensors. IEEE Trans. Instrum. Meas. 2018, 68, 2996–3003. [Google Scholar] [CrossRef]
  22. Jiang, C.; Chen, Y.; Chen, C.; Jia, J.; Sun, H.; Wang, T.; Hyyppä, J. Smartphone PDR/GNSS integration via factor graph optimization for pedestrian navigation. IEEE Trans. Instrum. Meas. 2022, 71, 1–12. [Google Scholar] [CrossRef]
  23. Xia, H.; Zuo, J.; Liu, S.; Qiao, Y. Indoor localization on smartphones using built-in sensors and map constraints. IEEE Trans. Instrum. Meas. 2018, 68, 1189–1198. [Google Scholar] [CrossRef]
  24. Wang, Q.; Fu, M.; Wang, J.; Luo, H.; Sun, L.; Ma, Z.; Li, W.; Zhang, C.; Huang, R.; Li, X. Recent advances in pedestrian inertial navigation based on smartphone: A review. IEEE Sens. J. 2022, 22, 22319–22343. [Google Scholar] [CrossRef]
  25. Jin, Z.; Zhang, X.; Liu, G.; Guo, M.; Su, Y.; Lu, M. Flexible gaits adaptive pedestrian dead reckoning system: Precision positioning across diverse gaits. IEEE Sens. J. 2025, 25, 15431–15441. [Google Scholar] [CrossRef]
  26. Wu, L.; Guo, S.; Han, L.; Baris, C.A. Indoor positioning method for pedestrian dead reckoning based on multi-source sensors. Measurement 2024, 229, 114416. [Google Scholar] [CrossRef]
  27. Yao, Y.; Pan, L.; Fen, W.; Xu, X.; Liang, X.; Xu, X. A robust step detection and stride length estimation for pedestrian dead reckoning using a smartphone. IEEE Sens. J. 2020, 20, 9685–9697. [Google Scholar] [CrossRef]
  28. Li, W.; Chen, R.; Yu, Y.; Wu, Y.; Zhou, H. Pedestrian dead reckoning with novel heading estimation under magnetic interference and multiple smartphone postures. Measurement 2021, 182, 109610. [Google Scholar] [CrossRef]
  29. Harindranath, A.; Arora, M. A systematic review of user-conducted calibration methods for MEMS-based IMUs. Measurement 2024, 225, 114001. [Google Scholar] [CrossRef]
  30. Zhao, G.; Wang, X.; Zhao, H.; Jiang, Z. An improved pedestrian dead reckoning algorithm based on smartphone built-in MEMS sensors. AEU-Int. J. Electron. Commun. 2023, 168, 154674. [Google Scholar] [CrossRef]
  31. Bi, J.; Zhen, J.; Yao, G.; Sang, W.; Ning, Y.; Guo, Q. Improved Finite State Machine Step Detection Algorithm for Smartphone. Geomat. Inf. Sci. Wuhan Univ. 2023, 48, 232–238. [Google Scholar]
  32. Dirican, A.C.; Aksoy, S. Step counting using smartphone accelerometer and fast Fourier transform. Sigma J. Eng. Nat. Sci. 2017, 8, 175–182. [Google Scholar]
  33. Kochka, K.V.; Evseev, A.D.; Chugunov, A.A. Synthesis of the step detection and step length estimation algorithms based on imu measurements. In Proceedings of the 2023 International Russian Automation Conference (RusAutoCon), Sochi, Russia, 10–16 September 2023; pp. 763–768. [Google Scholar]
  34. Wu, Q.; Li, Z.; Shao, K. Location accuracy indicator enhanced method based on MFM/PDR integration using Kalman filter for indoor positioning. IEEE Sens. J. 2023, 24, 4831–4840. [Google Scholar] [CrossRef]
  35. Yamagishi, S.; Jing, L. The Extended Kalman Filter with Reduced Computation Time for Pedestrian Dead Reckoning. IEEE Sens. Lett. 2023, 7, 1–4. [Google Scholar] [CrossRef]
  36. Tong, X.; Su, Y.; Li, Z.; Si, C.; Han, G.; Ning, J.; Yang, F. A double-step unscented Kalman filter and HMM-based zero-velocity update for pedestrian dead reckoning using MEMS sensors. IEEE Trans. Ind. Electron. 2019, 67, 581–591. [Google Scholar] [CrossRef]
  37. Pei, L.; Liu, D.; Zou, D.; Choy, R.L.F.; Chen, Y.; He, Z. Optimal heading estimation based multidimensional particle filter for pedestrian indoor positioning. IEEE Access 2018, 6, 49705–49720. [Google Scholar] [CrossRef]
  38. Zhang, W.; Wei, D.; Yuan, H. The improved constraint methods for foot-mounted PDR system. IEEE Access 2020, 8, 31764–31779. [Google Scholar] [CrossRef]
  39. Faramarzi, A.; Heidarinejad, M.; Stephens, B.; Mirjalili, S. Equilibrium optimizer: A novel optimization algorithm. Knowl.-Based Syst. 2020, 191, 105190. [Google Scholar] [CrossRef]
  40. Victoria, A.H.; Maragatham, G. Automatic tuning of hyperparameters using Bayesian optimization. Evol. Syst. 2021, 12, 217–223. [Google Scholar] [CrossRef]
  41. Alsattar, H.A.; Zaidan, A.A.; Zaidan, B. Novel meta-heuristic bald eagle search optimization algorithm. Artif. Intell. Rev. 2020, 53, 2237–2264. [Google Scholar] [CrossRef]
Figure 1. The positioning process of PDR system.
Figure 1. The positioning process of PDR system.
Sensors 25 07129 g001
Figure 2. Variation characteristics of resultant acceleration.
Figure 2. Variation characteristics of resultant acceleration.
Sensors 25 07129 g002
Figure 3. The binary state.
Figure 3. The binary state.
Sensors 25 07129 g003
Figure 4. AO-PDR system framework.
Figure 4. AO-PDR system framework.
Sensors 25 07129 g004
Figure 5. The graphical representation of experimental factors.
Figure 5. The graphical representation of experimental factors.
Sensors 25 07129 g005
Figure 6. The optimal fitness of 50 optimizations.
Figure 6. The optimal fitness of 50 optimizations.
Sensors 25 07129 g006
Figure 7. The running time of 50 optimizations.
Figure 7. The running time of 50 optimizations.
Sensors 25 07129 g007
Figure 8. The CDF of optimal fitness of 50 optimizations.
Figure 8. The CDF of optimal fitness of 50 optimizations.
Sensors 25 07129 g008
Figure 9. The CDF of running time of 50 optimizations.
Figure 9. The CDF of running time of 50 optimizations.
Sensors 25 07129 g009
Figure 10. The optimal fitness of 24 sets of data.
Figure 10. The optimal fitness of 24 sets of data.
Sensors 25 07129 g010
Figure 11. The running time of 24 sets of data.
Figure 11. The running time of 24 sets of data.
Sensors 25 07129 g011
Figure 12. The CDF of optimal fitness of 24 sets of data.
Figure 12. The CDF of optimal fitness of 24 sets of data.
Sensors 25 07129 g012
Figure 13. The CDF of running time of 24 sets of data.
Figure 13. The CDF of running time of 24 sets of data.
Sensors 25 07129 g013
Figure 14. The pedestrian gait information.
Figure 14. The pedestrian gait information.
Sensors 25 07129 g014
Figure 15. The pedestrian step length information.
Figure 15. The pedestrian step length information.
Sensors 25 07129 g015
Figure 16. The pedestrian heading information.
Figure 16. The pedestrian heading information.
Sensors 25 07129 g016
Figure 17. Pedestrian trajectory on the football ground.
Figure 17. Pedestrian trajectory on the football ground.
Sensors 25 07129 g017
Figure 18. Pedestrian trajectory in the corridor.
Figure 18. Pedestrian trajectory in the corridor.
Sensors 25 07129 g018
Figure 19. Positioning error of pedestrian trajectory on the football ground.
Figure 19. Positioning error of pedestrian trajectory on the football ground.
Sensors 25 07129 g019
Figure 20. Positioning error of pedestrian trajectory in the corridor.
Figure 20. Positioning error of pedestrian trajectory in the corridor.
Sensors 25 07129 g020
Figure 21. The CDF of positioning error.
Figure 21. The CDF of positioning error.
Sensors 25 07129 g021
Table 1. The settings of the system parameters.
Table 1. The settings of the system parameters.
ParametersStagesValuesMeanings
A f Step Detection∈[9.6, 10.4]Binary threshold
w ∈[40, 60]Sliding window size
K Step Length Estimation∈[0.3, 0.8]Step length estimation coefficient
S J 1 Heading Correction∈[13, 17]Straight judgment threshold 1
S J 2 ∈[8, 12]Straight judgment threshold 2
M J ∈[8, 12]Main heading judgment threshold
Table 2. Specific information of four experimenters.
Table 2. Specific information of four experimenters.
InformationExperimenter1Experimenter2Experimenter3Experimenter4
GenderMaleMaleFemaleFemale
Height (cm)168180170176
Weight (kg)56806958
Table 3. Specific information of three smartphones.
Table 3. Specific information of three smartphones.
InformationXiaomi 10sHuawei Mate 60 ProiPhone 14 Plus
SystemsMIUI 13.0.10HarmonyOS Next 5.1.0iOS 18.6.2
Internal storage8G + 256G12G + 512G8G + 256G
Battery capacity4780 mAh5000 mAh4323 mAh
ProcessorsQualcomm Snapdragon 870HiSilicon Kirin 9000SApple A15 Bionic
Accelerometerslsm6dso Accelerometer Non-wakeuprgm 3-axis
Accelerometer
An accelerometer from Bosch Sensortec
Gyroscopeslsm6dso Gyroscope
Non-wakeup
rgm 3-axis
Gyroscope
A gyroscope from
Bosch Sensortec
Table 4. Technical indexes of optimal fitness and running time of 50 optimizations.
Table 4. Technical indexes of optimal fitness and running time of 50 optimizations.
Technical IndexesOptimal FitnessRunning Time (s)
BOBESEOAOABOBESEOAOA
Mean0.4418 0.6142 0.5378 0.2354 250.25 353.56 132.37 118.61
Std0.3182 0.1213 0.1240 0.0858 19.88 27.70 33.19 9.28
Min0.3510 0.4309 0.3766 0.1122 204.01 315.87 112.87 104.95
Max1.8115 0.8257 0.8980 0.3905 292.75 464.22 348.91 151.68
Table 5. Technical indexes of optimal fitness and running time of 24 sets of data.
Table 5. Technical indexes of optimal fitness and running time of 24 sets of data.
Technical IndexesOptimal FitnessRunning Time (s)
BOBESEOAOABOBESEOAOA
Mean2.8732 2.8486 2.9719 2.4685 271.18 625.99 220.65 211.09
Std1.9691 2.0288 2.3137 2.3277 40.47 245.73 87.90 83.58
Min0.2851 0.4074 0.4194 0.1071 200.31 333.31 115.73 117.69
Max6.4583 6.6778 9.3628 6.4303 366.12 1011.28 356.67 343.61
Table 6. The specific information of AO-PDR and comparison algorithms.
Table 6. The specific information of AO-PDR and comparison algorithms.
AlgorithmsStep DetectionStep Length EstimationHeading CorrectionParameters
FC-PDRBinary detection with fixed parametersWeinberg model with fixed parameterThe heading is solved by quaternion and corrected according to the correction.[9.88, 50, 0.55, null, null, null]
FP-PDRBinary detection with fixed parametersWeinberg model with fixed parameterBased on FC-PDR, the heading correction is adjusted according to the pedestrian motion state.[9.88, 50, 0.55, 15, 10, 10]
AO-PDRBinary detection with optimal parametersWeinberg model with optimal parameterBased on FP-PDR, the heading correction mechanism is established according to the motion state.Obtained by the AOA
Table 7. Technical indexes of positioning error.
Table 7. Technical indexes of positioning error.
Technical IndexesFC-PDRFP-PDRAO-PDR
Mean (m)5.3275 2.8403 0.3864
Std (m)2.9086 2.4265 0.3410
Min (m)1.0683 0.1434 0.0821
Max (m)12.3194 9.6978 1.4416
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

Zhang, M.; Xu, A. A Novel Arithmetic Optimization PDR Algorithm for Smartphones. Sensors 2025, 25, 7129. https://doi.org/10.3390/s25237129

AMA Style

Zhang M, Xu A. A Novel Arithmetic Optimization PDR Algorithm for Smartphones. Sensors. 2025; 25(23):7129. https://doi.org/10.3390/s25237129

Chicago/Turabian Style

Zhang, Mingze, and Aigong Xu. 2025. "A Novel Arithmetic Optimization PDR Algorithm for Smartphones" Sensors 25, no. 23: 7129. https://doi.org/10.3390/s25237129

APA Style

Zhang, M., & Xu, A. (2025). A Novel Arithmetic Optimization PDR Algorithm for Smartphones. Sensors, 25(23), 7129. https://doi.org/10.3390/s25237129

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