Detection of UWB ranging measurement quality for collaborative indoor positioning

Wireless communication signals have become popular alternatives for indoor positioning and navigation due to lack of navigation satellite signals in such environments. The signal characteristics determine the method used for positioning as well as the positioning accuracy. Ultra-wideband (UWB) signals, with a typical bandwidth of over 1 GHz, overcome multipath problems in complicated environments. Hence, potentially achieves centimetre-level ranging accuracy in open areas. However, signals can be disrupted when placed in environments with obstructions and cause large ranging errors. This paper proposes a ranging measurement quality indicator (RQI) which detects the UWB measurement quality based on the received signal strength pattern. With a detection validity of more than 83%, the RQI is then implemented in a ranging-based collaborative positioning system. The relative constraint of the collaborative network is adjusted adaptively according to the detected RQI. The proposed detection and positioning algorithm improves positioning accuracy by 80% compared to non-adaptive collaborative positioning.


Introduction
Location-based services (LBS) and applications have become increasingly popular with the growing usage of Global Navigation Satellite System (GNSS) devices for outdoor positioning and navigation. According to statistics, one in every two persons owns a mobile phone around the globe (GSMA Intelligence 2014). Yet more than 90% mobile users now search for location related information on their phones and 70% of human activity takes place indoors (Laoudias et al. 2013). This implies that the user demand for indoor position related information and applications are soaring every day. Yet the indoor environment still remains a tricky place and quite often the positioning results do not meet the required accuracy. Inertial navigation and wireless communication signals have been developed as common alternatives in GNSS-denied environments. With the collaboration between different sensors and multiple users to correct measurements, high accuracy could be achieved. In collaborative positioning (Wymeersch, Lien, and Win 2009;Win et al. 2011;Conti et al. 2012;Nilsson et al. 2013;Song, Moon, and Bae 2013), positioning information and measurements are shared among nearby users who are constrained within a certain area by the measurement hence minimising positioning bias and errors. The collaborative network is often formed by relative ranging measurements obtained between pairs of users within the network.
Narrow-band wireless network signals, e.g. Wi-fi, Bluetooth, ZigBee, etc., can provide ranging estimations based on either signal free space path loss model or received signal strength pattern (evennou and Marx 2006;Narzullaev, Park, and Jung 2008). However, narrow-band signals are easily disrupted by signal attenuation and multipath, reducing the positioning accuracy (Kaemarungsi and Krishnamurthy 2012;Sen et al. 2013).
Ultra-wideband (UWB) devices can transmit signals that either occupies 1.5 GHz or more of the spectrum or the fractional bandwidth is greater than 0.25 (fCC 2002). It can spread its signal pulses so that signals can be transmitted at very high-time resolution. Previous studies suggest that UWB systems are immune to multipath due to very fine timing characteristics of the signals, robust signalling, strong penetration ability (Saleh and valenzuela 1987;Win and Scholtz 1998;foerster 2001;Molisch et al. 2006). Such properties give UWB systems the potential to provide centimetre-level ranging (Lee and Scholtz 2002;Ingram, Harmer, and Quinlan 2004;Schroeder et al. 2007;Mahfouz et al. 2008;Choliz, Hernandez-Solana, and valdovinos 2011). Angelis et al. (2013) present an impulse-radio UWB platform for indoor ranging which can achieve ranging estimations with 90% of the errors within 0.5 m. The usage of wideband signals for collaborative positioning are discussed in Shen, Wymeersch, and Win (2010) which derives the limits of accuracy for wideband based collaborative networks. dardari et al. (2009) also presents the capabilities of accurate ranging using UWB technology and proposes a bound for assessing the performance of time-based ranging estimation.
However, a number of challenges still remain for practical UWB-based ranging, including unstable signal acquisition and errors in non-line-of-sight (NLoS) signals. The ranging accuracy is degraded in NLoS signals due to the change in their physical signal characteristics. Therefore, identifying and mitigating NLoS signals has been looked into widely for high accuracy indoor positioning and ranging (Casas et al. 2006;Benedetto and Giunta 2007;Ismail et al. 2008;Alsindi et al. 2009;Marano et al. 2010;Montorsi, Pancaldi, and vitetta 2011;Wymeersch et al. 2012;Yan et al. 2013).
In this paper, the quality of the ranging measurements are analysed from the received signal strength extracted from UWB measurements. Unlike previous studies where signals are classified as line-of-sight (LoS) or NLoS (Ismail et al. 2008;Alsindi et al. 2009;dardari et al. 2009), a measurement quality indicator is introduced here which is then applied as an adjustment factor in the collaborative positioning network. The collaborative positioning method constrains errors by restricting positioning estimations according to the relative ranging measurement. Simulation and trials validate that the adaptive collaborative method improves positioning accuracy and robustness as the constraint is adjusted according to the actual behaviour of the ranging measurement.
The reminder of this paper is organised as follows. Section 2 discusses current indoor ranging methods using UWB systems and its error sources. Section 3 presents the measurement quality detection method and its theoretical application in collaborative positioning. Real UWB ranging measurements are presented in Section 4 and the detection tool is trained based on the measurements. finally, the detection indicator is implemented in a collaborative positioning algorithm and improved positioning results are achieved.

