Open Access
This article is

- freely available
- re-usable

*Sensors*
**2020**,
*20*(1),
193;
https://doi.org/10.3390/s20010193

Article

A Robust PDR/UWB Integrated Indoor Localization Approach for Pedestrians in Harsh Environments

^{1}

School of Computer Science and Engineering, Northeastern University, Shenyang 110819, China

^{2}

China Academy of Space Technology, Institute of Telecommunication Satellite, Beijing 100094, China

^{*}

Author to whom correspondence should be addressed.

Received: 20 November 2019 / Accepted: 27 December 2019 / Published: 29 December 2019

## Abstract

**:**

Wireless sensor networks (WSNs) and the Internet of Things (IoT) have been widely used in industrial, construction, and other fields. In recent years, demands for pedestrian localization have been increasing rapidly. In most cases, these applications work in harsh indoor environments, which have posed many challenges in achieving high-precision localization. Ultra-wide band (UWB)-based localization systems and pedestrian dead reckoning (PDR) algorithms are popular. However, both have their own advantages and disadvantages, and both exhibit a poor performance in harsh environments. UWB-based localization algorithms can be seriously interfered by non-line-of-sight (NLoS) propagation, and PDR algorithms display a cumulative error. For ensuring the accuracy of indoor localization in harsh environments, a hybrid localization approach is proposed in this paper. Firstly, UWB signals cannot penetrate obstacles in most cases, and traditional algorithms for improving the accuracy by NLoS identification and mitigation cannot work in this situation. Therefore, in this study, we focus on integrating a PDR and UWB-based localization algorithm according to the UWB communication status. Secondly, we propose an adaptive PDR algorithm. UWB technology can provide high-precision location results in line-of-sight (LoS) propagation. Based on these, we can train the parameters of the PDR algorithm for every pedestrian, to improve the accuracy. Finally, we implement this hybrid localization approach in a hardware platform and experiment with it in an environment similar to industry or construction. The experimental results show a better accuracy than traditional UWB and PDR approaches in harsh environments.

Keywords:

wireless sensor networks (WSNs); indoor localization; pedestrian dead reckoning (PDR); ultra-wide band (UWB); harsh environments## 1. Introduction

With the development of wireless sensor networks (WSNs) and the Internet of Things (IoT) in industrial, construction, and other fields, accurate indoor localization technology for pedestrians is playing an increasingly important role. For example, the localization of workers in industry can prevent them from entering dangerous areas. The environments in these fields have their own characteristics. On the one hand, they are all in indoor environments, so satellite-based outdoor localization systems, such as the Global Positioning System (GPS) and BeiDou Navigation Satellite System (BDS), cannot be used due to the weak penetration of the satellite signal. On the other hand, they are harsh environments in most cases. There are some commercial indoor localization systems and mature research prototypes for line-of-sight (LoS) propagation environments, but the accuracy of these solutions is not satisfactory [1,2] in NLoS propagation. However, non-line-of-sight (NLoS) is the most important feature of harsh environments. Indoor localization technology is still very challenging under NLoS propagation in harsh environments.

The current mainstream indoor localization systems are radio frequency (RF)-based. This kind of system basically requires beacon nodes, or beacon nodes (BNs), with known coordinates in the localization system. Each target to be located has an electronic tag, or tag node (TN). Specific features generated from the communication between the TN and BN are used for localization. These features mainly include the radio signal strength (RSS), time, signal angle, etc. The challenge of indoor localization systems in harsh environments is that these features can be severely disturbed [1] by NLoS propagation or other interference. As a result, the localization accuracy will be greatly reduced.

In harsh environments, interference of an RF-based localization system can be mainly divided into three types. Firstly, multipath refraction is a common type of interference in harsh environments. It means that an RF signal will be transmitted to the receiver through multiple paths, which causes the transmission time to be unreliable and unpredictable RSS superposition. Additionally, it apparently has a greater impact on the signal angle. Secondly, non-line-of-sight (NLoS) propagation caused by obstacles is also a very serious form of interference. It can cause signal attenuation, time delay, and signal interruption. Moreover, it interferes with the identification of multipath by some systems. Thirdly, electromagnetic fields of some large devices can interfere with signal transmission.

An ultra-wide band (UWB)-based localization system, such as an RF-based algorithm, is popular. Since UWB communication has a mature solution for multipath and the ability to record time features, the UWB-based localization algorithm is the most accurate indoor localization solution. Most studies have tried to improve the accuracy of UWB-based localization in harsh environments by NLoS identification and mitigation. However, UWB works in a high frequency, and UWB signals cannot penetrate obstacles in most cases. This makes NLoS identification and mitigation pointless. RF-based indoor localization algorithms have problems achieving high-precision locations in harsh environments, in which cases some hybrid systems have been proposed. This refers to the addition of other auxiliary sensors in the localization system, such as ultrasonic, infrared ranging, and inertial measurement unit (IMU) sensors, etc. The IMU-based pedestrian dead reckoning (PDR) algorithm combined with RF localization is a potential solution in terms of cost and implementation difficulty. However, its related research in harsh environments is still rare.

To address the problem presented above, this paper proposes a hybrid indoor localization system based on integrating PDR/UWB to achieve a high precision in harsh environments for pedestrians. The core idea includes two aspects. First, the UWB-based localization algorithm has a high accuracy in the case of less interference, and based on this, we can obtain the speed and heading of every pedestrian. Second, using the speed and heading, we propose a strategy to dynamically adjust key parameters for each pedestrian in the PDR algorithm. Third, the PDR algorithm is not sensitive to environmental interference, and this advantage can correct location errors caused by environmental interference in the UWB-based algorithm. The contributions of this paper can be summarized as follows:

- (1)
- In localization environments with LoS, the UWB-based algorithm can provide a high-precision trajectory for each individual. We propose a strategy to identify this localization situation, and using the location results, we estimate the speed and heading for each pedestrian;
- (2)
- An improved PDR algorithm is proposed, which can dynamically adjust the parameters of each pedestrian’s stride estimation and heading prediction; and
- (3)
- The final location results will be calculated using a weighted average algorithm, wherein the weights are dynamically adjusted according to the UWB communication condition.

The rest of this paper is organized as follows: Section 2 gives a short summary of the related works for indoor localization in harsh environments. Section 3 summarizes the problem of localization in harsh environments and briefly describes the system architecture. Then, the UWB-based and PDR localization algorithm is proposed in Section 4 and Section 5. Section 6 provides the fusion of results from two localization algorithms. Section 7 and Section 8 detail the experimental results and conclusions.

## 2. Related Works

Many harsh environments have strong demands for localization, so there have been many related studies in recent years. RF-based indoor localization technology mainly relies on two features: time and RSS. There are also hybrid localization systems that combine with other sensors.

#### 2.1. RSS Feature in Harsh Environments

The RSS feature is widely used in indoor localization technology and wireless sensor networks, but the reliability of RSS is doubtful in terms of improving the location accuracy [3]. The main reason why RSS is widely used is its simplicity and low cost. In fact, receivers (or beacon nodes) can easily read RSS in any wireless communication system. Therefore, in various wireless communications, such as Bluetooth, WiFi, RFID, and Zigbee, and RSS-based applications can be seen.

