Open Access
This article is

- freely available
- re-usable

*Sensors*
**2019**,
*19*(11),
2627;
https://doi.org/10.3390/s19112627

Article

Robust Least-SquareLocalization Based on Relative Angular Matrix in Wireless Sensor Networks

College of Communications Engineering, Army Engineering University of PLA, Nanjing 210042, China

*

Correspondence: [email protected]

^{†}

These authors contributed equally to this work.

Received: 8 May 2019 / Accepted: 3 June 2019 / Published: 10 June 2019

## Abstract

**:**

Accurate position information plays an important role in wireless sensor networks (WSN), and cooperative positioning based on cooperation among agents is a promising methodology of providing such information. Conventional cooperative positioning algorithms, such as least squares (LS), rely on approximate position estimates obtained from prior measurements. This paper explores the fundamental mechanism underlying the least squares algorithm’s sensitivity to the initial position selection and approaches to dealing with such sensitivity. This topic plays an essential role in cooperative positioning, as it determines whether a cooperative positioning algorithm can be implemented ubiquitously. In particular, a sufficient and unnecessary condition for the least squares cost function to be convex is found and proven. We then propose a robust algorithm for wireless sensor network positioning that transforms the cost function into a globally convex function by detecting the null space of the relative angle matrix when all the targets are located inside the convex polygon formed by its neighboring nodes. Furthermore, we advance one step further and improve the algorithm to apply it in both the time of arrival (TOA) and angle of arrival/time of arrival (AOA/TOA) scenarios. Finally, the performance of the proposed approach is quantified via simulations, and the results show that the proposed method has a high positioning accuracy and is robust in both line-of-sight (LOS) and non-line-of-sight (NLOS) positioning environments.

Keywords:

wireless sensor networks; least-squares localization; convexity; relative angular matrix; non-line-of-sight## 1. Introduction

In recent years, positioning and navigation technology has been playing an increasingly important role in many applications, such as public safety, law enforcement, rescue operations, traffic management, inventory tracking, home automation, etc. At the same time, location-based services also have significant commercial value [1]. The Global Navigation Satellite System (GNSS) is the most widely-used navigation and positioning technology, providing services that are suitable for most applications in an open environment [2]. However, the GNSS might fail to provide reliable services due to interference and in some challenging environments such as cities, forests and indoors, due to the weakness of GNSS signals.

An effective way of solving this problem is to supplement and enhance GNSS with terrestrial positioning systems. At present, there are several positioning systems, including cellular-based positioning, WiFi positioning, and ultra-wideband-based (UWB-based) positioning systems. In particular, with the development of large-scale multiple-input and multiple-output (MIMO) systems, positioning based on mmWave communication that is becoming an emerging research focus has also received increasing attention [3,4].

The sensors in the terrestrial system constitute a positioning network, and we are interested in locating the sensors based solely on measurements from the multi-target scene. Based on the nodes’ exchange measurements and other data, the WSN positioning scenarios can be divided into cooperative and noncooperative. Compared with traditional positioning methods, cooperative (also known as collaborative) positioning has important research and application significance. For instance, cooperative positioning of connected vehicles that effectively utilizes the relative observations from the vehicle-to-vehicle (V2V) devices has become a significant trend of future cooperative intelligent transportation system (ITS) applications [5]. Its advantages have been confirmed theoretically and algorithmically [6,7]. The analysis of Fisher information can show that nodes can obtain better positioning accuracy and availability in cooperative scenarios [8].

For various ground systems, the primary positioning methods can be divided into four categories, among which the distance-based time of arrival (TOA) and time difference of arrival (TDOA) positioning methods are more common [9]. At present, various classic algorithms for cooperative positioning are available, such as maximum likelihood (ML) estimation [10], extended Kalman filter (EKF) [11], particle filter (PF) [12], etc. These algorithms use the minimum mean squared error (MESE) as the evaluation criterion of estimation, and under certain conditions, they are essentially equivalent to the LS estimator. For instance, when the ranging error has a Gaussian distribution, the ML algorithm is equivalent to the LS estimator.

#### 1.1. Related Works

When estimating the location of user nodes, it is necessary to select a reasonable initial value. Unfortunately, sometimes, there is a problem with initial value sensitivity when the algorithms are used. In addition, the NLOS propagation error of the signal is also an important factor affecting the positioning accuracy. Thus far, some efforts have been made to solve these problems. By way of observation, if measurements based on the received signal strength (RSS) and angle of arrival (AOA) are considered as the auxiliary positioning methods, the NLOS effect can be suppressed by the algorithms, and the positioning accuracy can be improved [13,14,15,16]. In general, hybrid positioning methods with multiple measurement methods tend to have higher positioning accuracy and be more robust than those based on a single measurement. The localization based on mmWave communication is a hybrid positioning method, but differs from the traditional approach. Its advantage lies in the unique structure of the MIMO systems, so it can determine the position of targets using only one base station by measuring the angles of both the transmitted and received signals [17]. This scheme reduces the cost of base station deployment, but also has apparent disadvantages. One major problem is the diffuse reflection effect of the signal, which causes a higher angle measurement error. For this reason, the positioning results will not be accurate; this topic remains to be studied, and the related improvements are yet to be attained [18,19].

As for the algorithms, a variety of robust positioning algorithms are available. The localization technique based on multidimensional scaling (MDS), which was first proposed by Shang et al. [20], offers a new solution of node localization. Recently, several localization methods related to the classical MDS method have been applied to sensor networks. Forero and Giannakis presented a robust multidimensional scaling based on regularized least squares [21]. Focusing on the problem of localization in mixed LOS and NLOS scenarios, a novel localization algorithm called the Gaussian mixed model based non-metric multidimensional (GMDS) was proposed [22]. The advantages of MDS are that one can obtain actual positions between nodes by setting only a few anchor nodes; besides, the anchor nodes’ deployment has no strict restriction. However, it is unreliable in large-scale networks with sparse connectivity. The work of Destino and Abreu transformed the original WLS function into a convex one by introducing the Gaussian kernel function and optimizing the smoothing parameters [23]. In the literature [24,25], the problem has been formulated by applying robust statistics techniques on squared range measurements. This provides the opportunity to find the estimate efficiently. However, this formulation is not optimal in the ML sense [23]. Another class of methods is based on the convex relaxation technique. The paper [26] derived a maximum likelihood estimator for Laplacian noise and relaxed it to a convex program by linearizing and dropping a rank constraint. Soares et al. [27] set forth a convex underestimator of the maximum likelihood cost for the sensor network localization based on the convex envelopes of its parcels. At the same time they capitalized on the robust estimation properties of the Huber function and derived a convex relaxation [28]. It is known that the semidefinite programming (SDP) algorithm is one of the most used methods, which also transforms the position model into a convex optimization problem by applying the convex relaxation technique [29,30,31]. These approaches can not only limit the errors caused by the NLOS effect, but also make the cost function convex. In other words, they are insensitive to the initial value’s selection. However, the downside of these algorithms is that the estimation accuracy will decrease slightly. Besides, other approaches such as the parallel projection method (PPM) [19,32], projection onto convex sets (POCS) [33,34], etc., have been proposed. These two methods turn the LS cost function into a convex one. At the same time, the PPM can be used in the distributed cooperative scenario, which significantly reduces the pressure of information interaction between the two nodes. An outlier detection method was proposed by Wang et al. [35] based on the maximum entropy principle and fuzzy set theory.

#### 1.2. Contributions

It is known that the LS cost function is nonlinear and nonconvex in the global region. We consider the location result of an iterative algorithm depending on the selected initial value if the function has more than one local optimal point, and it seems that the initial value selection is associated with the convexity of the cost function. Existing studies analyzed the LS source localization problem to determine the condition of the function being convex [36,37]. Similarly, for WSN localization, the convexity or the number of local extremum points seems to relate to the quantity of targets and the ranging error. To explore this problem further, we perform a study of the LS model for WSN localization to understand theoretically how the targets and the ranging error affect the extremum point. The major contributions of the paper are as follows:

- A sufficient and unnecessary condition for the LS cost function to be convex is proposed and proven for WSN positioning.
- We define the relative angle matrix for both noncooperative and cooperative scenarios and show that the LS function can be transformed into a globally convex function if all the targets are located inside the convex polygon formed by its adjacent nodes.
- A robust algorithm that detects the relative angular matrix is proposed for WSN localization. Additionally, we improve the algorithm by using angle constraints so that it can be used in both the AOA/TOA and TOA positioning methods, which extends the applicability of the method.

It is worth noting that with the development of MIMO technology, the acquisition of ranging information and angle information between two nodes becomes easier, as the technology provides hardware and technical support for the measurement of the relative angular matrix. On the other hand, the position of the virtual anchors can be calculated, so mmWave positioning can be transformed into an AOA/TOA positioning model in the traditional sense, and the null space algorithm improved in this paper can be used to solve the position.

The rest of the paper is organized as follows. In Section 2, some basic definitions and model descriptions are given. In Section 3, we analyze the convexity of the unconstrained LS positioning model and derive a sufficient and unnecessary condition for the function to be convex. In Section 4, we first provide the definition of the relative angular matrix, then subsequently prove some important properties, and propose a novel null space algorithm by adding the angle constraint. We perform a numerical simulation that aims to verify the correctness of the proposition and evaluate the performance of the proposed algorithm in Section 5. Finally, we conclude the paper in Section 6.

## 2. Definition and Scenario Description

#### 2.1. Definition of the Nodes and Links

In the wireless network location scenario based on the TOA method, we assume there are M targets and use the set ${\mathcal{F}}_{c}=\left\{{T}_{1},{T}_{2},\dots ,{T}_{M}\right\}$ to enumerate them. The real coordinates of a target are ${\mathit{x}}_{j}\in {\mathbb{R}}^{\eta},\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}1\le j\le M,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}j\in {\mathbb{N}}^{+}$, where $\eta \in {\mathbb{N}}^{+}$ is the Euclidean spatial dimension of the location scene. There are N anchors, which are represented by the set ${\mathcal{F}}_{a}=\left\{{A}_{1},{A}_{2},\dots ,{A}_{N}\right\}$, and their real coordinates are ${\mathit{s}}_{i}\in {\mathbb{R}}^{\eta},\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}1\le i\le M,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}i\in {\mathbb{N}}^{+}$. Let the set of all node records be ${\mathcal{F}}_{t}$; then, ${\mathcal{F}}_{t}={\mathcal{F}}_{a}\cup {\mathcal{F}}_{c}$. Assume that there is a total of L ranging links in the positioning scenario and the set of links is $\mathcal{L}=\left\{{l}_{1},{l}_{2},\dots ,{l}_{L}\right\}$. In the cooperative scenario, the ranging links can be divided into two categories: that of ranging links between targets and anchors (AT links) and that of cooperative ranging links between two targets (TT links). The set of all distance observations is denoted by ${\mathcal{D}}_{t}$, the set of AT links by ${\mathcal{D}}_{a}$, and the set of TT links by ${\mathcal{D}}_{c}$. Obviously, we have ${\mathcal{D}}_{t}={\mathcal{D}}_{a}\cup {\mathcal{D}}_{c}$, ${\mathcal{D}}_{a}\cap {\mathcal{D}}_{c}=\varnothing $, $\left|{\mathcal{D}}_{t}\right|=L$, and $\left|{\mathcal{D}}_{a}\right|=N$. Let ${d}_{{K}_{i}{K}_{j}}$ and ${\widehat{d}}_{{K}_{i}{K}_{j}}$ be the real and estimated distances between the nodes ${K}_{i}$ and ${K}_{j}$.

#### 2.2. Definition of the Errors

In the TOA positioning method, since the signal is affected by noise, the multipath effect, and the NLOS effect during propagation, the observed value is not the real distance between the two nodes, and there usually exists a ranging error. Let $\epsilon ={\left[{\epsilon}_{1}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{\epsilon}_{2}\dots \phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{\epsilon}_{L}\right]}^{T}\in {\mathbb{R}}^{L}$ be the ranging error vector, where ${\epsilon}_{i}$ represents the error on the $i\mathrm{th}$ link. In the LOS environment, the ranging error is caused entirely by noise, which usually follows a Gaussian distribution with a mean of zero and a constant variance. Here, we denote it by ${\epsilon}_{los}$. In the NLOS environment, besides the noise, there also exists a positive deviation that follows the Gaussian distribution with both the mean and variance being constant. Here, we denote it by ${\epsilon}_{nlos}$. Then, the ranging error can be modeled as follows:
where ${\epsilon}_{los}\sim N\left(0,{\sigma}_{los}^{2}\right)$, ${\epsilon}_{nlos}\sim N\left({\mu}_{nlos},{\sigma}_{nlos}^{2}\right)$, and ${\mu}_{nlos}>0$.