UWB signal ranging errors
To understand the ranging performance of wireless signals, some common types of wireless signals in obstructed areas are introduced. In an environment with obstructions, two types of wireless signals are usually found, LoS and NLoS signals. When the signal between the transmitter and the receiver travelled in a straight line with no obstructions it is known as LoS signals (dardari et al. 2009), e.g. as Tx and Rx1 in figure 1. NLoS signals are obtained when the signal must penetrate an obstruction, e.g. a wall, to reach the receiver. This could result in excess delay where the propagation time would be extended and the signal strength weakened, e.g. between Tx and Rx2. otherwise, the signal from the original path maybe completely blocked and the only reflected or refracted signals will reach the receiver, e.g. Tx and Rx3. In complicated environments, the received signal is almost always a mixture of LoS and NLoS signals. The problem of multipath arises as the signal characteristic of these signals are contaminated and each is different from the original signal.
Wireless signal-based ranging can be achieved by identifying the signal propagation time t, and the distance travelled is obtained through s = ct, where c is the speed of the signal and s is the distance. However, when signals come across obstructions, they may each be affected differently and the receiver could receive a cluster of LoS and NLoS signals arriving via different propagation path with varying signal strength. This causes problems as the receiver needs to extract the original signal to measure the true distance d. Usually the estimated distance d (t) is expressed as below: where b i is the bias caused by NLoS signals, i is a measurement noise that is generally Gaussian distributed. To examine the NLoS bias b i more closely, a received signal is expressed as where a d is the dP signal strength, d is its arrival time; a l , l is the signal strength and arrival time of the lth NdP signal, i.e. the multipath components (MPC). n(t) and i(t) are re garded as the noise and interference here. s(t) is the channel response to a transmitted signal pulse. The signal strength a l and time delay l are closely related to the material and the thickness of the obstruction as well as the travelling distance. However, the effects on measurement accuracy of different materials are not the main concerns in this study and this is further discussed in Section 4.1.
for accurate ranging, distinguishing the first signals from the MPC is essential. While the detection is possible for UWB signals with its high-time resolution and frequency spread, but NLoS is still a problem for UWB as it affects the original signal arrival time d and signal strength a d causing a bias in the ranging measurement, hence reducing accuracy (Kristem et al. 2014). oppermann, Hamaainen, andIinatti (2004) discuss the problem of NLoS signals in UWB systems and suggest a detection method based on signal strength confidence level by extracting the physical properties of signal multipath components. Benedetto and Giunta (2007) present a binary hypothesis test of the Rician factor of the received wireless signals to identify NLoS signals. UWB NLoS detection based on the kurtosis, mean excess delay spread and root-mean-square delay spread of the multipath channel statistics and signal-to-noise ration is discussed in Schroeder et al. (2007), Ismail et al. (2008), Blankenbach and Norrdine (2011). Marano et al. (2010) and Wymeersch et al. (2012) propose machine learning-based methods to classify received signals into LoS and NLoS signals. NLoS detection method based on statistical hypothesis testing are proposed in , Yan et al. (2013) where both time-and received signal strength-based UWB signal measurements are used. While some of the above approaches provide quite accurate identification, but a full channel impulse response is required in almost all of the methods which is inconvenient for real-time positioning based on simple mobile devices. Attempts of improving UWB indoor ranging and positioning performance are made by a proposed ranging likelihood and the analysis of indoor multipath situations (Lu, Mazuelas, and Win 2013;Meissner, Leitinger, and Witrisal 2014) which still requires the waveform features and indoor map information. on the other hand, detecting the ranging accuracy is more important that knowing whether it is LoS or NLoS for positioning purposes. Therefore, the method applied this paper will only try to detect the signal accuracy level.

