## 1. Introduction

The wireless sensor network (WSN) is a highly integrated discipline and has been well developed in the last decade [

1]. WSNs have enabled smart industry by exploiting the significant advantages such as extremely low power consumption [

2], self-organization, and on-site sensing. In typical smart industrial WSNs (SIWSNs), plenty of sensor nodes are deployed in industrial facilities to monitor manufacturing processes, compute simple tasks, collect and deliver information [

3]. SIWSNs can support a broad range of applications, such as factory automation, equipment management, fault diagnosis, surveillance, etc. However, SIWSNs also pose challenges due to the stringent requirements on reliability, latency, and security [

4,

5], and their susceptibility to the highly complicated environments with serious electromagnetic interference and jamming [

6]. Hence, we need to enhance the functionality and reliability of conventional WSNs to satisfy the requirements of industrial-grade applications.

One important issue for SIWSNs is the node localization. Wireless sensors/actuators are usually placed at specified moving points in industrial environments. For example, mobile sensor nodes (MSNs) may be mounted on the carrying facilities in wharves, freight terminals, and mines. It is critical to locate the MSNs quickly and accurately for target tracking and process monitoring. The global positioning system (GPS) is not applicable because SIWSNs usually operate in indoor or underground environments without the GPS signals. Therefore, the efficient, precise, and fast determination of relative positions of multiple MSNs is an important and challenging issue for SIWSNs.

Although wireless positioning methods have been studied extensively (as reviewed in

Section 2), the current schemes most focus on positioning in two-dimensional (2D) planes. The positioning in three-dimensional (3D) space has been less explored. Another key limitation is that the current methods usually locate a single node/target in one measurement trial and cannot perform multi-target positioning simultaneously. As mentioned earlier, to locate a number of MSNs quickly is an essential feature for industrial applications.

Motivated by the characteristics of SIWSNs and the deficiencies of current positioning algorithms, this paper proposes a new scheme, called Angle-of-arrival (AOA) based three-dimensional Multi-target Localization (ATML). This algorithm can provide fast simultaneous localization of multiple MSNs with small operational latency. The main contributions of this paper are as follows.

First, the ATML algorithm based on the iterative maximum-likelihood (ML) method is proposed. We design the sensor network architecture that has two anchor nodes (ANs) with fixed positions and a number of MSNs whose positions relative to the ANs are to be determined. We propose a multi-target single-input-multiple-output (MT-SIMO) signal transmission scheme that combines the code division multiplexing access (CDMA) and ML estimation. Each MSN is assigned a pre-defined orthogonal spread spectrum sequence and broadcasts the spreading sequence using an omnidirectional antenna. The ANs capture the signals from all the MSNs simultaneously using antenna arrays. Then, we adopt the interactive ML method to estimate the 2D AOAs of the line-of-sight (LOS) paths from each MSN to the ANs in the joint time-space domain. Finally, the relative positions of the MSNs in the 3D space are deduced according to the 3D geometric theory of skew lines.

Second, we conduct extensive simulations to evaluate and compare the performance of ATML with other methods in the literature. The simulations of AOA estimation and localization errors for varying the signal-to-noise ratio (SNR), number of MSNs, and AN antenna array size are presented. The results show that ATML can locate multiple MSNs simultaneously with high accuracy.

Third, we have developed a testbed of ATML and performed field experiments to validate the scheme. The prototype system comprises two portable transmitters (Tx) that send orthogonal pseudo-noise (PN) sequences simultaneously to emulate MSNs and a receiver (Rx) that captures the signals using a rectangular planar antenna array to emulate an AN. The antenna array comprises 64 elements and the system operates at the carrier frequency of 3.5 GHz. In the experiment, the two Tx’s were moved along a line, and the AOAs of their LOS paths to the AN were correctly determined. The field experiment has verified the effectiveness and feasibility of ATML in practical systems.

