Next Article in Journal
An Active/Reactive Power Control Strategy for Renewable Generation Systems
Next Article in Special Issue
A Flexible Input Mapping System for Next-Generation Virtual Reality Controllers
Previous Article in Journal
Application of Deep Neural Network to the Reconstruction of Two-Phase Material Imaging by Capacitively Coupled Electrical Resistance Tomography
Previous Article in Special Issue
A Distributed Edge-Based Scheduling Technique with Low-Latency and High-Bandwidth for Existing Driver Profiling Algorithms
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Low-Memory Indoor Positioning System for Standalone Embedded Hardware

School of Electrical Engineering, Korea University, Seoul 02841, Korea
*
Author to whom correspondence should be addressed.
Electronics 2021, 10(9), 1059; https://doi.org/10.3390/electronics10091059
Submission received: 31 March 2021 / Revised: 23 April 2021 / Accepted: 28 April 2021 / Published: 29 April 2021
(This article belongs to the Special Issue Real-Time Control of Embedded Systems)

Abstract

:
As the proportion and importance of the indoor spaces in daily life are gradually increasing, spatial information and personal location information become more important in indoor spaces. In order to apply indoor positioning technologies in any places and for any targets inexpensively and easily, the system should utilize simple sensors and devices. In addition, due to the scalability, it is necessary to perform indoor positioning algorithms on the device itself, not on the server. In this paper, we construct standalone embedded hardware for performing the indoor positioning algorithm. We use the geomagnetic field for indoor localization, which does not require the installation of infrastructure and has more stable signal strength than RF RSS. In addition, we propose low-memory schemes based on the characteristics of the geomagnetic sensor measurement and convergence of the target’s estimated positions in order to implement indoor positioning algorithm to the hardware. We evaluate the performance in two testbeds: Hana Square (about 94 m × 26 m) and SK Future Hall (about 60 m × 38 m) indoor testbeds. We can reduce flash memory usage to 16.3% and 6.58% for each testbed and SRAM usage to 8.78% and 23.53% for each testbed with comparable localization accuracy to the system based on smart devices without low-memory schemes.

1. Introduction

