Exploiting Redundancy for UWB Anomaly Detection in Infrastructure-Free Multi-Robot Relative Localization

Ultra-wideband (UWB) localization methods have emerged as a cost-effective and accurate solution for GNSS-denied environments. There is a significant amount of previous research in terms of resilience of UWB ranging, with non-line-of-sight and multipath detection methods. However, little attention has been paid to resilience against disturbances in relative localization systems involving multiple nodes. This paper presents an approach to detecting range anomalies in UWB ranging measurements from the perspective of multi-robot cooperative localization. We introduce an approach to exploiting redundancy for relative localization in multi-robot systems, where the position of each node is calculated using different subsets of available data. This enables us to effectively identify nodes that present ranging anomalies and eliminate their effect within the cooperative localization scheme. We analyze anomalies created by timing errors in the ranging process, e.g., owing to malfunctioning hardware. However, our method is generic and can be extended to other types of ranging anomalies. Our approach results in a more resilient cooperative localization framework with a negligible impact in terms of the computational workload.


I. INTRODUCTION
In recent years, there has been a growing interest in the development of anomaly detection in various applications, including fraud and fault detection in safety systems [1], healthcare [2], and autonomous robots [3].Anomaly detection, also known as foreign detection or outlier detection, is the process of finding anomalous patterns in a given dataset.It can be applied to different types of data, including numerical data, images, videos, audio, text, or time series data [4], [5].Many multi-robot applications are also at risk of being affected by anomalous data or byzantine agents which can disrupt the entire operation [6], [7].The attack can target visual sensors, communication sensors, and positioning and localization sensors such as lidars, GNSS, or ultra-wideband (UWB).In our recent work, we presented a decentralized method for anomalies and byzantine agent detection in multirobot systems using an external motion capture (MOCAP) system to determine the robot's location [8].In this paper, our objective is to use UWB technology for multi-robot relative localization while being able to detect byzantine robots that generate false or anomalous ranging information.Global Navigation Satellite Systems (GNSS), such as the Global Positioning System (GPS), are widely employed for accurate global positioning in outdoor environments.Nonetheless, GNSS cannot reliably perform indoors and may be disrupted by attacks, or by jamming signals at the receiver.Among the localization approaches in GNSS-denied and indoor environments, UWB technology has emerged as a robust solution for relative localization and state estimation in multi-robot systems [9].A UWB-based system could replace expensive and complicated MOCAP systems and achieve centimeter-level localization accuracy for mobile robots.Fixed anchors and mobile tags are the two types of nodes used in UWB localization, while time of flight (ToF) and time difference of arrival (TDoA) are two popular methods for ranging measurements [10].
In this paper, a multi-robot cooperative positioning system employs UWB nodes in each robot to achieve robust relative localization in GNSS-denied environments through information sharing.For UWB ranging, we rely on time-of-flight (ToF) measurements between all pairs of nodes.Trilateration or multilateration algorithms can be used to determine the position of the tags [11].In 2D localization, which relies on at least two nodes to determine the tag's position, the estimated positions might slightly vary depending on the reference nodes used.Using all available nodes, we propose a multiconfigurational localization method to determine optimal positions and make them resilient to fixed anchors.The core idea is to exploit redundancy in terms of the ways in which the relative positions can be calculated.This is possible because a higher number of ranges are measured than the minimum needed to ensure a unique solution in the relative localization problem (except for transaltions, rotations and mirror solutions).
Numerous research has been conducted in the UWB relative localization systems in terms of obtaining robust and reliable localization performance in swarms of robots.However, wireless networking makes multi-robot systems vulnerable to various types of attacks, so the UWB ranging mechanism is not immune to ranging attacks, such as malicious interference, sensor failure, timing error, or jamming, among others.In multi-robot cooperative localization, it is crucial not only to detect the anomalous pattern but also to identify and eliminate byzantine robot that can tamper with their ToF measurement, manipulating the distance measurement and creating false ranging information for other nodes [12].
Statistical-based approaches in related works, such as Kalman filters [13], detect outliers and estimate normal values in UWB ranges.However, in this study, the anomaly is a UWB transceiver (robot) that may generate a normal but altered data pattern.We propose a robust anomaly detection framework based on the fusion of all possible position configurations using different reference nodes.We developed our code based on ROS 2 and verified the proposed approach in real-world robot navigation.Our proposed method identifies unreliable UWB node at each time stamp and eliminates them from the cooperative localization pipaline within the multi-robot system.In this contribution, we calculate the least square error of the reference node's corresponding configurations and the dispersion of the remaining configurations after applying fixed-UWB range matching.
The remainder of this document is organized as follows.In Section II, we review related works for UWB relative localization and anomaly detection in robotics.Section III describes our methodology for cooperative localization and the detection of abnormal UWB data and robots.Section IV describes the experimental results.Finally, Section V summarizes the work and outlines future directions.