Compared with other RSS-based localization algorithms, the “fingerprinting” algorithm has a higher accuracy. In general, such algorithms are divided into two phases: the training phase and the implementation phase. In the training phase, a priori knowledge of the RSS distribution is received by the beacon node when a tag is in various locations in the environment (or map). Then, in the implementation phase, the real-time RSS of the tag, in every beacon node, will match with the map “fingerprinting”, and the location with the highest matching degree is the localization result. This solution has a high localization accuracy. Moreover, if the environment is stable, it still performs well in harsh environments [4,5,6]. However, it has two main drawbacks: (1) It requires a large amount of a priori data, and (2) the localization environment cannot be changed. Many studies have tried to overcome these shortcomings, for instance, [7] constructs a radio map with motion sensors, which makes it less demanding in terms of the priori data. However, the solutions presented have been unable to adapt to complex and changeable environments.

Another RSS-based localization solution is to use the log-normal distance path loss (LDPL) model. The LDPL model describes the relationship between distance and RSS [8], and the trilateration algorithm can then be used to calculate the tag location. This solution does not require plenty of priori data like “fingerprinting”, and it can be more flexible in implementation. This has led to a great deal of related research. “iBeacon” is a popular commercial indoor localization technology [9], but its high accuracy is achieved by dense iBeacon beacon nodes. Therefore, it is not suitable for harsh environments. Hartman F proposes a fusion algorithm in article [10], which combines the IMU-based inertial navigation algorithm with RSS to achieve high-precision localization. However, the accuracy of the micro-IMU sensor is insufficient, and the inertial navigation algorithm is difficult to implement. However, it also requires a dense beacon node. Moreover, it is difficult to further improve. In short, the advantage of RSS is its low cost, not its localization accuracy. The RSS can be easily interfered with by many environmental factors, such as multipath, NLoS propagation, etc., which causes the relationship between distance and RSS to become extremely unreliable [3].

Obtaining RSSI or CSI information don’t require any additional operations or data on transmitters, which means that transmitters don’t consume extra energy for localization algorithms. This feature is also applied to other fields [11,12]. In addition, there is a channel state information (CSI) feature that can be used for indoor localization technology. It can be seen as an upgraded version of RSS. The CSI feature works in the physical layer. It can distinguish multipath propagation and weak fluctuation to a certain extent, thus depicting the energy characteristics of the signal. It performs better than RSS in most of cases. However, CSI has higher hardware requirements, and this information is also not sufficient to support high-precision localization in harsh environments [13].

#### 2.2. Time Feature in Harsh Environments

Generally, time-based indoor feature technology can obtain a higher localization accuracy than RSS features. Common algorithms include time-of-flight (TOF)/time-of-arrival (TOA) and time difference of arrival (TDOA). In many cases, they can all achieve a centimeter-level localization accuracy, and this accuracy can meet the needs of most applications.

The most popular communication solution for time-based indoor localization systems is ultra-wide band (UWB). The main reason for this is that UWB offers a realistic way of solving multipath problems and recording the propagation time [14]. However, its main drawback is that NLoS propagation caused by obstacles represents very serious interference, which will reduce the localization accuracy. The reason for this is that the frequency of UWB is very high, usually exceeding 3 GHz, while the penetration of high-frequency signals is weak. We can increase the power of UWB signals by using an amplifier to penetrate some obstacles (but the penetration is still not satisfied). However, multipath phenomena become a major source of error in TOA or TDOA estimation. This is because overlap of the arriving multipath is a source of error in the estimation of the first-arriving signal [15,16]. Moreover, some UWB signals cannot penetrate the obstacle, and this situation still exists in harsh environments. The solution to the NLoS problem mainly depends on identification and mitigation. For instance, Stefano Maran [17] evaluated the resulting performance based on various UWB propagation features through Monte Carlo simulations, and proposed an algorithm for identifying NLOS conditions and reducing the ranging error caused by NLOS conditions. The authors in articles [18,19] attempted to use the channel impulse response (CIR) from the antennas, together with ground truth locational data (derived by a robot equipped with an optical reference system), to train a deep convolutional neural network (CNN). Then, they used the CNN model to identify and mitigate the NLoS propagation. Indoor propagation channels can be divided into multiple categories so that the channel identification results can be used to evaluate how serious the NLOS effect is [20]. UWB signal attenuation is very serious in the case of NLoS propagation, and the time delay caused by NLoS will cause a large error in high-precision localization, both of which can be features for identifying and mitigating the NLoS [21,22,23].

However, all the solutions above for NLoS propagation in harsh environments have two drawbacks. First, when a tag transmits messages to beacon nodes, NLoS may occur simultaneously on multiple communication lines. These solutions have limits when facing this situation. Second, a special case of NLoS is that the signal does not reach the beacon node at all (i.e., it does not penetrate the obstacle). These solutions can hardly handle this situation. Unfortunately, these situations are common in harsh environments.

#### 2.3. Hybrid System

All IMUs that can be embedded in tags are microelectric mechanical systems (MEMS). Currently, the accuracy of this kind of IMU cannot support strap-down inertial navigation systems for pedestrians. Although some works have tried to overcome the problem using UWB [24], we do not consider the inertial navigation-based algorithm. The IMU-based PDR algorithm is more common in pedestrian localization systems. The algorithm achieves localization by calculating the step size, the number of steps, and the direction of a pedestrian. This makes the PDR more resistant to external interference like NLoS propagation. However, there are cumulative errors over time. On the other hand, the UWB-based localization system has a high-accuracy, but can be seriously interfered with by NLoS propagation, multipath, etc. Accordingly, it is a good solution to combine both of the two technologies.

There are a few works in the literature on combining UWB and PDR [25,26]. Tian proposed a low-cost inertial navigation system (INS) and UWB fusion pedestrian tracking system [26]. However, the system had only one UWB beacon node, and only UWB was used to correct the cumulative error of PDR. In Reference [27], the core idea is mainly to correct the PDR direction, but the parameters cannot be adjusted for each pedestrian. Qian proposes a fusion method for WiFi/magnetic matching/PDR in Reference [28], but the “fingerprinting”-based algorithm limits its application for harsh environments. Most of these hybrid systems have three drawbacks. Firstly, the calculation and storage resources of tags are limited, and complex algorithms cannot be deployed; secondly, everyone has their own walking characteristics, and these systems fail to dynamically adjust the walking parameters of each pedestrian; third, the fusion algorithm does not try to identify and mitigate the NLoS in UWB transmission. There is not much research related to this kind of solution.

## 3. Problem Statement and System Architecture

In this section, we describe the problem in harsh environments for UWB-based and PDR algorithms. Then, we briefly introduce the sources of error of the two algorithms and the proposed hybrid indoor localization system architecture.

#### 3.1. Environments and System Architecture

In this paper, the hybrid indoor localization system consists of three types of devices (or nodes): the tag node (TN), beacon node (BN), and server. The coordinates of BN are known. TN is a target to be located in the localization system. The pedestrian wears a TN in a fixed location on the body, such as his/her arm, hat, trouser, or jacket’s pocket. Each TN is an electric tag. The TN will embed a nine-axis inertial sensor: three-axis inertial sensor, three-axis gyroscope, and three-axis magnetometer. TN communicates with BN through UWB at a frequency of 1 Hz, which means that the UWB-based localization algorithm is executed once per second. The PDR algorithm will be implemented on TN. TN will upload the location results and download correction information by UWB communication. Meanwhile, TOF-based ranging is completed using three messages: the TN initiates the communication (sends the first message); the BN responds to the message (the second message); and finally, the TN replies with the final message (the final message). All message transmission and reception times will be recorded, and the TOF ranging algorithm can then be realized. BNs send all information to the server for final processing. The communication between the BN and server is considered reliable communication. In other words, this reliable communication will be considered to be real-time and not lose any packets in this paper. The whole communication structure can be seen in Figure 1.

In this paper, the localization algorithm is executed independently for every TN. Therefore, for notational convenience, we consider the point of view of one single TN in the system: The TN with unknown coordinate p, and surrounded by BNs with known coordinates p