With the rapid development and increasing utilization of ICT (Information and Communications Technology), the various services and systems based on the smart devices are rapidly expanding. Moreover, as the indoor spaces are gradually enlarged with the development of architectural technology, the activities and services for the outdoor spaces can be accomplished in the indoor spaces. As a result, the proportion and importance of the indoor spaces in daily life are gradually increasing. Spatial information and personal location information that have been provided in the outdoor spaces becomes more important in the indoor spaces along with the increase in the proportion of the indoor spaces in daily life. For more diverse services in the indoor spaces, existing LBS-related systems and services require indoor spatial information and personal location information. Since most of these LBS applications like asset tracking and indoor navigation often require more fine-grained positioning accuracy and ease of deployment, accurate and economical solutions for indoor positioning system are key enabling technologies for Location Based Services (LBS).
In the past few decades, a diverse range of indoor localization schemes have been proposed. These schemes can be classified by the type of sensor signals used, which includes RF (Radio Frequency), acoustic, IR (Infrared), light, etc. Among these, the indoor positioning system (IPS) based on RF signals such as Bluetooth Low Energy (BLE) or Wi-Fi is the most common since such RF technology is widely adopted by smart devices and signals are often available in indoor environment. The RF based IPSs may measure the received signal strength (RSS) [1,2,3], time of arrival (ToA) [4], or time difference of arrival (TDoA) [5,6] for the positioning. However, ToA and TDoA are not common due to their large clock synchronization overhead compared to the fast speed of RF signal propagation. Therefore, most of the RF based IPSs rely on sensing RSS. However, it is not easy to build high accuracy IPS even with RF’s RSS due to the time varying and unstable nature of RF signal, which is caused by multipath propagation, diffraction, and scattering of RF signals incurred by the indoor structures such as walls, furniture, humans, and elevators.
An alternative signal that can be used for IPS is the geomagnetic field signal generated by the earth movement. The geomagnetic field signal has several distinct advantages over other signals. First, IPS based on the geomagnetic field does not require infrastructure such as access points or beacons since the geomagnetic field is created by nature unlike RF signals. Second, the geomagnetic field signal is easy and cheap to sense by using IMU (Inertial Measurement Unit) sensors, also known as motion sensors, which include the magnetic field sensor in addition to the accelerometers and gyroscope sensors which are usually included in IoT devices. Third, as shown in Figure 1, the signal strength of the geomagnetic field is much more stable over time than those of RF or ultrasonic signals, which would potentially enable higher accuracy IPS [7]. These characteristics enable inexpensive IPS implementation based on the geomagnetic field regardless of factors such as the indoor structures in testbeds and the previously installed infrastructure.
Position change due to the target’s movement occurs continuously. However, the absolute positioning schemes such as the fingerprinting method do not use the currently estimated position to determine the next position, which leads to irregular and discontinuous route prediction. In contrast, a relative positioning scheme such as Pedestrian Dead Reckoning (PDR) estimates the target’s movement based on the previous position. Therefore, it can produce a smoother contiguous route for the pedestrian movement. In general, it leads to smaller localization error for a short distance, but it often results in huge localization errors for a long distance due to the accumulation of the errors. In addition, PDR cannot absolutely determine the current position without the initial position. Therefore, in this paper, in order to complement each algorithm, we use not only fingerprinting with K-NN (K-Nearest Neighbor) algorithm but also the PDR algorithm that estimates the relative position change of pedestrians as the indoor positioning algorithm [8].
In order to make indoor LBS easily applicable and inexpensive, simple sensors and lightweight and inexpensive embedded hardware have to be offered. The embedded hardware for IPS can be composed of a computing unit for performing indoor positioning algorithms, a sensor unit for sensing the current state of the target, and a communication unit for sending and receiving data with a server. MCUs (Micro Controller Unit) for the embedded system, such as ATMEGA-128 [9] and STM32F103 [10], have very small size of SRAM and flash memory compared to the hardware of smart devices/PC. In order to implement the indoor positioning algorithm on the embedded hardware, the magnetic field map of the testbed should be stored in the embedded hardware to compare with current state which is sensed by the sensor unit. However, due to the small size of the flash memory, only small size of magnetic field map can be stored, so it is necessary to compress and store the magnetic field map in order to implement indoor localization algorithm to the embedded system for large indoor spaces. In addition, since the size of the SRAM is small, when the entire magnetic field map is loaded from the flash memory to the SRAM in order to implement the indoor localization algorithm, the delay to load the magnetic field map may increase, and real-time tracking services may not be provided properly. Therefore, it is also necessary to decrease the delay caused by the small size of SRAM. In [11], we have proposed methods to lower flash memory usage of the embedded hardware for IPS. For Real-Time Locating System (RTLS), we propose methods to reduce the usage of not only flash memory but also SRAM while achieving comparable performance to IPS based on the smart devices for two testbeds.
In a magnetic field map, 3-axis magnetic field data of a corresponding location are stored in a float format for each coordinate. When the magnetic field sensor measures magnetic field data, it gives integer format as an output and converts it into real measured magnetic field data through sensitivity-based scaling. Therefore, it is possible to increase the size of the magnetic field map stored in the embedded hardware by inverting the magnetic field map through the sensitivity of the magnetic field sensor and replacing the magnetic field map with the integer format. In addition, since the range of the magnetic field map is smaller than the range that the magnetic field sensor can measure, the magnetic field map can be compressed into the number of bits, which represents the smaller range, instead of all range. Moreover, there are some areas of the testbed where pedestrians cannot access, while the data are stored in the same format on these areas of the magnetic field map with other areas. However, due to inaccessibility, we do not use data of these areas for IPS. Instead of storing data in the same format for these areas, it is possible to decrease the size of the magnetic field map by expressing inaccessibility.
Since all the magnetic field maps must be searched at the initial stage of IPS, increase of the delay due to the SRAM size constraints is inevitable. However, when the estimated location of the target converges after the pedestrian walks a few steps, only magnetic field map data around the converged location is required. So, after the estimated location of the target converges, only the magnetic field map data around the converged location could be loaded from the flash memory to the SRAM in order to decrease the delay.
In this paper, we construct the lightweight embedded hardware and evaluate memory usage and performance of low-memory indoor positioning algorithms for the embedded hardware. The following are the main contributions of this paper:
  • Development of the embedded hardware for indoor localization: We develop the lightweight embedded hardware which consists only of essential modules for indoor localization, which leads to IPS being inexpensive and easily applied.
  • Development of the indoor positioning technology based on geomagnetic field: We propose a localization algorithm that can combine the advantage of both PDR and fingerprinting method based on geomagnetic field whose signal strength is much more stable over time than that of RF without infrastructure.
  • Low-memory algorithms for the embedded hardware: We propose low memory schemes for the embedded hardware with limited resources, such as flash memory and SRAM, in order to implement the indoor positioning algorithm to the embedded hardware by using the convergence of estimated positions and characteristics of the sensor modules and testbeds.
To evaluate our low-memory embedded hardware schemes for IPS, we use two testbeds: Hana Square and SK Future Hall at Korea University. The dimensions of each testbed are 94.4 m by 26 m and 60.1 m by 37.9 m. For comparative evaluation, we have also implemented IPS based on smart devices which use Wi-Fi fingerprinting techniques and proposed indoor positioning technology based on geomagnetic field without low-memory schemes. The rest of this paper is organized as follows. Section 2 surveys recent studies related to indoor localization algorithms and simple hardware designs for the algorithms. Section 3 presents our proposed low-memory embedded hardware schemes for IPS. Section 4 explains the experimentation methodology and analyzes the experiment results, comparing the performance of IPS using the smart device. Section 5 concludes the paper.

2. Related Works

