## 2 Problem Statement
To be noted, the matrix \(\mathbf{A}\) is singular, and the solution does not exist if all the neighboring nodes are collinear. If the measured distances are disturbed by measurement noise, the equalities in (1) and (2) would no longer hold. The problem of finding the unknown positions of the nodes is then approached by forming the residuals of the system and then minimizing a cost function of these residuals. In the following, we study different formulations of the estimation problem with noisy range measurements, harnessing different cost functions to minimize the localization error. They are  
Figure 1: Multi-drone/anchor localization scenarios. (_Left_): A set of UWB tags with known positions are used to track a set of drones. (_Right_): A drone or a set of drones with estimated poses are used to retrieve unknown positions of a set of fixed UWB tags. summarized below in (3)-(6) and will be thoroughly discussed under different conditions in the following sections. **Definition 1** (Problem 1). : _The optimal estimate of the unknown position of a node \(i\), \(\mathbf{x}_{i}\) having measurements \(d_{i,j}\) to nodes \(\mathbf{x}_{\mathbf{n}j}\), \(j=1\ldots k\) with known positions, is usually given by:_  
\[\mathbf{x}_{i}^{\star}=\operatorname*{argmin}_{\mathbf{x}_{i}\in\mathbb{R}^{3 }}\sum_{j=1}^{k}\bigl{(}\|\mathbf{x}_{i}-\mathbf{x}_{\mathbf{n}j}\|-d_{i,j} \bigr{)}^{2} \tag{3}\]  
This is a nonlinear optimization problem aimed at minimizing the sum of the squares of the residuals between the measured distances and the hypothetical distances based on the known location of nodes. **Definition 2** (Problem 2). : _An alternative formulation to the cost function (3) could be defined by the following to provide an optimal node location estimate:_  
\[\mathbf{x}_{i}^{\star}=\operatorname*{argmin}_{\mathbf{x}_{i}\in\mathbb{R}^{3 }}\sum_{j=1}^{k}\frac{1}{2}\Bigl{(}\|\mathbf{x}_{i}-\mathbf{x}_{\mathbf{n}j}\| ^{2}-d_{i,j}^{2}\Bigr{)}^{2} \tag{4}\]  
This still leads to a nonlinear, nonconvex optimization problem, aiming to minimize the quadratic error between the squared measured distances and the squared relative positions of the nodes. The formulations (3) and (4) do not explicitly take into account uncertainties. However, the nodes of known positions could be affected by uncertainties, and the acquired distances are also affected by measurement errors. In these cases, the previous problems are modified to include position and measurement errors and are formulated as follows:  
**Definition 3** (Problem 3). : _In the presence of positioning and measurement errors, the optimal estimate derived from (3) is given by:_  
\[\mathbf{x}_{i}^{\star}=\operatorname*{argmin}_{\mathbf{x}_{i}\in\mathbb{R}^{3 }}\sum_{j=1}^{k}\bigl{(}\|\mathbf{x}_{i}-(\mathbf{x}_{\mathbf{n}j}+\mathbf{e} _{pos})\|-(d_{i,j}+\epsilon_{d})\bigr{)}^{2} \tag{5}\]  
_where \(\mathbf{e}_{pos}\) and \(\epsilon_{d}\) denote the position and range measurement errors, respectively._  
**Definition 4** (Problem 4). : _The alternative formulation derived from (4) of the cost function while including position and measurement errors leads to the optimal estimate:_  
\[\mathbf{x}_{i}^{\star}=\operatorname*{argmin}_{\mathbf{x}_{i}\in\mathbb{R}^{3 }}\sum_{j=1}^{k}\frac{1}{2}\Bigl{(}\|\mathbf{x}_{i}-(\mathbf{x}_{\mathbf{n}j }+\mathbf{e}_{pos})\|^{2}-(d_{i,j}+\epsilon_{d})^{2}\Bigr{)}^{2} \tag{6}\]  
Localization by multilateration consists of solving one of the previous formulations of the optimization problems (3)-(6), which differ mainly by the cost functions used and by considering explicitly or not the uncertainties in the position of the anchor nodes and the range measurements. These formulations are of great importance and will impact not only the precision of the solution, but also the computation time and even the possibility of finding a solution to the localization problem.