Ranging measurement detection
The aim of this paper was to detect the quality of the ranging measurement and integrate the measurement into a collaborative positioning network along with the information of its quality as well. Therefore, measurements will not be forced into a category of either LoS or NLoS, but rather a factor indicating the probability of high accuracy. The ranging quality indicator (RQI) is applied here which is assigned to each received signal based on the received signal characteristics. The RQI will be detected based on the pattern of these features and output a value between 0 and 1 that indicates the level of error to be anticipated in the measurement, hence reflecting how close the measurement is to the truth.

Detection method
The Gaussian Process (GP) regression approach is applied to train and generate the RQI. GP is a machine learning technique which is regarded as a generalisation of the Gaussian probability distribution in the space of functions. Machine learning is considered as a set of methods that can automatically detect patterns in a large data-set and use this pattern to predict future data or perform other decision making (Murphy 2012). GP is a type of supervised machine learning approach as it generalises a mapping from inputs with known desired output which could then be used to predict an output for other inputs. As stated in Rasmussen and Williams (2006), GP assumes that the distribution over functions p(f (x 1 ), f (x 2 ), ..., f (x n )) is jointly Gaussian with some mean and covariance. It is a stochastic process that realises the generalisation of Gaussian probability distribution at each point of a certain range of space or time which may be defined by the mean function m(x) and covariance function k(x, x � ) (also known as kernel, a measure of similarity between x and x ′ ). Thus, GP is denoted as f (x) ∼ GPm(x), k(x, x � ), whereas To realise prediction based on GP, let D = {(x i , y i )|i = 1, 2, ..., n} be a set of training observations drawn from a noisy process, whereas is assumed to be an additive independent identically distributed Gaussian noise with variance 2 n . We derive the main predictive equations, where X is the training input matrix, y is the unknown function values for the training inputs or observed values. X * is a vector of test inputs, K is the covariance matrix which contains the covariance for each pair of training and test points. f * is the function value, i.e. the predicative output. The prediction performance of the GP is highly dependent on the chosen kernel, which to draw out the optimal prediction of inputs and function values, several free parameters that define the covariance function, known as hyperparameters, are determined from the training data by maximising the marginal likelihood, which is the marginalisation over the function values f, i.e. the integral of the likelihood times the prior The maximisation of the marginal likelihood is usually realised through maximising its logarithm term. If the hyperparameters are denoted as , then The parameters could then be estimated by any gradient-based optimiser. The hyperparameters are derived from the training inputs which is carried out by GP regression using the GPML toolbox in Matlab (Rasmussen and Nickisch 2013). once they are acquired, predictions can be carried out for further inputs. (3) To generate RQI values, UWB ranging data, which consists the range estimation and the signal characteristics, are collected forming the training data. for training purposes, the ranging error of each measurement is obtained, err r , and associated with an RQI following rules as below This rule is set based on the required measurement accuracy of the collaborative network where the constraint works best when ranging accuracy is within 3 m. As the ranging accuracy reduces, its effect on the constraint also decreases. Therefore, applying a ranging constraint with a measurement error of 5 m and an error of 8 m does not change the result significantly whereas the constraint effect will be massively changed if an error of 1 m is used instead of a measurement with an error of 0.5 m. Hence, the RQI of measurements with errors over 3 m decrease very quickly but then does not change much until it reaches an error of 15 m. Measurements are collected in several different situations explained below to train and evaluate this rule.

Collaborative weighting based on detected RQI
once the RQI for each measurement is detected, it can be applied as a weighting factor in a relative ranging-based collaborative positioning process, which is carried out between two moving users, regarded as rovers. each rover's step propagation and heading are estimated from low-cost inertial measurements and a relative ranging measurement is obtained to estimate the distance between them. An accurate ranging measurement would be able to constrain the two rovers so that they are in a relative geometry which follows the ranging measurements, hence minimising the system errors and other measurement errors of the constrained rover.
However, in reality, all measurements contain some level of error. Hence, when applying the ranging constraint, an uncertainty boundary is added to each measurement which indicates the anticipated error in the current measurement, as shown in figure 2. The real ranging measurement of Rover 2 is indicated by the black solid line, and the orange dashed line defines the uncertainty boundary. Given that the position of Rover 1 is accurate and reliable, the estimated position of Rover 2 should fall somewhere on the orange line. If it falls outside the threshold of the boundary, it would be forced into the boundary regardless of other measurements and minimising previous errors in the process. However, this relies on how trustworthy the defined uncertainty boundary is. While the ideal situation is that a small boundary is always given to minimise errors, we should beware of setting a threshold that is lower than the actual measurement error itself, as this constraint would be too "tight" and as a result, push the position of Rover 2 towards a wrong location. However, setting a threshold for the boundary that is "just right" can be a problem when the level of measurement error is always changing from epoch to epoch.
The detected RQI is used to adjust the constraint threshold based on real-time ranging measurements in the collaborative positioning algorithm. The RQI reflects the expected error level of the measurement based on received signal characteristics, which is then regarded as a factor which indicates how likely the ranging measurement is close to the true distance. As a measurement with an error over 3 m becomes less useful in constraining positioning errors thus the RQI of such measurements is less than 0.5 and reduces to 0 when the error reaches 15 m. Any measurement with error less than 3 m, is regarded as useful measurement that can provide some level of constraint on positioning errors, hence the RQI is given to be higher than 0.5.