A number of solutions [12,13,14,15,16,17] have been proposed in the literature that rely on a number of technologies including WiFi, BLE, etc. and technologies such as RSSI, Angle of Arrival (AoA), Time of Flight (ToF), etc. for indoor localization and tracking using smart devices to sense signals.
In [12], Kotaru et al. target for the devices with a Wi-Fi chip such as smart phones based on already deployed Wi-Fi infrastructure. They propose SpotFi that uses a two-dimensional multiple signal classification algorithm to estimate the angle of arrival and time of flight of the most significant multipath propagation components from Wi-Fi CSI data.
Indoor localization algorithms are typically evaluated within varying evaluation environments including varying node densities and building architectures. Since such unintended variations have been shown to significantly influence localization-accuracies. In [13], in order to identify their proposed optLoc localization algorithms, they have identified the most accurate path-loss functions and localization algorithms and their optimal settings for twelve additional factors of typical model-based RSS indoor localization algorithms by considering successful localizations, correct floor-detections, and low error-distances, as accuracy criteria. They showed that optLoc achieved lower localization error rates and error distances.
The time varying and unstable nature of RF signal is caused by multipath propagation, diffraction, and scattering of RF signals incurred by the indoor structures. In [14], they use Sub GHz transceivers for both accuracy and power consumption. They show that Sub GHz transceivers are better suited than Wi-Fi transceivers in both considered terms and are especially more robust regarding the influence of obstacles and peoples.
Several previous studies [15,16,17] have adopted iBeacons as APs, which are implementations of Bluetooth Low Energy (BLE) wireless technology, because they are cheaper, easier to deploy, and have lower power consumption whereas Wi-Fi cannot be deployed in all locations. Similar to Wi-Fi-based systems, these studies use technologies such as Angle of Arrival, Time of Arrival, Time Difference of Arrival, and Signal Strength. In [17], they use the combination of channel-separate polynomial regression model (PRM), channel-separate fingerprinting (FP), outlier detection, and extended Kalman filtering (EKF) for smartphone-based indoor localization with BLE beacons using BLE RSS.
However, the indoor positioning technologies may require additional installation of such APs or beacons, and the performance varies depending on the location and the number of APs. In addition, these studies assume that the target owns a smart device which is not efficient in terms of weight and cost. In addition, there are some environments, such as factory, where Wi-Fi cannot be deployed and targets cannot be allowed to carry the smart devices.
There are only a few approaches [18,19,20,21] in which they develop lightweight hardware designs or utilize simple interfaces, rather than using the smart devices, for indoor localization.
In [18], they introduce Foglight, a visible light enabled indoor localization system for IoT devices that relies on unique spatial encoding produced when mechanical mirrors inside a projector are flipped based on gray-coded binary images. Foglight employs a simple hardware at the client’s side with a few components: light sensors and entry-level microcontrollers. However, they also need to install digital light processing projectors in the environment.
In [19], they propose the light-weight wearable sensing device integrating a low-cost Ultra-Wide Band module and microelectromechanical system IMU to provide a cost-effective hardware solution with data fusion algorithms for wearable indoor localization. The inertial measurement for indoor localization suffers from cumulative errors in the integral operations, which cannot satisfy long-time localization applications while UWB positioning technology is vulnerable to barrier blocking between moving nodes and anchors, which has limited its accuracy for NLoS occasions. They use the Kalman filter algorithm to integrate the two methods by using an iterative compensation of the two location results, in order to achieve higher precision indoor positioning.
In [20], they use the RFID system based on IR-enabled RFID tags, which initiate communication with the RFID reader, sending data every few seconds. The system is based on reference RFID tags, which act as fingerprints while a single RFID reader is proposed to reduce costs, and stability and robustness are provided to RFID-based localization solution through fusion with IR data.
In [21], for museum visitors, they develop simple BLE devices with periodically transmitting packets, which are received by geo-localized BLE receivers. Collected packets are provided to the locator server to estimate the positions of the visitors. The position estimation is based on a feed-forward neural network and a nonlinear least square algorithm.
However, in some studies they need additional installation of infrastructure which could lead to enormous cost depending on the environments and significant difference in performance with same technologies in different places. In addition, because they are focused on the lightweight hardware, the hardware only senses the current state of the user but does not calculate the indoor positioning algorithm. Instead, the hardware transmits the sensing data to the server and the server calculates the indoor positioning algorithm, so that the hardware itself cannot perform indoor positioning algorithms, which cannot assure the scalability.

3. Embedded Hardware for Indoor Positioning System

3.1. Hardware Configuration

In order to construct a standalone IoT device for the indoor positioning system, the embedded hardware should consist of a MCU for performing the indoor positioning algorithms, an IMU sensor for sensing target’s movement and geomagnetic field data, and a communication module for sending the calculated data to a server/gateway. Figure 2 shows the components of the hardware for the indoor positioning system and the data exchange between each component of the hardware.

3.2. Measuring the Geomagnetic Field Vectors

The IMU sensor integrates three different sensors: accelerometer, gyroscope, and magnetic sensor, each of which measures its sensor value in the three-dimensional X, Y, and Z axes. Using the magnetic field sensor, we can measure the three-dimensional components of the geomagnetic field vector. Because the geomagnetic field vector depends on the orientation of the device, if we turn the device, the axis is changed, which makes the geomagnetic field values change. It can be fixed by using the orientation value. The orientation value shows us how much the device has been rotated by the absolute three-dimensional cardinal dimension, namely north, east, south, west, up, and down. This orientation value can be estimated by the IMU sensor.

3.3. Construction of the Geomagnetic Field Maps

Similar to radio map construction in RF-based fingerprinting, we need to construct the geomagnetic field maps for our testbeds. However, geomagnetic field maps are easier to construct than radio maps. This can be attributed to the following reasons. First, we only need to collect one geomagnetic field signal instead of multiple beacon or AP signals. Second, the geomagnetic field signal is more stable over time compared to unstable time-varying RF signals. Thus, signal sampling and calibration is generally faster. Using the IMU sensor, we collect the geomagnetic field vector signals at the reference points and also records the physical coordinates of the reference points.

3.4. Indoor Localization Techniques