II. RELATED WORK A. Anomaly Detection in Robotics
Detection of anomalies in robotics, such as unusual data patterns [14], abnormal behaviors, or abnormal sensors, can broadly be divided into two areas: self-monitoring and group monitoring.In self-monitoring approaches, each robot detects anomalies independently.Meanwhile in group-detection approach, multiple robots are involved in detecting malicious data or byzantine agents [8].In both scenarios, knowledgebased approaches typically learn the distribution of normal data in order to make the model robust to abnormal data.In [15], a simple autoencoder framework based on reconstruction error was presented to detect anomalies in trajectory data.
Such approaches require sufficient samples for the training data.

B. UWB-based Localization in Mobile Robots
UWB has been widely adopted in robotics and autonomous field and its applications include global or relative localization and wireless mesh sensor networks for situated communication [16].UWB can significantly benefit localization in the robotics field, particularly in GNSS-denied environments [17], seamlessly transition between indoor and outdoor environments while keeping centimeter-level global or relative position accuracy [18].Most of the UWB positioning solutions, both commercial and in academia, are based on fixed anchors in known locations.Some studies are focusing on utilizing various approaches to improve localization accuracy.In [19], the authors applied Long Short-term Memory (LSTM) to estimate the user position based on anchors and achieved comparable accuracy to traditional approaches including triangulation.More recently, relative localization has gained traction within multi-robot collaborative localization problems as it enables higher degrees of flexibility and infrastructure-free deployments [20].With multiple UWB transceivers mounted in each robot, relative positions among robots can be estimated [21] for various applications including autonomous docking [22], collaborative scene reconstruction [23], and others.By integrating UWB with other sensors including visual odometry, and GNSS, the robots can obtain more accurate and robust relative positions [24], [25], [26].

C. UWB Anomaly Detection
Outliers and malicious data are crucial factors that can significantly affect the accuracy of UWB-based positioning algorithms.To boost the accuracy and reliability of localization, many researchers have proposed various solutions to detect and address outlier data in both line-of-sight (LOS) and non-line-of-sight (NLOS) conditions.For example, the authors in [27] used an extended Kalman filter (EKF) for sensor fusion, and outlier detection based on residual error on UWB ranges at each time step.In [28], an anomaly detection approach is presented for UWB indoor positioning based on Gaussian Distribution (GD) and Generalized Gaussian Distribution (GGD) algorithms.This paper has used the variance of the estimated distance and the power of the first path to classify NLoS environment.In another study [11], authors proposed an anomaly detection treatment using the derivatives of the mean function of a UWB range time series to denoise and correct dropouts and outliers.
In summary, most existing approaches look for out-ofdistribution data.Such statistical outlier detection methods are not ideal for anomalous agent detection problems, as large numbers of data need to be analyzed with a high computational load and may not detect faults immediately.For example, individual range distributions might be nominal to a LOS measurement but shifted or biased.To approach this issue, we present instead an approach where we exploit redundancy in ranging measurements and perform a statistical outlier detection at the multi-robot system level rather than invidudal measurement level.

2
; pose [r] = mean p [r]   N ×(N −1) 2 ; III. METHODOLOGY This section presents details of the multi-robot cooperative localization approach we present for an infrastructure-free (or anchor-free) anomaly-resilient relative localization.We also compare the anomaly detection process with multilateration to the use of a gradient descent algorithm.

A. Hardware
In the experiments, we used eight TurtleBot4 Lite mobile robot platforms built on top of the iRobot Create 3 base, denoted as R i, i∈{1,2,3,4,5,6,7,8} .Each of these robots was outfitted with a Qorvo DWM1001 UWB transceiver that had custom firmware installed.We developed and deployed custom firmware for the DWM1001 modules, enabling them to function as active nodes.To gather ranging measurements, we programmed the UWB transceivers to repeatedly measure the ToF between each pair of nodes.Within the experimental arena, the robots move around while an OptiTrack motion capture (MOCAP) system provides accurate ground truth information to verify the estimated relative states of each robot.The operating area is approximately 8 meters wide, 9 meters long, and 5 meters high (see Fig. 1).Within this area, we positioned two static nodes, R 1 and R 2 , and six mobile robots, denoted as R i, i∈{3,4,5,6,7,8} .The purpose of the static nodes is to provide a common orientation reference for comparing different relative localization approaches.

B. UWB-Based cooperative Localization
In the remaining portions of this paper, we use the following notation.N robots are considered, with their positions indi- N ×(N −1) 2 ; {f inal enm} N ×(N −1)