Indoor ranging measurements
UWB ranging measurements are collected under different network settings to demonstrate the ranging quality of UWB units in an indoor environment which will also be used as training data. The units work with a frequency Hopped direct Sequence Spread Spectrum (fH-dSS) signal covering 4760 MHz to 6200 MHz with output power level of -41.3 dBm/MHz (Harmer, 2004). The implemented UWB system is an off-the-shelf system from Thales UK, which should incorporate precise timing and provide accurate positioning under normal circumstances (e.g. in open indoor areas where units are in LoS with each other) (Russell , 2013). Thus system and clock errors are assumed to be negligible. The trials are carried out in a modern office building and ranging estimations are achieved through time-based technique.
The full UWB network consists of two types of units: several static base units (BU) setup at known positions which make up the fundamental set-up of the UWB positioning network and mobile units (MU) which can be static or moving. The MUs receive signals transmitted from surrounding BUs in the network to work out its position based on Time-difference-ofarrival and final solution is adjusted using least squares. one of the BUs must be setup as a master BU to provide time synchronisation among the whole network, thus at least one BU must be set up in the network for the system to function properly. If a 3-d position is required, at least 4 BUs should be set up so the MU could work out its positions based on the measured ranges. The BUs should be distributed in the target area with good geometry, i.e. significant difference in height and if possible, form a circle around the area creating as much LoS as possible between the units to provide accurate ranging and positioning. Yet, this is not always possible in indoor environments and several factors are examined from the collected data to understand their correlation to ranging accuracy. Ranging Error: the difference in metres between the UWB ranging measurement and the truth (tracked by total stations). Ranging Difference: the difference in metres between the two MUs' ranging measurement. Data Strength (DS): the received peak signal strength of all signals in dB. Led Strength (LS): the received signal strength of the first arriving signal in dB.
The trial environment is as shown in figure 3, where the small rooms a longside of the corridors are ordinary office rooms. The two big rooms on the left is a meeting room and a lecture room. The space in the middle is the equipment store room with metal shelves and the garage is on the right-hand side of the building. An UWB unit of the set-up in the trial is shown in figure 4.