The device measures the signal strength of the geomagnetic field when the target moves. The device produces the fingerprint of a current location from the signal strength and compares it with those of reference points in the magnetic field map. In case of the geomagnetic field vector fingerprint, Euclidean distances between the geomagnetic field vectors are calculated to find a reference point of a closest geomagnetic field vector, so-called nearest neighbor (NN). The K-NN algorithm produces K nearest neighbors and estimates the final location as a weighted sum of their locations.
The Pedestrian Dead Reckoning (PDR) is the process of calculating the current position from the initial given position by estimating the movement of a pedestrian. More specifically, PDR estimates the step count, the step length, and the orientation of the movement by using the IMU sensor. It usually determines the step by analyzing the pattern of the accelerometer sensor data and estimates the direction of the target’s movement by analyzing the IMU sensor data, i.e., gyroscope, magnetometer, and accelerometer sensor signals of the device. In addition, step length can be determined by the minimum and maximum acceleration measured in the Z axis in a single stride [22]. PDR is a relative positioning scheme since it calculates the next position relative to the current position by estimating the relative target’s movement.
Figure 3 shows the flow chart of the proposed localization algorithm. The initial position is estimated by using the absolute positioning scheme such as fingerprinting. Then, the next position of the user is estimated by using PDR every step while the absolute position is updated by the absolute positioning scheme, i.e., fingerprinting every k steps. The estimated absolute position data (P_abs) is not directly applied for every step to prevent the position data from sudden fluctuation caused by the localization inaccuracy. Instead, the difference (error) between the current position data (P_current) and the position data (P_abs) estimated through the absolute positioning scheme is applied to every k steps. Furthermore, when the difference is larger than threshold (thrsh), the system does not apply the difference, which could lower reliability in continuous route prediction. On the other hand, when the difference is smaller than threshold (thrsh), which means the estimated location of the target converges, the system decreases the threshold (thrsh) and increase the k, which is the update interval of the absolute position estimation (P_abs). However, if the threshold (thrsh) is too small, the current position data could be hard to update through the estimated absolute position data (P_abs), which leads to large localization error for a long distance due to the accumulation of the PDR localization errors. So, we set the minimum magnitude of the threshold (min_thrsh).

3.5. Magnetic Map Compression Methods for Constrained Memory

In general, in a magnetic field map, 3-axis magnetic field data of a corresponding location are stored in a float format for each coordinate. As shown in Table 1, the magnetic field sensor measures magnetic field data in 16-bit integer format and converts the 16-bit integer data to the data in a 32-bit float format which represents the real measured magnetic field data by using sensitivity-based scaling. Therefore, we could replace the magnetic field map with integer format by inverting the magnetic field map through the sensitivity of the magnetic field sensor, which could lead to increase the size of the magnetic field map stored in the embedded hardware, as shown in sensitivity based compression formula below. In the formula, m a g m a p represents the real measured magnetic field map in 32-bit float format, m a g m a p c o m p r e s s i o n 1 represents converted magnetic field map in 16-bit integer data, and scale represents sensitivity of the magnetic sensor which is 4912/32752 in Table 1. Since the magnetic field data range of the magnetic field map is limited, the magnetic field map can be compressed into the number of bits that can represent the limited range, instead of all range, as shown in formulas of the range based compression and the number of bits that represent the limited range below. In the formulas, m a g m a p c o m p r e s s i o n 2 is the data in which the minimum value is zero by shifting m a g m a p c o m p r e s s i o n 1 .  n m a p b i t s represents the number of bits required to store compressed data of the magnetic field map. In addition, it is necessary to decompress the compressed data for performing the indoor positioning algorithm. The decompression process is performed by reversing the compression process as shown in the decompression process formula below.
  • Sensitivity based compression
    m a g m a p c o m p r e s s i o n 1 = [   m a g m a p × 1 s c a l e   ]
  • Range based compression
    m a g m a p c o m p r e s s i o n 2 = m a g m a p c o m p r e s s i o n 1 m i n ( m a g m a p c o m p r e s s i o n 1 )
  • The number of bits that represent the limited range
    n m a p b i t s = [ l o g 2 ( (   m a x ( m a g m a p ) m i n ( m a g m a p )   ) × 1 s c a l e   ) ]  
  • Decompression process
    m a g m a p = ( m a g m a p c o m p r e s s i o n 2 + m i n ( m a g m a p c o m p r e s s i o n 1 ) ) × s c a l e
There are some areas of the testbed where targets cannot access, and ‘0’ are stored in the same format on these areas of the magnetic field map with other areas where the target can access. These areas can be expressed as 1-bit ‘0’ and can be compressed by expressing the magnetic field map in the form of a bitmap and data array as shown in Figure 4. The bitmap shows target accessibility as 1 bit per coordinate. Areas where the target cannot access occupy a large portion of the testbed, so this method can compress a large portion of the magnetic field map.

3.6. Map Load Strategy for Reducing Load Delay