$${\epsilon}_{i}=\left\{\begin{array}{cc}{\epsilon}_{los},\hfill & \mathrm{if}\phantom{\rule{4.pt}{0ex}}\mathrm{the}\phantom{\rule{4.pt}{0ex}}i\mathrm{th}\phantom{\rule{4.pt}{0ex}}\mathrm{path}\phantom{\rule{4.pt}{0ex}}\mathrm{is}\phantom{\rule{4.pt}{0ex}}\mathrm{LOS}\hfill \\ {\epsilon}_{los}+{\epsilon}_{nlos},\hfill & \mathrm{if}\phantom{\rule{4.pt}{0ex}}\mathrm{the}\phantom{\rule{4.pt}{0ex}}i\mathrm{th}\phantom{\rule{4.pt}{0ex}}\mathrm{path}\phantom{\rule{4.pt}{0ex}}\mathrm{is}\phantom{\rule{4.pt}{0ex}}\mathrm{NLOS}\hfill \end{array}\right.$$

In the AOA method, we assume that there are observation errors in the relative angle matrix $\Omega $, which will be defined in the fourth part of this paper. Hence,
where $\tilde{\Omega}$ represents the observation of the relative angular matrix and $\Delta $ is the error matrix, an element ${\delta}_{ij}$ of which follows the Gaussian distribution ${\delta}_{ij}\sim N\left({\mu}_{\alpha},{\sigma}_{\alpha}^{2}\right)$.

$$\tilde{\Omega}=\Omega +\Delta $$

#### 2.3. Noncooperative Scenario Description

In the noncooperative localization scenario, there are M targets, and there is no link between any two targets. Consider target ${T}_{j}$; the target’s real and estimated positions are ${\mathit{x}}_{j}$ and ${\widehat{\mathit{x}}}_{j}$; then, the distance can be given by:
where ${\parallel \xb7\parallel}_{2}$ represents the Euclidean distance between two nodes. In the noncooperative scenario, there are N ranging links that are denoted by ${l}_{1},{l}_{2},\dots ,{l}_{N}$, respectively. Let ${d}_{i}$ and ${\widehat{d}}_{i}$ be the real and estimated distances, corresponding to link ${l}_{i}$. Then, we can assign the values as follows:
where $1\le i\le N,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}i\in {\mathbb{N}}^{+}$ and ${q}_{ja}$ is the quantity of all links directly connected to node ${T}_{j}$. Assume that the distance observations are ${\rho}_{i}\in {\mathcal{D}}_{a},\phantom{\rule{4pt}{0ex}}1\le i\le N,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}i\in {\mathbb{N}}^{+}$. If the observation error is considered, the relationship between the distance observation and the true distance is given by:
Accordingly, the unconstrained LS estimation model in the noncooperative scenario can be expressed as follows:

$$\left\{\begin{array}{c}{d}_{{T}_{j}{A}_{i}}={\parallel {\mathit{s}}_{i}-{\mathit{x}}_{j}\parallel}_{2}\hfill \\ {\widehat{d}}_{{T}_{j}{A}_{i}}={\parallel {\mathit{s}}_{i}-{\widehat{\mathit{x}}}_{j}\parallel}_{2}\hfill \end{array}\right.$$

$${d}_{i}=\left\{\begin{array}{c}{d}_{{T}_{1}{A}_{i}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}1\le i\le {q}_{1a}\hfill \\ {d}_{{T}_{j}{A}_{i}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\sum _{m=1}^{j-1}{q}_{ma}<i\le \sum _{m=1}^{j}{q}_{ma}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}j\ge 2\hfill \end{array}\right.,$$

$${\widehat{d}}_{i}=\left\{\begin{array}{c}{\widehat{d}}_{{T}_{1}{A}_{i}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}1\le i\le {q}_{1a}\hfill \\ {\widehat{d}}_{{T}_{j}{A}_{i}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\sum _{m=1}^{j-1}{q}_{ma}<i\le \sum _{m=1}^{j}{q}_{ma}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}j\ge 2\hfill \end{array}\right.,$$

$${\rho}_{i}={d}_{i}+{\epsilon}_{i}.$$

$$arg\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\underset{{\widehat{d}}_{i}}{min}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{F}_{s}=\sum _{i=1}^{N}{\left({\widehat{d}}_{i}-{\rho}_{i}\right)}^{2}.$$

#### 2.4. Cooperative Scenario Description

The cooperative scenario is very similar to the noncooperative one. The difference is that there exist ranging and information interactions between two targets. Let ${\mathit{x}}_{j}$ and ${\widehat{\mathit{x}}}_{j}$ be the real and estimated coordinates of node ${T}_{j}$; then,

$$\left\{\begin{array}{c}{d}_{{T}_{j}{A}_{i}}={\parallel {\mathit{s}}_{i}-{\mathit{x}}_{j}\parallel}_{2}\hfill \\ {\widehat{d}}_{{T}_{j}{A}_{i}}={\parallel {\mathit{s}}_{i}-{\widehat{\mathit{x}}}_{j}\parallel}_{2}\hfill \end{array}\right.,\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\left\{\begin{array}{c}{d}_{{T}_{j}{T}_{k}}={\parallel {\mathit{x}}_{k}-{\mathit{x}}_{j}\parallel}_{2}\hfill \\ {\widehat{d}}_{{T}_{j}{T}_{k}}={\parallel {\widehat{\mathit{x}}}_{k}-{\widehat{\mathit{x}}}_{j}\parallel}_{2}\hfill \end{array}\right.,\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}k>j.$$

In the cooperative scenario, there are L ranging links in total, which are denoted by ${l}_{1},{l}_{2},\dots ,{l}_{L}$. Let ${d}_{i}$ and ${\widehat{d}}_{i}$ be the real and estimated distances corresponding to link ${l}_{i}$. Next, we can assign the values as follows. If $1\le i\le N,i\in {\mathbb{N}}^{+}$, each ${l}_{i}$ is an AT link, and we assign the values according to Formulas (4) and (5). If $N<i\le L,i\in {\mathbb{N}}^{+}$, ${l}_{i}$ is a TT link, and we assign the values as follows:
Above, ${q}_{jc}$ is the quantity of TT links with endpoints ${T}_{j},{T}_{k}$ such that $k>j$. Additionally, there also are ${T}_{k}\in {U}_{j}$, and ${U}_{j}$ is the set of targets that have ranging links with ${T}_{j}$. In set ${U}_{j}$, the elements’ subscripts are arranged in increasing order, and ${T}_{k}$ is the $g\mathrm{th}$ element, the index of which is calculated by:
Let ${\rho}_{i}\in {\mathcal{D}}_{t},\phantom{\rule{0.166667em}{0ex}}1\le i\le L,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}i\in {\mathbb{N}}^{+}$ be distance observations; then, the relationship between ${\rho}_{i}$ and ${d}_{i}$ satisfies Formula (6). Accordingly, in the cooperative scenario, the unconstrained LS model is constructed as:
In this paper, we refer to ${F}_{s}$ and ${F}_{c}$ together as the LS positioning cost function and denote it by F.

$${d}_{i}=\left\{\begin{array}{c}{d}_{{T}_{1}{T}_{k}},\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}N+1\le i\le {q}_{1c}\hfill \\ {d}_{{T}_{j}{T}_{k}},\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}N+\sum _{m=1}^{j-1}{q}_{mc}<i\le N+\sum _{m=1}^{j}{q}_{mc}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}j\ge 2\hfill \end{array}\right.,$$

$${\widehat{d}}_{i}=\left\{\begin{array}{c}{\widehat{d}}_{{T}_{1}{T}_{k}},\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}N+1\le i\le {q}_{1c}\hfill \\ {\widehat{d}}_{{T}_{j}{T}_{k}},\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}N+\sum _{m=1}^{j-1}{q}_{mc}<i\le N+\sum _{m=1}^{j}{q}_{mc}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}j\ge 2\hfill \end{array}\right..$$