The proposed ATML provides a fast multi-target localization method suitable for SIWSNs with movability, low transmission power, and low cost. It has the following advantages.

The designed MT-SIMO signal transmission scheme utilizes the existing communication systems without the need of extra cost, weight, and volume for new hardware. The scheme requires high hardware complexity and computational capacity on ANs, and minimizes the complexity and working load of MSNs, which is preferable in WSNs.

ATML adopts a simple iterative ML method to estimate the azimuth and elevation AOAs of propagation paths, which enables the 3D localization. The simulation and experimental results demonstrate the high accuracy of the 2D AOA estimation.

By using the CDMA approach, the spread spectrum gain is exploited to mitigate the interference among MSNs and also from external sources. Meanwhile, since the AOAs are estimated based on the array signals collected by multiple antennas, the received SNR is increased significantly by the array gain. Therefore, ATML can achieve high localization accuracy with low transmission power to save the energy consumption on MSNs.

MSNs broadcast pre-assigned spreading sequences simultaneously and ANs separate the signals based on the signal orthogonality. The relative positions of multiple MSNs can be determined at the same time. Hence, ATML has a high speed and efficiency for multi-target localization, which is critical for the industrial applications with stringent latency requirements.

The remainder of this paper is organized as follows. In

Section 2, we briefly review the node localization and AOA estimation technologies.

Section 3 introduces the system model of the designed SIWSN architecture. The ATML scheme is proposed in

Section 4 including the communication system architectures on both MSNs and ANs, signal separation based on CDMA, propagation path parameter estimation, and multi-target localization.

Section 5 presents the simulation results to evaluate and compare the performance of ATML. The testbed implementation and experiments are presented in

Section 6.

Section 7 concludes the paper and points out the future research issues.

## 2. Related Work

Mao et al. [

7] has made a comprehensive summary of node positioning algorithms that can be distinguished into two main categories: range-based scheme and range-free scheme. Extensive analysis and comparison have been reported in the literature.

The range-based schemes usually use the trilateration and triangulation positioning methods by accurately measuring the distance or angle information between nodes. These kinds of schemes commonly measure the received signal strength indicator (RSSI) [

8,

9], AOA [

10,

11,

12], time of arrival (TOA) [

13], and time difference of arrival (TDOA) [

14]. Although the RSSI methods are most easily realized by using only the signal strength information, they have greater instability and larger errors in complex propagation environments. Chen et al. [

13] used two generalized geometrical positioning algorithms based on TOA measurements without time synchronization. The TDOA technology usually uses ultrasound for measurement. Shi et al. [

14] formulated the localization problem as a nonconvex optimization problem and adopted semi-definite relaxation to obtain a convex optimization problem. The scheme could minimize the worst-case position estimation error.

The AOA-based localization does not need synchronization among nodes and also has relatively high precision. Amundson et al. [

10] proposed a localization and navigation system using radio interferometric AOA estimation implemented for wireless sensor nodes. However, the scheme is limited to a single dimension and susceptible to multipath effect. Wielandt et al. [

11] presented an angle of arrivation (ACF) positioning scheme that utilized the tag signal AOA and the distance estimated by the power control method to locate active tags. Wielandt et al. [

12] proposed a new AOA-based approach that applied the spatial smoothing in pre-processing and computed the reference vectors. This approach was experimentally evaluated in LOS and non-LOS (NLOS) conditions. The hybrid approaches combining various range estimations together to improve localization accuracy have also been studied. Tomic et al. [

8] proposed to track a signal-emitting mobile target with RSSI and AOA measurements. In [

9], Tomic et al. proposed another scheme based on RSSI and AOA measurements for localization in WSNs. Obviously, AOA estimation is critical in these range-based methods. The traditional AOA estimation methods include MUSIC [

15], ESPRIT [

16], CLEAN [

17], SAGE [

18], and SPASE [

19]. Alsadoon et al. [

20] presented a new method with significantly reduced complexity by avoiding constructing the covariance matrix and computing the matrix inverse or applying eigenvalue decomposition.

