# Angle-of-Arrival Estimation Using Difference Beams in Localized Hybrid Arrays
## 3 Proposed AOA Estimation Approach
### Estimation of \(u\)  
Next, we perform the estimation of \(u\) in terms of \(Q\) being even or odd as follows. (I) When \(Q\) is even, letting \(n=k+qK\), \(k=0,...,K-1\), \(q=0,...,Q/2-1\), Equation (5) can be written as  
\[P_{m}(u,t)=\sum_{k=0}^{K-1}\sum_{q=0}^{Q/2-1}\Big{(}1-e^{jNu\omega_{m}(u,t)} \Big{)}e^{j2(k+qK)\omega_{m}(u,t)}=\sum_{k=0}^{K-1}g_{k}(u,t)e^{-j\frac{2-\pi }{K}}, \tag{9}\]  
where  
\[g_{k}(u,t)=-2j\frac{\sin^{2}\Big{(}\frac{Nu}{4}-\frac{Nu\pi t}{2L}\Big{)}}{ \sin\Big{(}\frac{Ku}{2}-\frac{Ku\pi t}{L}\Big{)}}e^{j(N-K)(\frac{\pi}{2}-\frac {M}{L})}e^{j(k(u-2\pi t)})\]are the Fourier coefficients of \(P_{m}(u,t)\). ```
0:\(s_{m}(t)\), \(m=0:M-1\), \(t=0:T-1\);
1:for\(t=0:T-1\)do
2: Calculate \(p_{m}(t)\) by (3), \(m=0:M-2\);
3:if\(K=M\)then
4:\(\rho_{K-1}(t)\gets s_{K-1}^{*}(t)s_{0}(t)\);//The cross-correlation between the first and the last subarrays
5:endif
6: Determine \(m^{\prime}\leftarrow\underset{m=0:K-1}{\operatorname{argmax}}\{|\rho_{m}(t)|\}\);//Find the subarray index with the largest amplitude
7:\(\tilde{\rho}_{m}(t)\leftarrow(-1)^{\mathcal{Q}+1\{\mod\{m-m^{\prime},K\}=0\}} \rho_{m}(t)\), \(m=0:M-2\);//Calibrate their signs
8:endfor
9:\(\widetilde{N}\hat{u}\leftarrow\arg\biggl{\{}e^{-j\frac{\pi}{K}}\sum\limits_{t =0}^{T-1}\sum\limits_{m=0}^{M-2}\beta_{m}(t)\biggr{\}}\).//Coherent combination for improving estimation accuracy
```  
**Algorithm 1** Estimation of \(Nu\)  
Given \(\widehat{Nu}\), we calibrate \(s_{m}(t)\) by multiplying \(e^{-jm\widehat{Nu}}\), i.e., \(s_{m}(t)e^{-jm\widehat{Nu}}\). Provided that \(e^{jm(Nu-\widehat{Nu})}\approx 1\), \(s_{m}(t)\) can be almost perfectly calibrated. Performing the \(K\)-point IDFT of \(s_{m}(t)e^{-jm\widehat{Nu}}\) produces \(\widetilde{S}_{k}(t)\approx\tilde{s}(t)g_{k}(u,t)+\Xi_{k}(t)\), where \(\Xi_{k}(t)\) are the \(K\)-point IDFT of \(\xi_{m}(t)e^{-jm\widehat{Nu}}\), \(m,k=0,...,K-1\). To obtain an estimate of \(u\), \(\hat{u}\), we compute the cross-correlation between any two adjacent IDFT outputs, \(\widetilde{S}_{k}^{*}(t)\widetilde{S}_{k+1}(t)\), denoted by \(d_{k}(t)\), \(k=0,...,K-2\), given by  
\[d_{k}(t)=4|\tilde{s}(t)|^{2}\frac{\sin^{4}\left(\frac{Nu}{4}-\frac{N\pi t}{2L }\right)}{\sin^{2}\left(\frac{Ku}{2}-\frac{K\pi t}{L}\right)}e^{j(u-\frac{2 \pi t}{L})}+\widetilde{\Xi}_{k}(t), \tag{10}\]  
where \(\widetilde{\Xi}_{k}(t)\) is approximated as an AWGN. It is observed from Equation (10) that \(\hat{u}\) can be unambiguously captured by \(\hat{u}=\arg\Bigl{\{}d_{k}(t)e^{\frac{2\pi t}{L}}\Bigr{\}}\). Similarly, \(d_{k}(t)\) across all subarrays and symbols can be combined to improve the accuracy of \(\hat{u}\). (II) When \(Q\) is odd, \(K\) must be even since \(N\) is even. Letting \(n=k+qK/2\), \(k=0,...,K/2-1\), \(q=0,...,Q-1\), (5) can be written as  
\[P_{m}(u,t)=\sum\limits_{k=0}^{K/2-1}\sum\limits_{q=0}^{Q-1}\Bigl{(}1-e^{jN \omega_{m}(u,t)}\Bigr{)}e^{j(2k+qK)\omega_{m}(u,t)}=\sum\limits_{k=0}^{K/2-1} \frac{\Bigl{[}1-(-1)^{m}e^{jN\left(\frac{u}{2}-\frac{\pi t}{L}\right)}\Bigr{]} ^{2}}{1-(-1)^{m}e^{jK\left(\frac{u}{2}-\frac{\pi t}{L}\right)}}e^{j\left[k(u- \frac{2\pi t}{L})\right]}e^{-j\frac{2\pi mk}{K}}. \tag{11}\]  
Separating \(P_{m}(u,t)\) to even and odd samples, we have  
\[P_{m}(u,t)= \begin{cases}\sum\limits_{k=0}^{K/2-1}\frac{\Bigl{[}1-e^{jN \left(\frac{u}{2}-\frac{\pi t}{L}\right)}\Bigr{]}^{2}}{1-e^{jK\left(\frac{u}{ 2}-\frac{\pi t}{L}\right)}}e^{jk\left(u-\frac{2\pi t}{L}\right)}e^{-j\frac{2 \pi mk}{K/2}},&m=2l\\ \sum\limits_{k=0}^{K/2-1}\frac{\Bigl{[}1+e^{jN\left(\frac{u}{2}-\frac{ \pi t}{L}\right)}\Bigr{]}^{2}}{1+e^{jK\left(\frac{u}{2}-\frac{\pi t}{L}\right) }\Bigr{]}^{2}}e^{jk\left(u-\frac{2\pi t}{L}-\frac{\pi t}{K}\right)}e^{-j\frac {2\pi mk}{K/2}},&m=2l+1\end{cases}  \tag{12}\]  
where \(l=0,...,K/2-1\).