$$g=\left\{\begin{array}{cc}i-N,\hfill & j=1\hfill \\ i-N-\sum _{m=1}^{j-1}{q}_{mc},\hfill & j\ge 2\hfill \end{array}\right..$$

$$arg\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\underset{{\widehat{d}}_{i}}{min}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{F}_{c}=\sum _{i=1}^{L}{\left({\widehat{d}}_{i}-{\rho}_{i}\right)}^{2}.$$

## 3. Convex Analysis of the Model

In the previous part, we presented the unconstrained LS localization model in the cooperative and noncooperative scenarios. For the positioning problem, we are interested in finding the global optimum of the cost function. Due to the nonconvex property of the LS function, there may be multiple local optima or stagnation points in most scenes. As a result, a local minimum solution is obtained in the iterative process, which affects the positioning accuracy significantly. In this part, we discuss the nonconvex property of the unconstrained LS localization model to study when the cost function is convex and when it is nonconvex. To simplify the analysis, it may be worth considering the positioning problem on the two-dimensional plane, i.e., for $\eta =2$. It is convenient to generalize the conclusion to a higher dimensional space. Let ${\mathit{s}}_{j}={\left[{x}_{{s}_{i}}\phantom{\rule{4pt}{0ex}}{y}_{{s}_{i}}\right]}^{T}$ be the coordinates of the anchor and ${\mathit{x}}_{j}={\left[{x}_{j}\phantom{\rule{4pt}{0ex}}{y}_{j}\right]}^{T}$ be the coordinates of the target. At the same time, the corresponding estimated position is ${\widehat{\mathit{x}}}_{j}={\left[{\widehat{x}}_{j}\phantom{\rule{4pt}{0ex}}{\widehat{y}}_{j}\right]}^{T}$.

#### 3.1. Analysis of the Noncooperative Scenario

It is known that the convex property of a function is directly related to its Hessian matrix, and the following theorem holds:

**Theorem**

**1.**

The second-order condition ensures the function is convex. Assume that function f of $\mathit{x}$ is second-order differentiable, and let its domain be $dom\phantom{\rule{4pt}{0ex}}f$. If $dom\phantom{\rule{4pt}{0ex}}f$ is a convex set and the Hessian matrix exists, then a sufficient and necessary condition for the function to be convex in $dom\phantom{\rule{4pt}{0ex}}f$ is that, for $\forall \mathit{x}\in dom\phantom{\rule{4pt}{0ex}}f$, its Hessian matrix is a semipositive definite matrix [38].

To simplify the problem, we first consider the scenario of only one target, and the target number is ${T}_{1}$. In this case, there are N links between ${T}_{1}$ and the anchors. We try to compute the gradient (the first-order differential) and the Hessian matrix (the second-order differential) of the cost function ${F}_{s}$. The calculation results are shown in Equations (13) and (14).
Considering Theorem 1, we obtain the following corollary:

$$grad\phantom{\rule{4pt}{0ex}}{F}_{s}={\nabla}_{{\widehat{\mathit{x}}}_{1}}=2\sum _{i=1}^{N}\left[\begin{array}{c}{\displaystyle \frac{\left({\widehat{d}}_{i}-{\rho}_{i}\right)\left({x}_{{s}_{i}}-{\widehat{x}}_{1}\right)}{{\widehat{d}}_{i}}}\\ {\displaystyle \frac{\left({\widehat{d}}_{i}-{\rho}_{i}\right)\left({y}_{{s}_{i}}-{\widehat{y}}_{1}\right)}{{\widehat{d}}_{i}}}\end{array}\right],$$

$${\nabla}_{{\widehat{\mathit{x}}}_{1}}^{2}=2\sum _{i=1}^{N}\left[\begin{array}{cc}{\displaystyle \frac{{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}}+\frac{{\rho}_{i}}{{\widehat{d}}_{i}^{3}}{\left({x}_{{s}_{i}}-{\widehat{x}}_{1}\right)}^{2}}& {\displaystyle \frac{{\rho}_{i}}{{\widehat{d}}_{i}^{3}}\left({x}_{{s}_{i}}-{\widehat{x}}_{1}\right)\left({y}_{{s}_{i}}-{\widehat{y}}_{1}\right)}\\ {\displaystyle \frac{{\rho}_{i}}{{\widehat{d}}_{i}^{3}}\left({x}_{{s}_{i}}-{\widehat{x}}_{1}\right)\left({y}_{{s}_{i}}-{\widehat{y}}_{1}\right)}& {\displaystyle \frac{{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}}+\frac{{\rho}_{i}}{{\widehat{d}}_{i}^{3}}{\left({y}_{{s}_{i}}-{\widehat{y}}_{1}\right)}^{2}}\end{array}\right].$$

**Corollary**

**1.**

If $dom\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{F}_{s}$ of the LS cost function is ${\mathbb{R}}^{2}$, it obviously is a convex set. Assume that the set of all ${\widehat{\mathit{x}}}_{1}$, which satisfy condition ${\nabla}_{{\widehat{\mathit{x}}}_{1}}^{2}\u2ab00$, is $\mathcal{A}$. Then, for ${\widehat{\mathit{x}}}_{1}\in \mathcal{A}$, ${F}_{s}$ is a convex function.

Corollary 1 is a sufficient and necessary condition for ${F}_{s}$ to be convex. Finding a set $\mathcal{A}$ that satisfies the condition is equivalent to dividing the domain in ${\mathbb{R}}^{2}$ so that ${F}_{s}$ is convex in each divided subinterval. Next, the condition of ${\nabla}_{{\widehat{\mathit{x}}}_{1}}^{2}\u2ab00$ will be further analyzed. Note that ${\nabla}_{{\widehat{\mathit{x}}}_{1}}^{2}$ is a real symmetric matrix, and the two following lemmas hold:

**Lemma**

**1.**

The eigenvalues of a real symmetric matrix are all real numbers.

**Lemma**

**2.**

A real symmetric matrix is a semipositive definite matrix if and only if all its eigenvalues are nonnegative [39].

Lemma 2 shows that the assessment of whether a matrix is positive semidefinite can be transformed into the determination of whether the eigenvalues are positive or negative. Hence, we consider calculating the eigenvalues of the Hessian matrix. Let $\mathit{J}={\nabla}_{{\widehat{\mathit{x}}}_{1}}^{2}\in {\mathbb{R}}^{2\times 2}$, and let $\lambda $ be the eigenvalue of $\mathit{J}$; then, the eigenvalue polynomial of $\mathit{J}$ is:
where ${J}_{ij}$ are the elements of $\mathit{J}$. Let $G=0$; then, the following characteristic polynomial equation can be obtained:
It is a quadratic equation of one variable. From Lemma 1, we observe that there must be two real roots, and the discriminant of roots $\Delta \ge 0$ is invariable. From the distribution relation of the two roots, the sufficient and necessary condition of having two nonnegative real roots is:
Therefore, we can derive the following corollary:

$$G=\left|\begin{array}{cc}\lambda -{J}_{11}& -{J}_{12}\\ -{J}_{21}& \lambda -{J}_{22}\end{array}\right|,$$

$${\lambda}^{2}-\left({J}_{11}+{J}_{22}\right)\lambda +{J}_{11}{J}_{22}-{J}_{12}{J}_{21}=0.$$

$$\left\{\begin{array}{c}{J}_{11}+{J}_{22}>0\hfill \\ {J}_{11}{J}_{22}-{J}_{12}{J}_{21}\ge 0\hfill \end{array}\right..$$

**Corollary**

**2.**

Set $\mathcal{A}$ consists of all the sets of ${\widehat{\mathit{x}}}_{1}$ that satisfy the condition of the inequality group (15).

Corollary 2 is an equivalent condition of the LS cost function ${F}_{s}$ being convex. Compared with Corollary 1, Corollary 2 transforms the condition that the Hessian matrix is semipositive definite into the solution of the inequality system, which provides a feasible method for finding the set satisfying the requirements. However, due to the nonlinear characteristics of Equation (17), it is difficult to obtain the analytic solutions of inequalities. In the next part, we discuss a particular case and try to provide the proof.

**Proposition**

**1.**

If there exists a set $\mathcal{C}$ in which all the estimates ${\widehat{\mathit{x}}}_{1}$ satisfy ${\widehat{d}}_{i}-{\rho}_{i}\ge 0$, then the LS cost function ${F}_{s}$ is convex and $\mathcal{C}\subseteq \mathcal{A}$.

The proof of Proposition 1 is given in Appendix A.

If there is more than one target and their number is M, the Hessian matrix $\mathit{J}$ has $2M$ rows and $2M$ columns, i.e., $\mathit{J}\in {\mathbb{R}}^{2M\times 2M}$. Consider a decomposition of $\mathit{J}$, and let $\mathit{J}={\sum}_{i=1}^{N}{\mathit{Q}}_{i}$. In the preceding formula, ${\mathit{Q}}_{i}$ is the Hessian matrix corresponding to the ranging link ${l}_{i}$. It is easy to observe that there are four elements, and the elements of ${\mathit{Q}}_{i}$ are located on the diagonal or adjacent positions of $\mathit{J}$. An example is shown in Figure 1b, where ${D}_{ij}^{k}$ represents the corresponding elements in $\mathit{J}$, which are the second-order partial derivatives of ${F}_{s}$ with respect to the coordinates of a target. We translate the four elements in ${\mathit{Q}}_{i}$ to the upper left corner via the elementary row-column transformation of matrices. Let the transformed matrix be ${\mathit{Q}}_{i}^{\prime}$, as shown in Figure 1c; we observe that ${\mathit{Q}}_{i}$ and ${\mathit{Q}}_{i}^{\prime}$ are similar matrices. The following lemma holds for similar matrices:

**Lemma**

**3.**

Similar matrices have the same eigenvalues.

This shows that ${\mathit{Q}}_{i}$ and ${\mathit{Q}}_{i}^{\prime}$ have the same eigenvalues. Let ${\mathit{G}}_{i}^{\prime}=\lambda I-{\mathit{Q}}_{i}^{\prime}$; to obtain the eigenvalues of ${\mathit{G}}_{i}^{\prime}$, we construct the following block for ${\mathit{G}}_{i}^{\prime}$:
Above, ${\mathit{G}}_{11}=\left[\begin{array}{cc}\lambda -{g}_{11}& -{g}_{12}\\ -{g}_{21}& \lambda -{g}_{22}\end{array}\right]\in {\mathbb{R}}^{2\times 2}$, ${\mathit{G}}_{12}=0\in {\mathbb{R}}^{2\times \left(2M-2\right)}$, ${\mathit{G}}_{21}=0\in {\mathbb{R}}^{\left(2M-2\right)\times 2}$, ${\mathit{G}}_{22}=\Lambda \in {\mathbb{R}}^{\left(2M-2\right)\times \left(2M-2\right)}$, where ${g}_{kl}$ is the element at the $k\mathrm{th}$ row and $l\mathrm{th}$ column of ${\mathit{G}}_{i}^{\prime}$. From the determinant theorem of block matrices, we know that:
Let $|{\mathit{G}}_{i}^{\prime}|=0$. According to the previous analysis, the two solutions of $|{\mathit{G}}_{11}|=0$ are $\lambda =1$ and $\lambda =\frac{{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}}$, and the remaining $2M-2$ solutions of $|{\mathit{G}}_{i}^{\prime}|=0$ are all zero. If ${\widehat{d}}_{i}-{\rho}_{i}\ge 0$, then ${\mathit{Q}}_{i}\u2ab00$.

$${\mathit{G}}_{i}^{\prime}=\left[\begin{array}{cc}{\mathit{G}}_{11}& {\mathit{G}}_{12}\\ {\mathit{G}}_{21}& {\mathit{G}}_{22}\end{array}\right].$$

$$|{\mathit{G}}_{i}^{\prime}|=|{\mathit{G}}_{11}|\xb7|{\mathit{G}}_{22}-{\mathit{G}}_{21}{\mathit{G}}_{11}^{-1}{\mathit{G}}_{12}|=|{\mathit{G}}_{11}|\xb7|{\mathit{G}}_{22}|={\lambda}^{2M-2}\left|{\mathit{G}}_{11}\right|.$$

Proposition 1 still holds if there is more than one target, and it is a sufficient and unnecessary condition for ${F}_{s}$ to be locally convex. The nonconvex interval of ${F}_{s}$ decreases with the increasing ${\epsilon}_{i}$ and the number of links that satisfy ${\epsilon}_{i}>0$.

#### 3.2. Analysis of the Cooperative Scenario

Similarly, we try to find a set of ${\widehat{\mathit{x}}}_{j}$ for the condition that the LS cost function is convex in the cooperative scenario. We guess that Proposition 1 is also valid in that scenario and try to prove it. In this scenario, the ranging link consists of two parts, an AT link and a TT link. Inspired by Lemma 3, we decompose Hessian matrix $\mathit{J}$ into several submatrices ${\mathit{Q}}_{i}$. Each ${\mathit{Q}}_{i}$ is actually a function related to ${\widehat{d}}_{i}$, which is denoted by $f\left({\widehat{d}}_{i}\right)={\left({\widehat{d}}_{i}-{\rho}_{i}\right)}^{2}$. The element of ${\mathit{Q}}_{i}$ is the second-order partial derivative of function $f\left({\widehat{d}}_{i}\right)$ with respect to the target coordinates ${\widehat{\mathit{x}}}_{j}$. In Section 3.1, it has been proven that Proposition 1 is satisfied if ${l}_{i}$ is an AT link. Next, we will show that Proposition 1 is also satisfied for TT links. To facilitate the analysis, we select one TT link ${l}_{k}$ in the cooperative scenario and denote the targets at the end of the link as ${T}_{m}$ and ${T}_{n}$, the estimates of which are $\left({\widehat{x}}_{m},{\widehat{y}}_{m}\right)$ and $\left({\widehat{x}}_{n},{\widehat{y}}_{n}\right)$, respectively. If the distance measurement is ${\rho}_{k}$, then the LS cost function can be written as:
Computing the partial derivatives of ${F}_{c}$ with respect to ${\widehat{x}}_{m},{\widehat{x}}_{n},{\widehat{y}}_{m},{\widehat{y}}_{n}$, the gradient vector (the first-order differential) can be obtained as follows:
Hence, the Hessian matrix is:
We are interested in the eigenvalue of $\mathit{J}$; the characteristic polynomial can be calculated as follows:
Then, the four eigenvalues can be solved as follows:
If ${\widehat{d}}_{k}-{\rho}_{k}\ge 0$, thus a TT link has similar properties to those of an AT link. In the following, we try to generalize this further. If there are two kinds of ranging links in the LS cost function, this property remains unchanged.

$${F}_{c}={\left({\widehat{d}}_{k}-{\rho}_{k}\right)}^{2}.$$

$$grad\phantom{\rule{4pt}{0ex}}{F}_{c}={\nabla}_{{\widehat{\mathit{x}}}_{m},{\widehat{\mathit{x}}}_{n}}=\frac{2\left({\widehat{d}}_{k}-{\rho}_{k}\right)}{{\widehat{d}}_{k}}\left[\begin{array}{c}{\widehat{x}}_{m}-{\widehat{x}}_{n}\\ {\widehat{x}}_{n}-{\widehat{x}}_{m}\\ {\widehat{y}}_{m}-{\widehat{y}}_{n}\\ {\widehat{y}}_{n}-{\widehat{y}}_{m}\end{array}\right].$$

$$\mathit{J}={\nabla}_{{\widehat{\mathit{x}}}_{m},{\widehat{\mathit{x}}}_{n}}^{2}.$$

$${\lambda}^{2}\left(\lambda -4\right)\left(\lambda -4\frac{{\widehat{d}}_{k}-{\rho}_{k}}{{\widehat{d}}_{k}}\right)=0.$$

$${\lambda}_{1}={\lambda}_{2}=0,{\lambda}_{3}=4,{\lambda}_{4}=4\frac{{\widehat{d}}_{k}-{\rho}_{k}}{{\widehat{d}}_{k}}.$$

Consider the case of M targets in the cooperative scenario; the Hessian matrix of ${F}_{c}$ is $\mathit{J}\in {\mathbb{R}}^{2M\times 2M}$. For example, the elements of the matrix are shown in Figure 1a, where ${D}_{ij}^{k}$ represents the corresponding element that is the second-order partial derivative of ${F}_{c}$ with respect to the coordinates of a target. Consider a decomposition of $\mathit{J}$, and let $\mathit{J}={\sum}_{i=1}^{L}{\mathit{Q}}_{i}$. In the preceding formula, ${\mathit{Q}}_{i}$ is the Hessian matrix corresponding to the ranging link ${l}_{i}$. If ${l}_{i}$ is an AT link, the analysis and result shown in Section 3.1 apply. If the ranging link is a TT link, there are sixteen elements in each ${\mathit{Q}}_{i}$. An example is shown in Figure 1d. All the elements in ${\mathit{Q}}_{i}$ are translated to the upper left corner, as shown in Figure 1e. We denote the transformed matrix by ${\mathit{Q}}_{i}^{\prime}$ and let ${\mathit{G}}_{i}^{\prime}=\lambda I-{\mathit{Q}}_{i}^{\prime}$. Similarly, we construct the following block for ${\mathit{G}}_{i}^{\prime}$:
$${\mathit{G}}_{i}^{\prime}=\left[\begin{array}{cc}{\mathit{G}}_{11}& {\mathit{G}}_{12}\\ {\mathit{G}}_{21}& {\mathit{G}}_{22}\end{array}\right].$$
Above, ${\mathit{G}}_{11}=\left[\begin{array}{ccc}\lambda -{g}_{11}& \dots & -{g}_{14}\\ \vdots & \ddots & \vdots \\ -{g}_{41}& \dots & \lambda -{g}_{44}\end{array}\right]\in {\mathbb{R}}^{4\times 4}$, ${\mathit{G}}_{12}=0\in {\mathbb{R}}^{4\times \left(2M-4\right)}$, ${\mathit{G}}_{21}=0\in {\mathbb{R}}^{\left(2M-4\right)\times 4}$, and ${\mathit{G}}_{22}=\Lambda \in {\mathbb{R}}^{\left(2M-4\right)\times \left(2M-4\right)}$, and ${g}_{kl}$ is the element at the kth row and the lth column of ${\mathit{G}}_{i}^{\prime}$. Similar to Formula (23), we have:
Let $|{\mathit{G}}_{i}^{\prime}|=0$. Reviewing the analysis for TT links, the four solutions of $|{\mathit{G}}_{11}|=0$ are ${\lambda}_{1}={\lambda}_{2}=0$, ${\lambda}_{3}=4$, and $\lambda}_{4}=4\frac{{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}$, and the remaining $2M-4$ solutions of $|{\mathit{G}}_{i}^{\prime}|=0$ are all zero. Hence, if ${\widehat{d}}_{i}-{\rho}_{i}\ge 0$, then ${\mathit{Q}}_{i}\u2ab00$.

$$|{\mathit{G}}_{i}^{\prime}|=|{\mathit{G}}_{11}|\xb7|{\mathit{G}}_{22}-{\mathit{G}}_{21}{\mathit{G}}_{11}^{-1}{\mathit{G}}_{12}|=|{\mathit{G}}_{11}|\xb7|{\mathit{G}}_{22}|={\lambda}^{2M-4}\left|{\mathit{G}}_{11}\right|.$$

The analysis above shows that Proposition 1 is still valid in the cooperative scenario. Similar to the noncooperative scenario, the nonconvex interval of ${F}_{c}$ decreases with the increasing ${\epsilon}_{i}$ and the number of links that satisfy ${\epsilon}_{i}>0$.

Proposition 1 shows that if the condition ${\widehat{d}}_{i}-{\rho}_{i}\ge 0$ is satisfied, an appropriate interval in which the LS cost function F is convex can always be found. Based on this, we can describe the condition for F to be convex globally.

**Proposition**

**2.**

For $\forall i$, if ${\widehat{d}}_{i}-{\rho}_{i}\ge 0$ always holds on $\widehat{\mathit{x}}={\left[{\widehat{\mathit{x}}}_{1}\phantom{\rule{4pt}{0ex}}{\widehat{\mathit{x}}}_{2}\phantom{\rule{4pt}{0ex}}\dots \phantom{\rule{4pt}{0ex}}{\widehat{\mathit{x}}}_{M}\right]}^{T}\in {\mathbb{R}}^{2M}$, then F is convex on ${\mathbb{R}}^{2M}$.

Proposition 2 is a sufficient and unnecessary condition for the global convexity of the LS cost function. In a practical scenario of the ranging error being greater than zero, the distance observation ${\rho}_{i}$ is positive. In this case, the condition of global convexity is not satisfied. If ${\epsilon}_{i}\le -{d}_{i}$, we have ${\rho}_{i}\le 0$; then, ${\widehat{d}}_{i}-{\rho}_{i}\ge 0$ is invariable, and F is convex in the global range. Although the global convexity condition is satisfied if all ${\epsilon}_{i}\le -{d}_{i}$, it is a low probability event that all the observation values will be negative because of the independence between the distance measurement errors. Therefore, in an actual location determination scenario, it is not a common phenomenon for the LS cost function to be convex in the global range.

## 4. Null Space of the Relative Angle Matrix

From the analysis in Section 3, it is known that a positive ranging error will cause the LS cost function to be nonconvex. In this condition, when the iterative method is used to search for the optimal solution, it may fall into a local minimum, causing the result obtained to not be the optimal global solution. There are generally two ways of solving this problem. The first is to divide the domain ${\mathbb{R}}^{2M}$ into several intervals so that the cost function is convex in each subinterval. Then, the appropriate initial value is selected in each subinterval, and the result is obtained by the iterative method. Proposition 1 shows that such subintervals must exist, so this method is feasible in any case. The second method is to modify the original LS localization model to make it convex in the global range. The advantage of this method is that the convexity weakens the requirement of initial value selection. That is, the solution is insensitive to initial value selection. Based on Proposition 2, we propose a robust method using the relative angle matrix for WSN positioning. The basic idea of this method is to transform the LS cost function into a globally convex function by calculating the relative angle matrix. This algorithm ensures that the minimum obtained by the Gauss–Newton iteration method will be the optimal global solution. Some further analysis will also be performed in this part.

#### 4.1. Definition of the Relative Angle Matrix

**Definition**

**1.**

The relative angle matrix in the noncooperative scenario is defined as:
where ${\Omega}_{s}\in {\mathbb{R}}^{N\times N}$. If ${\theta}_{iTj}^{\prime}$ is the angle between ${l}_{i}$ and ${l}_{j}$, then ${\theta}_{iTj}$ is given by:
Assume the following formulation:
where ${\mathit{P}}_{s}\in {\mathbb{R}}^{N\times 2M}$ and ${\epsilon}_{s}\in {\mathbb{R}}^{N}$. Let ${\nabla}_{{\widehat{\mathit{x}}}_{1}}=0$; this condition is equivalent to:
Further, the relationship between relative angle ${\Omega}_{s}$ and ${\mathit{P}}_{s}$ is as follows:
Substituting (30) into (31), we obtain:

$${\Omega}_{s}\stackrel{\u25b3}{=}\left[\begin{array}{cccc}1& cos\left({\theta}_{1T2}\right)& \dots & cos\left({\theta}_{1TN}\right)\\ cos\left({\theta}_{2T1}\right)& 1& \ddots & cos\left({\theta}_{2TN}\right)\\ \vdots & \ddots & \dots & \vdots \\ cos\left({\theta}_{1TN}\right)& cos\left({\theta}_{2TN}\right)& \dots & 1\end{array}\right],$$

$${\theta}_{iTj}=\left\{\begin{array}{c}{\theta}_{iTj}^{\prime}\phantom{\rule{4pt}{0ex}},\phantom{\rule{4pt}{0ex}}{l}_{i}\cap {l}_{j}={T}_{k}\hfill \\ {\displaystyle \frac{\pi}{2}\phantom{\rule{4pt}{0ex}},\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{l}_{i}\cap {l}_{j}\ne {T}_{k}}\hfill \end{array}\right..$$

$${\mathit{P}}_{s}=\left[\begin{array}{ccccc}{\displaystyle \frac{{x}_{{s}_{1}}-{\widehat{x}}_{1}}{{\widehat{d}}_{1}}}& {\displaystyle \frac{{y}_{{s}_{1}}-{\widehat{y}}_{1}}{{\widehat{d}}_{1}}}& \dots & 0& 0\\ {\displaystyle \frac{{x}_{{s}_{2}}-{\widehat{x}}_{1}}{{\widehat{d}}_{2}}}& {\displaystyle \frac{{y}_{{s}_{2}}-{\widehat{y}}_{1}}{{\widehat{d}}_{2}}}& \dots & 0& 0\\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0& 0& \dots & {\displaystyle \frac{{x}_{{s}_{N}}-{\widehat{x}}_{M}}{{\widehat{d}}_{N}}}& {\displaystyle \frac{{y}_{{s}_{N}}-{\widehat{y}}_{M}}{{\widehat{d}}_{N}}}\end{array}\right],\phantom{\rule{4pt}{0ex}}{\epsilon}_{s}=\left[\begin{array}{c}{\rho}_{1}-{\widehat{d}}_{1}\hfill \\ {\rho}_{2}-{\widehat{d}}_{2}\hfill \\ \phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\vdots \hfill \\ {\rho}_{N}-{\widehat{d}}_{N}\hfill \end{array}\right],$$

$${\mathit{P}}^{T}{\epsilon}_{s}=0.$$

$${\Omega}_{s}={\mathit{P}}_{s}{\mathit{P}}_{s}^{T}.$$

$${\Omega}_{s}{\epsilon}_{s}=0.$$

Imitating the noncooperative scenario, we can define the relative angle matrix in the cooperative scenario.

**Definition**

**2.**

The relative angle matrix in the cooperative scenario is defined as:
where ${\Omega}_{c}\in {\mathbb{R}}^{L\times L}$; when $i\ne j$, if ${\theta}_{iTj}^{\prime}$ is the angle between ${l}_{i}$ and ${l}_{j}$, then ${\theta}_{iTj}$ is defined by Formula (28). If $i=j$, let ${\omega}_{ij}$ represent the element of the $i\mathit{th}$ row and $j\mathit{th}$ column in ${\Omega}_{c}$. If ${l}_{i}$ is an AT link, then ${\omega}_{ij}=1$; otherwise, ${l}_{i}$ is a TT link, and then, ${\omega}_{ij}=2$. Assume that:
where ${\mathit{P}}_{c}\in {\mathbb{R}}^{L\times 2M}$ and ${\epsilon}_{c}\in {\mathbb{R}}^{L}$. Then, ${\nabla}_{{\widehat{\mathit{x}}}_{j}}=0$ is equivalent to:
Multiplying both ends of the equation by ${\mathit{P}}_{c}$ results in:
In the cooperative scenario, it still holds that:
Substituting Formula (36) into Formula (37), we obtain:
We refer to the relative angle matrices ${\Omega}_{s}$ and ${\Omega}_{c}$ collectively as $\Omega $. The following property of $\Omega $ is established generally.

$${\Omega}_{c}\stackrel{\u25b3}{=}\left[\begin{array}{ccccc}1& cos{\theta}_{1T2}& cos{\theta}_{1T3}& \dots & cos{\theta}_{1TL}\\ cos{\theta}_{2T1}& 1& cos{\theta}_{2T3}& \dots & cos{\theta}_{2TL}\\ \vdots & \vdots & \ddots & \vdots & \vdots \\ cos{\theta}_{L-1T1}& cos{\theta}_{L-1T2}& cos{\theta}_{L-1T3}& \dots & cos{\theta}_{L-1TL}\\ cos{\theta}_{LT1}& cos{\theta}_{L-2}& cos{\theta}_{LT3}& \dots & 2\end{array}\right],$$

$${\mathit{P}}_{c}=\left[\begin{array}{ccccccc}{\displaystyle \frac{{x}_{{s}_{1}}-{\widehat{x}}_{1}}{{\widehat{d}}_{1}}}& {\displaystyle \frac{{y}_{{s}_{1}}-{\widehat{y}}_{1}}{{\widehat{d}}_{1}}}& 0& 0& \dots & 0& 0\\ {\displaystyle \frac{{x}_{{s}_{2}}-{\widehat{x}}_{1}}{{\widehat{d}}_{2}}}& {\displaystyle \frac{{y}_{{s}_{2}}-{\widehat{y}}_{1}}{{\widehat{d}}_{2}}}& 0& 0& \dots & 0& 0\\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ 0& 0& 0& 0& \dots & {\displaystyle \frac{{x}_{{s}_{N-1}}-{\widehat{x}}_{M}}{{\widehat{d}}_{N-1}}}& {\displaystyle \frac{{y}_{{s}_{N-1}}-{\widehat{y}}_{M}}{{\widehat{d}}_{N-1}}}\\ 0& 0& 0& 0& \dots & {\displaystyle \frac{{x}_{{s}_{N}}-{\widehat{x}}_{M}}{{\widehat{d}}_{N}}}& {\displaystyle \frac{{y}_{{s}_{N}}-{\widehat{y}}_{M}}{{\widehat{d}}_{N}}}\\ {\displaystyle \frac{{\widehat{x}}_{2}-{\widehat{x}}_{1}}{{\widehat{d}}_{N+1}}}& {\displaystyle \frac{{\widehat{y}}_{2}-{\widehat{y}}_{1}}{{\widehat{d}}_{N+1}}}& {\displaystyle \frac{{\widehat{x}}_{1}-{\widehat{x}}_{2}}{{\widehat{d}}_{N+1}}}& {\displaystyle \frac{{\widehat{y}}_{1}-{\widehat{y}}_{2}}{{\widehat{d}}_{N+1}}}& \dots & 0& 0\\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ 0& 0& {\displaystyle \frac{{\widehat{x}}_{k}-{\widehat{x}}_{2}}{{\widehat{d}}_{L}}}& {\displaystyle \frac{{\widehat{y}}_{k}-{\widehat{y}}_{2}}{{\widehat{d}}_{L}}}& \dots & 0& 0\end{array}\right],\phantom{\rule{4pt}{0ex}}{\epsilon}_{c}=\left[\begin{array}{c}{\rho}_{1}-{\widehat{d}}_{1}\hfill \\ {\rho}_{2}-{\widehat{d}}_{2}\hfill \\ \phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\vdots \hfill \\ {\rho}_{L}-{\widehat{d}}_{L}\hfill \end{array}\right],$$

$${\mathit{P}}_{c}^{T}{\epsilon}_{c}=0.$$

$${\mathit{P}}_{c}{\mathit{P}}_{c}^{T}{\epsilon}_{c}=0.$$

$${\Omega}_{c}={\mathit{P}}_{c}{\mathit{P}}_{c}^{T}.$$

$${\Omega}_{c}{\epsilon}_{c}=0.$$

**Property**

**1.**

In the two-dimensional plane, let r be the rank of Ω, i.e., $r=rank\left(\Omega \right)$. Assume that there are M targets in the localization scenario, and the number of unknown variables is $\tau =2M$; then, the inequality $r\le \tau $ is satisfied.

The proof of Property 1 is given in Appendix B.

#### 4.2. Null Space Algorithms

From Formulas (32) and (38), we can conclude that the ranging error is the null space of $\Omega $. It is also known from Property 1 that once $\Omega $ has been determined, if the number of nontrivial solutions of ranging error $\epsilon $ is ${N}_{B}$, we have ${N}_{B}\ge 1$. If and only if $r=\tau $, then ${N}_{B}=1$. If $r<\tau $, the solution satisfying the equation should be a set, i.e., there is an infinite number of $\epsilon $ satisfying the equation. Hence, if a basic solution of $\epsilon $ has been obtained, $\epsilon $ is the linear space formed by $\Phi $, where $\Phi \in {\mathbb{R}}^{{N}_{A}\times \left(\tau -r\right)}$. Let $\Phi =\left[{\phi}_{1}\phantom{\rule{4pt}{0ex}}{\phi}_{2}\dots {\phi}_{\tau -r}\right]$; then, the general solution of $\epsilon $ can be expressed as:
where ${k}_{i}\in \mathbb{R}$ and ${\phi}_{i}\in {\mathbb{R}}^{{N}_{A}}$. Equation (39) indicates that for $\epsilon $ in the same linear space, the LS cost function F has the same local optimal point. However, convexity will vary with $\epsilon $. If $\epsilon >0$, F is likely to be a nonconvex function; thus, multiple local optima will exist. If $\epsilon \ll 0$, it is known from Proposition 2 that F can be transformed into a convex function in the global range. Assuming that $\Omega $ is known, we can determine $\Phi $ for a given $\epsilon $. If there exists a linear combination of column vectors in $\Phi $ that results in $\nu \ll 0$, then by the same property of the local optima, we can change the LS cost function F and make it convex in the global range.

$$\epsilon =\sum _{i=1}^{\tau -r}{k}_{i}{\phi}_{i},$$

**Proposition**

**3.**

Let ν be an element of the null space of Ω such that $\nu \ll 0$; then, Equations (7) and (12) can be rewritten as:

$$arg\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\underset{{\widehat{d}}_{i}}{min}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{F}_{s}^{\prime}=\sum _{i=1}^{N}{\left({\widehat{d}}_{i}-{\rho}_{i}-{\nu}_{i}\right)}^{2},$$

$$arg\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\underset{{\widehat{d}}_{i}}{min}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{F}_{c}^{\prime}=\sum _{i=1}^{L}{\left({\widehat{d}}_{i}-{\rho}_{i}-{\nu}_{i}\right)}^{2}.$$

In this paper, we refer to ${F}_{s}^{\prime}$ and ${F}_{c}^{\prime}$ collectively as ${F}^{\prime}$. In Proposition 3, ${F}^{\prime}$ and F have the same local optimal point, i.e., the objective functions are equivalent. Additionally, ${F}^{\prime}$ is also globally convex, which endows it with the characteristic of large-scale convergence. Thus, using it can reduce the sensitivity to the initial value selection. If we want to apply Proposition 3, the following problems remain to be solved:

- How do we achieve $\Omega $?
- For an arbitrary $\Omega $, does $\nu $ satisfy the condition of $\nu \ll 0$?
- When there are errors in $\Omega $, how do we deal with them?

For the first problem, the direct method is to measure the angle, which is similar to the AOA method. In this way, Proposition 3 is transformed into an AOA/TOA hybrid location algorithm. Another method is to transform the distance data into the corresponding angle via the cosine theorem and construct the relative angle matrix. To answer the second question, we will prove that the following properties are valid:

**Property**

**2.**

In both noncooperative and cooperative scenarios, there always exists $\nu \ll 0$ if the node to be located is inside the convex polygon composed of adjacent nodes, whereas there is no ν satisfying this condition if the node is outside the convex polygon.

The proof of Property 2 is given in Appendix C.

According to Property 2, Proposition 3 can be applied in both noncooperative and cooperative scenarios; however, there is a limitation that it can only be applied if all the targets are located in the convex hull composed of adjacent nodes. In contrast, Proposition 3 does not hold if there are targets outside the convex hull formed by neighboring nodes.

In the third problem, the angle measurement errors will influence the final positioning result. In addition, in the process of calculating the null space of $\Omega $, it is possible that no suitable $\nu \ll 0$ exists due to the errors. In this case, Proposition 3 will also be invalid, and it is necessary to eliminate it.

The paper [36] used the method of principal component analysis (PCA) to reduce the deviation of the relative angular matrix in source localization. The main steps are as follows. First, $\Omega $ is decomposed by SVD. Then, all the eigenvalues are sorted in descending order, and the large eigenvalues are selected as the main eigenvalues. At the same time, the eigenvectors corresponding to the eigenvalues are selected to reconstruct $\Omega $, which is denoted by ${\Omega}^{\prime}$. The null space of ${\Omega}^{\prime}$ is determined; one of the vectors is selected as the value of the base vector ${\phi}_{1}$ and is multiplied by the coefficient ${k}_{1}$ to satisfy $\nu ={k}_{1}{\phi}_{1}\ll 0$. The PCA method is simple and efficient; when the measurement errors are not large, it can calculate $\nu $ well. In WSN localization, the PCA method cannot obtain the appropriate $\nu $ as the errors and the number of targets increase. If the cosine theorem is used to transform the ranging data into angle data, the ranging measurement error will be converted into the angle measurement error after the calculation. Hence, similar problems will also exist. We consider the main reason for this problem to be that the distance circles formed by the node and the range measurement may not intersect at one point. Then, the sum of radian measures of the relative angles of each node at the same point will not equal $2\pi $.

Let ${\widehat{\alpha}}_{1},{\widehat{\alpha}}_{2},\dots ,{\widehat{\alpha}}_{n}$ be the estimated values of the angles, formed by the target and its adjacent nodes, and the corresponding angle measurements or calculated values be ${\alpha}_{1},{\alpha}_{2},\dots ,{\alpha}_{n}$. We define the angle least squares cost function as follows:
Formula (42) is a linear optimization problem with equality constraints and can be transformed into an unconstrained optimization problem by introducing Lagrange multipliers. If the Lagrange multiplier is $\lambda $, then Formula (42) is equivalent to:
We calculate the partial derivatives of ${f}_{\alpha}^{\prime}$:
Setting every derivative in (44) to zero, we obtain the following optimal point:

$$\begin{array}{c}arg\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\underset{{\widehat{\alpha}}_{i}}{min}\phantom{\rule{4pt}{0ex}}{F}_{\alpha}=\sum _{i=1}^{N}{\left({\widehat{\alpha}}_{i}-{\alpha}_{i}\right)}^{2}\\ \mathrm{s}.\mathrm{t}.\phantom{\rule{4pt}{0ex}}\sum _{i=1}^{N}{\widehat{\alpha}}_{i}=2\pi \end{array}.$$

$$arg\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\underset{{\widehat{\alpha}}_{i}}{min}\phantom{\rule{4pt}{0ex}}{f}_{\alpha}^{\prime}=\sum _{i=1}^{N}{\left({\widehat{\alpha}}_{i}-\alpha \right)}^{2}+\lambda \left(\sum _{i=1}^{N}{\widehat{\alpha}}_{i}-2\pi \right)$$

$$\left\{\begin{array}{c}{\displaystyle \frac{\partial {f}_{\alpha}^{\prime}}{\partial {\widehat{\alpha}}_{1}}=2\left({\widehat{\alpha}}_{1}-{\alpha}_{1}\right)-\lambda}\hfill \\ \phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\vdots \hfill \\ {\displaystyle \frac{\partial {f}_{\alpha}^{\prime}}{\partial {\widehat{\alpha}}_{n}}=2\left({\widehat{\alpha}}_{n}-{\alpha}_{n}\right)-\lambda}\hfill \\ {\displaystyle \frac{\partial {f}_{\alpha}^{\prime}}{\partial \lambda}={\widehat{\alpha}}_{1}+{\widehat{\alpha}}_{2}+\dots {\widehat{\alpha}}_{n}-2\pi}\hfill \end{array}\right..$$

$$\left\{\begin{array}{c}{\displaystyle {\widehat{\alpha}}_{1}=\frac{1}{2}\lambda +{\alpha}_{1}}\hfill \\ \phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\vdots \hfill \\ {\displaystyle {\widehat{\alpha}}_{n}=\frac{1}{2}\lambda +{\alpha}_{n}}\hfill \\ {\displaystyle \lambda =\frac{2}{n}\left[2\pi -\left({\widehat{\alpha}}_{1}+{\widehat{\alpha}}_{2}+\dots {\widehat{\alpha}}_{n}\right)\right]}\hfill \end{array}\right..$$

Using this method, the relative angle between targets and adjacent nodes can be estimated. After that, the sum of relative angular radians of each target will be $2\pi $. According to the properties of the relative angular matrix, $\nu \ll 0$ must exist. After that, F can be transformed into a globally convex function by Proposition 3 and solved by the Gauss–Newton iteration method.

If the cosine theorems are used to calculate the angle, the theorem may be inapplicable. In other words, because of the existence of the ranging error, the triangle’s trilateral side lengths may not satisfy the theorem’s condition, and the method needs to be further improved. In this paper, we use the generalized cosine law. Assume that the angle in a triangle is denoted by $\beta $; then, we calculate $\beta $ as follows:

$$\beta =\left\{\begin{array}{c}\pi \phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}t<-1\hfill \\ \phantom{\rule{4pt}{0ex}}arccos\phantom{\rule{4.pt}{0ex}}t\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}-1\le t\le 1\hfill \\ 0\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}t>1\hfill \end{array}\right..$$

Above, tis calculated from the trilateral relationship according to the cosine theorem. We call the respective methods the “angle-based null space algorithm” (A-NLS) and “cosine law-based null space algorithm” (C-NLS), whereby the angles are obtained by angle measurement or the cosine law calculation. The main steps of the algorithm are shown in Algorithm 1.

Algorithm 1: A-NLS and C-NLS algorithms. |

Input: ${\mathit{s}}_{i},{\rho}_{i},1\le i\le L,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}i\in {\mathbb{N}}^{+}$ and ${\alpha}_{i}$ (the angle observation is unnecessary for C-NLS); |

Output: $\widehat{\mathit{x}}$ |

1: Measuring or calculating $\Omega $ that entails errors; |

2: Angle estimation is performed by using the Equation (45); |

3: Obtain ${\Omega}^{\prime}$; |

4: Calculate the null space of ${\Omega}^{\prime}$, and choose the appropriate ${k}_{i}$ so that $\nu \ll 0$; |

5: For $\forall i$, calculate ${\rho}_{i}^{\prime}={\rho}_{i}-{\nu}_{i}$, set $K>0$, $t=0$, and choose random ${\mathit{x}}^{0}$; |

6: while $\Vert {\mathit{x}}^{t+1}-{\mathit{x}}^{t}\Vert >K$ do |

7: Update ${\mathit{x}}^{t+1}$ for using the Gauss–Newton iteration method; |

8: $t=t+1$; |

9: end while |

10: return $\widehat{\mathit{x}}={\mathit{x}}^{t}$ |

## 5. Simulations and Results

In the fifth part of this paper, we will validate the proposition and the proposed algorithm using a numerical simulation. The following simulation chooses two typical scenarios of non-cooperative and cooperative positioning for analysis and verification.

#### 5.1. Simulation Scenario Setting

In the noncooperative scenario, we assumed that there were four anchors and one target. In the cooperative scenario, there were two targets and six anchors. The Cartesian coordinate system was established in the two-dimensional plane. The coordinates of each anchor are shown in Table 1. Three kinds of environments were simulated: the NLOS environment, the LOS environment, and the case of negative ranging errors. We can consider the latter case as a particular condition. Although it is not common in actual positioning practice, we can regard it as the equivalent ranging error after using Proposition 3. The magnitudes of errors of each scenario in various situations are shown in Table 2 and Table 3.

#### 5.2. Convexity Verification

First, function ${F}_{s}$ was simulated globally to observe the convexity in various environments. The convexity of ${F}_{s}$ was considered under various ranging errors. The function image, the semipositive definite condition, and the estimates calculated by the iterative algorithm were obtained. The results are shown in Figure 2.

Figure 2c,f,g shows the condition of Hessian matrix $\mathit{J}$ at each point in the plane; the red part represents semipositive definite, the blue part seminegative definite, and the green part indefinite. Theorem 1 shows that if $\mathit{J}$ is semipositive definite, the function is convex. It is observed from Figure 2c that if the targets were in the NLOS environment, the semipositive definite area was discontinuous. The sum of the indefinite and seminegative definite areas was larger. If the targets were in the LOS environment, the semipositive definite area was continuous, while the sum of indefinite and seminegative definite areas was smaller. Proposition 2 shows that if there is a positive ranging error, the cost function is nonconvex in the global range. Therefore, in the above two environments, ${F}_{s}$ cannot be nonconvex in the global range.

The target position was solved for by the Gauss–Newton iteration method, with different initial values selected from different directions. The results are shown in Figure 2b,e,h. In the NLOS environment, because of the positive errors, the LS cost function ${F}_{s}$ had more than one local optimal point due to nonconvexity. When the initial value varied, the iterative algorithm converged to different minimums. In the LOS environment, there were lower ranging errors. Although the LS cost function ${F}_{s}$ was also nonconvex in the global range, there was no increase in the number of local optimal points. In this case, the iterative algorithm converged to the same location. Hence, the original LS model was applicable in the LOS environment.

The results obtained if the ranging error was negative and satisfied the condition for the cost function ${F}_{s}$ to be convex are shown in Figure 2g,i. It is observed that $\mathit{J}$ was semipositive definite and ${F}_{s}$ was convex in the global range. Figure 2h shows the results of the Gauss–Newton iteration algorithm with various initial values. The circle formed by the dotted lines in the graph indicates that the ranging error was negative, and its size is the absolute value of the distance observation. According to the results, the algorithm can eventually iterate to the same location regardless of the initial value, which confirms the global convergence in this case.

In the cooperative scenario, various initial values were selected, and the target location was calculated by the Gauss–Newton iterative algorithm. The iterative images are shown in Figure 3a–c. In the NLOS positioning environment, because of the positive ranging errors, the cost function was not convex in the global range. Therefore, various initial values caused the iteration algorithm to converge to different minimums. In the LOS positioning environment, although ${F}_{c}$ was also nonconvex in the global range, the positive ranging error was lower; hence, the algorithm could still converge to the same local optimal point. If the ranging error was negative, the cost function was convex in the global range. Thus, regardless of the selected initial value, the algorithm would converge to the global optimal point.

#### 5.3. Null Space Algorithm Performance

To compare the performance of algorithms (LS, A-NLS, and C-NLS), the following simulations were performed in both the noncooperative and cooperative scenarios. We assumed that all the targets were located in the polygon composed of adjacent nodes. The coordinates of each anchor are shown in Table 1. We performed simulations in both the LOS and NLOS environments. The ranging error parameters were set to ${\mu}_{nlos}=5$ m, ${\sigma}_{los}^{2}$ = 3 m

^{2}, and ${\sigma}_{nlos}^{2}$ = 4.5 m^{2}, and in the AOA angle measurement, it was assumed that the parameters of the relative angle error matrix were ${\mu}_{\alpha}=0.1,\phantom{\rule{4pt}{0ex}}{\sigma}_{\alpha}^{2}=0.5$. In the noncooperative scenario, the real location of the target was ${\mathit{x}}_{1}={\left[2,4\right]}^{T}$, while in the cooperative scenario, the real locations of the two targets were ${\mathit{x}}_{1}={\left[4,3\right]}^{T}$ and ${\mathit{x}}_{2}={\left[-6,-5\right]}^{T}$. For the LS, C-NLS, and A-NLS algorithms, any position was selected as the initial iteration value of the algorithm in each calculation. To consider all directions of the location of the initial value, the distribution ${\widehat{\mathit{x}}}_{0}\sim N\left({\mu}_{0},{\Sigma}_{0}\right)$ was used, where ${\mu}_{0}$ is the mean vector and ${\Sigma}_{0}$ is the covariance matrix; their values were set to ${\mu}_{0}={\left[50,50\right]}^{T}$ and ${\Sigma}_{0}=\left[\begin{array}{cc}100& 0\\ 0& 100\end{array}\right]$. As a reference, we chose the SDP and PPM algorithms to compare the performance with that of the null space algorithm proposed in this paper. For the PPM algorithm, the initial iteration position of each target was equal to the average of coordinates of its adjacent nodes. For each scenario, 100 numerical simulations were performed. The estimated positions obtained by the algorithms were compared with the real positions of the targets. The root mean squared errors (RMSE) were calculated according to Formula (47).
$${e}_{RMSE}=\sqrt{\frac{1}{M}\sum _{j=1}^{M}{\parallel {\widehat{\mathit{x}}}_{j}-{\mathit{x}}_{j}\parallel}_{2}}.$$

We calculated the convergence probability for different algorithms. The simulation results are shown in Figure 4, Table 4 and Table 5. If the convergence threshold was 5 m, we can see from the graphs or tables that in the LOS environment, there was a high convergence probability of each algorithm in the noncooperative scenario, while in the cooperative scenario, the convergence probability of the LS and PPM algorithm became lower. In the NLOS environment, the convergence probability of the LS and PPM algorithm decreased seriously, especially in the cooperative scenarios, which was almost non-convergent. The convergence performance of the SDP algorithm in the cooperative scenario also decreased considerably. However, the C-NLS algorithm maintained a high convergence probability in all environments and scenarios. The performance of the A-NLS algorithm was similar to that of the C-NLS algorithm, but it slightly decreased in the NLOS environment of the cooperative scenario.

Afterwards, the corresponding cumulative probability distributions of errors were obtained. The results are shown in Figure 5. In particular, Figure 5a,c shows that in the LOS environment, the differences between the algorithms were not significant in both the noncooperative and cooperative scenarios. In the NLOS environment, as shown in Figure 5b,d, the differences between the algorithms were apparent. The LS and PPM algorithms showed large positioning errors in the cooperative and noncooperative scenarios. The main reason is that the positive ranging errors increased, which directly led to a sharp decline of positioning performance.

The location precision of the SDP and null space algorithms (A-NLS, C-NLS) did not decrease in the NLOS environment, which reflects the stability of these algorithms in various situations; i.e., the algorithms can obtain better location estimates in both the LOS and NLOS environments. At the same time, the null space algorithm proposed in this paper was slightly better than the traditional SDP algorithm in both noncooperative and cooperative scenarios and achieved the desired goal.

## 6. Conclusions

In this paper, a necessary and sufficient condition for the global convexity of the LS cost function was specified for WSN positioning. Generally, when all the ranging errors were far less than zero, the LS cost function was convex. Next, we defined the relative angle matrix in both the noncooperative and cooperative scenarios and proved the two essential properties. We observed that if all the targets were located in the convex polygon formed by their adjacent nodes, the LS cost function could be transformed into a globally convex function by constructing measurements with a negative distance. Based on the analysis, we proposed a robust algorithm for WSN localization. The proposed method reduced the sensitivity of the Gauss–Newton iteration algorithm to initial value selection and made the function globally convex. In other words, the function had the characteristic of large-scale convergence. In the fifth part of the article, numerical simulations were performed to verify the proposition described in the third part, and the robust algorithm was compared with the conventional methods. The results showed that the null space algorithm effectively constrained the error in the NLOS environment and obtained more accurate positioning results in both the LOS and NLOS environments.

In the future, we will carry out a study on the impact of varying the topologies and number of anchors and targets. Furthermore, we will deal with the problem when the targets are not located inside the convex polygon formed by its neighboring nodes.

## Author Contributions

Y.T. and J.L. proposed and implemented the main idea. S.T. organized the overall flow of the manuscript, and Y.T. drafted the manuscript. J.Z. and W.L. refined the manuscript.

## Funding

This work is supported by the National Natural Science Foundation of China (Grant No. 61601511).

## Conflicts of Interest

The authors declare no conflict of interest.

## Appendix A

Before proving the proposition, we first give the following lemma:

**Lemma**

**A1.**

A matrix, which is the sum of finite semipositive definite matrices, is still semipositive definite. That is, if ${\mathit{R}}_{i}\u2ab00,\phantom{\rule{4pt}{0ex}}1\le i\le N,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}i\in {\mathbb{N}}^{+}$, there exists $\mathit{W}={\sum}_{i=1}^{N}{\mathit{R}}_{i}\u2ab00$.

**Proof of Proposition**

**1.**

Consider decomposing $\mathit{J}$ and the representation $\mathit{J}={\sum}_{i=1}^{N}{\mathit{Q}}_{i}$, where:
To find the eigenvalues of ${\mathit{Q}}_{i}$, let:
Simplifying it, we obtain:
The two roots of $\lambda $ can be obtained as follows:
As Formula (A4) shows, matrix ${\mathit{Q}}_{i}$ has two eigenvectors, and ${\lambda}_{1}>0$ is invariable. If another eigenvector satisfies ${\lambda}_{2}={\widehat{d}}_{i}-{\rho}_{i}\ge 0$, then ${\mathit{Q}}_{i}\u2ab00$. From Lemma A1, we know that if ${\widehat{d}}_{i}-{\rho}_{i}\ge 0,\phantom{\rule{4pt}{0ex}}1\le i\le N,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}i\in {\mathbb{N}}^{+}$ holds, then $\mathit{J}\u2ab00$. Then, the set of all estimates ${\widehat{\mathit{x}}}_{1}$ that satisfy this condition is $\mathcal{C}$. □