The range-based schemes are usually affected significantly by the multipath propagation effect and the NLOS problem, which cause significant measurement errors. Ziolkowski et al. [

21] analyzed the influence of environment transmission properties on the signal reception angular spread based on measurement results. It was shown that spatial averaging could provide a better estimation of the reception angle. They also studied the limitations in the direction-finding process of radio sources with directional antennas in an urbanized environment [

22]. The results could help to correct the bearing error to improve the localization efficiency. For the NLOS scenario, Shi et al. [

23] proposed a maximum likelihood estimator (MLE) that utilized all the available measurements and explicitly took the probabilities of occurrences of LOS and NLOS propagations into account.

The range-free methods are based on the number of hops between two communicating nodes as the distance metric. The classical range-free methods include the centroid-based, amorphous, and distance vector hop (DV-Hop) based algorithms [

24,

25]. Among these, the DV-Hop scheme is most widely used due to high positioning accuracy in isotropic networks. However, it has a lower accuracy in asymmetric and sparse networks. Without extra hardware and measurement, the range-free methods are not very accurate compared with the range-based schemes.

## 3. Network Model

In the ATML scheme, we employ two ANs to determine the 3D relative positions of a number of MSNs in a SIWSN. Let

${\mathcal{A}}_{1}$ and

${\mathcal{A}}_{2}$ denote the two ANs. Suppose that there are

K MSNs in the network, denoted by

${\mathcal{M}}_{k}(k=1,2,\cdots ,K)$. The positions of the ANs are fixed and pre-determined. The network model is illustrated in

Figure 1.

The architectures and signal flow of the MT-SIMO scheme on the MSNs and ANs are shown in

Figure 2. Each MSN uses an omnidirectional antenna to broadcast its signals, while an AN receives the signals from all the MSNs with an antenna array. Suppose that each AN array comprises

M antenna elements (for easy presentation, we assume that the antenna arrays on both ANs have the same structure, but this is unnecessary and different 2D or crown arrays may be employed). In order to perform 3D localization, the AN antennas should be sector/directional antennas and placed in 2D structures (e.g., rectangular or “L”-shaped planar arrays) or 3D structures (e.g., cylindrical or crown arrays). The planar arrays can cover a semisphere because the main lobes of the antennas are all pointing to one side of the array. The cylindrical or crown arrays can cover a whole sphere because the main lobes point to all the directions. The structure of the antenna arrays can be selected according to the deployment of the network. If all the MSNs are located on one side of an AN, we can adopt the planar arrays. However, if the MSNs are located in all directions to an AN, the cylindrical or crown arrays should be adopted. Thus, all the MSNs are visible to the AN antennas and in main lobes.

There is a common orthogonal coordinate system for the network, which is denoted by

${\mathbb{C}}_{N}$. The position of

${\mathcal{M}}_{k}$ in

${\mathbb{C}}_{N}$ is

${({x}_{M,k},{y}_{M,k},{z}_{M,k})}_{{C}_{N}}$. The positions of the two ANs are

${({x}_{A,i},{y}_{A,i},{z}_{A,i})}_{{C}_{N}}$ for

${\mathcal{A}}_{i}$ (

$i=1,2$). Furthermore, we adopt the spherical coordinate systems for the MSN positions with respect to

${\mathcal{A}}_{1}$ and

${\mathcal{A}}_{2}$, which are denoted by

${\mathbb{C}}_{1}$ and

${\mathbb{C}}_{2}$, respectively. The coordinate systems are defined based on the body frames of the two ANs. The origins are located at the centers of the antenna arrays of the ANs. The

x–

y and

x–

z planes correspond to the azimuth and elevation dimensions, respectively, as shown in

Figure 1.