Since the size of the SRAM is small, it is also necessary to decrease the delay caused by the SRAM size constraints. Since all the magnetic field maps must be searched at the initial stage of indoor positioning algorithm, increase of the delay due to the SRAM size constraints is inevitable. However, when the estimated locations of the target converge after the pedestrian walks a few steps, only magnetic field map data around the converged location is required. So, after the pedestrian walks a few steps, only the magnetic field map data around the converged location are loaded from the flash memory to the SRAM in order to decrease the delay.
Figure 5 shows the proposed algorithm for determining the size of the magnetic field map to load to SRAM. Because the size of magnetic field map is usually larger than the size of the SRAM, the magnetic field map is first divided into the maximum size that can be loaded to SRAM (max_sram), and pieces of the map are loaded from flash memory to the SRAM to perform indoor positioning algorithm. In order to perform the indoor positioning algorithm at the initial stage of indoor positioning system, the indoor positioning algorithm should perform for all pieces of the map, so all the pieces of the map have to be loaded to the SRAM, which could lead to several load operations. When the estimated positions of the target (knn_neighbors) are within a certain range (range), the system can determine that the position of the target converges. When the target’s estimated position converges, the target’s next estimated positions are nearby the converged position, so the KNN algorithm may be performed only around the estimated position. Therefore, the magnetic field map loaded into the SRAM (load_size) for performing indoor localization algorithm could only be a part of the magnetic field map around the estimated location. So, when the target’s estimated position converges, part of the magnetic field map load to the SRAM. However, if the magnetic field map loaded into the SRAM (load_size) for performing indoor localization algorithm is too small, indoor localization algorithm does not perform properly due to the operation in the limited area. So, we set the minimum size of the magnetic field map loaded into the SRAM (min_load_size) for performing indoor localization algorithm. In addition, if loaded map piece size (map_piece_size) is too small, the estimated position according to the target’s movement could be often beyond the boundary of the loaded map, which lead to additional load operations. When there is an estimated position at the boundary between the map pieces, it is necessary to load pieces which border the boundary, so that a maximum of 4 pieces should be loaded into the SRAM at the same time. So, we set the minimum size of the map pieces to 1/4 of the maximum map size that can be loaded to SRAM (max_sram), which leads to minimize the number of the load operations.

4. Experiment

4.1. Environment Configurations

We construct a lightweight embedded hardware for indoor positioning system using development boards. The embedded system consists of MCU, IMU, and BLE module, as mentioned in Section 3.1. We use STM32L476 for MCU module, MPU-9250 for IMU module, and HM-11 for BLE module. Table 2 shows the detailed specification of each module.
Figure 6 shows the embedded hardware system based on the development boards of the modules shown in the table, which are connected through jumper cables. IMU exchanges data and commands with MCU using I2C protocol while BLE exchanges data and commands with MCU using UART protocol.
For evaluation, we use two testbeds, Hana Square Basement Level 1 Floor of Korea University Science and Engineering campus and the 2nd floor of SK Future Hall of Korea University. The physical dimension of Hana Square testbed is 94.4 m by 26 m while that of SK Future Hall testbed is 37.9 m by 60.1 m. We construct geomagnetic field maps for both testbeds where Hana Square testbed has 242,683 reference points and SK Future Hall testbed has 227,779 reference points, each of which are spaced every about 10 cm interval. Figure 7 shows the geomagnetic field maps of the testbeds collected with a Samsung Galaxy S10 smartphone. Both testbeds include some empty spaces, which are outdoor spaces, restricted areas, or hall spaces connected to other floors where people actually cannot go. The empty spaces of Hana Square testbed and SK Future Hall testbed are 57.12% and 87.26% of the total area, respectively.

4.2. Comparison of Magnetic Field Map Collected by Different Sensor Models

Since the geomagnetic field map shown in Figure 7 is a map collected by the smartphone whose magnetic field sensor module is different from that of the embedded hardware, the bias between the magnetic field map which is collected by the smartphone and magnetic field data measured by the embedded hardware may occur. Therefore, in order to remove the bias, we recollect a portion of the geomagnetic field map with the embedded hardware and compare it with the geomagnetic field map collected by the smartphone. Figure 8 shows the comparison of the magnetic field map based on the embedded hardware (left side of the figure inside the box) before and after removing the bias and the magnetic field map collected by the smartphone (right side of the figure inside the box). The magnetic field maps collected based on the embedded hardware after removing the bias show similar patterns to the magnetic field maps collected by the smartphone.

4.3. Magnetic Field Map Compression

Table 3 shows the statistical characteristics for each axis of the magnetic field maps for each testbed. For Hana Square testbed, applying the compression method based on the sensitivity and range of the magnetometer described in Section 3.5. to the z-axis of the magnetic field map, the range of the z-axis of the magnetic field map is 150.4556, which can be expressed as about 1004 discrete data with the sensitivity of the magnetic field sensor, and these discrete data can be expressed by 10-bit integer format. Applying to the x, y, and z axes, the magnetic field map data expressed as float (32-bit) can be compressed to about 31%. In addition, about 57% of the testbed is inaccessible to targets. When the bitmap-based compression method, mentioned in Section 3.5., is additionally used, the magnetic field map can be compressed to 16.3% of the original size. Likewise, for SK Future Hall testbed, the magnetic field map can be compressed to 6.58% of the original size with magnetometer sensitivity-based compression method, range-based compression method, and bitmap-based compression method.

4.4. SRAM Usage Analysis

