# Indoor Positioning Using Smartphone Sensors: A LIDAR and IMU-Based Approach

Son Nguyen Trong

College of Information Science and

Engineering

Ritsumeikan University

Osaka, Japan

<mailto:is0593hx@ed.ritsumei.ac.jp>

Yanlei Gu

School of Informatics and Data

Science

Hiroshima University

Hiroshima, Japan

<mailto:guyanlei@hiroshima-u.ac.jp>

Igor Goncharenko

College of Information Science and

Engineering

Ritsumeikan University

Osaka, Japan

<mailto:igor@fc.ritsumei.ac.jp>

Abstract— The use of indoor positioning technology has become essential for various applications such as navigation, location-based services, and asset tracking. This paper presents a novel approach for indoor positioning utilizing a combination of smartphone built-in sensors and Normal Distributions Transform (NDT) algorithm utilizing lidar sensor data from an iPhone. Our method combines accelerometer, gyroscope, and magnetometer data from the smartphone to estimate the user's initial position, which is then dynamically refined using the Normal Distribution Transform (NDT) algorithm, which aligns LiDAR-derived point clouds with pre-existing 2D maps, thereby enhancing the accuracy of the position estimates. We evaluated the performance of our approach in a real-world indoor environment. Our results demonstrate that our proposed method significantly improves positioning accuracy compared to traditional methods. This study illustrates the potential of utilizing LidDAR sensor data from smartphones for indoor positioning and the advantages of combining multiple sensor modalities for improved accuracy. Our approach contributes to the development of practical and low-cost indoor positioning systems using only smartphones.

Keywords—indoor positioning, LIDAR, smartphone sensors, NDT matching, 2D map

### I. INTRODUCTION

Tracking the location of individuals has become an important aspect in a variety of fields, including retail, transportation, and emergency services [^1]. With the increasing popularity of smartphones, positioning features have become more essential in daily life. For example, people rely on navigation apps such as Google Maps or Apple Maps to determine their current position and find their way to the next stop. In outdoor environments, this can be accomplished through the use of satellite navigation systems, like the Global Navigation Satellite Systems (GNSS), which was used every day. However, in indoor environments where satellite signals may be blocked or unreliable, tracking becomes more challenging. This has led to the development of various technologies for indoor positioning, including infrastructure-dependent and infrastructure-independent methods [^2].

One infrastructure-dependent method is the installation of sensor networks like Ultra-Wideband (UWB) [^2], Wi-Fi [^3], or Bluetooth [^4]. However, these methods may not be feasible in situations where pre-installation is not possible. A infrastructure-independent method that operates without relying on external infrastructure is pedestrian dead reckoning (PDR). This technique leverages motion data obtained from inertial measurement unit (IMU) sensors built into smartphones' devices that are widely used around the world to update the user's estimated position with each detected step. By sequentially calculating the current location from the previous estimate, PDR inherently permits small inaccuracies to build up over time, leading to a gradual drift in the estimated trajectory. Additionally, because smartphone-grade IMUs exhibit limited precision and indoor environments introduce various sources of noise (such as magnetic interference or uneven flooring), PDR systems tend to maintain high accuracy only over shorter tracking distances. As a result, without periodic recalibration or integration of complementary positioning methods, the accumulated errors can significantly degrade performance on longer indoor paths. [^5].

To improve the performance of smartphone based PDR, Normal Distribution Transform is used to align 2D maps with point clouds generated by iPhone LiDAR, thereby enhancing the precision of Pedestrian Dead Reckoning (PDR) for locating pedestrians in indoor environments. The research will be implemented the iPhone 14 Pro, as current models are equipped with sufficient sensors, including a LiDAR sensor, making the research more practical and applicable to real world situations.

### II. INDOOR POSITIONING SYSTEM

As illustrated in Fig. 1, the system is comprised of three primary, sequential stages, with each stage's output contributing through fusion to the final goal of intention estimation. In the initial stage, pedestrian positioning is derived through Pedestrian Dead Reckoning (PDR). The second stage involves converting raw LiDAR measurements into a two-dimensional point cloud representation. Finally, the third stage performs map matching to refine the PDR-based location and produces an accurate positional estimate. These three interconnected processes are designed to operate entirely on a smartphone-mounted onboard sensing unit, integrated position and intention estimation.