_{i}, where i means the i-th BN.#### 3.2. Sources of Error and Problem Statement

There are harsh environments for the localization system. As a result, there will be interference in the environments, which can be sources of localization error. We will discuss them in the UWB-based and PDR algorithms separately.

First, for the UWB-based localization algorithm, estimated distances have errors with respect to the true distances. In ideal LoS propagation, the ranging error is a Gaussian distribution because of the accuracy of hardware. In NLOS propagation, there are two cases: (1) Signals fail to penetrate obstacles, which we will mainly study in this article, and (2) signals fade with delay and/or attenuation. With the time-based algorithm, there will be a bias in ranging in this situation. Some other articles [17,20,23] have studied this situation and proposed approaches to identify and mitigate the bias. In this paper, we use the algorithm in [20] to mitigate the bias, and the Kalman filter is used to smooth the location results. Then, the accuracy of the results in this case can satisfy the demand of the hybrid system.

Second, for the PDR algorithm, the erroneous results are not caused by external factors. Instead, the IMU sensor errors arise from random zero bias and oscillation noise. This is a cumulative error that cannot be self-eliminating.

In a hybrid system, the two localization algorithms will be realized separately in the first step. For the UWB-based algorithm, with a set of distance estimates calculated by the ToF algorithm, the TN’s location can be obtained using the least squares method (LSM). The biggest advantage of LSM is that it can compensate for the ranging errors to a certain extent. Its core idea is illustrated in Equation (1). Here, the TN’s coordinate, denoted as ${p}^{U}$, can be inferred by minimizing the cost function, and ${p}^{U}$ is equal to p, which minimizes L:

$$L={\displaystyle \sum}{d}_{i}-p-{p}_{i},\phantom{\rule{0ex}{0ex}}{p}^{U}=arg\underset{p}{\mathrm{min}}L.$$

The PDR algorithm, based on the IMU embedded in the TN, estimates a pedestrian’s location, mainly depending on three algorithms: Step detection, stride length estimation, and heading determination. The coordinate of the pedestrian (TN) from PDR, denoted as ${p}^{D}\left({x}_{t+1}^{D},{y}_{t+1}^{D}\right)$, can be iterated through the following equations:
where x and y are the coordinates of the TN in a 2D map, LS is the stride length, and $\theta $ is the heading at epoch t. From Equation (2), it is shown that we can estimate the location of the pedestrian in real time when the initial location is known.