Ranging distance and error
To examine the ranging accuracy of UWB signals in complicated environments, three different scenarios between two rovers are carried out in the office building to examine the signal properties. As this is potentially to be used in a collaborative positioning system, thus we are more interested in the signal characteristics in a dynamic environment, hence only the measurements between the MUs are analysed here.
(i) Scenario 1 (denoted as S1): the only units applied are the master BU carried by Rover 1 and a MU carried by Rover 2 to collect ranging measurements between the two rovers. Rover 2 walks along the corridor next to the store room, while Rover 1 walks inside the store room in parallel with Rover 1 so that they are obstructed by a wall. At the end of the trial, Rover 2 stays at the bottom of the corridor, while Rover 1 comes out of the store room so the two rovers are in LoS of each other in the last few minutes. Generally, BUs, especially the master BU, must be static to provide positioning. However, this trial only examines the ranging performance in different system settings. In this case, the ranging performance between a moving MU and a moving BU is tested.
(ii) Scenario 2 (denoted as S2): the master BU is fixed in the central location indicated by the red triangle in figure 3, and two MUs carried by the two rovers are used to collect ranging measurements between each other. The two rovers walk in identical trajectory as the first scenario, the only difference is that for a period in the trial, both the wall and Rover 2 are placed between the two units to introduce further obstruction. The ranging performance between moving MUs is tested when only one BU exists to provide basic network synchronisation.
(iii) Scenario 3 (denoted as S3): the full network is set up and the two rovers each carry a MU to collect ranging measurements. The two rovers each start from a different position and follow the corridor around the central store room walking in opposite directions so that they do not follow each other at any stage during the trial. The ranging performance between moving MUs in a full but blocked network (the units are not always in LoS with other units in the network) is tested.
In each scenario, the ground truth of both rovers is continuously tracked and measured by three robotic total stations (TS), which are placed over the points indicated by blue stars in figure 3. each TS was able to connect to a GPS antenna through Bluetooth which was placed outside the building to received timing. Hence, all units are synchronised to GPS time and measured to a local grid coordinate system. The origin of the local coordinate system is indicated by the star in the circle. figure 5 shows the difference in the ranging measurement collected by the two MUs in S2. The internal structure of the building where the trials were carried out is quite complex. Hence making the UWB signals quite vulnerable and signal loss is experienced easily, shown as data gaps in figure 5. A large fluctuation in the ranging measurement can be seen at around 400 s when the body obstruction was introduced, and also at the end when the two rovers just come to LoS of each other. The measurements outside the fluctuation period are quite stable, i.e. varying around 0, showing that the units used in the trials give the same level of performance without system bias. However, large errors are brought into measurements when the environment changes unexpectedly and rapidly. Although the fluctuation reduces in time and the system is able to adjust the measurements for both LoS and NLoS environments as long as it is stable, but the measurement fluctuation still makes it hard for the system to extract ranging signal features such as a d and d . Hence, difficult to estimate the measurement accuracy.
The ranging error of Rover 2 in S1 and S2 is plotted against the ranging distance shown in figure 6 and 7. Measurements of S1 show no obvious correlation between the distance, and ranging error could be seen as the errors are clustered around the same level. S2 shows  the same pattern when the ranging distance is within 5 m. At around a distance of 5 m, the error increases dramatically which is actually due to the extra obstruction introduced, also shown in figure 5. Hence is irrelevant to the ranging distance at this point. However, the minimum errors increase slightly as the distance gradually increases over 6 m, although the change is not significant. But the error does not become larger than the error caused by obstructions. Hence, the type of obstruction dominates the level of error in the measurement when the rovers are close together. However, this work aims to estimate error levels not by identifying the obstruction, environmental factors or signal propagation properties, but simply from the received signal strength characteristics. This reduces prior training effort for the user and enables faster estimation. A histogram of the errors seen in these scenarios is plotted in figure 8, indicating that the errors follow the right half of a normal distribution. Hence, the Gaussian process can be applied to detect and assess the measurement error from received signals.

Ranging error and signal strength
dS and LS values along with the ranging error of all three scenarios are plotted in figure 9, 10 and 11. While the ranging error is a direct result of NLoS signals, it is always positively biased. In all three plots, we can see a clear pattern that lower dS and LS correspond to a large ranging error. A large difference between dS and LS also leads to large ranging errors, even temporary loss of data. The dS and LS values are lower in S3 as the two rovers are farther away during some of the periods of the trial which means more obstructions, e.g. more walls or body of the rover carrying the unit. These obstructions change rapidly during the trials, making it hard for the unit to adjust and causing large errors as well as data loss. This correlation between the measurements suggests the possibility of training for RQI based on dS and LS patterns and identifies the pattern that the training could rely on.  The mean, maximum and minimum ranging error of each scenario are listed in Table 1. As the modern building structure and metal shelves caused frequent signal obstruction and data loss, 79% of the collected data in Scenarios 1, 66% in Scenario 2 and 36% in Scenario  3 contained valid measurements and only those data would be used for error evaluation. only the data collected by Rover 2 are evaluated for consistency. of all the valid data, 85%, 71% and 65% of the ranging measurement error were within 1 m in Scenario 1, Scenario 2 and Scenario 3, respectively.
Results indicate that the measurement accuracy is closely related to the dS and LS values, as well as the difference between the two values. This pattern is applied to the RQI detection training, and {DS, LS, ΔDLS} is the training input indicating the measurement error level, where ΔDLS is the difference between the dS and LS value. Higher dS, LS values and smaller ΔDLS have a high probability of LoS signal hence produce an RQI closer to 1. Low dS, LS values and large ΔDLS lead to larger errors and produce RQI closer to 0.