Figure 9 shows the ratio of the magnetic field map size required for performing indoor localization algorithm (load_size) and the size of map pieces to load to the SRAM per load operation (map_piece_size) compared to the sizes in initial step in Hana Square and SK Future Hall. As shown in the figure, as the target moves, the size of the magnetic field map required for performing the indoor positioning algorithm (load_size) decreases, and the ratios of the magnetic field map loaded to the SRAM compared to the original map converge to 8.78% and 23.53% for Hana Square and SK Future Hall testbeds, respectively. The converged ratio of the required magnetic field map size (load_size) loaded to SRAM for performing indoor localization algorithm in SK Future Hall is larger than that in Hana Square because the size of the magnetic field map in Hana Square is larger than SK Future Hall. In addition, in SK Future Hall, the size of the magnetic field map loaded to SRAM reaches the minimum magnetic field map size for performing indoor localization algorithm (min_load_size), as mentioned in Section 3.6. Therefore, the magnetic field size to load into the SRAM does not converge to smaller value in SK Future Hall. In addition, when the size of the magnetic field map required for performing the indoor positioning algorithm (load_size) are smaller than the maximum map size that can be loaded to SRAM (max_sram), the size of the map pieces becomes 1/4 of the maximum map size that can be loaded to SRAM (max_sram), which is minimum size of the map pieces, as mentioned in Section 3.6. The size of the map pieces reaches the minimum size faster in SK Future Hall than in Hana Square because the size of the magnetic field map in SK Future Hall is smaller than Hana Square.

4.5. Indoor Positioning Experiment Results

We tested total 20 paths for 2 testbeds (Hana Square and SK Future Hall), each of which consist of 100 pedestrian steps. For comparative evaluation, we test the localization performance of (1) Wi-Fi fingerprinting method with K-NN mapping, (2) the proposed indoor localization algorithm based on the magnetic field without low-memory schemes (magnetic field map compression and map load strategy) using the smartphone (Samsung Galaxy S10) and (3) the proposed indoor localization algorithm based on the magnetic field with low-memory schemes using the embedded hardware.
Table 4 shows the average localization errors of each path in Hana Square and SK Future Hall when walking on random paths on the testbeds with the smartphone and the embedded hardware. As shown in the table, our proposed IPS based on the magnetic field using the embedded hardware with low-memory schemes achieves the average errors of 1.33 m and 1.26 m for Hana Square and SK Future Hall with comparable performance to our proposed IPS based on the magnetic field using smartphone without low-memory schemes, which shows that there is less difference in the localization errors with and without low-memory schemes. In addition, our proposed IPS based on the magnetic field could achieve much better localization accuracy compared to Wi-Fi fingerprinting schemes, which is due to the fact that Wi-Fi signal is unstable and time-varying and that fingerprinting method does not reflect target’s continuous movements.

5. Conclusions

In this paper, we proposed the lightweight embedded hardware and low-memory schemes based on the characteristics of the geomagnetic sensor measurement and convergence of the target’s estimated positions in order to perform the indoor positioning algorithms in the embedded hardware. Through the experiments on the Hana Square and SK Future Hall testbed, we can substantially reduce the size of the magnetic field map to 16.3% and 6.58% for each testbed respectively, which leads to reduced flash memory usage and reduced SRAM usage to 8.78% and 23.53% for each testbed respectively. We also show that the indoor localization performance of the lightweight embedded hardware with low-memory schemes is comparable to that of a full-run smart device without low-memory schemes, which could achieve much better localization accuracy compared to Wi-Fi fingerprinting schemes.

Author Contributions