In complicated scattering industrial environments, signals generally propagate from an MSN to an AN through multiple paths, resulting in the

multipath components (MPCs). Suppose that there are

${L}_{i,k}$ propagation paths from

${\mathcal{M}}_{k}$ to

${\mathcal{A}}_{i}$. The parameter set of the

l-th (

$l=1,2,\cdots ,{L}_{i,k}$) component received on the antennas on

${\mathcal{A}}_{i}$ is [

26]

where

${\alpha}_{i,k,l}$,

${\tau}_{i,k,l}$,

${\varphi}_{i,k,l}$,

${\theta}_{i,k,l}$, and

${\nu}_{i,k,l}$ are the complex amplitude (including the path loss and phase shift), TOA (i.e., propagation delay), azimuth of arrival, elevation of arrival, and Doppler frequency, respectively.

It is important to note that the ATML scheme requires propagation along the connection directions from each MSN to both ANs. This condition can be satisfied in real industrial environments if there are clear LOS paths or LOS paths blocked by non-metallic materials such as concrete walls and plastic or wood cargoes. The radio signals can penetrate the obstacles and propagate along the LOS directions. For example, the radio propagation penetrating a building is illustrated in [

26]. If the LOS paths are blocked by metal materials, the radio signals cannot penetrate the objects. Then, we can deploy more ANs in the environment such that all the MSNs have LOS propagation to two ANs. Deploying more ANs results in a higher cost, but the NLOS problem can be avoided.

The propagation delay along the LOS path is generally smaller than the MPCs between a pair of Tx and Rx. Hence, the first arriving component (

$l=1$) travels through the LOS path with the parameter set of

${\omega}_{i,k,1}$. The azimuth and elevation direction from

${\mathcal{A}}_{i}$ to

${\mathcal{M}}_{k}$ is

${\varphi}_{i,k,1}$ and

${\theta}_{i,k,1}$, respectively, as shown in

Figure 1. Thus, the relative position of

${\mathcal{M}}_{k}$ with respect to

${\mathcal{A}}_{i}$ in the coordinate system of

${\mathbb{C}}_{i}$ is

$\left({d}_{i,k},{\varphi}_{i,k,1},{\theta}_{i,k,1}\right)$ where

${d}_{i,k}$ is the distance. Our purpose is to determine the 3D positions of the

K MSNs in the common network coordinate system,

${({x}_{M,k},{y}_{M,k},{z}_{M,k})}_{{C}_{N}}$ for

$k=1,2,\cdots ,K$, simultaneously and accurately. In practical multipath scattering channels, several sub-paths may arrive at the Rx at very close delays (in a small delay bin). These paths belong to a cluster in the delay domain. Because the ATML scheme utilizes the incident angles of the LOS paths for node localization and the parameters of the MPCs are not used, the clustering behavior of the MPCs can be ignored.

## 4. Multi-Target Detection and Localization

In this section, the ATML scheme that detects the signals from MSNs and locates their positions in a SIWSN is presented. The MT-SIMO signal transmission/detection system is first designed; then, the propagation parameter (especially the 2D AOA) estimation based on the spreading-sequence response using the MLE is proposed, and finally the relative 3D position of an MSN is deduced.

#### 4.1. MT-SIMO Signal Transmission

We utilize the CDMA technology to realize the multi-target detection (separating the signals from different MSNs). Each MSN is assigned a pre-defined spread spectrum sequence, i.e., a PN-sequence with the length of

N chips. The spreading sequence assigned to

${\mathcal{M}}_{k}$ is denoted by

${u}_{k}\left(\tau \right)$ and expressed as

where

$\mathbf{rect}\left(\tau \right)$ denotes the rectangular pulse of a chip that has the duration of

${\Delta}_{c}$ and power of

${P}_{c}={\int}_{0}^{{\Delta}_{c}}{\mathbf{rect}}^{2}\left(\tau \right)d\tau $. The duration of the spreading sequence is

