# AOA-Based Three-Dimensional Multi-Target Localization in Industrial WSNs for LOS Conditions
## 4 Multi-Target Detection and Localization
### 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  
\[\hat{\mathbf{a}}_{i,k}=\begin{bmatrix}\hat{A}_{i,1,k,1}&\hat{A}_{i,2,k,1}&\hat {A}_{i,3,k,1}&\cdots&\hat{A}_{i,M,k,1}\end{bmatrix}^{\mathrm{T}}. \tag{11}\]  
The observation vector, \(\hat{\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 \(\hat{\mathbf{a}}_{i,k}\) contain the noise, interference, and also the AOA information of the LOS path, \((\hat{\varphi}_{i,k,1},\hat{\theta}_{i,k,1})\). Our object is to estimate the AOA for localization from \(\hat{\mathbf{a}}_{i,k}\). The iterative MLE is given as follows.  
1. Set the initial iteration index, \(g=1\).
2. Set the initial elevation AOA of the LOS path from \(\mathcal{M}_{k}\) to \(\mathcal{A}_{i}\) as \(\tilde{\theta}^{(g)}_{i,k,1}=90^{\circ}\).
3. The incident azimuth angle is estimated based on the antenna array steering vectors. \(\tilde{\varphi}^{(g)}_{i,k,1}\) is updated by \[\tilde{\varphi}^{(g)}_{i,k,1}=\operatorname*{arg\,max}_{\tilde{\varphi}_{i,k, 1}\in[0,360^{\circ})}\left|\mathbf{s}_{i}\left(\tilde{\varphi}_{i,k,1},\tilde{ \theta}^{(g)}_{i,k,1}\right)^{\mathrm{H}}\hat{\mathbf{a}}_{i,k}\right|.\] (12)
4. By using \(\tilde{\varphi}^{(g)}_{i,k,1}\), the incident elevation angle, \(\tilde{\theta}^{(g)}_{i,k,1}\), is updated by \[\tilde{\theta}^{(g+1)}_{i,k,1}=\operatorname*{arg\,max}_{\tilde{\theta}_{i,k, 1}\in[0,180]}\left|\mathbf{s}_{i}\left(\tilde{\varphi}^{(g)}_{i,k,1},\theta_{i,k,1}\right)^{\mathrm{H}}\hat{\mathbf{a}}_{i,k}\right|.\] (13)
5. Update the iteration index by \(g=g+1\).
6. Repeat Steps 3 to 5, until the results converge by satisfying the condition of \[\sqrt{\left(\tilde{\varphi}^{(g-1)}_{i,k,1}-\tilde{\varphi}^{(g-2)}_{i,k,1} \right)^{2}+\left(\tilde{\theta}^{(g)}_{i,k,1}-\tilde{\theta}^{(g-1)}_{i,k,1} \right)^{2}}\leq\xi,\] (14) where \(\xi\) is a small number.  
For the first time using Equation (12), we have set \(\tilde{\theta}^{(1)}_{i,k,1}=90^{\circ}\) in Step 2. \(\hat{\mathbf{a}}_{i,k,1}\) is the observation of the antenna array. \(\mathbf{s}_{i}\left(\tilde{\varphi}_{i,k,1},\tilde{\theta}^{(1)}_{i,k,1}\right)\) is the antenna array pattern and has been measured in a chamber.  
We can obtain the value of \(\mathbf{s}_{i}\left(\phi_{i,k,1},\tilde{\theta}_{i,k,1}^{(1)}\right)\) with \(\phi_{i,k,l}\in[0^{\circ},360^{\circ})\) and \(\tilde{\theta}_{i,k,1}^{(1)}=90^{\circ}\). Thus, we can calculate the right side of Equation (12) for \(\phi_{i,k,l}\in[0^{\circ},360^{\circ})\). Finally, we can find out the maximum value of the right side, and the corresponding \(\phi_{i,k,l}\) is the updated value. Similarly, for Equation (13), we can obtain the value of \(\mathbf{s}_{i}\left(\tilde{\phi}_{i,k,1}^{(\delta)},\theta_{i,k,1}\right)\) where \(\tilde{\phi}_{i,k,1}^{(\delta)}\) has been determined in the previous step and \(\theta_{i,k,1}\in[0^{\circ},180^{\circ}]\). Thus, we can find out the maximum value of the right side for \(\theta_{i,k,1}\in[0^{\circ},180^{\circ}]\) and the corresponding \(\theta_{i,k,l}\).