## 4 MUSIC-Based 3D DoA Estimation Adopted to Multi-Mode Multi-Port Antennas  
The potential of DoA estimation using M\({}^{3}\)PAs was studied in [30; 31; 32]. Different M\({}^{3}\)PA prototypes were investigated in a simulation setup to estimate the DoA of impinging signals on the considered antenna. These studies focused on estimating the angle of arrival in a 2D plane using a maximum-likelihood (ML) estimator. This estimator is optimal in the sense of estimation theory, but unsuitable for practical purposes because it suffers from high computational complexity [16]. Contrary to the aforementioned publications, this paper applies the MUSIC algorithm [42] to estimate the DoA in 3D space, i.e., both azimuth (\(\phi\)) and co-elevation (\(\theta\)) angles are estimated. In the following, a quick recap of the MUSIC algorithm and its application to M\({}^{3}\)PAs is presented. Let \(\mathbf{x}(k)\in\mathbb{C}^{Q\times 1}\) be the signal vector consisting of \(Q\) narrowband signals impinging on the M\({}^{3}\)PA from directions \([\mathbf{\phi},\mathbf{\theta}]=[(\phi_{1},\theta_{1}),...,(\phi_{Q},\theta_{Q})]\)  
Figure 2: The measured \(\theta\)-component’s realized gain of the three ports of the investigated M\({}^{3}\)PA.  
at snapshot \(k\). Given that \(M\) is the number of ports of the M\({}^{3}\)PA, then the signal \(\mathbf{y}(k)\in\mathbb{C}^{M\times 1}\) at the output of the receiver can be written as  
\[\mathbf{y}(k)=\mathbf{A}(\mathbf{\phi},\mathbf{\theta})\mathbf{x}(k)+\mathbf{n}(k),\qquad k=1,...,K, \tag{1}\]  
where \(K\) is the total number of snapshots. \(\mathbf{A}(\mathbf{\phi},\mathbf{\theta})\in\mathbb{C}^{M\times Q}\) is the antenna response matrix. It accommodates \(Q\) antenna response vectors \(\mathbf{a}(\phi_{q},\theta_{q})\in\mathbb{C}^{M\times 1}\). Each vector \(\mathbf{a}(\phi_{q},\theta_{q})\) contains the responses \(a_{m}(\phi_{q},\theta_{q})\) of \(M\) ports to a signal arriving from direction \((\phi_{q},\theta_{q})\). Given that \(g_{m}(\phi_{q},\theta_{q})\) and \(\Phi_{m}(\phi_{q},\theta_{q})\) are the gain and phase response of port \(m\), respectively, the response can be defined as  
\[a_{m}(\phi_{q},\theta_{q})=\sqrt{g_{m}(\phi_{q},\theta_{q})}e^{i\Phi_{m}(\phi _{q},\theta_{q})}. \tag{2}\]  
\(\mathbf{n}(k)\in\mathbb{C}^{M\times 1}\) models a zero-mean Gaussian distributed noise process. The sample covariance matrix of \(\mathbf{y}(k)\) is frequently defined as  
\[\mathbf{\hat{R}}=\frac{1}{K}\sum_{k=1}^{K}\mathbf{y}(k)\mathbf{y}(k)^{\mathrm{H}}, \tag{3}\]  
where \((\cdot)^{\mathrm{H}}\) denotes the Hermitian transpose. Applying eigendecomposition on the matrix \(\mathbf{\hat{R}}\) yields  
\[\mathbf{\hat{R}}=\mathbf{\Lambda}\mathbf{D}\mathbf{\Lambda}^{-1}, \tag{4}\]  
where \(\mathbf{\Lambda}\) is a matrix with the eigenvectors of \(\mathbf{\hat{R}}\) in its columns and \(\mathbf{D}\) is a diagonal matrix with the corresponding eigenvalues on its diagonal. Next, the matrix \(\mathbf{\Lambda}\) can be split into two matrices \(\mathbf{\Lambda}_{s}\) and \(\mathbf{\Lambda}_{n}\). \(\mathbf{\Lambda}_{s}\) contains the \(Q\) signal eigenvectors that correspond to the \(Q\) largest eigenvalues; hence, it spans the signal subspace. \(\mathbf{\Lambda}_{n}\) contains the \(M-Q\) noise eigenvectors that correspond to the remaining \(M-Q\) smallest eigenvalues; hence, it spans the noise subspace. Since these two subspaces are orthogonal, the following equation  
\[\mathbf{a}^{H}(\phi,\theta)\mathbf{\Lambda}_{n}=0 \tag{5}\]  
holds for all directions \([\mathbf{\phi},\,\mathbf{\theta}]=[(\phi_{1},\theta_{1}),...,(\phi_{q},\theta_{q})]\). Consequently, the so-called MUSIC spectrum  
\[P_{\mathrm{MU}}(\phi,\theta)=\frac{1}{\left|\mathbf{a}(\phi,\theta)\mathbf{\Lambda}_{ n}\right|^{2}} \tag{6}\]  
exhibits peaks at the estimated directions of arrival \([\mathbf{\hat{\phi}},\,\mathbf{\hat{\theta}}]\). Figure 3 and Algorithm 1 provide a flowchart and a pseudocode of the described algorithm, respectively.