2
; Output: Anomaly UWB node(s) : anomaly , i ; sd ← standard deviation p [r]   N ×(N −1) 2 ; sd ← standard deviation p [r]   N ×(N −2) 2 ; if sd − sd > threshold then anomaly=i cated by p i , with i ∈ {1, ..., N }.Based on the time of flight of a message, ToF localization measures the distance between two nodes by exchanging messages between them and can be computed following Eq.( 1): where T init is the time measured between the instant when a ranging request is initiated by a given node to another, and until the reply from the latter is received at the former.With T res we denote the time it takes the receiver to receive, process and return the message.Using this information embedded in the response message, we can determine the distance between the two nodes.
In our proposed cooperative localization method, each point's position p i is determined based on all possible base anchor pairs in the system.Let p nm [r] be the layout generated by each base anchor pair n and m.Each target robot's position in this layout is calculated using the triangulation technique in which the first base anchor is assumed to be located at the origin (0, 0), and the second one, at a known distance d along the x-axis (d (n,m) , 0).
As this technique finds two possible intersection points, according to Eq. ( 3), the distance between the first target point (robot) and the next points is taken into account to eliminate one of the intersection points based on the distance error.The generated layouts are later transferred based on the two fixed nodes for a common orientation reference.Figure 2 shows three different layouts generated by various pair base nodes.
Once all layouts are generated, the robots' final positions can be defined as shown in Algorithm 1.In the first step of the  matching function, average positions are used to calculate the minimum least square error (LSE) in shifted layouts.As the objective is to detect the anomaly, we linearly shift the layout in three dimensions x, y, and θ, to align all configurations.By doing so, the layouts will be robust against errors caused by the base nodes' ranging error.Final positions are estimated based on configurations with the lowest least squares error (LSE).

C. Identification of Anomaly Nodes
During the cooperative localization step, the final layouts and their LSE were computed.In order to identify anomalous nodes, each individual node's error is determined based on the N − 1 configurations in which it has been involved.Whenever the error of an anchor exceeds a certain threshold, all related configurations to that anchor are removed.Fig. 2 (c) illustrates how a configuration is developed using an anomaly as a base node.It is possible to identify more false anomalies along with true anomalies when two nodes are involved in developing a wrong configuration.In order to address this, the standard deviation of the positions of each anchor is measured after removing the related configurations of each potential anomaly: Where N is the number of UWB nodes.Then the obtained sd is compared to the original layouts to assess the effect of each potential anomaly.At this point, it is also apparent that anomalies have the highest dispersion.The anomaly detection process is summarized in Algorithm 2.

D. Gradient Descent Optimization
Gradient descent as an optimization algorithm has been used to reduce the loss function in various models.The goal of gradient descent in UWB localization is to position the nodes by minimizing the distance error [29].The basic idea behind gradient descent is to iteratively update the positions by taking a step in the opposite direction of the gradient.By iterating this process, gradient descent gradually converges to final positions that minimize the error function.Gradient descent requires initial parameter values to start the optimization process.For the convergence speed and stability of the algorithm, the initial reference system for the optimization process has been calculated using the UWB collaborative localization method described in subsection B. After the anchors are initialized, their positions are modified by minimizing the loss function.The loss function is defined as the difference between points Each of the data points represents the position calculated using a single pair of nodes for the origin and x-axis orientation.All the estimates are then rotated and shifted as needed for comparison.
p i and p j reported UWB distance d (i,j) , and their estimated 2D distance (5): Figure 3 illustrates how each point coordinates with other nodes to be located at an optimal position based on the loss function.In Fig. 3 (b), it is shown that with the gradient descent method, anomalies impact also other nodes' positions regardless of the base nodes, as the global error is minimized, with anomalies generating a non-convex cost function.

IV. EXPERIMENTAL RESULTS
In this section, we focus on the results of experiments carried out to validate the functionality of the proposed methods.First, we evaluate the viability of the proposed cooperative localization framework on normal UWB ranges in comparison to the optimized positions using the gradient descent algorithm.Then, we assess the behavior of these methods in the presence of anomalies.

A. cooperative Localization with Nominal Ranging
The findings of this study regarding the trajectory error of the multilateration method based on the anchor-free cooperative framework for normal data for different agents are presented in Fig. 4. Specifically, the performance of the multilateration method was evaluated and compared with the gradient descent optimization technique.Through the implementation of gradient descent, the position of each anchor was optimized, which resulted in a slight reduction in the total error as compared to the multilateration method.However, it is worth noting that the computational time required by the gradient descent optimization technique is higher than that of the multilateration method.Therefore, while the gradient descent optimization technique may offer a slight improvement in positioning accuracy, it may not be the most practical approach in scenarios where computational efficiency is a critical consideration.As an example, Figure 6 (a) provides the trajectory results of both methods for the normal dataset.During the data acquisition, we wanted to study whether the anomaly would be detected independently of having LOS or NLOS ranging conditions.Therefore, the trajectories of the nodes are generated in a way such that Node 5 range measurements suffer of NLOS conditions significantly more than others.