Conceptualization, H.J.B. and L.C.; Data curation, H.J.B.; Funding acquisition, L.C.; Methodology, H.J.B. and L.C.; Software, H.J.B.; Supervision, L.C.; Validation, H.J.B.; Visualization, H.J.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the MSIT (Ministry of Science and ICT), Korea, under the ITRC (Information Technology Research Center) support program (IITP-2020-2015-0-00363) supervised by the IITP (Institute for Information and Communications Technology Planning and Evaluation). This research was supported by Korea University.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Hightower, J.; Want, R.; Borriello, G. SpotON: An Indoor 3D Location Sensing Technology Based on RF Signal Strength. UW CSE Technical Report. 18 February 2000. Available online: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.161.2328&rep=rep1&type=pdf (accessed on 17 November 2020).
  2. Bahl, P.; Padmanabhan, V.N. RADAR: An in-building RF-based user location and tracking system. In Proceedings of the IEEE INFOCOM 2000 Conference on Computer Communications, Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies (Cat. No.00CH37064), Tel Aviv, Israel, 26–30 March 2000. [Google Scholar]
  3. An, J.H.; Choi, L. Inverse fingerprinting: Server side indoor localization with Bluetooth low energy. In Proceedings of the 2016 IEEE 27th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC), Valencia, Spain, 4–7 September 2016. [Google Scholar]
  4. Chen, X.; Song, S.; Xing, J. A ToA/IMU indoor positioning system by extended Kalman filter, particle filter and MAP algorithms. In Proceedings of the 2016 IEEE 27th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC), Valencia, Spain, 4–8 September 2016; pp. 1–7. [Google Scholar] [CrossRef]
  5. Harter, A.; Hopper, A.; Steggles, P.; Ward, A.; Webster, P. The Anatomy of a Context-Aware Application. Wirel. Netw. 2002, 8, 187–197. [Google Scholar] [CrossRef]
  6. Priyantha, N.B.; Miu, A.K.; Balakrishnan, H.; Teller, S. The cricket compass for context-aware mobile applications. In Proceedings of the 7th Annual International Conference on Mobile Computing and Networking—MobiCom’01; ACM: New York, NY, USA, 2001; pp. 1–14. [Google Scholar]
  7. Jang, H.J.; Shin, J.M.; Choi, L. Geomagnetic Field Based Indoor Localization Using Recurrent Neural Networks. In Proceedings of the GLOBECOM 2017–2017 IEEE Global Communications Conference; Institute of Electrical and Electronics Engineers (IEEE): New York, NY, USA, 2017; pp. 1–6. [Google Scholar]
  8. Bae, H.J.; Choi, L. Indoor Positioning System with Pedestrian Dead Reckoning and BLE Inverse Fingerprinting. Int. J. Sens. Netw. Data Commun. 2018, 7. [Google Scholar] [CrossRef]
  9. Atmel. 8-bit Atmel Microcontroller with 128KBytes In-System Programmable Flash ATmega128 ATmega128L. Available online: http://ww1.microchip.com/downloads/en/DeviceDoc/doc2467.pdf (accessed on 17 November 2020).
  10. STM32F103. Available online: https://www.st.com/resource/en/datasheet/stm32f103c8.pdf (accessed on 18 February 2021).
  11. Bae, H.J.; Choi, L. Low-Memory Embedded Hardware Design for Indoor Positioning System That Can Replace Smart Devices. In Proceedings of the 6th International Conference on Next Generation Computing 2020, Busan, Korea, 17–19 December 2020. [Google Scholar]
  12. Kotaru, M.; Joshi, K.; Bharadia, D.; Katti, S. Spotfi: Decimeter level localization using wifi. In Proceedings of the 2015 ACM Conference on Special Interest Group on Data Communication, London, UK, 17–21 August 2015. [Google Scholar]
  13. Fudickar, S.; Valentin, M. Most accurate algorithms for RSS-based Wi-Fi indoor localisation. In Proceedings of the 2014 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Busan, Korea, 27–30 October 2014; Institute of Electrical and Electronics Engineers (IEEE): New York, NY, USA, 2014; pp. 38–47. [Google Scholar]
  14. Fudickar, S.; Valentin, M. Comparing suitability of sub 1 GHz and WiFi transceivers for RSS-based indoor localisation. In Proceedings of the 2014 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Busan, Korea, 27–30 October 2014; Institute of Electrical and Electronics Engineers (IEEE): New York, NY, USA, 2014; pp. 347–354. [Google Scholar]
  15. Fard, H.K.; Chen, Y.; Son, K.K. Indoor positioning of mobile devices with agile iBeacon deployment. In Proceedings of the 2015 IEEE 28th Canadian Conference on Electrical and Computer Engineering (CCECE), Halifax, NS, Canada, 3–6 May 2015; Institute of Electrical and Electronics Engineers (IEEE): New York, NY, USA, 2015; pp. 275–279. [Google Scholar]
  16. Lin, X.-Y.; Ho, T.-W.; Fang, C.-C.; Yen, Z.-S.; Yang, B.-J.; Lai, F. A mobile indoor positioning system based on iBeacon technology. In Proceedings of the 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Milan, Italy, 25–29 August 2015; pp. 4970–4973. [Google Scholar]
  17. Zhuang, Y.; Yang, J.; Li, Y.; Qi, L.; El-Sheimy, N. Smartphone-based indoor localization with bluetooth low energy bea-cons. Sensors 2016, 16, 596. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Ma, S.; Liu, Q.; Sheu, P.C.-Y. Foglight: Visible Light-Enabled Indoor Localization System for Low-Power IoT Devices. IEEE Internet Things J. 2017, 5, 175–185. [Google Scholar] [CrossRef]
  19. Zhang, H.; Zhang, Z.; Gao, N.; Xiao, Y.; Meng, Z.; Li, Z. Cost-Effective Wearable Indoor Localization and Motion Analysis via the Integration of UWB and IMU. Sensors 2020, 20, 344. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  20. Moreno, V.; Zamora, M.A.; Skarmeta, A.F. A Low-Cost Indoor Localization System for Energy Sustainability in Smart Buildings. IEEE Sens. J. 2016, 16, 3246–3262. [Google Scholar] [CrossRef]
  21. Giuliano, R.; Cardarilli, G.C.; Cesarini, C.; Di Nunzio, L.; Fallucchi, F.; Fazzolari, R.; Mazzenga, F.; Re, M.; Vizzarri, A. Indoor Localization System Based on Bluetooth Low Energy for Museum Applications. Electronics 2020, 9, 1055. [Google Scholar] [CrossRef]
  22. Weinberg, H. Using the ADXL202 in pedometer and personal navigation applications. Analog Devices AN-602 Appl. Note 2002, 2, 1–6. [Google Scholar]
  23. STM32L476. Available online: https://www.st.com/resource/en/datasheet/stm32l476rg.pdf (accessed on 18 February 2021).
  24. MPU-9250. Available online: https://invensense.tdk.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf (accessed on 18 February 2021).
  25. Bluetooth V4.0 HM-11 BLE Module. Available online: https://www.elecrow.com/download/bluetooth40_en.pdf (accessed on 18 February 2021).