${T}_{u}=N{\Delta}_{c}$. The sequences of the

K MSNs are orthogonal and the auto-correlation functions are pulse functions. Hence, the cross-correlation functions of the spreading sequences are [

27]

where

$<\xb7,\xb7>$ denotes the sliding inner-production,

${\epsilon}_{{k}_{1},{k}_{2}}$ is a very small number

${\epsilon}_{{k}_{1},{k}_{2}}\to 0$ and

$\delta \left(\tau \right)$ is the delta function. The peak amplitude of the delta function is

${\int}_{0}^{{T}_{u}}{u}_{k}^{2}\left(\tau \right)d\tau =N{P}_{c}$.

An MSN modulates (e.g., via binary phase shift keying, BPSK) the carrier with its spreading sequence circularly and continuously and uses an omnidirectional antenna to transmit the modulated signal. The MSNs can transmit asynchronously, and each AN captures the signals using an

M element antenna array, as mentioned in

Section 3. An AN keeps receiving signals for the duration of more than

$2{T}_{u}$ such that it can capture at least one complete spreading sequence from each MSN. To reduce the hardware complexity and cost of the ANs, the signal reception can be realized in a time-division-multiplexing (TDM) manner. An AN uses only a single radio and baseband processing chain. The antennas of the array are connected to an

M-input-1-output microwave switch. The switch connects one receiving antenna for more than

$2{T}_{u}$ to capture the signals in the air, and then changes to the next antenna. Consequently, the antennas receive the signals one-by-one controlled by the microwave switch. After the time of

$2M{T}_{u}$, all the antennas receive at least one complete spreading sequence from every MSN. As long as the antenna switching is fast enough, the movement of the MSNs during

$2M{T}_{u}$ is ignorable and the signals on the receiving antennas can be regarded as being captured simultaneously. The MT-SIMO links between an MSN and the ANs and the signal flow are illustrated in

Figure 2. Please note that synchronization and coordination among the MSNs are not required.

As mentioned in

Section 3, there are

${L}_{i,k}$ propagation paths from

${\mathcal{M}}_{k}$ to

${\mathcal{A}}_{i}$. Hence,

${L}_{i,k}$ MPCs are received on each antenna. In this system, the pattern of one antenna element in an array refers to the complex radiation gain with respect to the reference element (e.g., the first antenna) for a given azimuth and elevation direction. The pattern of the

m-th (

$m=1,2,\cdots ,M$) antenna of

${\mathcal{A}}_{i}$ is denoted by

${s}_{i,m}(\varphi ,\theta )$ where

$(\varphi ,\theta )$ is the 2D radiation/incident direction. The amplitude of

${s}_{i,m}(\varphi ,\theta )$ is the scale of the signal magnitude by the antenna gain. The phase of

${s}_{i,m}(\varphi ,\theta )$ is the phase difference between the signals impinging at the

m-th antenna and the reference antenna. When the

l-th path from

${\mathcal{M}}_{k}$ arrives at

${\mathcal{A}}_{i}$ at the 2D incident angle of

$({\varphi}_{i,k,l},{\theta}_{i,k,l})$, the pattern of the

m-th antenna will be

${s}_{i,m}({\varphi}_{i,k,l},{\theta}_{i,k,l})$. Thus, the baseband signal from

${\mathcal{M}}_{k}$ received on the

m-th antenna on

${\mathcal{A}}_{i}$ through the

l-th path at the moment of

t is denoted by

${y}_{i,m,k,l}\left(\tau \right)$. The variable

$\tau $ is the excess delay of the propagation paths. The receiving time,

t, is a parameter of the signal and ignored in the notations for easy presentation. Thus, the received signal is

where

${u}_{k}(\tau -{\tau}_{i,k,l})$ is the circular shift of

${u}_{k}\left(\tau \right)$ by the propagation delay. As all of the