$${\mathit{Q}}_{i}=\left[\begin{array}{cc}{\displaystyle \frac{{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}}+\frac{{\rho}_{i}}{{\widehat{d}}_{i}^{3}}{\left({x}_{{s}_{i}}-{\widehat{x}}_{1}\right)}^{2}}& {\displaystyle \frac{{\rho}_{i}}{{\widehat{d}}_{i}^{3}}\left({x}_{{s}_{i}}-{\widehat{x}}_{1}\right)\left({y}_{{s}_{i}}-{\widehat{y}}_{1}\right)}\\ {\displaystyle \frac{{\rho}_{i}}{{\widehat{d}}_{i}^{3}}\left({x}_{{s}_{i}}-{\widehat{x}}_{1}\right)\left({y}_{{s}_{i}}-{\widehat{y}}_{1}\right)}& {\displaystyle \frac{{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}}+\frac{{\rho}_{i}}{{\widehat{d}}_{i}^{3}}{\left({y}_{{s}_{i}}-{\widehat{y}}_{1}\right)}^{2}}\end{array}\right].$$

$$\left|\lambda I-{\mathit{Q}}_{i}\right|=0.$$

$${\lambda}^{2}-\frac{2{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}}\lambda +\frac{{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}}=0.$$

$$\left\{\begin{array}{c}{\lambda}_{1}=1\hfill \\ {\displaystyle {\lambda}_{2}=\frac{{\widehat{d}}_{i}-{\rho}_{i}}{{\widehat{d}}_{i}}}\hfill \end{array}\right..$$

## Appendix B

**Proof of Property**

**1.**

We first show that this property holds in the noncooperative scenario with one target. Let the angles between two adjacent anchor nodes and the target be ${\alpha}_{1},{\alpha}_{2},\dots ,{\alpha}_{N}$. Then, we can compute that:
An elementary row transformation is performed on ${\Omega}_{s}$; then, the simplified matrix can be structured as:

$${\Omega}_{s}=\left[\begin{array}{ccccc}1& cos{\alpha}_{1}& cos\left({\alpha}_{1}+{\alpha}_{2}\right)& \dots & cos\left(\sum _{i=1}^{N-1}{\alpha}_{i}\right)\\ cos\left(\sum _{i=2}^{N}{\alpha}_{i}\right)& 1& cos{\alpha}_{2}& \dots & cos\left(\sum _{i=2}^{N-1}{\alpha}_{i}\right)\\ cos\left(\sum _{i=3}^{N}{\alpha}_{i}\right)& cos\left(\sum _{i=3}^{N}{\alpha}_{i}+{\alpha}_{1}\right)& 1& \dots & cos\left(\sum _{i=3}^{N-1}{\alpha}_{i}\right)\\ \vdots & \vdots & \vdots & \ddots & \vdots \\ cos{\alpha}_{N}& cos\left({\alpha}_{N}+{\alpha}_{1}\right)& cos\left({\alpha}_{N}+{\alpha}_{1}+{\alpha}_{2}\right)& \dots & 1\end{array}\right]$$

$$=\left[\begin{array}{ccccc}1& cos{\alpha}_{1}& cos\left({\alpha}_{1}+{\alpha}_{2}\right)& \dots & cos\left(\sum _{i=1}^{N-1}{\alpha}_{i}\right)\\ cos\left(-{\alpha}_{1}\right)& 1& cos\left(-{\alpha}_{1}+{\alpha}_{1}+{\alpha}_{2}\right)& \dots & cos\left(-{\alpha}_{1}\sum _{i=1}^{N-1}{\alpha}_{i}\right)\\ cos\left(-{\alpha}_{1}-{\alpha}_{2}\right)& cos\left(-{\alpha}_{1}-{\alpha}_{2}+{\alpha}_{1}\right)& 1& \dots & cos\left(-{\alpha}_{1}-{\alpha}_{2}-\sum _{i=1}^{N-1}{\alpha}_{i}\right)\\ \vdots & \vdots & \vdots & \ddots & \vdots \\ cos\left(-\sum _{i=1}^{N-1}{\alpha}_{i}\right)& cos\left(\sum _{i=1}^{N-1}{\alpha}_{i}+{\alpha}_{1}\right)& cos\left(\sum _{i=1}^{N-1}{\alpha}_{i}+{\alpha}_{1}+{\alpha}_{2}\right)& \dots & 1\end{array}\right].$$

$${\Omega}_{s}^{\prime}=\left[\begin{array}{ccccc}1& cos{\alpha}_{1}& cos\left({\alpha}_{1}+{\alpha}_{2}\right)& \dots & cos\left(\sum _{i=1}^{N-1}{\alpha}_{i}\right)\\ 0& sin{\alpha}_{1}& sin\left({\alpha}_{1}+{\alpha}_{2}\right)& \dots & sin\left(\sum _{i=1}^{N-1}{\alpha}_{i}\right)\\ 0& 0& 0& \dots & 0\\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0& 0& 0& \dots & 0\end{array}\right].$$

From this, we observe that the rank of ${\Omega}_{s}$ with one target satisfies $r\le 2$. Consider the case of more than one target in the noncooperative scenario. For each node, we can perform a similar elementary row transformation, and the number of nonzero rows is no more than two. Hence, we know that the number of nonzero rows of ${\Omega}_{s}^{\prime}$ will not be greater than $\tau $. In the cooperative scenario, the first to the $N\mathrm{th}$ rows of ${\Omega}_{c}$ are similar to those of ${\Omega}_{s}$. For rows numbered from $N+1$ to L, due to the existence of the TT link, the number of nonzero elements per row is four; if $i=j$, we have ${\omega}_{ij}=2$. The reason is that the targets connect between the cooperative link. If each target has at least two known location nodes connected to it, the element in the respective row can be reduced to zero by a row transformation similar to that in the noncooperative scenario. In the simplified relative angular matrix ${\Omega}_{c}^{\prime}$, each user node is independent of other nodes, so it must hold that $r\le \tau $. □

## Appendix C

**Definition**

**A1.**

An adjacent node of ${T}_{j}$ is defined as the node that has a ranging link with ${T}_{j}$, whether it is an anchor or a target.

**Definition**

**A2.**

A point $\mathit{p}$ in a convex set $\mathcal{K}$ is said to be an extreme point if it cannot be written in the form $\mathit{p}=t\mathit{x}+\left(1-t\right)\mathit{y}$, where $\mathit{x}$ and $\mathit{y}$ are distinct points of $\mathcal{K}$ and $0<t<1$; informally, this means $\mathit{p}$ is not between two other points of $\mathcal{K}$.

**Lemma**

**A2.**

Every point in a bounded closed convex set must be a convex combination of its extreme points [40].

**Lemma**

**A3.**

Let ${\mathcal{K}}_{1},{\mathcal{K}}_{2}$ be convex subsets of ${\mathbb{R}}^{n}$ and ${\mathbb{R}}^{m}$, respectively. Then, ${\mathcal{K}}_{1}\times {\mathcal{K}}_{2}\subset {\mathbb{R}}^{n}\times {\mathbb{R}}^{m}{\mathbb{R}}^{m+n}$ is convex. Furthermore, point $\left({P}_{1},{P}_{2}\right)$ is an extreme point of ${\mathcal{K}}_{1}\times {\mathcal{K}}_{2}$ if and only if ${P}_{1}$ is an extreme point of ${\mathcal{K}}_{1}$ and ${P}_{2}$ is an extreme point of ${\mathcal{K}}_{2}$ [40].

**Figure A1.**Establish the coordinate system with the user node as the origin. Draw the unit circle with the origin as the center. The points and angles defined by each link are as shown. Graph (

**a**) denotes one target ${T}_{1}$ in the noncooperative scenario, and Graph (

**b**) denotes the cooperative scenario, where one of the user nodes is ${T}_{j}$.

**Proof of Property**

**2.**

We first assume that there is only one node in the scenario, and the error vector is set to $\epsilon ={\left[{\epsilon}_{1}\phantom{\rule{4pt}{0ex}}{\epsilon}_{2}\phantom{\rule{4pt}{0ex}}\dots \phantom{\rule{4pt}{0ex}}{\epsilon}_{N}\right]}^{T}$. According to Formula (32),
As Figure A1a shows, if a coordinate system is established with ${T}_{1}$ as the origin, then Formula (32) can be rewritten as follows:
Take ${T}_{1}$ as the center of a circle; consider a unit circle, and suppose that the intersection with ${l}_{i}$ occurs at point ${P}_{i}$. It is easy to observe that $\left[\begin{array}{c}1\\ 0\end{array}\right],\left[\begin{array}{c}cos\alpha {\phantom{\rule{3.33333pt}{0ex}}}_{1}\\ sin\alpha {\phantom{\rule{3.33333pt}{0ex}}}_{1}\end{array}\right],\dots ,\left[\begin{array}{c}cos\left({\sum}_{j=1}^{N-1}{\alpha}_{j}\right)\\ sin\left({\sum}_{j=1}^{N-1}{\alpha}_{j}\right)\end{array}\right]$ are the coordinates of points ${P}_{1},{P}_{2},\dots ,{P}_{N}$ in the Cartesian coordinate system. If ${P}_{1},{P}_{2},\dots ,{P}_{N}$ form a convex polygon and ${P}_{1},{P}_{2},\dots ,{P}_{N}$ are the extreme points of that polygon, the origin ${T}_{1}$ must be a point inside the convex polygon. Lemma 3 shows that there exists a convex combination, so that the coordinates of ${T}_{1}$ are composed of convex combinations of ${P}_{1},{P}_{2},\dots ,{P}_{N}$. In other words, $\exists \phantom{\rule{4pt}{0ex}}{\xi}_{1},{\xi}_{2},\dots ,{\xi}_{N}$, ${\xi}_{i}\in \left(0,1\right)$ and ${\sum}_{i=1}^{N}{\xi}_{i}=1$ such that:
Let ${\epsilon}_{i}={\xi}_{i}$; then, we can prove that Property 2 holds in the single target scenario.

$$\left\{\begin{array}{c}{\epsilon}_{1}+\sum _{i=2}^{N}cos\left(\sum _{j=1}^{i-1}{\alpha}_{j}\right){\epsilon}_{i}=0\hfill \\ \phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\sum _{i=2}^{N}sin\left(\sum _{j=1}^{i-1}{\alpha}_{j}\right){\epsilon}_{i}=0\hfill \end{array}\right..$$

$$\left[\begin{array}{c}1\\ 0\end{array}\right]{\epsilon}_{1}+\sum _{i=2}^{N}\left[\begin{array}{c}cos\left(\sum _{j=1}^{i-1}{\alpha}_{j}\right)\\ sin\left(\sum _{j=1}^{i-1}{\alpha}_{j}\right)\end{array}\right]{\epsilon}_{i}=\left[\begin{array}{c}0\\ 0\end{array}\right].$$

$$\left[\begin{array}{c}1\\ 0\end{array}\right]{\xi}_{1}+\sum _{i=2}^{N}\left[\begin{array}{c}cos\left(\sum _{j=1}^{i-1}{\alpha}_{j}\right)\\ sin\left(\sum _{j=1}^{i-1}{\alpha}_{j}\right)\end{array}\right]{\xi}_{i}=\left[\begin{array}{c}0\\ 0\end{array}\right].$$

If more than one node exists, we suppose that the ${j}^{\mathrm{th}}$ user node ${T}_{j}$ has a total of ${r}_{jt}$ links, including ${r}_{ja}$ AT links and ${r}_{jc}$ TT links. These links divide the plane into ${r}_{jt}$ parts. Every two adjacent links form an angle with the ${T}_{j}$ as the vertex. Let the radian measures of angles at ${T}_{j}$ be ${\gamma}_{j1},{\gamma}_{j2},\dots ,{\gamma}_{j\left({r}_{ja}-1\right)},{\gamma}_{j{r}_{ja}},\dots ,{\gamma}_{j{r}_{jt}}$. The two adjacent links constituting these angles are numbered ${l}_{{s}_{j1}},{l}_{{s}_{j2}},\dots ,{l}_{{s}_{j{r}_{jt}}},{l}_{{s}_{j1}}$, where ${s}_{jk}$ is the number of all links connected to ${T}_{j}$, which satisfies ${s}_{j\left(k+1\right)}>{s}_{jk}$. The error vector is set to $\epsilon ={\left[{\epsilon}_{1}\phantom{\rule{4pt}{0ex}}{\epsilon}_{2}\phantom{\rule{4pt}{0ex}}\dots \phantom{\rule{4pt}{0ex}}{\epsilon}_{L}\right]}^{T}$; according to Formula (36), it holds that:

$$\left\{\begin{array}{c}\begin{array}{c}{\epsilon}_{{s}_{11}}+\sum _{k=2}^{{r}_{1t}}cos\left(\sum _{m=1}^{k-1}{\gamma}_{1m}\right){\epsilon}_{{s}_{1k}}=0\hfill \\ \begin{array}{c}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\sum _{k=2}^{{r}_{1t}}sin\left(\sum _{m=1}^{k-1}{\gamma}_{1m}\right){\epsilon}_{{s}_{1k}}=0\hfill \\ \phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\vdots \hfill \end{array}\hfill \\ {\epsilon}_{{s}_{M1}}+\sum _{k=2}^{{r}_{Mt}}cos\left(\sum _{m=1}^{k-1}{\gamma}_{Mm}\right){\epsilon}_{{s}_{Mk}}=0\hfill \\ \phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\sum _{k=2}^{{r}_{Mt}}sin\left(\sum _{m=1}^{k-1}{\gamma}_{Mm}\right){\epsilon}_{{s}_{Mk}}=0\hfill \end{array}\hfill \end{array}\right..$$

As shown in Figure A1b, consider any ${T}_{j}$, and consider a unit circle centered at ${T}_{j}$ that intersects ${l}_{i}$ at points ${P}_{{s}_{j1}},{P}_{{s}_{j2}},\dots ,{P}_{{s}_{j{r}_{jt}}}$. Then, the $j\mathrm{th}$ and $j+1\mathrm{th}$ lines in Equation (A10) can be written as follows:
where $\left[\begin{array}{c}1\\ 0\end{array}\right],\left[\begin{array}{c}cos{\gamma}_{j1}\\ sin{\gamma}_{j1}\end{array}\right],\dots ,\left[\begin{array}{c}cos\left({\sum}_{m=1}^{{r}_{jt}}{\gamma}_{jm}\right)\\ sin\left({\sum}_{m=1}^{{r}_{jt}}{\gamma}_{jm}\right)\end{array}\right]$ represent the coordinates of points ${P}_{{s}_{j1}},{P}_{{s}_{j2}},\dots ,{P}_{{s}_{j{r}_{jt}}}$ in the Cartesian coordinate system. Then, ${P}_{{s}_{j1}},{P}_{{s}_{j2}},\dots ,{P}_{{s}_{j{r}_{jt}}}$ form a convex polygon, and they are the extreme points of that polygon. Hence, all the points inside the polygon constitute a closed convex set ${\mathcal{H}}_{j}\subseteq {\mathbb{R}}^{2}$. If all ${T}_{i}$ are located in the corresponding convex polygons, then set ${\mathcal{H}}_{j}$ exists for $\forall j,\phantom{\rule{4pt}{0ex}}1\le j\le M,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}j\in {\mathbb{N}}^{+}$.

$$\left[\begin{array}{c}1\\ 0\end{array}\right]{\epsilon}_{{s}_{j1}}+\sum _{k=2}^{{r}_{jt}}\left[\begin{array}{c}cos\left(\sum _{m=1}^{k-1}{\gamma}_{jm}\right)\\ sin\left(\sum _{m=1}^{k-1}{\gamma}_{jm}\right)\end{array}\right]{\epsilon}_{{s}_{jk}}=\left[\begin{array}{c}0\\ 0\end{array}\right],$$

As can be observed from Lemma A3, the Cartesian product ${\mathcal{H}}_{t}={\mathcal{H}}_{1}\times {\mathcal{H}}_{2}\times \dots \times {\mathcal{H}}_{M}\subseteq {\mathbb{R}}^{\eta}$ is also a convex set. Combining extreme points ${\widehat{\mathit{x}}}_{j},\phantom{\rule{4pt}{0ex}}1\le j\le M,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}j\in {\mathbb{N}}^{+}$ in ${\mathcal{H}}_{j}$ forms a new extreme point $\widehat{\mathit{x}}={\left[{\widehat{\mathit{x}}}_{1}\phantom{\rule{4pt}{0ex}}{\widehat{\mathit{x}}}_{2}\phantom{\rule{4pt}{0ex}}\dots \phantom{\rule{4pt}{0ex}}{\widehat{\mathit{x}}}_{M}\right]}^{T}\in {\mathbb{R}}^{2M}$ in ${\mathcal{H}}_{t}$ in ${\mathcal{H}}_{t}$. According to Lemma A2, the origin is a convex combination of extreme points. In other words, $\exists \phantom{\rule{4pt}{0ex}}{\xi}_{1},{\xi}_{2},\dots ,{\xi}_{L}$, ${\xi}_{i}\in \left(0,1\right)$ and ${\sum}_{i=1}^{L}{\xi}_{i}=1$ satisfy Equation (37). If ${\epsilon}_{i}={\xi}_{i}$, then Property 2 also holds in the multitarget scenario. □

## References

- Tian, S.; Dai, W.; Li, G.; Lv, J.; Xu, R.; Cheng, J. On the Research of Cooperative Positioning: A Review. In Proceedings of the 4th China Satellite Navigation Conference, Wuhan, China, 15–17 May 2013. [Google Scholar]
- Parkinson, B.W. Global Positioning System: Theory and Applications, Volume II; American Institute of Aeronautics and Astronautics (AIAA): Reston, VA, USA, 1996; Volume 163. [Google Scholar]
- Witrisal, K.; Meissner, P.; Leitinger, E.; Shen, Y.; Gustafson, C.; Tufvesson, F.; Haneda, K.; Dardari, D.; Molisch, A.F.; Conti, A. High-Accuracy Localization for Assisted Living: 5G systems will turn multipath channels from foe to friend. IEEE Signal Process. Mag.
**2016**, 33, 59–70. [Google Scholar] [CrossRef] - Shahmansoori, A.; Garcia, G.E.; Destino, G.; Seco-Granados, G.; Wymeersch, H. Position and Orientation Estimation Through Millimeter-Wave MIMO in 5G Systems. IEEE Trans. Wirel. Commun.
**2018**, 17, 1822–1835. [Google Scholar] [CrossRef] - Jiang, L.; Cai, B.G.; Jian, W. Cooperative Localization of Connected Vehicles: Integrating GNSS with DSRC Using a Robust Cubature Kalman Filter. IEEE Trans. Intell. Transp. Syst.
**2017**, 18, 2111–2125. [Google Scholar] - Shen, Y.; Win, M.Z. Fundamental Limits of Wideband Localization and mdash; Part I: A General Framework. IEEE Trans. Inf. Theory
**2010**, 56, 4956–4980. [Google Scholar] [CrossRef] - Shen, Y.; Wymeersch, H.; Win, M.Z. Fundamental Limits of Wideband Localization—Part II: Cooperative Networks. IEEE Trans. Inf. Theory
**2010**, 56, 4981–5000. [Google Scholar] [CrossRef] - Penna, F.; Caceres, M.A.; Wymeersch, H. Cramer-Rao Bound for Hybrid GNSS-Terrestrial Cooperative Positioning. IEEE Commun. Lett.
**2010**, 14, 1005–1007. [Google Scholar] [CrossRef] - Gante, A.D.; Siller, M. A Survey of Hybrid Schemes for Location Estimation in Wireless Sensor Networks. Procedia Technol.
**2013**, 7, 377–383. [Google Scholar] [CrossRef] - Buehrer, R.M.; Jia, T. Collaborative Position Location; Wiley-IEEE Press: New York, NY, USA, 2011; pp. 1089–1114. [Google Scholar]
- Xiong, Z.; Sottile, F.; Caceres, M.A.; Spirito, M.A.; Garello, R. Hybrid WSN-RFID cooperative positioning based on extended kalman filter. In Proceedings of the 2011 IEEE-APS Topical Conference on Antennas and Propagation in Wireless Communications, Torino, Italy, 12–16 September 2011. [Google Scholar]
- Sottile, F.; Wymeersch, H.; Caceres, M.A.; Spirito, M.A. Hybrid GNSS-Terrestrial Cooperative Positioning Based on Particle Filter. In Proceedings of the 2011 IEEE Global Telecommunications Conference, Kathmandu, Nepal, 5–9 December 2011. [Google Scholar]
- Chen, L.; Wen, F. Received Signal Strength based Robust Cooperative Localization with Dynamic Path Loss Model. IEEE Sens. J.
**2016**, 16, 1265–1270. [Google Scholar] - Bao, D.; Hao, Z.; Hao, C.; Liu, S.; Zhang, Y.; Feng, Z. TOA Based Localization under NLOS in Cognitive Radio Network; Springer Press: New York, NY, USA, 2016; pp. 668–679. [Google Scholar]
- Tomic, S.; Beko, M.; Rui, D.; Montezuma, P. A Robust Bisection-based Estimator for TOA-based Target Localization in NLOS Environments. IEEE Commun. Lett.
**2017**, 21, 2488–2491. [Google Scholar] [CrossRef] - Nguyen, T.L.N.; Vy, T.D.; Shin, Y. An Efficient Hybrid RSS-AoA Localization for 3D Wireless Sensor Networks. Sensors
**2019**, 19, 2021. [Google Scholar] [CrossRef] - Ji, L.; Conan, J.; Pierre, S. Mobile Terminal Location for MIMO Communication Systems. IEEE Trans. Antennas Propag.
**2007**, 55, 2417–2420. [Google Scholar] - Goulianos, A.A.; Freire, A.L.; Barratt, T.; Mellios, E.; Beach, M. Measurements and Characterisation of Surface Scattering at 60 GHz. In Proceedings of the 2017 IEEE 86th Vehicular Technology Conference (VTC-Fall), Toronto, ON, Canada, 24–27 September 2017. [Google Scholar]
- Vaghefi, R.M.; Buehrer, R.M.; Wymeersch, H. Collaborative Sensor Network Localization: Algorithms and Practical Issues. Proc. IEEE
**2018**, 106, 1089–1114. [Google Scholar] - Shang, Y.; Rumi, W.; Zhang, Y.; Fromherz, M. Localization from Connectivity in Sensor Networks. IEEE Trans. Parallel Distrib. Syst.
**2004**, 15, 961–974. [Google Scholar] [CrossRef] - Forero, P.A.; Giannakis, G.B. Sparsity-Exploiting Robust Multidimensional Scaling. IEEE Trans. Signal Process.
**2012**, 60, 4118–4134. [Google Scholar] [CrossRef] - Li, B.; Cui, W.; Wang, B. A Robust Wireless Sensor Network Localization Algorithm in Mixed LOS/NLOS Scenario. Sensors
**2015**, 15, 23536–23553. [Google Scholar] [CrossRef] [PubMed] - Destino, G.; Abreu, G. On the Maximum Likelihood Approach for Source and Network Localization. IEEE Trans. Signal Process.
**2011**, 59, 4954–4970. [Google Scholar] [CrossRef] - Beck, A.; Stoica, P.; Li, J. Exact and Approximate Solutions of Source Localization Problems. IEEE Trans. Signal Process.
**2008**, 56, 1770–1778. [Google Scholar] [CrossRef] - Zaeemzadeh, A.; Joneidi, M.; Shahrasbi, B.; Rahnavard, N. Robust Target Localization Based on Squared Range Iterative Reweighted Least Squares. In Proceedings of the IEEE International Conference on Mobile Ad Hoc and Sensor Systems, Orlando, FL, USA, 22–25 October 2017. [Google Scholar]
- Oguz-Ekim, P.; Gomes, J.P.; Xavier, J.; Oliveira, P. Robust Localization of Nodes and Time-Recursive Tracking in Sensor Networks Using Noisy Range Measurements. IEEE Trans. Signal Process.
**2011**, 59, 3930–3942. [Google Scholar] [CrossRef] - Soares, C.; Xavier, J.; Gomes, J. Simple and fast cooperative localization for sensor networks. IEEE Trans. Signal Process.
**2015**, 63, 4532–4543. [Google Scholar] [CrossRef] - Soares, C.; Gomes, J. Dealing with bad apples: Robust range-based network localization via distributed relaxation methods. arXiv
**2016**, arXiv:1610.09020v1. [Google Scholar] - Biswas, P.; Ye, Y. Semidefinite programming for ad hoc wireless sensor network localization. In Proceedings of the International Symposium on Information Processing in Sensor Networks, Berkeley, CA, USA, 26–27 April 2004. [Google Scholar]
- Vaghefi, R.M.; Buehrer, R.M. Cooperative sensor localization with NLOS mitigation using semidefinite programming. In Proceedings of the 2012 9th Workshop on Positioning Navigation and Communication, Dresden, Germany, 15–16 March 2012. [Google Scholar]
- Ghari, P.; Shahbazian, R.; Ghorashi, S. Wireless Sensor Network Localization in Harsh Environments using SDP Relaxation. IEEE Commun. Lett.
**2016**, 20, 137–140. [Google Scholar] [CrossRef] - Tao, J.; Buehrer, R.M. A Set-Theoretic Approach to Collaborative Position Location for Wireless Networks. IEEE Trans. Mob. Comput.
**2011**, 10, 1264–1275. [Google Scholar] - Rydstrom, M.; Strom, E.G.; Svensson, A. Robust Sensor Network Positioning Based on Projections onto Circular and Hyperbolic Convex Sets (POCS). In Proceedings of the IEEE Workshop on Signal Processing Advances in Wireless Communications, Cannes, France, 2–5 July 2006. [Google Scholar]
- Blatt, D.; Hero, A.O. Energy-based sensor network source localization via projection onto convex sets. IEEE Trans. Signal Process.
**2006**, 54, 3614–3619. [Google Scholar] [CrossRef] - Wang, D.; Wan, J.; Wang, M.; Zhang, Q. An MEF-Based Localization Algorithm against Outliers in Wireless Sensor Networks. Sensors
**2016**, 16, 1041. [Google Scholar] [CrossRef] [PubMed] - Destino, G.; Abreu, G. Reformulating the least-square source localization problem with contracted distances. In Proceedings of the 2009 Conference Record of the Forty-Third Asilomar Conference on Signals, Systems and Computers, Pacific Grove, CA, USA, 1–4 November 2009. [Google Scholar]
- Destino, G.; Abreu, G.T.F.D. Improving source localization in NLOS conditions via ranging contraction. In Proceedings of the Workshop on Positioning Navigation and Communication, Dresden, Germany, 11–12 March 2010. [Google Scholar]
- Boyd, S.; Vandenberghe, L. Convex Optimization; Cambridge University Press: Cambridge, UK, 2004; pp. 61–65. [Google Scholar]
- Lay, D.C. Linear Algebra and Its Applications, 2e; Addison-Wesley: New York, NY, USA, 2000; pp. 341–358. [Google Scholar]
- Rockafellar, R.T. Convex Analysis; Princeton University Press: Princeton, NJ, USA, 1970; p. 19. [Google Scholar]

**Figure 1.**A simple example of Hessian matrix $\mathit{J}$. Graph (

**a**) shows the arrangement of elements in one of the cooperative scenarios. Graph (

**b**) represents ${\mathit{Q}}_{i}$ associated with the target ${T}_{i}$, and (

**c**) represents ${\mathit{Q}}_{i}^{\prime}$, which is the matrix after the row and column transformation of ${\mathit{Q}}_{i}$. Similarly, Graphs (

**d**,

**e**) represent ${\mathit{Q}}_{i}$ and ${\mathit{Q}}_{i}^{\prime}$ associated with target-target (TT) links in the cooperative scenario.

**Figure 2.**The graphs related to ${F}_{s}$ of one target in the noncooperative scenario. Above, Graphs (

**a**,

**d**,

**g**) are the images of ${F}_{s}$ in each scene; Graphs (

**b**,

**e**,

**h**) are the results of the Gauss–Newton iteration algorithm when different initial values were selected; Graphs (

**c**,

**f**,

**i**) represent the semipositive definite distribution of Hessian matrix $\mathit{J}$ in the two-dimensional plane.

**Figure 3.**The results of the Gauss–Newton iteration algorithm when different initial values were selected in the cooperative scenario. Above, graph (

**a**) shows the result for NLOS positioning environment, graph (

**b**) shows the result for LOS environment, and graph (

**c**) shows the result when the ranging error was negative.

**Figure 4.**Convergence for algorithms in the different scenarios and environments. Above, Graphs (

**a**,

**b**) are the results in the noncooperative scenario, where (a) represents the LOS environment, while (b) represents the NLOS environment. Graphs (

**c**,

**d**) are the results in the cooperative scenario, which represent the LOS and NLOS environments, respectively. The red boxes in the figure represent the anchors, while the blue stars represent the targets. We drew the ranging link as the green dotted line and the convergence radius as the blue dotted circle. The solid points represent the results of positioning.

**Figure 5.**The CDF of the minimum mean squared error (MESE) for algorithms in the different scenarios and environments. Above, Graphs (

**a**,

**b**) are the results in the noncooperative scenario, where (a) represents the LOS environment, while (b) represents the NLOS environment. Graphs (

**c**,

**d**) are the results in the cooperative scenario, which represent the LOS and NLOS environments, respectively.

Node Number | ${\mathit{A}}_{1}$ | ${\mathit{A}}_{2}$ | ${\mathit{A}}_{3}$ | ${\mathit{A}}_{4}$ | ${\mathit{A}}_{5}$ | ${\mathit{A}}_{6}$ |
---|---|---|---|---|---|---|

Noncooperative/(m) | $\left(-10,-10\right)$ | $\left(-10,10\right)$ | $\left(10,-10\right)$ | $\left(10,10\right)$ | – | – |

Cooperative/(m) | $\left(15,15\right)$ | $\left(30,0\right)$ | $\left(15,-15\right)$ | $\left(-15,-15\right)$ | $\left(-30,0\right)$ | $\left(-15,15\right)$ |

Link Number | ${\mathit{l}}_{1}$ | ${\mathit{l}}_{2}$ | ${\mathit{l}}_{3}$ | ${\mathit{l}}_{4}$ |
---|---|---|---|---|

NLOS${\mathit{\epsilon}}_{\mathit{i}}$/(m) | $10.59$ | $6.53$ | $7.23$ | $6.93$ |

LOS${\mathit{\epsilon}}_{\mathit{i}}$/(m) | $2.03$ | $1.58$ | $-1.48$ | $1.42$ |

Negative${\mathit{\epsilon}}_{\mathit{i}}$/(m) | $-17.42$ | $-24.06$ | $-26.57$ | $-20.69$ |

Link Number | ${\mathit{l}}_{1}$ | ${\mathit{l}}_{2}$ | ${\mathit{l}}_{3}$ | ${\mathit{l}}_{4}$ | ${\mathit{l}}_{5}$ | ${\mathit{l}}_{6}$ | ${\mathit{l}}_{7}$ |
---|---|---|---|---|---|---|---|

NLOS${\mathit{\epsilon}}_{\mathit{i}}$/(m) | $10.31$ | $8.98$ | $9.54$ | $11.04$ | $8.42$ | $2.72$ | $3.67$ |

LOS${\mathit{\epsilon}}_{\mathit{i}}$/(m) | $-1.62$ | $2.26$ | $3.08$ | $1.32$ | $4.22$ | $2.13$ | $-2.74$ |

Negative${\mathit{\epsilon}}_{\mathit{i}}$/(m) | $-29.13$ | $-30.32$ | $-34.61$ | $-38.75$ | $-35.69$ | $-28.02$ | $-36.64$ |

**Table 4.**Convergence probability in the noncooperative scenario. PPM, parallel projection method; SDP, semidefinite programming; A-NLS, angle-based null space algorithm; C-NLS, cosine law-based null space algorithm.

Algorithms | LS | PPM | SDP | A-NLS | C-NLS |
---|---|---|---|---|---|

LOS/% | 99 | 99 | 100 | 99 | 100 |

NLOS/% | 6 | 3 | 94 | 100 | 100 |

Algorithms | LS | PPM | SDP | A-NLS | C-NLS |
---|---|---|---|---|---|

LOS/% | 66 | 68 | 93 | 100 | 99 |

NLOS/% | 0 | 0 | 30 | 78 | 97 |

© 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/).