Abstract

Distance estimation methods arise in many applications, such as indoor positioning and COVID-19 contact tracing. The received signal strength indicator (RSSI) is favored in distance estimation. However, the accuracy is not satisfactory due to the signal fluctuation. Besides, the RSSI-only method has a large-ranging error because it uses fixed parameters of the path loss model. Here, we propose an optimization method combining RSSI and pedestrian dead reckoning (PDR) data to estimate the distance between smart devices. The PDR may provide high accuracy of walking distance and direction. Moreover, the parameters of the path loss model are optimized to dynamically fit the complex electromagnetic environment. The proposed method is evaluated in outdoor and indoor environments and compared with the RSSI-only method. The results show that the mean absolute error is reduced up to 0.51 m and 1.02 m, with an improvement of 10.60% and 64.55% for outdoor and indoor environments, respectively, compared with the RSSI-only method. Consequently, the proposed optimization method has better accuracy of distance estimation than the RSSI-only method, and its feasibility is demonstrated through real-world evaluations.

1. Introduction

In the field of the Internet of things (IoT), excellent distance estimation is the key point for many applications [13], such as indoor positioning for wireless sensor networks (WSNs) and danger alerts for unmanned vehicles on the road [4, 5]. For human beings, currently, mobile smartphone apps are used to facilitate COVID-19 contact tracing [6, 7]. If two people carrying smartphones contact close to one another (generally, within 2 meters), then the apps on their smartphones will both record this contact event. The exposure notifications will be provided when one is diagnosed with COVID-19. The apps focus on the task of proximity sensing, which is relied on predicting accurate distance between the two smartphones [8].

In recent years, the received signal strength indicator (RSSI) of Bluetooth low-energy (BLE) has been exploited for distance estimation [9, 10]. RSSI-distance estimation method is based on the theoretical log-distance path loss (LDPL) model, which describes that the signal value attenuates as the distance increases [11, 12]. The LDPL model contains two main parameters, the RSSI at the reference distance (named as A) and the path loss exponent (named as n) [13]. These two parameters need to be calibrated before distance measurement for a known scenario. However, for an unknown situation, distance estimation may have inaccuracies because it uses parameters not fitted to this environment [14]. Furthermore, RSSI fluctuates significantly in an indoor environment [15]. Despite the limitations in RSSI and LDPL models, the RSSI-only method is still widely used for distance estimation applications, such as Google/Apple Exposure Notification (GAEN) app for COVID-19 contact tracing [16]. Leith and Farrell report on the evaluation results of this app in a commuter bus [17]. However, they find that the attenuation level indicated by the app need not increase with the distance between phones. The results showed that the distance estimation method of this app might have inaccuracies because it uses parameters not fitted to an unknown situation.

On the other hand, pedestrian dead reckoning (PDR) is recognized as a relative localization technique, which predicts the current location by taking into account the three main inputs, i.e., pedestrian’s start position, walking distance, and walking direction [18]. It utilizes multiple sensors available in smart devices; for instance, magnetometer, gyro, and accelerometer sensors [19, 20]. Since the properties of the RSSI-based distance estimation method and PDR-based localization method are complementary, so the combination of these two methods would be beneficial to improve the estimation accuracy. Han et al. proposed a probabilistic position selection algorithm based on the RSSI and PDR, which needs a number of BLE beacons deployed in an indoor environment [21]. Moreover, recent studies try to dynamically adjust the parameters of the RSSI-distance model by using a neural network. Shi et al. built the RSSI-distance model with the backpropagation neural network (BPNN), which requires a huge amount of data to train the neural network before distance estimation [22, 23]. Nonetheless, it is challenging to implement these above methods into real-time COVID-19 contact tracing due to deploying dozens of beacons, requiring a large amount of calibrated data and training the neural network for the known scenario before distance estimation [24].

Given the need for better distance estimation without time-consuming beacon deployment and neural network training in advance, we propose an optimization method combining RSSI and PDR data, which can dynamically adapt to different environments, especially for an unknown situation.

In summary, this paper has the following contributions:(i)An optimization method is developed to estimate the distance between smart devices by combining RSSI and PDR data. The method optimizes the parameters of the RSSI-distance model and the relative locations of each pair of devices simultaneously.(ii)The method does not require a time-consuming fingerprint database build-up or beacon deployment for an unknown environment. Thus, it has high feasibility and low complexity.(iii)The performance of the method is tested in outdoor and indoor environments. The results show better accuracy of distance estimation than the RSSI-only method.

The rest of this paper is organized as follows: Section 2 describes the proposed distance estimation method. Section 3 shows the experimental setup and procedure, as well as the evaluation results for several scenarios in outdoor and indoor environments. Finally, Section 4 concludes this paper and presents some future directions.