K MSNs are broadcasting simultaneously, the signals received on the AN antennas are the superposition of all the MSNs’ signals. The received (observed) signal on the

m-th antenna on

${\mathcal{A}}_{i}$ is

where

${w}_{i,m}\left(\tau \right)$ is the noise in the

m-th receiving chain on

${\mathcal{A}}_{i}$.

By organizing the radiation gains of all the

M antennas pointing to the 2D AOA

$(\varphi ,\theta )$ in one vector, we can obtain the

steering vector of the antenna array on

${\mathcal{A}}_{i}$ pointing to the direction, which is

It is important to note that the antenna pattern, ${s}_{i,m}(\varphi ,\theta )$, is a parameter matrix that is measured in an anechoic chamber. The antenna gains for all the 2D directions of $\varphi \in [{0}^{\circ},{360}^{\circ})$ and $\theta \in [{0}^{\circ},{180}^{\circ}]$ are all measured. For example, when the antenna pattern is measured with the step of ${1}^{\circ}$, the matrix dimension is $360\times 181$ and the elements in the matrix are the complex radiation gain with respect to the reference antenna.

#### 4.2. Multi-Target Detection

We can separate and detect each MSN’s signal based on the orthogonality among the spreading sequences. The ANs perform sliding-correlations between the received signal

${\widehat{y}}_{i,m}\left(\tau \right)$ and the spreading sequence

${u}_{k}\left(\tau \right)$ in the delay domain to extract the signal from

${\mathcal{M}}_{k}$. The observed result is given as

By substituting Equations (

3) and (

4) into Equation (

7), we can obtain

where

${A}_{i,m,k,l}=N{P}_{c}{\alpha}_{i,k,l}{s}_{i,m}({\varphi}_{i,k,l},{\theta}_{i,k,l}){e}^{j2\pi {\nu}_{i,k,l}t}$ is the complex amplitude of the

l-th peak in the cross-correlation function and

is the inter-MSN interference received on the

m-th antenna on

${\mathcal{A}}_{i}$. Because of the correlation property of the spreading sequences, the cross-correlation result in Equation (

8) generates

${L}_{i,k}$ peaks at the excess delays of

${\tau}_{i,k,l}$ with the observed complex amplitude of

for

$l=1,2,\cdots ,{L}_{i,k}$. In this work,

${\widehat{h}}_{i,m,k}\left(\tau \right)$ is called the multipath spreading sequence response (MSSR).

For the signals received on the AN antennas, ${\widehat{y}}_{i,m}\left(\tau \right)$, we can perform sliding-correlation using the K spreading sequences, ${u}_{k}\left(\tau \right)$ for $k=1,2,\cdots ,K$. Thus, the MSSR for each MSN, ${\widehat{h}}_{i,m,k}$, is observed on every receiving antenna. The interference from other MSNs and also external sources is removed by the sliding correlation. Hence, the MT-SIMO scheme provides the advantages of mitigating interference and high signal-to-interference-ratio (SIR), resulting in the spread spectrum gain.

#### 4.3. Iterative ML Estimation of AOA

The localization of an MSN is performed based on the LOS path AOAs from the MSN to both ANs. As discussed in the previous subsection, based on the observed MSSRs of ${\mathcal{M}}_{k}$ on the AN arrays, we can distinguish the LOS paths from the other reflected/scattered MPCs in a complicated industrial environment. In this subsection, we propose a simple ML method to estimate the AOAs of the LOS paths.

According to Equation (

8), the peak of the

l-th path occurs at the excess delay of

${\tau}_{i,k,l}$ in all the MSSRs on the antennas on

${\mathcal{A}}_{i}$. The observed amplitudes of the LOS path (the first peak) on all the antennas (

$m=1,2,\cdots ,M$) are organized in the vector of

The observation vector,

${\widehat{\mathbf{a}}}_{i,k}$, is called the