$$\{\begin{array}{c}{x}_{t+1}^{D}={x}_{t}^{D}+LS\ast \mathrm{sin}\left(\theta \right)\\ {y}_{t+1}^{D}={y}_{t}^{D}+LS\ast \mathrm{sin}\left(\theta \right)\end{array},$$

The final location will be fused by a weighted average algorithm using the results of the two algorithms:
where P is the final result, ${P}_{u}$ is the result from UWB, and ${P}_{pdr}$ is the result from the PDR algorithm. ${w}_{u}$ and ${w}_{p}$ are their weights, respectively, and can be calculated by experience.

$$P={w}_{u}\ast {P}_{u}+{w}_{p}\ast {P}_{pdr},$$

## 4. Localization Using UWB

#### 4.1. Ranging Algorithm Using ToF

The ToF ranging algorithm can be divided into two categories: Single-sided two-way ranging (SS-TWR) and double-sided two-way ranging (DS-TWR). SS-TWR uses one single round trip time measurement to obtain a time-of-flight result. Additionally, DS-TWR, an extension of the basic SS-TWR, uses two round trip time measurements, which results in a reduced error. Considering the communication structure and accuracy requirements in indoor localization systems, this paper chooses the DS-TWR strategy using three messages. Moreover, the three messages will provide three RSS to assist in calculating the weight ${w}_{u}$.

The three messages of DS-TWR are shown in Figure 2. The TN starts the initial message, and BNs receive it and respond with a second message. The TN receives the second message and transmits the final message. According to Figure 2, the time of signal flight ${T}_{prop}$ can be calculated, and the distance d will be the result of multiplying ${T}_{prop}$ by the speed of light c, shown as Equation (4):
where ${T}_{round1}$ is the time interval between Initial message and Response message, and ${T}_{reply2}$ is the time interval between the response message and the final message in TN. ${T}_{reply1}$ is the time interval between the initial message and response message, and ${T}_{round2}$ is the time interval between the response message and the final message in BN.

$${T}_{prop}=\frac{{T}_{round1}\ast {T}_{round2}-{T}_{reply1}\ast {T}_{reply2}}{{T}_{round1}+{T}_{round2}+{T}_{reply1}+{T}_{reply2}},\phantom{\rule{0ex}{0ex}}d={T}_{prop}\ast c,$$

#### 4.2. Localization Algorithm

In an ideal model, with three known ranges between the TN and each of the three BNs, the coordinate of the TN can be obtained by trilateration. There are three circles, with the BN as the center and the distance as the radius. They are exactly intersecting at one point, based on Pythagorean theorem, which is the coordinate of the TN. This is illustrated in Figure 3a. However, the real situation is more complicated. Ranging errors mean that the three circles cannot intersect at one point. Moreover, the number of BNs may be more than three, as shown in Figure 3b.

For real situations like Figure 3b, with ranging and coordinates of the BN, we can build the following equations:
where (x, y) is the coordinate of the TN, (x

$${({x}_{i}-x)}^{2}+{({y}_{i}-y)}^{2}={d}_{i}^{2},i=1,2,3,\dots ,n,$$

_{i}, y_{i}) means the i-th BN, and d_{i}is the distance between the TN and the i-th BN. Based on these equations, we can employ the former (n − -1)-th equations minus the n-th. Then, we have (n − 1) equations. They are all linear functions and can be described in matrix form:
$$\left[\begin{array}{cc}2\left({x}_{1}-{x}_{n}\right)& 2\left({y}_{1}-{y}_{n}\right)\\ 2\left({x}_{2}-{x}_{n}\right)& 2\left({y}_{2}-{y}_{n}\right)\\ ...& ...\\ 2\left({x}_{n-1}-{x}_{n}\right)& 2\left({y}_{n-1}-{y}_{n}\right)\end{array}\right]\left[\begin{array}{c}x\\ y\end{array}\right]=\left[\begin{array}{c}{x}_{1}^{2}-{x}_{n}^{2}+{y}_{1}^{2}-{y}_{n}^{2}+{d}_{1}^{2}-{d}_{n}^{2}\\ {x}_{2}^{2}-{x}_{n}^{2}+{y}_{2}^{2}-{y}_{n}^{2}+{d}_{2}^{2}-{d}_{n}^{2}\\ ...\\ {x}_{n-1}^{2}-{x}_{n}^{2}+{y}_{n-1}^{2}-{y}_{n}^{2}+{d}_{n-1}^{2}-{d}_{n}^{2}\end{array}\right].$$

We can summarize Equation (6) as:
where $A=\left[\begin{array}{cc}2\left({x}_{1}-{x}_{n}\right)& 2\left({y}_{1}-{y}_{n}\right)\\ 2\left({x}_{2}-{x}_{n}\right)& 2\left({y}_{2}-{y}_{n}\right)\\ ...& ...\\ 2\left({x}_{n-1}-{x}_{n}\right)& 2\left({y}_{n-1}-{y}_{n}\right)\end{array}\right]$, $X=\left[\begin{array}{c}x\\ y\end{array}\right]$, $b=\left[\begin{array}{c}{x}_{1}^{2}-{x}_{n}^{2}+{y}_{1}^{2}-{y}_{n}^{2}+{d}_{1}^{2}-{d}_{n}^{2}\\ {x}_{2}^{2}-{x}_{n}^{2}+{y}_{2}^{2}-{y}_{n}^{2}+{d}_{2}^{2}-{d}_{n}^{2}\\ ...\\ {x}_{n-1}^{2}-{x}_{n}^{2}+{y}_{n-1}^{2}-{y}_{n}^{2}+{d}_{n-1}^{2}-{d}_{n}^{2}\end{array}\right]$.

$$Ax=b,$$

Based on the value of A in Equation (7), there are three cases to solve X.

**Case one**, A = [0, 0]. This means that only one single BN completes the ranging algorithm with TN, illustrated in Figure 3d. We cannot solve the exact coordinate of TN and can only get a possible range, even in an ideal model. Considering the motion model of TN in Figure 3d, we are able to narrow down the possible range. However, it is pointless in this localization system. There are two reasons for this: (1) ranging errors make the possible range larger and the (2) PDR algorithm has a higher accuracy in this situation.

**Case two**, A is a singular matrix. This means that two BNs complete the ranging or all BNs are in a straight line. In this situation, we find the two BNs closest to the TN, as shown in Figure 3c. Then, we employ a binary quadratic equation:

$$\{\begin{array}{c}{({x}_{i}-x)}^{2}+{({y}_{i}-y)}^{2}={d}_{i}^{2}\\ {({x}_{j}-x)}^{2}+{({y}_{j}-y)}^{2}={d}_{j}^{2}\end{array}.$$

To solve it, we will obtain two results. If we have the coordinate of the TN from the last step, we can then calculate the Euclidean distances between the coordinate and the two results. We choose the coordinate with a shorter distance as the final result this time.

**Case three**, A is not a singular matrix. This is a common situation in most localization research. In this situation, the number of BNs will be greater than or equal to three, and they are not in a straight line. According to Figure 3b, in order to improve the location accuracy, we use the LSM algorithm to calculate the coordinate instead of trilateration. Then, Equation (7) can be transformed to Equation (9). In this case, most UWB indoor localization systems can achieve a centimeter-level location accuracy.

$$X={\left({A}^{T}A\right)}^{-1}{A}^{T}b,$$

## 5. Localization Using PDR

The PDR algorithm is an IMU-based algorithm. Inertial navigation is an intuitive solution, but it is not suitable for tags for two reasons: (1) In a tag, limited by size and cost, the IMU is a microelectro mechanical system (MEMS), which makes the precision of IMU low, and (2) the strap-down inertial navigation system is too complicated to realize it in the TN. PDR focuses on step detection, stride length calculation, and heading estimation of the pedestrian. According to Equation (3), with an initial location, we can estimate the location at any moment.

#### 5.1. Initial Location

The initial location is the premise of starting the PDR algorithm, but PDR itself cannot provide it. Therefore, we can use the result of UWB localization to provide it. According to the localization situation, the process of initializing the location can be divided into two cases:

- (1)
- With Equation (7), matrix A is not a singular matrix. Then, we can calculate the coordinate of TN as the initial location, and start the PDR algorithm; and
- (2)
- In other cases, we do not initialize the location or start the PDR algorithm, until case (1).

#### 5.2. Step Detection

Step detection is a basic technique of PDR. It is crucial, but not complicated. There are many mature and efficient solutions. In this paper, we use the step detection algorithm from the [28].

The data for step detection comes from a triaxial accelerometer. Due to the difference in TN attitude, it is complicated to analyze the acceleration characteristics in each three-axis. The authors in [28] proposed a method using the total acceleration magnitude. The magnitude ${a}_{mag,t}$ at time t can be expressed as:
where ${a}_{x,t}$, ${a}_{y,t}$, and ${a}_{z,t}$ are the measurements from the triaxial accelerometer at time t. Compared to the vertical direction of the acceleration, the total acceleration magnitude is insensitive to the orientation of a tag worn by pedestrians. Then, it can be adapted to different walking patterns.

$${a}_{mag,t}=\sqrt{{a}_{x,t}^{2}+{a}_{y,t}^{2}+{a}_{z,t}^{2}},$$

According to the value of ${a}_{mag}$, a candidate step can be detected by a threshold ${\delta}_{th}$, where the ${a}_{mag}$ has to cross ${\delta}_{th}$ from negative to positive. In order to ensure the accuracy of step detection, there are some constraints: (1) The time interval $\mathsf{\Delta}t$ between two consecutive steps must be within the interval threshold from $\mathsf{\Delta}{t}_{min}$ to $\mathsf{\Delta}{t}_{max}$; (2) the difference ${a}_{mag}$ between extreme values of ${a}_{mag}$ during a step phase and the threshold ${\delta}_{th}$ has to be between ${a}_{min}$ and ${a}_{max}$, otherwise a perturbation point is recorded; and (3) the threshold ${\delta}_{th}$ is updated dynamically according to the mean value of ${a}_{mag}$ over a step period, illustrated as:
where m means the number of samples of the accelerometer during a single step at the last point.

$${\delta}_{th}=\frac{1}{m}{{\displaystyle \sum}}_{i=1}^{m}{a}_{mag}^{\left(i\right)},$$

The algorithm mentioned above can effectively detect steps when pedestrians walk or run, but it cannot work if pedestrians are standing. Different from [29], this paper uses another mature algorithm. When we detect a new candidate step, we record the two values—the maximum and minimum of ${a}_{mag}$—during the step. Only when the difference between the two values is greater than a threshold can, we consider the candidate step as a true step. The threshold can be obtained from a set of trained data. The data is a series of ${a}_{mag}$ when the pedestrians are walking or standing. We do not need to tag them, and we can use the K-means clustering algorithm to obtain the characteristics of ${a}_{mag}$ during different pedestrians’ motion. In K-means clustering algorithm, we consider Euclidean distance as the degree of difference between ${\delta}_{th}$, and cluster ${\delta}_{th}$ into two categories. The value of ${\delta}_{th}$ in the clustering center is smaller, which indicates a standing state, and larger, which indicates a walking state.

#### 5.3. Stride Length Estimation

Stride length, combined with step detection, is utilized for the moving distance calculation of pedestrians. According to related PDR algorithm works, the stride length of a pedestrian is not constant and varies with walking speed, step frequency, acceleration variance, and so on. The relationship between these variables is linear, shown as:
where LS is the stride length; f is the step frequency; v is the acceleration variance; $\alpha $ and $\beta $ are weights for step frequency and acceleration variance, respectively; and $\gamma $ is the bias. In this paper, these three parameters are named walking parameters. In every step, $v$ can be described as:
where ${a}_{max}$ and ${a}_{min}$ represent the maximum and minimum of ${a}_{mag}$ in every single step, respectively.

$$LS=\alpha \ast f+\beta \ast v+\gamma ,$$

$$v=\sqrt[4]{{a}_{max}+{a}_{min}},$$

In traditional algorithms, these parameters, including $\alpha $, $\beta $, and $\gamma $, are measured by a set of offline data. This method will increase the deployment difficulty of the PDR algorithm. Moreover, every pedestrian has their own unique walking habit, which will lead to different walking characteristics, and will then lead to different parameters for each pedestrian. It is impossible to measure a set of parameters for each pedestrian. The hybrid system can solve the problem using results from UWB localization.

The hybrid system can adaptively adjust walking parameters for each pedestrian. The core idea is that the precise location and walking trajectory obtained from the UWB-based localization algorithm will help the PDR algorithm to calculate the parameters. The whole process can be divided into two parts: the extraction of training data and linear regression for parameters.

The first step is training data extraction. Not all location results are suitable for training data. Therefore, we define a time window for a series of location points, and design a strategy to determine whether these points in the time window are suitable as training data. The length l of the time window is related to the frequency of localization. When the locations in the time window meet all the following three constraints, these locations in the window can be extracted as training data.

(1) High precision of localization results

Training data with large errors will lead to parameters with errors. Therefore, we need to obtain an accurate location from the UWB-based algorithm. According to the description of the localization algorithm using UWB in Section 4, a centimeter-level location accuracy can be obtained in the case of non-singular matrix A. This accuracy can meet the needs of training parameters. As a result, we demand that all locations in the time window are calculated in the case of the non-singular matrix A.

(2) The pedestrian walks in a straight line

The frequency of the localization algorithm using UWB is low, because frequent localization will shorten the battery life of the TN. In this case, the accuracy of the walking trajectory estimation will be reduced when the pedestrian turns, as shown in Figure 4. Therefore, the locations in training data must be a straight line for pedestrians. The strategy for selecting location data will be described in Section 5.4.

(3) Pedestrian walks at a constant speed

A pedestrian’s walking speed is related to their stride length. Therefore, if a pedestrian walks at a different speed within a set of training data, their stride length is not constant. We can calculate the length separately with step detection, but there will be errors. With these cases, it is better to demand that the pedestrian walks at a constant speed when collecting training data. Fortunately, pedestrians walk at a constant speed most of the time. The strategy of selecting location data for walking with a constant speed will be described in Section 5.4.

Second, using these training data, the pedestrian trajectory can be obtained. With step detection, we are able to estimate the stride length in the time window. By repeating the first step, we can obtain multiple sets of training data and stride length. Using these data, we can perform a linear regression of Equation (12) to acquire the parameters.

#### 5.4. Strategy for Selecting Location Data

The location data from the UWB localization algorithm will be a series of discrete coordinates $\left({x}_{i},{y}_{i}\right)$ on a localization map, as illustrated in Figure 5. They must be accurate according to the first constraint in Section 5.3. Figure 5 can be considered a small part of the location map. We can fit a line based on the coordinates. Then, the degree of dispersion of these points with the fitted line is used to determine whether the pedestrian walks in a straight line, and they are marked as red segments in Figure 5. The fitted line can be described as follows:

$$y=ax+b.$$

Then, the process of fitting the line is employed to solve a and b. Using the coordinates, we have a series of equations:
where ${x}_{i},{y}_{i}$ are the coordinates of location data. These equations can be expressed in the form of linear algebra as:
where $Y=\left[\begin{array}{c}{y}_{1}\\ {y}_{2}\\ ...\\ {y}_{n}\end{array}\right],X=\left[\begin{array}{cc}{x}_{1}& 1\\ {x}_{2}& 1\\ ...& ...\\ {x}_{n}& 1\end{array}\right],B=\left[\begin{array}{c}a\\ b\end{array}\right]$.

$${y}_{i}=a{x}_{i}+b,i=1,2,3,\dots ,n,$$

$$Y=XB=>B={({X}^{T}X)}^{-1}{X}^{T}T,$$

We can calculate a and b through Equation (16), and then obtain the fitted line. The degree of dispersion can be described as the distance from each point to the fitted line:

$$\xi =\frac{1}{n}{{\displaystyle \sum}}_{i=0}^{n}\left|\frac{a{x}_{i}-{y}_{i}+b}{\sqrt{{a}^{2}+1}}\right|.$$

Then, we can set a threshold ${\xi}_{th}$. In the time window, if $\xi <{\xi}_{th}$, we consider that the pedestrian walks in a straight line; otherwise, the pedestrian is not walking straight.

As shown in Figure 5, each location point has a projection on the fitted line, marked as blue points. By calculating the distances between all adjacent projection points, we can use the standard deviation $\mathsf{\sigma}$ of these distances to determine whether pedestrian walks at a constant speed. Then, we can still set a threshold ${\sigma}_{th}$, and if $\sigma <{\sigma}_{th}$, we can consider that the pedestrian walks at a constant speed; otherwise, the pedestrian is not walking at a constant speed.

The fitted line starts at the first projection and ends at the final projection. The length of this line is the distance the pedestrian walks. Considering it as a vector, the direction is the heading of the pedestrian, and will be used for heading estimation of the PDR algorithm in Section 5.5. It is the black line in Figure 5.

#### 5.5. Heading Estimation

In this paper, the target of localization, the TN, is an electronic tag. Unlike a smartphone, the pedestrian wears the tag on a fixed location on their body. In this respect, the heading estimation in this PDR system is easier than the smartphone-based PDR algorithm. On the other hand, the basis of the heading estimation is the magnetometer, and the magnetometer can be disturbed in harsh environments. Therefore, drifting data from the magnetometer can cause heading prediction errors. We use three steps to solve this problem and estimate the heading direction.

Step 1:

We are able to calculate the yaw, pitch, and roll for the TN using the IMU-based attitude heading reference system (AHRS). In this paper, AHRS refers to the [30] and the algorithm details are not described here. Whenever new IMU data is obtained, the AHRS algorithm is executed once. According to Yaw, we have an angle ${\theta}_{Yaw}$ for the TN. However, this angle ${\theta}_{Yaw}$ refers to the direction of the electronic tag in the local Cartesian coordinates coordinate system (ENU). It is related to the attitude of the TN when the system is initialized and it has no connection with the heading of the pedestrian. Moreover, there will be an offset if we are trying to calculate the absolute direction in ENU using ${\theta}_{Yaw}$ and the magnetometer.

Step 2:

Although the angle ${\theta}_{Yaw}$ has no connection with the heading, it still has a relationship with a certain absolute direction in ENU. Then, the problem is focused on finding a relationship between the directions with the heading of the pedestrian. According to Section 5.4, we can estimate the direction of the pedestrian using a set of location coordinates in a time window. Then, we have both the walking heading and ${\theta}_{Yaw}$ in the time window:
where ${\theta}_{offset}$ is the offset between the heading and ${\theta}_{Yaw}$, as illustrated in Figure 6. As long as the pedestrian does not re-adjust the TN pose, it is constant for the TN in the location of the localization environment, as shown in Figure 6b,c, even if the magnetometer data exhibit errors caused by harsh environments.

$$\theta ={\theta}_{Yaw}+{\theta}_{offset},$$

Step 3:

Pedestrians may change the TN attitude in different walking states. Then, we can select the estimated heading when ${a}_{mag,t}=g$, where ${a}_{mag,t}$ is the magnitude ${a}_{mag,t}$ from the three-axis accelerometer at time t and $g$ is the gravity acceleration. This represents the short period before the foot makes contact with the ground. If there is more than one ${a}_{mag,t}$, the average of the angles at ${a}_{mag,t}$ is taken as the result.

#### 5.6. Location Estimation

With step detection, and stride and heading estimation, we are able to estimate the location during every step by Equation (2), as shown in Section 3.2. However, the PDR algorithm is applied in the TN, and the result must be transmitted to the server. UWB has its own protocol, so it is difficult to transmit the result in real time when the TN completes the algorithm.

Instead of estimating the location by Equation (2), we can combine the stride length and heading as a two-dimensional vector, and divide the vector by the time of the step. In this way, we can acquire the current pedestrian’s velocity vector. When the TN transmits a message to the BN, the TN estimates the current PDR location and adds it to the message.

## 6. Fusing the Two Results from UWB and PDR

With the location results from UWB and the PDR algorithm, the final result can be obtained by a weighted average using Equation (4) in Section 3.2. Then, the calculation of the weights can be concentrated on.

After UWB calibration, the localization accuracy of the PDR algorithm is very stable. UWB-based localization is vulnerable to the external harsh environment. If there is no NLoS in UWB communication, then the accuracy of UWB localization is higher than the PDR algorithm; otherwise, UWB is lower than PDR. Then, the weights depend on NLoS communication.

According to the three descriptions of UWB localization in Section 4.2 and Equation (9), there are also three cases for weight determination and the decisive factor is also matrix A.

First, A = [0, 0]. One single BN cannot provide location results by the UWB-based localization algorithm. Therefore, we do not use its result and make weights ${w}_{u}=0$ and ${w}_{p}=1$.

Second, $A\ne \left[0,0\right]$, but it is still a singular matrix. There are only two BNs completing ranging with the TN and they may also have NLoS transmission. In this case, the UWB localization system can complete the algorithm and provide a location result with errors. The accuracy of the results from the two localization algorithms becomes similar, which makes the weights similar. There are two ways of calculating the weight: (1) Through prior data, the accuracy of the two algorithms (represented by standard deviation) can be obtained, and the weights can then be determined by the ratio of the two standard deviation, or, (2) if it is difficult to obtain prior data, the weights can be set as ${w}_{u}=0.5$ and ${w}_{p}=0.5$.

Third, A is not a singular matrix. In this case, the UWB localization system can provide an accurate location result that is more precise than PDR. We can set the weights as ${w}_{u}=0.9$ and ${w}_{p}=0.1$. Alternatively, standard deviation from prior data can be used to employ more precise weights.

## 7. Hybrid Localization System Implementation and Experiment

In order to deploy our hybrid localization system, we have designed three hardware devices: TN, BN, and middleware. They are shown in Figure 7. The TN installs mpu9250 as the IMU, and uses dw1000 to make UWB communication and ranging with the BN. In order to make the UWB communication distance further, we installed power amplifiers on both TN and BN. Additionally, in order to facilitate the aggregation of data on the BNs, we have designed a middleware. It communicates with BNs by LoRa and realizes the convergence of location data, and then sends data to the server via WiFi. In these experiments, after employing power amplifiers, the UWB communication distance can reach at least 212 meters in the case of LoS. The theoretical communication distance of LoRa is more than five kilometers. The middleware uses polling to communicate with BNs, and the distance between them is less than 300 meters. The middleware communicates with the server via WiFi, and the distance between them is less than 5 m. We have tested the reliability of LoRa and WiFi in this environment. In total, 72,000 packets were transmitted in one hour, and the number of lost packets was 0. Therefore, we can consider LoRa and WiFi communication as reliable within this distance.

The TN reads IMU data at a frequency of 20 Hz. Uploading these data to the server is a significant burden for UWB communication. There are two main reasons for this: (1) Transmitting a large amount of data will increase the power consumption of the TN, thereby shortening the battery life, and (2) these data demand a higher UWB bandwidth, but a high bandwidth will reduce the communication distance. As a result, we can run the PDR algorithm in the TN. When the TN and BN are ranging by UWB with three messages, the TN uploads the real-time location and downloads the speed and heading of the TN. All ranging data and location results from PDR will be sent to the middleware and then uploaded to the server by WiFi. The hybrid localization system needs some preset parameters, and their values are shown in Table 1.

The localization environment for the experiment was set as a small park in a university, as shown in Figure 8. We used three BNs and one TN, and the coordinates of the three BNs were known. Figure 8 shows their location and labels them with different colors. Due to some obstacles, including trees and a model, there are some areas in the park which mean that TN can only communicate with one or two BNs (NLoS communication). In Figure 8, we have used different color shades to indicate the loss of the BN signal. There are also large enough areas with non-NLoS communication, providing a high-precision location from the UWB-based localization algorithm to train parameters for the PDR algorithm. This situation can satisfy the experiment.

With the platform as described above, we ran the hybrid localization algorithm. Additionally, we also implemented a UWB-based localization and PDR algorithm as a comparison. The real trajectory and coordinates calculated the errors of localization algorithms’ results. In order to ensure the accuracy of the real trajectory, the tester walked on a fixed trajectory with a fixed speed. We recorded the time when the tester passed through key reference objects, and then compared the distance and UWB high-precision localization results to obtain high-precision real trajectories and coordinates. We repeated the experiment 30 times.

During the experiment, obstacles such as trees and models caused UWB communication packet loss, which means different accuracies for the algorithms. The comparison of results the UWB-based and hybrid localization system are illustrated in Figure 9. Figure 9a shows the average errors from the UWB-based and hybrid localization system, and only coordinates with successful completion from the localization calculation are counted. Since there are obstacles blocking UWB signals, the localization algorithm may fail to complete the calculation. Figure 9b shows the location results that failed to complete the calculation. We can see that the hybrid system is more robust to signal blocking. In other words, the hybrid system is more robust and accurate in harsh environments.

Figure 10 and Figure 11 show a comparison of the experimental results obtained from different localization algorithms. Figure 10 shows the results from the PDR algorithm, where the black line is the true walking track and the red points are the location results acquired from the PDR algorithm. The PDR algorithm uses trained parameters from the UWB-based algorithm. We can see that as the walking distance increases, the offset of the locations becomes bigger. In Figure 11b, a comparison of the UWB-based algorithm and hybrid system is presented. The map is too big to differentiate the details of the two algorithms. Therefore, we zoomed in on parts of the map, as shown in Figure 11a,c,d, and marked them with different color frames in Figure 11b. The black arrows point to the zoomed-in figures.

Referring to Figure 8, we can confirm that the TN can communicate with only two BNs in the areas with a black and blue frame in Figure 11b, which meets the second case described in Section 4.2. We zoomed-in on the results in Figure 11a,d. In the two figures, we can see that the location results obtained from the UWB-based algorithm have a higher dispersion than the UWB/PDR hybrid localization system. The mean of the results is similar to the true walking track, but the standard deviation of the UWB-based algorithm is larger. In other words, the errors of the UWB-based algorithm are larger. In case two, according to all the experimental results, the total average error of the UWB-based algorithm is 2.12 meters, and that of the hybrid system is 0.71 meters. Figure 11c shows the results in case one. In this situation, the TN can communicate with only one BN, and the UWB-based algorithm cannot complete the location calculation. In the figure, we can see that we cannot obtain the location from the UWB-based algorithm. We can still obtain location results from the PDR system, although the results begin to drift with an increasing distance. However, once the localization situation returns to case two or three, the results are quickly recalibrated. In this case, the offset error per 100 meters of the hybrid localization system is 1.3 meters.

The advantage of PDR in the hybrid system is that it can dynamically adjust the walking parameters for each pedestrian. This makes the algorithm more robust for different pedestrians. In the walking experiments, a male student with a height of 1.82 m completed the test 20 times, a female student with a height of 1.69 m completed the test 10 times, and a female student with a height of 1.55 m completed it 10 times. We saved the data in the flash of MCU, and use the same data to run a PDR algorithm in [28] with fixed parameters and the hybrid system. By manually adjusting the parameters for the male student a height of 1.82 m, the offset error per 100 m of PDR in [28] could achieve 1.18 m, which is better than the hybrid. However, if we used the parameters for the female student, the offset error per 100 m would be 2.1 m. The compressions between PDR in [28] and hybrid system are illustrated in Table 2 and Table 3.

## 8. Conclusions

In this paper, we have proposed a hybrid localization system for fusing the UWB-based and PDR algorithm. The UWB-based localization algorithm has a high accuracy and weak anti-interference ability. PDR is based on internal sensors and is less affected by external influences, but it produces cumulative errors that cannot be self-eliminating. We used accurate location results from the UWB-based algorithm to train parameters in PDR to improve its accuracy. Then, PDR was used to improve the localization accuracy when UWB was disturbed by external interference. The experimental results show that the accuracy of the hybrid system is higher than that of UWB or PDR. However, when the system is running, its greatest drawback is that the TN consumes more power, which will shorten the battery life. Future work needs to focus on low-power algorithms. Recently, deep learning has been proven to be a powerful tool, and has been successfully applied in many fields [31,32,33]. We will try to use deep learning algorithms to train the data in the future to obtain higher accuracy location results. Besides, TDOA based localization systems have greater capacity of tags than TOF-based. We will learn from some of new communication approaches [34,35,36] to achieve hybrid localization based on TDOA algorithm in the next works.

## Author Contributions

Formal analysis: H.T.; writing—original draft: H.T. and T.C.; validation: X.S.; funding acquisition: J.W. and N.X.; writing—review and editing: H.T. and T.C. All authors have read and agreed to the published version of the manuscript.

## Funding

This work was supported in part by the National Key R and D Program of China (grant nos. 2016YFC0801607), the National Natural Science Foundation of China under grant 61871107, grant 61501105, and grant 61701102, and by the Fundamental Research Funds for the Central Universities under grant N171612014, grant N181613002, grant N180708009, grant N170308028, and grant N180703018.

## Conflicts of Interest

The authors declare no conflicts of interest.

## References

- Ferreira, A.; Fernandes, D.; Catarino, A.; Monteiro, J. Performance Analysis of Toa-Based Positioning Algorithms for Static and Dynamic Targets with Low Ranging Measurements. Sensors
**2017**, 17, 1915. [Google Scholar] [CrossRef] [PubMed] - Khelifi, F.; Bradai, A.; Benslimane, A.; Rawat, P.; Atri, M. A Survey of Localization Systems in Internet of Things. Mob. Netw. Appl.
**2019**, 24, 761–785. [Google Scholar] [CrossRef] - Heurtefeux, K.; Valois, F. Is Rssi a Good Choice for Localization in Wireless Sensor Network? In Proceedings of the 2012 IEEE 26th International Conference on Advanced Information Networking and Applications, Fukuoka, Japan, 26–29 March 2012; pp. 732–739. [Google Scholar]
- Tomažič, S.; Dovžan, D.; Škrjanc, I. Confidence-Interval-Fuzzy-Modelbasedindoor Localization. IEEE Trans. Ind. Electron.
**2018**, 66, 2015–2024. [Google Scholar] [CrossRef] - Tsuji, J.; Kawamura, H.; Suzuki, K.; Ikeda, T.; Sashima, A.; Kurumatan, K. Zigbee Based Indoor Localization with Particle Filter Estimation. In Proceedings of the 2010 IEEE International Conference on Systems, Man and Cybernetics, Istanbul, Turkey, 10–13 October 2010; pp. 1115–1120. [Google Scholar]
- Khattak, S.B.A.; Pasha, M.A.; Farooq, M.U.; Hassan, N.U.; Yuen, C. Empirical Performance Evaluation of Wifi Fingerprinting Algorithms for Indoor Localization. In Proceedings of the 2018 IEEE International Conference on Communication Systems (ICCS), Chengdu, China, 19–21 December 2018; pp. 303–308. [Google Scholar]
- Zhao, W.; Han, S.; Hu, R.Q.; Meng, W.; Jia, Z. Crowdsourcing and Multisource Fusion-Based Fingerprint Sensing in Smartphone Localization. IEEE Sens. J. 2018; 18, 3236–3247. [Google Scholar]
- Son, T.H. Path Loss Prediction for Indoor Wireless Communications in Multifloored Buildings by Ray Tracing with utd. In Proceedings of the ITC-CSCC: International Technical Conference on Circuits Systems, Computers and Communications, Okinawa, Japan, 14–16 July 1997; pp. 821–824. [Google Scholar]
- Martin, P.; Ho, B.-J.; Grupen, N.; Muñoz, S.; Srivastava, M. An Ibeacon Primer for Indoor Localization: Demo Abstract. In Proceedings of the 1st ACM Conference on Embedded Systems for Energy-Efficient Buildings, Memphis, TN, USA, 3–6 November 2014; pp. 190–191. [Google Scholar]
- Hartmann, F.; Gaedeke, T.; Leibold, P.; Niestoruk, L.; Stork, W. Navigation for Occupational Safety in Harsh Industrial Environments. In Proceedings of the Smart SysTech 2014; European Conference on Smart Objects, Systems and Technologies, Dortmund, Germany, 1–2 July 2014; pp. 1–8. [Google Scholar]
- Wang, X.; Ning, Z.; Hu, X.; Wang, L.; Guo, L.; Hu, B. Future Communications and Energy Management in Internet of Vehicles: Toward Intelligent Energy-Harvesting. IEEE Wirel. Commun.
**2019**, 26, 87–93. [Google Scholar] [CrossRef] - Ning, Z.; Huang, J.; Wang, X.; Rodrigues, J.; Guo, L. Mobile Edge Computing-enabled Internet of Vehicles: Toward Energy-efficient Scheduling. IEEE Network
**2019**, 33, 198–205. [Google Scholar] [CrossRef] - Yang, Z.; Zhou, Z.; Liu, Y. From Rssi to Csi: Indoor Localization via Channel Response. ACM Comput. Surv. (CSUR)
**2013**, 46, 25. [Google Scholar] [CrossRef] - Mazhar, F.; Khan, M.G.; Sällberg, B. Precise Indoor Positioning Using Uwb: A Review of Methods, Algorithms and Implementations. Wirel. Pers. Commun.
**2017**, 97, 4467–4491. [Google Scholar] [CrossRef] - Patwari, N.; Ash, J.N.; Kyperountas, S.; Hero, A.O.; Moses, R.L.; Correal, N.S. Locating the Nodes: Cooperative Localization in Wireless Sensor Networks. IEEE Signal Process. Mag.
**2005**, 22, 54–69. [Google Scholar] [CrossRef] - Soganci, H.; Gezici, S.; Poor, H.V. Accurate Positioning in Ultrawideband Systems. IEEE Wireless Commun.
**2011**, 18, 19–27. [Google Scholar] [CrossRef] - Marano, S.; Gifford, W.M.; Wymeersch, H.; Win, H.Z. Nlos Identification and Mitigation for Localization Based on Uwb Experimental Data. IEEE J. Sel. Areas Commun.
**2010**, 28, 1026–1035. [Google Scholar] [CrossRef] - Niitsoo, A.; Edelhäuer, T.; Mutschler, C. Convolutional Neural Networks for Position Estimation in Tdoa-Based Locating Systems. In Proceedings of the 2018 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Nantes, France, 24–27 Sept. 2018; pp. 1–8. [Google Scholar]
- Niitsoo, A.; Edelhäußer, T.; Eberlein, E.; Hadaschik, N.; Mutschler, C. A Deep Learning Approach to Position Estimation from Channel Impulse Responses. Sensors
**2019**, 19, 1064. [Google Scholar] [CrossRef] [PubMed] - Yu, K.; Wen, K.; Li, Y.; Zhang, S.; Zhang, K. A Novel Nlos Mitigation Algorithm for Uwb Localization in Harsh Indoor Environments. IEEE Trans. Veh. Technol.
**2019**, 68, 686–699. [Google Scholar] [CrossRef] - Savic, V.; Ferrer-Coll, J.; Ängskog, P.; Chilo, J.; Stenumgaard, P.; Larsson, E.G. Measurement Analysis and Channel Modeling for Toa-Based Ranging in Tunnels. IEEE Trans. Wirel. Commun.
**2014**, 14, 456–467. [Google Scholar] [CrossRef] - Silva, B.; Hancke, G.P. Ir-Uwb-Based non-Line-Of-Sight Identification in Harsh Environments: Principles and Challenges. IEEE Trans. Ind. Inform.
**2016**, 12, 1188–1195. [Google Scholar] [CrossRef] - Kim, D.-H.; Kwon, G.-R.; Pyun, J.-Y.; Kim, J.-W. Nlos Identification in Uwb Channel for Indoor Positioning. In Proceedings of the 2018 15th IEEE Annual Consumer Communications & Networking Conference (CCNC), Las Vegas, NY, USA, 12–15 January 2018; pp. 1–4. [Google Scholar]
- Hartmann, F.; Rifat, D.; Stork, W. Hybrid Indoor Pedestrian Navigation Combining an Ins and a Spatial Non-Uniform Uwb-Network. In Proceedings of the 2016 19th International Conference on Information Fusion (FUSION), Heidelberg, Germany, 5–8 July 2016; pp. 549–556. [Google Scholar]
- Tian, Q.; Wang, K.I.; Salcic, Z. A Low-Cost Ins and Uwb Fusion Pedestrian Tracking System. IEEE Sens. J.
**2019**, 19, 3733–3740. [Google Scholar] [CrossRef] - Liu, F.; Wang, J.; Zhang, J.; Han, H. An Indoor Localization Method for Pedestrians Base on Combined Uwb/Pdr/Floor Map. Sensors
**2019**, 19, 2578. [Google Scholar] [CrossRef] - Li, Y.; Zhuang, Y.; Lan, H.; Zhou, Q.; Niu, X.; El-Sheimy, N. A Hybrid Wifi/Magnetic Matching/PDR Approach for Indoor Navigation with Smartphone sensors. IEEE Commun. Lett.
**2015**, 20, 169–172. [Google Scholar] [CrossRef] - Qian, J.; Ma, J.; Ying, R.; Liu, P.; Pei, L. An Improved Indoor Localization Method Using Smartphone Inertial Sensors. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation, Montbeliard-Belfort, France, 28–31 October 2013; pp. 1–7. [Google Scholar]
- Xiao, Z.; Wen, H.; Markham, A.; Trigoni, N.; Blunsom, P.; Frolik, J. Non-Line-Of-Sight Identification and Mitigation Using Received Signal Strength. IEEE Trans. Wirel. Commun.
**2014**, 14, 1689–1702. [Google Scholar] [CrossRef] - Geiger, W.; Bartholomeyczik, J.; Breng, U.; Gutmann, W.; Hafen, M.; Handrich, E.; Huber, M.; Jackle, A.; Kempfer, U.; Kopmann, H.; et al. Mems Imu for Ahrs Applications. In Proceedings of the 2008 IEEE/ION Position, Location and Navigation Symposium, Hyatt Regency Hotel Monterey, CA, USA, 6–8 May 2008; pp. 225–231. [Google Scholar]
- Ning, Z.; Feng, Y.; Collotta, M.; Kong, X.; Wang, X.; Guo, L.; Hu, X.; Hu, B. Deep Learning in Edge of Vehicles: Exploring Tri-relationship for Data Transmission. IEEE Trans. Ind. Inform.
**2019**, 15, 5737–5746. [Google Scholar] [CrossRef] - Ning, Z.; Dong, P.; Wang, X.; Rodrigues, J.; Xia, F. Deep Reinforcement Learning for Vehicular Edge Computing: An Intelligent Offloading System. ACM Trans. Intell. Syst. Technol.
**2019**, 10, 60. [Google Scholar] [CrossRef] - Ning, Z.; Dong, P.; Wang, X.; Obaidat, M.S.; Hu, X.; Guo, L.; Guo, Y.; Huang, J.; Hu, B.; Li, Y. When Deep Reinforcement Learning Meets 5G-enabled Vehicular Networks: A Distributed Offloading Framework for Traffic Big Data. IEEE Trans. Ind. Inform.
**2019**. [Google Scholar] [CrossRef] - Peng, Y.; Wang, X.; Guo, L.; Wang, Y.; Deng, Q. An Efficient Network Coding-Based Fault-Tolerant Mechanism in WBAN for Smart Healthcare Monitoring Systems. Appl. Sci.
**2017**, 7, 817–835. [Google Scholar] [CrossRef] - Peng, Y.; Yu, Y.; Guo, L.; Jiang, D.; Gai, Q. An Efficient Joint Channel Assignment and QoS Routing Protocol for IEEE 802.11 Multi-Radio Multi-Channel Wireless Mesh Networks. J. Netw. Comput. Appl.
**2013**, 36, 843–857. [Google Scholar] [CrossRef] - Peng, Y.; Song, Q.; Yu, Y.; Wang, F. Fault-Tolerant Routing Mechanism Based on Network Coding in Wireless Mesh Networks. J. Netw. Comput. Appl.
**2014**, 37, 259–272. [Google Scholar] [CrossRef]

**Figure 3.**Tag node (TN) localization with different situations: (

**a**) An ideal model with three beacon nodes (BNs); (

**b**) real situation with ranging error; (

**c**) localization with two BNs; (

**d**) only one single BN completes the ranging step.

**Figure 6.**Heading estimation in different situations: (

**a**) Obtaining the offset ${\theta}_{offset}$ between yaw and heading; (

**b**,

**c**) correct heading estimation; (

**d**,

**e**) wrong heading estimation.

**Figure 7.**Three hardware devices for the hybrid localization system: (

**a**) TN; (

**b**) BN; (

**c**) middleware.

**Figure 9.**Comparison with different packet losses: (

**a**) Average errors comparison vs. packet loss rate; (

**b**) location results that failed to complete the localization algorithm vs. packet loss rate.

**Figure 11.**Comparison of experimental results from different localization algorithms: (

**a**) Zoomed-in on the black frame in Figure b; (

**b**) a comparison of the two localization results: UWB and hybrid system; (

**c**) zoomed-in on the red frame in Figure b; (

**d**) zoomed-in on the blue frame in Figure b.

Symbols | Parameters Description | Values |
---|---|---|

$\left({w}_{u}^{1},{w}_{p}^{1}\right)$ | Weights when A = [0, 0] | (0, 1) |

$\left({w}_{u}^{2},{w}_{p}^{2}\right)$ | Weights when A is a singular matrix. | (0.5, 0.5) |

$\left({w}_{u}^{3},{w}_{p}^{3}\right)$ | Weights when A is not a singular matrix. | (0.9, 0.1) |

${\mathsf{\xi}}_{th}$ | Threshold for judging whether to walk straight. | 0.8 |

${\mathsf{\sigma}}_{th}$ | Threshold for judging whether to walk at a constant speed. | 0.8 |

Pedestrians | Gender | Height | Average Errors per 100 m (m) | Max Error per 100 m (m) |
---|---|---|---|---|

a | male | 1.82 m | 1.3 | 1.51 |

b | female | 1.69 m | 1.33 | 1.56 |

$\mathrm{c}$ | female | 1.55 m | 1.28 | 1.49 |

**Table 3.**Errors with PDR in [28].

Pedestrians | Gender | Height | Average Errors per 100 m (m) | Max Error per 100 m (m) |
---|---|---|---|---|

a | male | 1.82 m | 1.18 | 1.46 |

b | female | 1.69 m | 2.3 | 2.80 |

$\mathrm{c}$ | female | 1.55 m | 2.1 | 2.75 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).