2. Materials and Methods

In order to illustrate the proposed distance estimation method, we consider the general situation as follows. For a pair of two smart devices, device #1 and device #2 suppose that there are sampling points during their recorded contacting paths, as Figure 1 shows.

In Figure 1, denotes the coordinates of the device at the th sampling point, denotes the walking distance from the th sampling point to the th, denotes the walking direction, , and denotes the real distance between two devices at the th sampling point. The subscripts 1 and 2 of , , , and represent device #1 and device #2, respectively. The subscript 0 represents the start point of this recorded contacting path. Additionally, at each sampling point, the receiver will record the RSSI, which can be denoted as for the th time point. Matrix is defined to contain all of the previous data, that is,

For simplicity’s sake, the start point of device #1 is defined as the origin of the coordinate system, and the start point of device #2 is defined as in this coordinate system, that is,

The distance between the two devices can be calculated from both the RSSI-only method and the PDR-based method. These two methods will be described in the following.

2.1. Distance Estimation by Using RSSI-Only Method

The RSSI-only method generally uses the log-distance path loss (LDPL) model [13]. It is expressed as follows:where is the distance between the transmitter and the receiver, and is the path loss exponent which varies depending upon the radio propagation environment. is the RSSI at the reference distance from the transmitter. is a Gaussian distribution random variable with mean zero. For convenience, is assigned as 1 meter, and has a mean value of zero. Then, the LDPL model can be obtained as follows:

According to equation (5), the distance at the th sampling point can be calculated by the following equation:

Consequently, the distance estimation of the RSSI-only method is as follows:can be written as a function of , , and , that is,it can also be written as follows:where is the known data, and and are the optimization variables.

In this study, the LDPL model is optimized by particle swarm optimization without training. The RSSI-distance between two devices is achieved during the optimization process, which is also a part of the optimization objective function.

2.2. Distance Estimation by Using PDR-Based Method

The PDR is a relative location method based on walking data of pedestrians, which can navigate with low-cost devices (e.g., the inertial sensors available in most smartphones, such as accelerometer, magnetometer, and gyro sensor) [25, 26]. It is comprised of three main parts: (i) pedestrian’s start location, (ii) walking distance, and (iii) walking direction, as depicted in Figure 2, where E and N represent the East and North directions, respectively.

The formula for the PDR can be defined as follows:

Here, and represent the walking direction (the angle between forwarding direction and North), and the walking distance from the th sampling point to the th, respectively. The coordinates can be calculated by equation (10) if and are obtained.

According to equations (2) and (10), the coordinates of device #1 at the th sampling point are as follows:

Similarly, according to equations (3) and (10), the coordinates of device #2 at the th sampling point are as follows:

So, for the PDR-based method, the distance at the th sampling point can be calculated by the following equation:

Consequently, the distance estimation of the PDR-based method is as follows:can be written as a function of , , , and , that is,it can also be written as follows:where is the known data and and are the optimization variables.

In this study, the PDR-distance between two devices is obtained from the coordinates of the two devices’ locations. is also a part of the optimization objective function.

2.3. Proposed Optimization Method Combining RSSI and PDR Data

Based on equations (9) and (18), the objective function of the distance estimation optimization problem is proposed as follows:that is,

The function is defined as follows:

So, the objective function can be written as follows:that is,where is the known data and , , and are the optimization variables. The values of and can be determined after optimization, and then the estimated distance can be obtained based on the equation (18).

In addition, for three-dimensional cases, the formulation could be extended straightforwardly, that is, the optimization problem can be expressed as follows:

For COVID-19 contact tracing, the risk estimation mainly depends on the two-dimensional plane distance between side-by-side persons. Therefore, this paper only focuses on the solution method of two-dimensional optimization problems.

The constraints of this optimization problem include three items as follows:(1)The domain of the model parameters and For common smartphones, the value of is in the range of −80 dBm and −40 dBm. is the path loss exponent that varies depending on the radio propagation environment. T. S. Rappaport gives typical values for in outdoor and indoor environments. The minimal value of is 2 for free space, while the maximum can be set to 6 for obstructed building. The constraints are written as follows:(2)The domain of the relative coordinates of device #2 start pointDue to the range of Bluetooth low-energy (BLE) is about 100 m, the minimal relative coordinate value of device #2 start point can be set to −100 m, and the maximum can be set to 100 m. The constraints are written as follows:(3)The effective measurable range of the proposed distance estimation method

The effective measurable range depends on the application scenario. For COVID-19 contact tracing apps, the minimal effective distance can be set to 0.1 m, and the maximum can be set to 10 m. The constraints are written as follows:

The previous optimization problem is solved by the particle swarm optimization (PSO) algorithm. The PSO algorithm first creates initial particles and then assigns initial velocities to them. It evaluates the objective function (fitness) of each particle position and determines the best function value and the best position. It selects a new velocity based on the current velocity, the individual best position of the particle (), and the best position among all the population (). Then, it iteratively updates the particle position and velocity (the new position is the old position plus the velocity, and keeps the particle within the boundary). The algorithm iterates until it reaches the stopping criterion. The following two equations illustrate the searching process:where denotes the particle index and denotes the iteration index. and represent the position and velocity of particle in iteration , respectively. and are random numbers uniformly distributed in the interval (0, 1). and are positive constants, where is the self-adjustment weight and is the global adjustment weight. presents inertia weight. In this study, the value of was constantly reduced from 0.8 to 0.4 during the searching process. and were set to 0.4 and 0.6, respectively.

3. Results and Discussion

The proposed scheme is integrated into smartphones with Android or IOS system. Then, the method is evaluated in outdoor and indoor environments and compared with the RSSI-only method. The results will be illustrated in the following.

3.1. Outdoor Experiments with Participants

We placed 13 sampling points (A∼M) on outdoor park ground, as the following Figure 3 shows. Two participants walked from the start point to the endpoint with smartphones, following the designed path (detailed description in Table 1). The first participant held device #1 (iPhone XS) as a transmitter; the second participant held device #2 (Samsung Note10) as a receiver.

For the RSSI-only method, the RSSI-distance model’s parameter was set to −65 dBm and was 3.3, after a typical calibration procedure. For the proposed method, the domain of was between −80 and −40 dBm, and the domain of was between 2 and 6. These values and domains of parameters were also used for indoor experiments. To reduce the effects of signal fluctuation, at each sampling point, we measured RSSI for one minute. The median of sampled RSSI was considered as the RSSI value for our experiments. The distance between two smartphones was estimated by using the RSSI-only method and the proposed method, respectively. Then, we measured the real distance to evaluate the performance of these two methods. The real distance, the estimation errors of the RSSI-only method, and the proposed method are shown in Table 1.

We can see that the estimation results of the RSSI-only method were still average even when the parameter calibration was used. The mean value was 0.43 m, the root mean square error (RMSE) was 0.96 m, the mean absolute error (MAE) was 0.57 m, and the maximum error was 3.45 m. The proposed method was able to reduce the estimation error. The mean was 0.10 m, the RMSE was 0.76 m, the MAE was 0.51 m, and the maximum error was 2.23 m. The results were compared with the paired-samples t-test using SPSS statistical software version 26.0. The statistical results indicated that there was a significant difference between the two methods, value <0.00001.

3.2. Indoor Experiments with Participants

We placed 16 sampling points (A∼I, O, and M1∼M6) on an indoor meeting room ground, as the following Figure 4 shows. The first participant held iPhone XS (transmitter) at point I, and the second participant walked from the start point to the endpoint with Samsung Note10 (receiver), following the designed path (detailed description in Table 2).

Similarly, as in the outdoor experiment, the distance between two smartphones was estimated by using the RSSI-only method and the proposed method, respectively. Then, we measured the real distance to evaluate the performance of these two methods. The real distance, the estimation errors of the RSSI-only method, and the proposed method are listed in Table 2.

We can see that the estimation results of the RSSI-only method were poor when the parameters and used the fixed value. The mean value was −2.88 m, the RMSE was 3.24 m, the MAE was 2.89 m, and the maximum error was 4.49 m. The proposed method was able to effectively reduce the estimation error. The mean was −0.31 m, the RMSE was 1.21 m, the MAE was 1.02 m, and the maximum error was 2.15 m. The paired-samples t-test results indicated that there was a significant difference between the two methods, value <0.00001.

4. Conclusions

This paper presents a novel optimization method to estimate the distance between smart devices based on RSSI and PDR data by using particle swarm optimization. The PDR may provide a high accuracy of walking distance and direction. Moreover, the parameters of the log-distance path loss model optimized by PSO are used to dynamically fit the complex electromagnetic environment. The performance of the method is tested in outdoor and indoor environments. The results show better accuracy of distance estimation than the RSSI-only method and demonstrate its high feasibility and low complexity. Therefore, the proposed method can be further integrated into the positioning systems for wireless sensor networks and proximity alert apps for COVID-19 contact tracing. We hope that more researchers or research institutions will be interested in further testing the effectiveness of this method.

Data Availability

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare that they have no conflicts of interest regarding the publication of this paper.

Acknowledgments

The authors would like to thank all of the members of the research group for the technical support provided during the research activities.