Training the detection tool
All 5474 previously collected data are sorted for training the RQI detection tool and a 10-fold cross validation is used on the data-set to validate the training quality. Hence, 90% of the data are used as training, and the rest are used as test data each time. However, a small portion of the test data included invalid measurements which either contained data outage or obvious measurement outliers and could be used for training. The covariance function selected here is squared exponential (Se) covariance function that takes the form of where r = |x − x � |, is the characteristic length scale, which indicates the distance between function values where a significant change will take place. The Se covariance function is selected here as the GP with this function has mean square derivates of all orders, hence strong smoothness. Although this may not fit realistically with the actual model of indoor signals, but it is the best assumption when no further information is known to the system. In this case, the hyperparameters obtained in training are = ( , 2 n , 2 f ), where 2 f is the signal variance.
once the hyperparameters are trained, the remaining selection of the data, regarded as the test data, is input to predict the RQI for each set of measurement. As the signal strength indicators, i.e. dS and LS, and the true distance measured from the total stations are known for each input, the GP detection performance can be evaluated by comparing the detection output to the anticipated truth. figure 12 plots the detection value against the ranging error and figure 13 plots the detection against the anticipated RQI.
from the figures shown, we could see that the predicted output generally matches well with the "truth". What should also be noted is that according to the rules given, the ranging error which is continuous is quantised into several discrete categories, i.e. the RQI. However, during predication, the RQI output is continuous as the test input, the ranging error, is a real number which is continuous and the predicted RQI is not forced into one of the given categories but kept its original value rounding it to 1 decimal places. Thus, a small difference  between the predicted RQI and the anticipated truth is acceptable. Based on whether the detected RQI and the true RQI fall into the same category, an overall result of the detection shows that the possibility of Type I error, where a high accuracy measurement is assigned a low detection value, is 11%; the possibility of Type II error, where a low accuracy measurement is assigned a high detection value, is 6%. This trained detection tool is then applied in a collaborative positioning algorithm to set the constraint threshold.

Particle filtering for collaborative positioning
Multi-user ranging-based collaborative positioning minimises the errors and biases of each system within the collaborative network by constraining the rovers to a relative distance from one another (Jing et al. 2013). This constraint forces the users to fit into reasonable positions based on the measurements obtained from other sensors, e.g. inertial measurements. The proposed collaborative positioning algorithm is based on particle filtering (Pf) which integrates the ranging measurements of nearby rovers to a dead reckoning (dR) model. Pf estimates the system state through sequential Monte Carlo estimation based on a large number of particles which represe nt the probability density of the system state (Ristic, Arulampalam, and Gordon 2004). It is an efficient estimator to tackle non-Gaussian non-linear problems in tracking and positioning given sufficient particles. In Pf, the system state vector is as: where k is the time index, f k is the non-linear function of the state x k−1 and process noise v k−1 . The state vector x k is recursively estimated from observation z k : where h k is a non-linear function with noise measurement w k . Pf estimates the state x k at time k given the observations z 1:k up to time k. The system state is first represented with an initial probability density function (pdf ), known as the prior. during the prediction stage, the state is propagated based on a predication model to obtain the a prior pdf which is then updated from observation measurements to obtain the a posterior pdf of the current state. In reality, the true state pdf is impossible to obtain. Hence a discrete approximation to the density p(⋅) is represented by a cluster of particles that are drawn out based on importance sampling: where w i is the weight of the ith particle, x i ∼ q(x), i = 1, ..., N are particles that are generated from an importance density q(⋅). Therefore, the a posterior pdf p(x k |z 1:k−1 ) could be approximated from the selected particles. As N → ∞, the approximation should approach the true state representation (Arulampalam et al. 2002).

