# Comparison of CS-Based Channel Estimation for Millimeter Wave Massive MIMO Systems
## 4 A Comparison of Sparse Signal Recovery Algorithms
### Bayesian Inference Algorithms  
The Bayesian inference algorithms are based on the Bayesian theorem and their main idea can be summarized as follows [28]. Firstly, assume the sparsity prior distribution of parameters that need to be estimated. Secondly, transform the prior to posterior distribution based on Bayesian theorem. Thirdly, find the optimal value of parameters to maximize the posterior probability. The prior assumption is crucial as it controls the computational complexity and recovery accuracy of algorithms. To enlarge the sparseness and formulate a closed-form expression after Bayesian inference, the hierarchical sparsity prior is widely used in the sparsity Bayesian learning, particularly in the relevance vector machine (RVM) [28]. Specifically, define a zero-mean Gaussian prior of each element in \(\mathbf{h}\), and then the probability density function (PDF) can be expressed as  
\[p\left(\mathbf{h}|\boldsymbol{\alpha}\right)=\prod_{i=1}^{L}\mathbf{N}\left(h_ {i}|0,\alpha_{i}^{-1}\right) \tag{18}\]  
where \(\alpha_{i}\) is the precision of a Gaussian density function. A Gamma prior is considered over \(\boldsymbol{\alpha}\)  
\[p\left(\boldsymbol{\alpha}|a,b\right)=\prod_{i=1}^{L}\Gamma\left(\alpha_{i}|a,b\right) \tag{19}\]  
Based on Bayesian inference, we can express the posterior for \(\mathbf{h}\) as a Gaussian distribution with the mean and variance given as follows  
\[\left\{ \begin{array}{l}\boldsymbol{\mu}=\alpha_{0}\boldsymbol{\Sigma} \boldsymbol{\Phi}^{T}\mathbf{h}\\ \boldsymbol{\Sigma}=\left(\alpha_{0}\boldsymbol{\Phi}^{T}\boldsymbol{\Phi}+ \mathbf{A}\right)^{-1}\end{array} \right. \tag{20}\]  
where \(\mathbf{A}=diag\left(\alpha_{1},\alpha_{2},\cdots,\alpha_{L}\right)\). By marginalizing over the \(\mathbf{h}\), the logarithm marginal likelihood for a and \(\alpha_{0}\) can be expressed as  
\[ \begin{array}{l}L\left(\boldsymbol{\alpha},\alpha_{0}\right)=\log\int p \left(\mathbf{y}|\mathbf{h},\alpha_{0}\right)p\left(\mathbf{h}|\boldsymbol{ \alpha}\right)d\mathbf{h}\\ =-\frac{1}{2}\left[K\log\left(2\pi\right)+\log|\mathbf{C}|+\mathbf{y}^{T} \mathbf{C}^{-1}\mathbf{y}\right]\end{array}  \tag{21}\]  
where \(\mathbf{C}=\sigma^{2}\mathbf{I}+\boldsymbol{\Phi}\mathbf{A}^{-1}\boldsymbol{ \Phi}^{T}\). By using the type-II ML [29] to maximize Equation (21), the parameters \(\boldsymbol{\alpha}\) and \(\alpha_{0}\) can be updated as follows  
\[\left\{ \begin{array}{l}a_{i}^{new}=\frac{\gamma_{i}}{\mu_{i}^{2}}\\ \frac{1}{\alpha_{0}^{2}}=\frac{|\mathbf{y}-\boldsymbol{\Phi}\mu_{i}^{2}|^{2}}{K -\frac{1}{\gamma_{i}}\gamma_{i}}\end{array} \right. \tag{22}\]  
where \(\mu_{i}\) is the \(i\)th element of \(\boldsymbol{\mu}_{i}\) and \(\gamma_{i}=1-\alpha_{i}\Sigma_{ii}\). It is worth noting that the channel estimation in mmWave massive MIMO involves complex signal recovery so that the traditional Bayesian inference algorithm designed to recover the real signal in [30; 31] needs to be improved to fit the complex signal. A feasible method is to slip the real and imaginary components as follows  
\[\left[ \begin{array}{c}R\left(\mathbf{y}\right)\\ I\left(\mathbf{y}\right)\end{array} \right]=\left[ \begin{array}{cc}R\left( \mathbf{\Phi\Psi}\right)&-I\left(\mathbf{\Phi\Psi}\right)\\ I\left(\mathbf{\Phi\Psi}\right)&R\left(\mathbf{\Phi\Psi}\right)\end{array}  \right]\left[ \begin{array}{c}R\left(\mathbf{h}\right)\\ I\left(\mathbf{h}\right)\end{array} \right]+\left[ \begin{array}{c}R\left( \mathbf{e}_{N}\right)\\ I\left(\mathbf{e}_{N}\right)\end{array} \right] \tag{23}\]  
where \(R\left(\cdot\right)\) denotes the real component and \(I\left(\cdot\right)\) denotes the imaginary component. As a result, the dimensions will increase so a simplified model for Bayesian inference is essential and the main motivation of adopting the RVM is because of its highly efficient computation. Based on above analysis, the Bayesian compressed sensing (BCS) algorithm can be used to recover the sparse channel through proper conversion.