![Image](images/3ad756164450e401ca9cfa1b9afeafe0dd0e4968c0b8f28028f74269989b9325.jpg)

<div style="text-align: center;">Fig. 1. The flowchart of the proposed system for estimating position in indoor environment</div>

---

### A. Pedestrian Dead Reckoning

Pedestrian Dead Reckoning (PDR), widely utilized in smartphone-assisted indoor navigation, computes an individual's two-dimensional location by tracking steps, ascertaining step length, and determining heading [^6]. The architecture of the Pedestrian Dead Reckoning (PDR) system shown in Fig. 2 comprise data pre-processing, step detection, mode recognition, and heading estimation. In the initial processing stage, the system acquires IMU data from smartphone sensors, including the accelerometer, gyroscope, and magnetometer. The low-cost inertial sensors equipped in smartphones are influenced not only by inherent drift but also by environmental disruptions. Particularly, magnetometer readings can be distorted by local magnetic fields. Therefore, it is essential to filter and calibrate the raw data. Both time-domain and frequency-domain features are extracted from this pre-processed data. The parameters for step detection, stride length estimation, and heading determination are then computed based on the processed data. Subsequently, the pedestrian's location is updated using the PDR equation:

 $$ \left\{\begin{aligned}X_{k}&=X_{k-1}+L_{k-1,k}.\sin\left(\theta_{k-1,k}\right)\\ Y_{k}&=Y_{k-1}+L_{k-1,k}.\cos\left(\theta_{k-1,k}\right)\end{aligned}\right. $$

where X and Y are the coordinates in the east and north, L is the stride length, $\theta$ is the heading angle during one stride interval, and k denotes the index of pedestrian's strides [^6].

![Image](images/0863f1cefefbbe6767db557b592a1665508be4edb7284e3f49ba435031256a07.jpg)

<div style="text-align: center;">Fig. 2. The flowchart of Pedestrian Dead Reackoning algorithm</div>

### B. Point Cloud Projection

The data from the LiDAR was saved as a depth image, where each pixel represents distance. The first step in processing this data involves transforming the depth image into a point cloud through a two-step process. Initially, the intrinsic matrix is used to convert the depth image into a three-dimensional representation within the camera's coordinate system. Following this, the extrinsic matrix is applied to map this three-dimensional model into the world coordinate system, resulting in a point cloud that is a faithful representation of the scene's spatial arrangement as captured by the depth camera. The intrinsic matrix characterizes the internal features of the camera, such as the focal lengths along the x and y axes and the coordinates of the principal point, while the extrinsic matrix provides essential information about the camera's position and orientation in the world, crucial for transforming the camera-centric coordinates into a global coordinate system.

The mathematical representation of these matrices is as follows:

 $$ P=K.\left[R\;t\right] $$

where K is the intrinsic matrix, R and t is rotation and translation vector in extrinsic matrix

In the domain of point cloud processing, particularly in indoor environments, it is often imperative to eliminate nonessential structures such as floors and ceilings to concentrate on objects of interest. The Random Sample Consensus (RANSAC) algorithm, introduced by Fischler and Bolles in 1981 [^7], is used to remove the floor and ceiling plane of the point cloud shown in Fig. 3a.

The final stage is the transformation of the filtered point cloud to a bird's eye view (BEV) representation. This involves changing the perspective from which the point cloud is viewed, typically by aligning the z-axis of the point cloud with the line of sight of the observer. The BEV transformation facilitates a top-down view of the scene, which is particularly useful for tasks that require an understanding of spatial relationships and layouts from a global perspective. In a BEV, features such as landmarks and road layouts appear as they would on a conventional map, making it easier to line up observed data with existing map information. This top-down perspective also benefits registration, since bringing two datasets into a common coordinate system is more straightforward when both are expressed in the same planar view. In the BEV representation, the point cloud is often projected onto a two-dimensional plane shown in Fig. 3b. This projection simplifies the complexity of the data, making it more amenable to analysis by algorithms that are not inherently three-dimensional in nature, such as Normal Distribution Transform matching.

<div style="text-align: center;">(a)</div>

<div style="text-align: center;">(b)</div>

![Image](images/e03d504615f49e982383618796402d5a43ea9b0c20c05e291ade68c8b9c2ed5e.jpg)

<div style="text-align: center;">Fig. 3. Coversion of depth map to bird eye view point cloud: (a) Point cloud after removing floor and ceiling, (b) Bird eye view point cloud</div>

### C. Normal Distribution Transform Matching

The Normal Distribution Transformation (NDT) matching is a technique for aligning two sets of points in a common coordinate system, based on the probability of measuring a point at a given location. First, the space is partitioned into cells, and each cell is assigned a normal distribution whose mean and covariance are computed from the points within that cell, resulting in a piecewise continuous probability density function. Then, the optimal rigid transformation (translation and rotation) that maps one point set onto the other is found by maximizing the likelihood of the transformed points under the normal distributions defined by the first set [^8].

The vector map in this study is developed using AutoCAD software, derived from a 2D image map and converted into an electronic vector format. A scale factor is applied to ensure the map accurately represents real-world distances. Surrounding walls of the estimated pedestrian position are extracted and transformed into a local East-North-Up coordinate system.

---

The process begins by transforming the map’s walls into a structured point cloud. Points are uniformly distributed along the wall segments, maintaining an equal distance with a maximum separation of 10 cm, as shown in Fig. 4. This uniformity is crucial for the effective integration of the direct use of the map with the Normal Distribution Transform algorithm. Following refinement, the LiDAR-derived 3D point set is transformed into the East–North–Up frame to correspond with the mapping reference, based on a provided initial location estimate [^9]

For the matching process, the corridor's point cloud is used as the reference set, labeled Y, and converted into a Gaussian distribution. The LiDAR point cloud intended for alignment is denoted X. The transformed point cloud X, aligned to match Y, is referred to as X' [^10]:

 $$ x_{i}^{\prime}=R x_{i}+T $$

where R,T is rotation and translation between two point cloud, $x_i \in X$ [^10] [^11].

In the first step of the NDT, space is segmented into a grid of cells, as depicted in Fig. 3b. The cell size is pivotal in influencing the convergence area and the ultimate accuracy of the localization. After a series of trial and error, a cell dimension of 1 m is selected. Whenever a cell contains enough building points, a two-dimensional Gaussian distribution is established (see Fig. 3c). The mean $\mu_k$ and covariance $P_k$ for that cell kare then calculated from the subset of points Y that lie within the cell (denoted $Y_k$):

 $$ \begin{array}{r}{\mu_{k}=\frac{1}{N_{k}}\sum_{y\in Y_{k}}(y)}\end{array} $$

 $$ \begin{array}{r}{P_{k}=\frac{1}{N_{k}-1}\sum_{y\in Y_{k}}(y-\mu_{k})(y-\mu_{k})^{T}}\end{array} $$

with $N_{k}$ the number of point in $Y_{k}$. In the case that the points are aligned, the covariance matrix $P_{k}$ will present a singularity and will not be invertible [^10] [^11].

After constructing the 2D Gaussian distribution for each cell as shown in Fig. 3c, attention shifts to the NDT matching process. In this stage, we seek the optimal rotation and translation that align the pedestrian's point cloud Y with the LiDAR-derived point cloud X. This alignment is achieved by minimizing the log-likelihood, which is calculated as the sum of negative logarithms of the probabilities for each transformed point. Optimizing this function ensures the transformed pedestrian data fits the environmental model as closely as possible, resulting in precise registration between the user's position and the scanned surroundings captured by the smartphone's LiDAR. The log-likelihood is computed using formula:

 $$ -l n L(R,T)=-\sum_{i=1}^{N_{x}}\ln(p(R x_{i}+T)) $$

where R, T is rotation and translation between two point cloud, $x_i \in X$ [^10] [^11].

![Image](images/962832724b3a8b6e4548bff24306aa4fff72dc27ed352e2c3f1367f7a262333b.jpg)

<div style="text-align: center;">Fig. 4. Coversion of 2D building vector map to a Normal Distribution map: (a) 2D vector map (b) Division into a grid of cells, (c) Normal Distribution map with ellipsoids</div>

Finally, the localization is done by fusing the output from the Normal Distributions Transform (NDT) algorithm with data from a pedestrian dead reckoning system, utilizing an Extended Kalman Filter (EKF) [^12].

### III. EXPERIMENTS

In this research, we present the experiments conducted to evaluate the efficacy of our proposed indoor localization methods. For system testing, iPhone 14 Pro smartphones served as the primary test platform. The localization experiments were carried out in indoor settings, specifically on the second floor of the Creation Core building at the College of Information Science and Engineering, BKC campus, Ritsumeikan University. Fig. 5 depicts the layout of the experimental site, covering an area of approximately 130 meters in length. This test environment is characterized by a typical magnetic field disturbance, resulting from various elements such as GNSS receivers, computers, Bluetooth and WiFi transmitter modules, and the concrete structure of the building. During the experiment, the test subject initiated the walk from the designated start point (marked in red in Fig. 5), proceeding first to Corner 1, then making a left turn to Corner 2, followed by another left to Corner 3, and finally turning left to Corner 4 before returning to the starting point. The trajectory followed by the pedestrian is clearly marked in Fig. 5.

![Image](images/ce23180ecd747469f158997de45998585ee180e840340a34872b7bfe7b8f808a.jpg)

#### Fig. 5. Indoor positioning experiment site

The experimental results are presented in the form of a trajectory plot, as shown in Fig. 5. The study commenced at the origin point, with coordinates $(0,0)$, which is represented by a red dot on the graph. The actual path taken during the experiment is depicted by the red line, which serves as the ground truth for our analysis. The blue line represents the trajectory estimated by the Pedestrian Dead Reckoning (PDR) system alone. In comparison, the green line illustrates the trajectory obtained from the PDR system after integration with Normal Distributions Transform (NDT) matching, which combines Inertial Measurement Unit (IMU) data and LiDAR information for enhanced localization.

---

The PDR system, which relies solely on IMU data, shows a significant deviation from the ground truth as the path progresses. This deviation is indicative of the inherent drift problem commonly associated with PDR systems due to the accumulation of errors in step detection and heading estimation. The PDR trajectory can be observed making an erroneous loop towards the northeast quadrant of the graph before correcting its course towards the final destination.

On the other hand, the trajectory corrected by the NDT matching approach (green line) adheres more closely to the ground truth. This improved accuracy highlights the effectiveness of NDT matching in correcting the PDR drift. Notably, in areas where the PDR trajectory shows significant divergence from the ground truth, the NDT integrated solution successfully realigns the estimated path to follow the actual path more accurately. The slight discrepancies visible between the green line and the ground truth could be attributed to the limitations in the NDT algorithm's performance in certain indoor environments or due to the inherent noise in IMU and LiDAR data.

![Image](images/3e0bba84c597358ee9d1043de75533000b8030075f94de9ee203c16d31968838.jpg)

<div style="text-align: center;">Fig. 6. Comparison of the trajectories of PDR only and NDT integrated PDR</div>

<div style="text-align: center;">TABLE I. COMPARISON OF RMSE VALUES FOR ONLY PDR AND INTEGRATED PDR WITH GROUND TRUTH</div>

<table border=1 style='margin: auto; word-wrap: break-word;'><tr><td style='text-align: center; word-wrap: break-word;'>Method</td><td style='text-align: center; word-wrap: break-word;'>RMSE (meters)</td></tr><tr><td style='text-align: center; word-wrap: break-word;'>PDR only</td><td style='text-align: center; word-wrap: break-word;'>16.37</td></tr><tr><td style='text-align: center; word-wrap: break-word;'>Integrated PDR</td><td style='text-align: center; word-wrap: break-word;'>1.71</td></tr></table>

The comparative trajectory analysis, as quantified by the Root Mean Square Error (RMSE), demonstrates a substantial improvement in positioning accuracy when NDT matching is applied to PDR data. The reduction of RMSE from approximately 16.37 meters in the PDR-only approach to about 1.71 meters with the NDT-integrated approach unequivocally attests to the effectiveness of the proposed solution.

The integration of NDT matching with PDR has shown to effectively mitigate the drift problem in indoor positioning. This integration leverages the strengths of both IMU and LiDAR technologies, harnessing the high update rate of IMU data and the spatial awareness provided by LiDAR scans. The results suggest that this hybrid approach is a promising solution for achieving reliable and accurate indoor navigation, which is critical for various applications such as autonomous robotics, augmented reality, and emergency response within indoor environments.

### IV. CONCLUSION

In this study, we introduced an approach to enhance indoor positioning accuracy by combining Pedestrian Dead Reckoning (PDR) with Normal Distributions Transform (NDT) matching. The method integrates sensor data from smartphones, specifically using Inertial Measurement Units (IMU) and Light Detection and Ranging (LiDAR) sensors. Our tests demonstrated that this combined method significantly reduces the cumulative drift typically seen in traditional PDR systems. By incorporating periodic corrections through NDT matching, we successfully improved both the precision and stability of the indoor positioning results.

A notable advantage of our method is its reliance on smartphones, which are commonplace and widely used in daily life. This makes our solution both practical and accessible, presenting an affordable alternative for indoor navigation tasks. The proposed method has significant potential applications in areas such as indoor navigation, emergency response scenarios, augmented reality experiences, and asset tracking.

In the future, we plan to refine our approach further by experimenting with other sensor combinations and conducting extensive testing across different indoor environments. Future efforts will also aim to develop adaptive calibration techniques to reduce sensor biases and enhance real-time processing abilities, facilitating smoother integration into practical, real-world scenarios.

## REFERENCES

[^1]: Shum, L.C.; Faieghi, R.; Borsook, T.; Faruk, T.; Kassam, S.; Nabavi, H.; Spasojevic, S.; Tung, J.; Khan, S.S.; Iaboni, A. Indoor Location Data for Tracking Human Behaviours: A Scoping Review. Sensors 2022, 22, 1220.

[^2]: A. Alari, A. Al-Salman, M. Alsaleh, A. Alnafessah, S. Al-Hadhrami, M. A. Al-Ammar, and H.S. Al-Khalifa, Ultra wideband indoor positioning technologies: Analysis and recent advances, Sensors, vol. 16, no. 5, pp. 707743, May 2016

[^3]: Yang, C.C.; Shao, H.R. WiFi-Based Indoor Positioning. IEEE Commun. Mag. 2015, 53, 150–157.

[^4]: Subhan, F.; Hasbullah, H.; Rozyyev, A.; Bakhsh, S.T. Indoor positioning in Bluetooth networks using fingerprinting and lateration approach. In Proceedings of the 2011 International Conference on Information Science and Applications, Jeju Island, Republic of Korea, 26–29 April 2011; pp. 1–9.

[^5]: C. Lin and Y. Shin, "Deep Learning-Based Multifloor Indoor Tracking Scheme Using Smartphone Sensors," in IEEE Access, vol. 10, pp. 63049-63062, 2022

[^6]: Wang, B.; Liu, X.; Yu, B.; Jia, R.; Gan, X. Pedestrian Dead Reckoning Based on Motion Mode Recognition Using a Smartphone. Sensors 2018, 18, 1811.

[^7]: Martin A. Fischler and Robert C. Bolles. 1981. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Commun. ACM 24, 6 (June 1981), 381–395.

[^8]: P. Biber and W. Strasser, "The normal distributions transform: a new approach to laser scan matching," Proceedings 2003 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2003) (Cat. No.03CH37453), Las Vegas, NV, USA, 2003, pp. 2743-2748

---

[^9]: E. Javanmardi, M. Javanmardi, Y. Gu and S. Kamijo, "Adaptive Resolution Refinement of NDT Map Based on Localization Error Modeled by Map Factors," 2018 21st International Conference on Intelligent Transportation Systems (ITSC), Maui, HI, USA, 2018, pp. 2237-2243.

[^10]: M. Escourrou, J. Al Hage and P. Bonnifait, "NDT Localization with 2D Vector Maps and Filtered LiDAR Scans," 2021 European Conference on Mobile Robots (ECMR), Bonn, Germany, 2021, pp.1-6

[^11]: M. Magnusson, “The three-dimensional normal-distributions transform: An efficient representation for registration, surface analysis, and loop detection,” Ph.D. dissertation, “Orebro University, 2009.

[^12]: Welch, Greg and Gary Bishop. “An Introduction to Kalman Filter.” International Conference on Computer Graphics and Interactive Techniques (1995).