Collaborative positioning weighting scheme
In this particular Pf-based collaborative positioning (CPf), the state of each rover is propagated by a pedestrian dR prediction model. In a dR model, the movement of the user is defined by estimating the characteristics of each step taken by the user relative to the previous location, including the detecting the step, its length and the heading. for simplicity, the IMU only performs a step detection while the step length is set to constant value.
Step detection is achieved from cross-correlation between the current step acceleration measurements and a typical step acceleration measurement. The initial position and heading of the user is determined externally, usually an estimation based on building map or previous positioning results. The major problem in dR positioning is that the gyro drifts of the unit can grow very quickly. Hence, external measurements are required to constrain this drift and update the state pdf. Although the UWB measurement noise is assumed to be Gaussian, but random bias and disturbance can be experienced unexpectedly when navigating in an indoor environment. Pf is particularly useful in dealing with non-linear measurements found in large amount of random dR measurement errors when using low-cost inertial units. other non-linear measurements are also found when integrating different measurements, such as wall constraints and random errors seen in the relative ranging measurements caused by random disturbance. The implementation of both measurements are given below.
In basic CPf, any pair of particles of the two rovers that has a distance different to the measured range is given a lower weight or "killed", i.e. weight w i = 0. This works on the assumption that the current state of the rovers are not biased and the ranging measurement is accurate. However, neither is likely to be true. Therefore, the uncertainty boundary is added to each measurement to allow for biases in the rover states and the threshold of the boundary is given based on the expected accuracy of the ranging measurement. The proposed adaptive ranging constraint based collaborative positioning (ARCP) method is introduced here and basic steps of the algorithm are as below: (1) Initialisation: generate N particles around the initial position Rx 0 [x 0 , y 0 ], all particles are assigned an equal weight w i t = 1 N , indicating that each particle initially contributes the same amount in the position estimation; (2) Prediction: particles are propagated forward based on the dR model: whereas [x t ,ŷ t ] is the estimated position of time t , ŝ t|t−1 is the estimated step length taken from time t − 1 to time t, that is assumed to be sl with a uniformly distributed random noise U(−n s , n s ), t|t−1 is the measured heading with a heading bias b h and uniformly distributed random noise U(−n h , n h ); (3) Update and weighting: if wall constraint is available, any particles that cross a wall without going through a door will be killed, i.e. w m i = 0. Remaining particles are then constrained by the relative range measurement r j i obtained from Rx i to Rx j . The distances between the particles of the rovers are compared to r j i as following whereas pt denotes the particles of each rover, m indicates the mth particle of Rx i , n denotes the particles of Rx j . thr r is the threshold of the uncertainty boundary. At least one particle from Rx j should be within the threshold of r j i for pt m i to live. If not, particle pt m i is "killed"; this works the same way for constraint on Rx j . (4) Resampling: if the number of the killed particles becomes larger than a threshold, normally N 2 , new particles are regenerated from the live particles to replace and maintain a total number of N particles. (5) Return to step 2 or end iteration.
As shown in Section 4, the ranging measurement can be quite unstable in an indoor environment. Consequently, it would be unfair to kill off particles by the same constraint threshold throughout the entire positioning period. If there was a large bias in the ranging measurement and the constraint was too "tight", i.e. a small threshold, too many particles would be killed off. In this case, the particles that are close to the true position may not survive. However, if the constraint was too "loose", where the threshold is set to a large value, the outlier particles produced due to system noise and bias will not be discarded, resulting in large positioning inaccuracy. The threshold thr r therefore has a high impact on the algorithm performance. ARCP adjusts thr r according to the detected RQI following, Hence, a large RQI would lead to a small thr r , and vice versa. a is a parameter that adjusts the correlation between the RQI and thr r . The final threshold should always be larger than the detected accuracy to give better performance, as this allows for previous accumulated bias or biased estimations. It is set to a value between 1.5 and 3, i.e. 1.5 for a confident network condition and 3 when the signal is noticed to be unstable.

Collaborative positioning simulations
A series of simulations are carried out to demonstrate the effects of ARCP between two rovers with different range constraint settings in Matlab 2013b. In the first simulation, all measurements are simulated according to the anticipated system performance. A second set of simulation is carried out where dR propagation is based on measurements from a MicroStrain 3dM-GX3 Ⓡ -25 low cost inertial measurement unit (IMU) that is fixed onto the users' foot, shown in figure 14. The unit gyro bias is around ±18 • ∕hr and accelerometer bias is around ±0.004mg. Ranging measurements are obtained from UWB units that are fixed onto a pole and carried by the user. Both measurements are logged onto the same laptop which is carried by the user during the trial and post-processed by both CPf and ARCP in real-time mode to obtained position estimations.
(1) Simple Trajectory: In the first simulation, denoted as Sim1, the two rovers follow two simple straight lines that are perpendicular to each other for 80 epochs and ranging measurements are simulated at every epoch to perform collaborative positioning. Rover positions are obtained by the basic CPf and ARCP, respectively. Table 2 lists the positioning error of the two rovers for both CPf and ARCP.
(2) Indoor environment Collaborative Positioning: The second simulation, denoted as Sim2, is carried out in an office building environment with real data measurements.
(17) thr r ∝ a RQI Inertial measurements are obtained by attaching a low-cost IMU onto the rover's shoe and fed into the dR model. each rover carries a UWB MU to collect ranging measurements between each other and also to one of four static units that is set up at known locations around the building just to provide ranging. Rover 1 is tracked by a total station to provide the ground truth. Without corrections, the dR trajectory would be severely biased due to the gyro drift. The measurement data are postprocessed under four settings for comparison, the first is dR with wall constraint, second is CPf with wall constraint, third setting is ARCP with wall constraint and finally ARCP without wall constraint. figure 15 plots the positioning result of Rover 1 and figure 16 plots the positioning result of Rover 2 for dR and ARCP, the result of CPf is listed in Table 3.