Figure 1. Measurement of geomagnetic field (left), wireless LAN (middle), and sound waves (right) according to time.
Figure 1. Measurement of geomagnetic field (left), wireless LAN (middle), and sound waves (right) according to time.
Electronics 10 01059 g001
Figure 2. Overview of the embedded hardware for indoor positioning system.
Figure 2. Overview of the embedded hardware for indoor positioning system.
Electronics 10 01059 g002
Figure 3. Flow chart of the indoor localization algorithm combining PDR and fingerprinting.
Figure 3. Flow chart of the indoor localization algorithm combining PDR and fingerprinting.
Electronics 10 01059 g003
Figure 4. Bitmap-based magnetic field map compression method.
Figure 4. Bitmap-based magnetic field map compression method.
Electronics 10 01059 g004
Figure 5. Flow chart of the algorithm to determine the size of the magnetic field map to load to SRAM.
Figure 5. Flow chart of the algorithm to determine the size of the magnetic field map to load to SRAM.
Electronics 10 01059 g005
Figure 6. Embedded hardware construction based on the development modules for indoor positioning system.
Figure 6. Embedded hardware construction based on the development modules for indoor positioning system.
Electronics 10 01059 g006
Figure 7. Geomagnetic field map of Hana Square.
Figure 7. Geomagnetic field map of Hana Square.
Electronics 10 01059 g007
Figure 8. Comparison of the magnetic field map based on the embedded hardware (left side inside the box) before and after removing the bias and the magnetic field map collected by the smartphone (right side inside the box).
Figure 8. Comparison of the magnetic field map based on the embedded hardware (left side inside the box) before and after removing the bias and the magnetic field map collected by the smartphone (right side inside the box).
Electronics 10 01059 g008
Figure 9. The ratio of the magnetic field map required for performing indoor localization algorithm (load_size) and the size of map pieces to load to the SRAM per load operation (map_piece_size) compared to the size in initial step in Hana Square and SK Future Hall.
Figure 9. The ratio of the magnetic field map required for performing indoor localization algorithm (load_size) and the size of map pieces to load to the SRAM per load operation (map_piece_size) compared to the size in initial step in Hana Square and SK Future Hall.
Electronics 10 01059 g009
Table 1. Magnetometer measurement data format.
Table 1. Magnetometer measurement data format.
Measurement Data (Each Axis) [15:0] BitsMagnetic Flux Density [μT]
Two’s ComplementHexDecimal
0111 1111 1111 00007FF0327524912 (max)
||||
0000 0000 0000 0001000110.15
0000 0000 0000 0000000000
1111 1111 1111 1111FFFF−1−0.15
||||
1000 0000 0001 00008010−32,752−4912 (min)
Table 2. System environment.
Table 2. System environment.
Module NameSpecification
MCUSTML476 [23]ARM cortex-M4
128 KB SRAM
1 MB FLASH MEMORY
IMUMPU-9250 [24]Accelerometer
Gyroscope
Magnetometer
BLEHM-11 [25]BLE v4.0
Table 3. Statistical characteristics (average, max, min, range) for x, y, z axis of the magnetic field maps.
Table 3. Statistical characteristics (average, max, min, range) for x, y, z axis of the magnetic field maps.
Hana SquareSK Future Hall
xyzxyz
Average−20.45678.612137−26.5417−25.726515.7109−28.5532
Min35.8308564.4873532.06634−51.5073−11.1975−59.2175
Max−89.8356−62.717−118.389−3.387432.42492.5572
Max–min125.6664127.2044150.455648.119843.622561.7748
Table 4. Indoor localization errors based on the embedded hardware and the smart devices.
Table 4. Indoor localization errors based on the embedded hardware and the smart devices.
Hana Square.SK Future Hall
Wi-Fi (Smartphone)Magnetic field (Smartphone)Magnetic field
(Embedded Hardware)
Wi-Fi (Smartphone)Magnetic Field (Smartphone)Magnetic field
(Embedded Hardware)
Route #14.18 m2.03 m1.82 m1.12 m0.86 m0.79 m
Route #25.55 m2.16 m2.31 m2.48 m2.01 m1.83 m
Route #33.81 m1.24 m1.25 m2.80 m1.71 m1.90 m
Route #45.47 m0.83 m0.68 m4.41 m1.09 m1.34 m
Route #54.85 m0.69 m0.46 m1.86 m0.60 m0.84 m
Route #64.46 m0.95 m1.02 m2.44 m2.15 m2.31 m
Route #73.91 m0.81 m0.82 m2.64 m0.75 m0.61 m
Route #82.43 m2.01 m1.84 m2.04 m0.48 m0.51 m
Route #94.55 m1.02 m1.01 m3.11 m1.17 m1.33 m
Route #101.83 m2.23 m2.09 m5.40 m0.99 m1.10 m
Average4.10 m1.40 m1.33 m2.83 m1.18 m1.26 m
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Bae, H.J.; Choi, L. Low-Memory Indoor Positioning System for Standalone Embedded Hardware. Electronics 2021, 10, 1059. https://doi.org/10.3390/electronics10091059

AMA Style

Bae HJ, Choi L. Low-Memory Indoor Positioning System for Standalone Embedded Hardware. Electronics. 2021; 10(9):1059. https://doi.org/10.3390/electronics10091059

Chicago/Turabian Style

Bae, Han Jun, and Lynn Choi. 2021. "Low-Memory Indoor Positioning System for Standalone Embedded Hardware" Electronics 10, no. 9: 1059. https://doi.org/10.3390/electronics10091059

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