LOS path response vector (LPRV). It is worth noticing that, as given in Equations (

8) and (

10), the observed peak amplitudes in

${\widehat{\mathbf{a}}}_{i,k}$ contain the noise, interference, and also the AOA information of the LOS path,

$({\varphi}_{i,k,1},{\theta}_{i,k,1})$. Our object is to estimate the AOA for localization from

${\widehat{\mathbf{a}}}_{i,k}$. The iterative MLE is given as follows.

Set the initial iteration index, $g=1$.

Set the initial elevation AOA of the LOS path from ${\mathcal{M}}_{k}$ to ${\mathcal{A}}_{i}$ as ${\tilde{\theta}}_{i,k,1}^{\left(g\right)}={90}^{\circ}$.

The incident azimuth angle is estimated based on the antenna array steering vectors.

${\tilde{\varphi}}_{i,k,1}^{\left(g\right)}$ is updated by

By using

${\tilde{\varphi}}_{i,k,1}^{\left(g\right)}$, the incident elevation angle,

${\tilde{\theta}}_{i,k,1}^{\left(g\right)}$, is updated by

Update the iteration index by $g=g+1$.

Repeat Steps 3 to 5, until the results converge by satisfying the condition of

where

$\xi $ is a small number.

For the first time using Equation (

12), we have set

${\tilde{\theta}}_{i,k,1}^{\left(1\right)}={90}^{\circ}$ in Step 2.

${\widehat{\mathbf{a}}}_{i,k,1}$ is the observation of the antenna array.

${\mathbf{s}}_{i}\left({\varphi}_{i,k,1},{\tilde{\theta}}_{i,k,1}^{\left(1\right)}\right)$ is the antenna array pattern and has been measured in a chamber. We can obtain the value of

${\mathbf{s}}_{i}\left({\varphi}_{i,k,1},{\tilde{\theta}}_{i,k,1}^{\left(1\right)}\right)$ with

${\varphi}_{i,k,l}\in \left[{0}^{\circ},{360}^{\circ}\right)$ and

${\tilde{\theta}}_{i,k,1}^{\left(1\right)}={90}^{\circ}$. Thus, we can calculate the right side of Equation (

12) for

${\varphi}_{i,k,l}\in \left[{0}^{\circ},{360}^{\circ}\right)$. Finally, we can find out the maximum value of the right side, and the corresponding

${\varphi}_{i,k,l}$ is the updated value. Similarly, for Equation (

13), we can obtain the value of

${\mathbf{s}}_{i}\left({\tilde{\varphi}}_{i,k,1}^{\left(g\right)},{\theta}_{i,k,1}\right)$ where

${\tilde{\varphi}}_{i,k,1}^{\left(g\right)}$ has been determined in the previous step and

${\theta}_{i,k,1}\in \left[{0}^{\circ},{180}^{\circ}\right]$. Thus, we can find out the maximum value of the right side for

${\theta}_{i,k,1}\in \left[{0}^{\circ},{180}^{\circ}\right]$ and the corresponding

${\theta}_{i,k,l}$.

#### 4.4. Localization of MSNs

As shown in the network model of

Figure 1, the target MSN,

${\mathcal{M}}_{k}$, should be on the line through

${\mathcal{A}}_{i}$ with the direction of

$({\tilde{\varphi}}_{i,k,1},{\tilde{\theta}}_{i,k,1})$ in the spherical coordinate system

${\mathbb{C}}_{i}$ where

$i=1,2$ for the two ANs. The two lines are denoted by

${f}_{i,k}{(x,y,z)}_{{C}_{N}}$ in the common network coordinate system,

${\mathbb{C}}_{N}$. Ideally,

${\mathcal{M}}_{k}$ is located at the intersection of

${f}_{1,k}$ and

${f}_{2,k}$. However, in practical environments, the two lines may have no point of intersection (not in the same plane) due to measurement errors caused by noise and interference, and they are

