# An Efficient Precoding Algorithm for mmWave Massive MIMO Systems
## 3 Proposed Algorithm
### The Generalized Inverse of Banachievicz-Schur Block Matrix Based Solution  
For matrix inversion, it is often replaced by the generalized inverse of Banachievicz-Schur block matrix. It converts the high-dimensional matrix into a low-dimensional matrix and updates it with the result of the previous iteration to avoid matrix inversion and reduce the amount of computation. For convenience, we define \(G\) as:  
\[G_{IJ}=\varphi_{I}^{H}\varphi_{I} \tag{13}\]  
where \(\varphi\) is an \(N_{t}\times N_{cl}\)\(N_{\text{ray}}\) matrix whose column consists of the array's response vector at the transmitting end, \(I\) and \(J\) are two arbitrary index sets, and \(\varphi_{I}\) is a sub-array consisting of an index set \(I\) of \(\varphi\). In addition, let \(I_{i}\), be the index set of the base vector selected in the \(i\)th iteration. Therefore, the least squares solution can be rewritten as:  
\[F_{\text{BB}}=\left(F_{\text{RF}}^{H}\right)^{-1}F_{\text{RF}}^{H}F_{\text{ opt}}=\left(\varphi_{I_{i}}^{H}\varphi_{I_{i}}\right)^{-1}\varphi_{I_{i}}^{H}F_{ \text{opt}}=G_{I_{i}J_{i}}^{-1}\varphi_{I_{i}}^{H}F_{\text{opt}}. \tag{14}\]  
Applying the Banachievicz-Schur block matrix generalized inverse to the matrix \(G_{I_{i}J_{i}}^{-1}\) in Equation (14), the matrix can be written as:  
\[G_{I_{i}J_{i}}^{-1}=\left[\begin{array}{cc}G_{I_{i}-1,I_{i}-1}&G_{I_{i}-1,k }\\ G_{K,I_{i}-1}&G_{k,k}\end{array}\right]^{-1}=\left[\begin{array}{cc}G_{I_{i} -1,I_{i}-1}^{-1}+VA^{H}A&-VA^{H}\\ -VA&V\end{array}\right] \tag{15}\]  
where  
\[A=G_{K,I_{i}-1}G_{I_{i}-1,I_{i}-1}^{-1} \tag{16}\]  
\[V=\frac{1}{G_{k,k}-G_{K,I_{i}-1}G_{I_{i}-1,I_{i}-1}^{-1}G_{I_{i}-1,k}}=\frac{1 }{G_{k,k}-AG_{I_{i}-1,k}} \tag{17}\]  
where \(k\) is the index of the currently selected base vector, \(G_{I_{i}-1,I_{i}-1}^{-1}\) is the \((i-1)\times(i-1)\) inverse matrix obtained from \((i-1)\) iterations, \(A\) is an auxiliary vector of \(1\times(i-1)\), and \(V\) is an auxiliary scaler of the generalized inverse of the block matrix. By directly using the previous iteration, \(G_{I_{i}-1,I_{i}-1}^{-1}\), \(G_{I_{i},I_{i}}^{-1}\) can be reduced to matrix multiplication, matrix addition, and a reciprocal of a real number. Therefore, the calculation of \(F_{\mathbf{BB}}\) can skip the calculation of \(G_{I_{i},I_{i}}^{-1}\) with the calculation results of the previous iteration. \(F_{\mathbf{i}}\) is defined as the least square's solution matrix in the \(i\)th iteration, which can be decomposed into:  
\[\begin{split}& F_{\mathbf{i}}=F_{\mathbf{BB}}=G_{I_{i},I_{i}}^{-1} \varphi_{I_{i}}^{H}F_{\mathbf{opt}}=G_{I_{i},I_{i}}^{-1}\left[\varphi_{I_{i},1} -\varphi_{k}\right]^{H}F_{\mathbf{opt}}\\ =&\left[\begin{array}{cc}G_{I_{i}-1,I_{i}-1}^{-1}+VA ^{H}A&-VA^{H}\\ -VA&V\end{array}\right]\times\left[\begin{array}{c}\varphi_{I_{i},I_{i}}^{H}F_ {\mathbf{opt}}\\ \varphi_{k}^{H}F_{\mathbf{opt}}\end{array}\right]\\ =&\left[\begin{array}{cc}F_{i-1}+VA^{H}A\varphi_{I_{i-1}}^{H}F_{\mathbf{opt} }-VA^{H}\varphi_{k}^{H}F_{\mathbf{opt}}\\ VA\varphi_{I_{i-1}}^{H}F_{\mathbf{opt}}+V\varphi_{k}^{H}F_{\mathbf{opt}}\end{array} \right]\end{split} \tag{18}\]  
where \(M\) is an auxiliary vector of \(\mathbf{1}\times\mathbf{N}_{s}\), which is expressed as:  
\[M=A\varphi_{I_{i}-1}^{H}F_{\mathbf{opt}}-\varphi_{k}^{H}F_{\mathbf{opt}}=A \psi_{0}(I_{i-1},:)-\psi_{0}(k,:) \tag{19}\]  
where \(\psi_{0}\) is the correlation matrix of the base vector \(\varphi\) and the initial residual matrix \(F_{\mathbf{res}}=F_{\mathbf{opt}}\). Therefore, Equation (18) can be simplified to:  
\[F_{i}=\left[\begin{array}{cc}F_{i-1}+VA^{H}M\\ -VM\end{array}\right]. \tag{20}\]  
In summary, \(G_{I_{i},I_{i}}^{-1}\), \(F_{i}\), and \(\psi_{i}\) can all be updated simultaneously using the auxiliary variables \((A,V,M)\) and the calculation results of the previous iteration. This replaces the process of matrix inversion to reduce the amount of computation.