Result analysis
The performance of the two simulations above are evaluated by their mean and maximum positioning error, which are listed in Tables 2 and 3. The ground truth of Rover 2 in Sim2 was provided by UWB positioning whose accuracy level is not sufficient to judge the accuracy of ARCP, therefore only the error for Rover 1 is given. In simulation 1, the overall positioning error is reduced by 34% when ARCP is applied. In simulation 2, the mean positioning error is reduced by more than 80% for Rover 1 comparing     ARCP to CPf and the maximum error reduces by 56%. While wall constraint is implemented to ensure that position e stimations do not end up in unreasonable locations, results show that by integrating relative ranging is sufficient to eliminate those outliers. The cyan lines in figure 15 and 16 show that wall constraint is insufficient to constrain inertial measurement bias as the estimated positions easily go through the wrong the door into the wrong room. However, this is immediately eliminated when collaborative positioning is implemented, even if no wall constraint is applied, as plotted in magenta lines. Relative ranging-based collaborative positioning is able to correct the inertial measurement bias as long as the ranging measurement is accurate enough to provide a suitable constraint. While it is impossible to always acquire accurate ranging, the positioning system can still benefit by knowing the expected accuracy level. The RQI detection method enables the user to detect the measurement accuracy level at the current state and adjust the relative constraint accordingly. Therefore a "tight" constraint could be performed if a high RQI is predicted, and a "loose" constraint performed for low RQI. By varying the constraint adaptively, errors could be minimised when accurate ranging is achieved and the system is allowed to propagate without too much interruption by following other measurements when low accuracy ranging is achieved.

Conclusions and future work
The indoor environment has always been difficult for accurate positioning where signals are easily distorted by the complicated obstructions. A relative ranging constraint-based collaborative positioning method is proposed in this paper which adjusts the relative constraint based on actual ranging accuracy level. The ranging performance of an UWB system is analysed in an indoor environment under different system settings. The collected ranging measurement consisted of the estimated distance and the signal strength, dS and LS. A pattern derived from the measurements is that low dS and LS, and a large ΔDLS usually indicates large measurement error. Based on this pattern, the measurements are applied as training data to a GP training tool and used to detect a r anging accuracy level indicator, the RQI. The RQI is provided to the collaborative positioning algorithm and introduces the concept of adaptive ranging-based collaborative positioning where the ranging constraint is applied adaptively in each epoch so that the relative range constraint threshold is set according to the detected ranging accuracy level, reflected by RQI.
The UWB ranging measurements are applied to the detection tool to achieve RQI. With 83% detection accuracy, this detected ranging quality indicator is implemented as a threshold adjustment factor in ARCP. The ARCP method improves positioning accuracy by more than 80% with real data. It is especially effective in reducing the outliers caused by inertial bias in positioning, eliminating the wall constraint which is usually required in Pf positioning algorithms and also reduces the number of particles needed for positioning which saves the computation cost. The overall positioning performance is enhanced and the positioning system becomes more robust by introducing the adaptive relative constraint. However, this approach currently can only be applied to constraint users on the same floor level, hence near 2-d scenario. As the rovers and transmitters change floor levels, the scenario would become more complex as the geometry becomes 3-d and the ranging measurements becomes a slope distance between rovers.
UWB system is employed in this work as this is currently the most suitable system to provide relative ranging between users with the required accuracy. for applications which require high reliability, such as for first responders or people with special needs, where dedicated network needs to be set up and applied, the accurate ranging measurements provided by UWB systems give promising results, which cannot be guaranteed by narrow band wireless signals. However, to apply such approach to the mass market, cheaper solutions need to be used. With further development of Bluetooth 4.0 and 5G Wi-fi, similar wireless signals should be able to be applied with same procedure. The relative ranging between rovers introduced here allows the system to be implemented in complicated indoor environments where the available measurements are changing. The collaborative positioning can bridge gaps when other absolute positioning measurements, e.g. GNSS and Wi-fi, are not available and provide continuous stable positioning solutions.