## 2 Array Antenna Angle-of-Arrival Positioning Algorithm
In this system, the data acquisition points of channel 2 are equal to the sum of the data acquisition points of 12 antennas in channel 1, so the FFT length is long enough to estimate the frequency offset accurately. By substituting the estimated frequency offset value into Equation (5), the \(2N\) matrix metadata arranged into a column vector can be obtained as follows:  
\[\mathbf{x}_{l}=\left[ \begin{array}{c}x_{1}(t_{l})\\ x_{2}(t_{l})\\ x_{2N}(t_{l})\end{array} \right]=b_{l}\times\mathbf{p}(\theta,\varphi,\gamma,\eta) \odot\mathbf{a}_{s}(\theta,\varphi) \tag{9}\]  
where \(\mathbf{p}(\theta,\varphi,\gamma,\eta)=\mathbf{P}(\theta,\varphi)\mathbf{w}(\gamma,\eta)\),\(\mathbf{P}(\theta,\varphi)=\left[ \begin{array}{c}\mathbf{p}_{1}^{T}( \theta,\varphi)\\ \mathbf{p}_{2}^{T}(\theta,\varphi)\\ \vdots\\ \mathbf{p}_{2N}^{T}(\theta,\varphi)\end{array} \right]\),\(\mathbf{w}(\gamma,\eta)=\left[ \begin{array}{c}\cos\gamma\\ \sin\gamma e^{i\eta}\end{array} \right]\),  
\[\mathbf{a}_{s}(\theta,\varphi)=\left[ \begin{array}{c}e^{-i2\pi f_{0}\tau_{1}( \theta,\varphi)}e^{i2\pi(f_{\Delta}+f_{d})[t+(n-1)T-\tau_{1}(\theta,\varphi)]} \\ e^{-i2\pi f_{0}\tau_{2}(\theta,\varphi)}e^{i2\pi(f_{\Delta}+f_{d})[t+(n-1)T- \tau_{2}(\theta,\varphi)]}\\ \vdots\\ e^{-i2\pi f_{2N}\tau_{1}(\theta,\varphi)}e^{i2\pi(f_{\Delta}+f_{d})[t+(n-1)T- \tau_{2N}(\theta,\varphi)]}\end{array} \right]\text{, and }\odot\text{ denotes the Hardmard product. }\]  
Considering the receiver noise, the echo signal vector can be expressed as follows:  
\[\mathbf{y}_{i}=\mathbf{a}(\theta,\varphi,\gamma,\eta)+\mathbf{n}_{i} \tag{10}\]  
where \(\mathbf{a}(\theta,\varphi,\gamma,\eta)=\mathbf{p}(\theta,\varphi,\gamma,\eta)ea( \theta,\phi)\), and \(\mathbf{n}_{i}\in\mathcal{CN}(0,\mathbf{R}_{n})\) is a complex Gaussian noise vector with a zero mean and a covariance matrix \(\mathbf{R}_{n}\). In an indoor environment, signals received by the array contain not only direct waves but also multipath echoes that reached the array after being reflected by various obstacles such as walls, tables, and floors. After considering these factors, the receiver echo signal \(\mathbf{y}_{i}\) can be expressed in the following form:  
\[\mathbf{y}_{i}=\mathbf{A}\mathbf{s}_{i}+\mathbf{n}_{i} \tag{11}\]  
where \(\mathbf{A}=\left[ \begin{array}{cc}\mathbf{a}(\theta_{1},\phi_{1},\gamma_{1},\eta_{1 })&\mathbf{a}(\theta_{2},\phi_{2},\gamma_{2},\eta_{2})&L&\mathbf{a}(\theta_{P},\phi_{ P},\gamma_{P},\eta_{P})\end{array} \right]\) denotes the array manifold matrix, \(P\) is the number of direct waves and multipath signals, and \(\mathbf{s}_{i}\) is the signal vector, which can be expressed as:  
\[\mathbf{s}_{i}=\left[ \begin{array}{cc}\mathbf{b}_{11},\mathbf{b}_{22},\mathrm{L},\mathrm{ b}_{Pl}\end{array} \right]^{T} \tag{12}\]  
In a multipath environment, the direct wave signal and multipath signal need to be separated to estimate the target direction accurately. In this case, a super-resolution angle estimation method is needed. Considering that the Multiple Signal Classificaion (MUSIC) spectrum estimation algorithm has the advantages of a small amount of computation and low complexity, the MUSIC spectrum estimation algorithm is adopted. Assume that \(\hat{\mathbf{R}}_{music}=\frac{1}{L}\sum\limits_{l=1}^{L}\mathbf{y}_{i}\mathbf{y}_{i}^{H}\) is the covariance matrix of the received signal. The spatial spectrum obtained by the MUSIC spectrum algorithm is expressed as follows:  
\[Pmusic(\theta,\phi,\gamma,\eta)=\frac{1}{\mathbf{a}^{H}(\theta,\phi,\gamma,\eta) \mathbf{Q}_{music}\mathbf{a}(\theta,\phi,\gamma,\eta)} \tag{13}\]  
where \(\mathbf{Q}_{music}=\mathbf{U}_{N}\mathbf{U}_{N}^{H}\), and \(\mathbf{U}_{N}\) is the eigenvector matrix of noise subspace derived from \(\hat{\mathbf{R}}_{music}\) eigen decomposition.