skew lines. How to determine the position of

${\mathcal{M}}_{k}$ according to 3D Euclidean geometry is described below.

At first, we convert the definitions of the two lines from the spherical coordinate systems (for AOA estimation) to the network orthogonal coordinate system (for target localization). The intersection between the line

${f}_{i,k}{(x,y,z)}_{{C}_{N}}$ and the unit sphere is denoted by

${\mathbf{P}}_{i,k}$. In

${\mathbb{C}}_{i}$, the coordinate of

${\mathbf{P}}_{i,k}$ is

Thus, the coordinates of ${\mathbf{P}}_{i,k}$ in ${\mathbb{C}}_{N}$ are ${\mathbf{P}}_{{C}_{N},i,k}={\mathbf{P}}_{{C}_{i},i,k}+{\mathbf{A}}_{{C}_{N},i},$ where ${\mathbf{A}}_{{C}_{N},i}$ are the coordinates of ${\mathcal{A}}_{i}$ in ${\mathbb{C}}_{N}$. Consequently, the two lines are defined by the two pairs of points, ${\mathbf{A}}_{{C}_{N},i}$ and ${\mathbf{P}}_{{C}_{N},i,k}$, in ${\mathbb{C}}_{N}$ for $i=1,2$.

The two pairs of points define a tetrahedron in 3D space as the four vertices. The volume of the tetrahedron is

where

$det[\xb7]$ is the determinant. The relationship between the two lines is discussed in the following two cases.

If the volume of the tetrahedron is zero (i.e., $V=0$), the two lines are coplanar and have an intersection. The intersection point can be easily determined by ${f}_{i,k}{(x,y,z)}_{{C}_{N}}$ in the plane.

If the volume of the tetrahedron is nonzero (i.e., $V>0$), ${f}_{1,k}$ and ${f}_{2,k}$ are skew lines without intersection. The points on the line segment perpendicular to both lines have the minimum sum of distances to ${f}_{1,k}$ and ${f}_{2,k}$. Hence, the MSN position is approximated by the midpoint of the line segment.

First, we define the direction vectors of the two lines by

${\mathbf{D}}_{{C}_{N},i,k}={\mathbf{P}}_{{C}_{N},i,k}-{\mathbf{A}}_{{C}_{N},i}$ for

$i=1,2$. Thus, the two lines can be expressed as

${\mathbf{Q}}_{{C}_{N},i,k}={\mathbf{A}}_{{C}_{N},i}+{\lambda}_{i}{\mathbf{D}}_{{C}_{N},i,k}$ where

${\mathbf{Q}}_{{C}_{N},i,k}$ represents an arbitrary point on the line with the real number

${\lambda}_{i}$ determining where the point is on the line. Then, the point on

${f}_{1,k}$ nearest to

${f}_{2,k}$ is given by

In Equation (

17),

${\mathbf{V}}_{{C}_{N},2}={\mathbf{D}}_{{C}_{N},2}\times \left({\mathbf{D}}_{{C}_{N},1}\times {\mathbf{D}}_{{C}_{N},2}\right)$ where × is cross product. Similarly, the point on

${f}_{2,k}$ nearest to

${f}_{1,k}$ is given by

where

${\mathbf{V}}_{{C}_{N},1}={\mathbf{D}}_{{C}_{N},1}\times \left({\mathbf{D}}_{{C}_{N},2}\times {\mathbf{D}}_{{C}_{N},1}\right)$. Thus,

${\mathbf{Q}}_{{C}_{N},1,k}^{*}$ and

${\mathbf{Q}}_{{C}_{N},2,k}^{*}$ form the shortest line segment joining

${f}_{1,k}$ and

${f}_{2,k}$. Finally, the location of

${\mathcal{M}}_{k}$ can be determined as

Since we have determined the coordinates of the target MSN, the distance ${d}_{i,k}$ is readily calculated from its coordinate.