B. Anomaly Detection
The multilateration method proposed in this study utilizes linear transformations and shifts for all configurations.As a result, the estimated distances between nodes remain fixed at each timestamp, enabling the use of dispersion-based anomaly detection techniques to detect any irregular layouts or nodes.Figure 5 presents a clear visualization of the node distribution at a specific timestamp.It is evident from subfigure (a) that the anomalous node was transmitting erroneous UWB ranges to all nodes, resulting in a wide distribution of positions.
In the context of detecting anomalies, gradient descent minimizes the distance error between the predicted values and the actual values of each node.As a result, the positions of each node from different configurations have converged in a way that leads to similar distributions for all nodes, including the anomaly node.This means that, at each timestamp, the anomaly node may not stand out as being significantly different from the other nodes, as shown in subfigure (b). Figure 6.(a) and (b) illustrate the calculated trajectory of a normal node in the absence of an anomaly and disturbed by an anomaly, respectively, using both the proposed multilateration and gradient descent techniques.In Subfigure (c), anomaly detection and elimination results are shown using both methods, while subfigure (d) shows slightly different results when multilateration anomaly detection is followed by gradient descent optimization for positioning.Figure 7 also displays the trajectory error of all agents for both methods.Notably, in the case of anomalies, the gradient descent algorithm yields a higher error at each node and also results in a larger total error.
In the confusion matrix, in figure 8, we evaluated the performance of both methods with and without the anomaly.As previously discussed, both techniques perform similarly, with a balance between speed and accuracy when dealing with normal data, marked as None in the matrix.However, when it comes to detecting anomalies, multilateration provides better accuracy, and the false negative rate of the gradient descent technique is high, indicating that the model is missing a significant number of anomalies.

V. CONCLUSION AND FUTURE WORK
This paper proposes a novel approach to detecting anomalies in UWB ranging in mobile robots by exploiting redundant localization data.Specifically, throughout the paper, we have studied the problem of identifying anomalous nodes in a multi-robot system.The anomalies can be caused by byzantine agents, due to either malicious behavior or hardware or timing problems.Both multilateration and optimizationbased methods are typical in the literature in terms of relative localization estimation.Despite the higher accuracy of optimization methods, we show in this study how leveraging redundancy allows for multilateration methods to be more robust in identifying anomalies.Our approach consists in calculating relative positions with different subsets of ranging data, with results that can then be compared to each other.In comparison, a gradient descent method analyzed in the paper that minimizes global error masks the anomalies instead.Once the anomalous nodes are detected, however, optimizationbased methods can be used to increase the accuracy of the relative localization.Overall, our experiments with multiple real robots show that the proposed method works and clearly outperforms anomaly detection based on a gradient descent method for relative localization.
In future work, we will study different types of anomalies.We are particularly interested in analyzing the performance of this method for NLOS ranging detection, specially when only a subset of ranges from a given node present anomalies.

Fig. 1 :
Fig. 1: Illustration of the experimental arena and customized Turtlebot 4 robots used in the experiments.Here we show in red the range measurements that are inaccurate, with nominal ranges in green.

Fig. 2 :
Fig.2: Illustration of node positions calculated using the multilateration method.The blue points represent normal nodes, while the red node generates anomalous ranges.The dotted red lines illustrate noisy UWB range measurements generated by the anomaly node.Subfigures (a) and (b) are configurations generated using two different pairs of normal nodes as the reference basis, while in (c) one of the reference nodes is the anomaly.

Fig. 3 :
Fig. 3: Illustration of calculated positions using gradient descent method in (a) normal nodes, and (b) in the existence of anomaly.

Fig. 4 :
Fig. 4: Multilateration and gradient descent-based trajectory error for (a) each individual node, and (b) the average error for normal dataset.The error distribution is significantly larger in Node 5 due to repeated NLOS conditions during the experiments.

Fig. 5 :
Fig.5: Example of estimated positions, from a single set of measurements, using MLAN (left) and GD (right).The data includes anomalies.Each of the data points represents the position calculated using a single pair of nodes for the origin and x-axis orientation.All the estimates are then rotated and shifted as needed for comparison.

Fig. 6 :Fig. 7 :Fig. 8 :
Fig.6: Estimated trajectories of a normal agent (node) using multilateration and gradient descent methods in the (a) absence, (b) presence of an anomalous node, (c) after removing the anomalous layout by each method, and (d) after removing the anomaly and optimizing the positions by gradient descent.