## 4 Digital Baseband Precoding and Combining
### Complexity Analysis  
Hybrid beamforming algorithm with relay selection mechanism was proposed to enhance the spectral efficiency by deploying multiple relays between source and destination. Multi-linear SVD is applied on the overall channel \(\mathbf{H}_{t}\in\mathbb{C}^{N_{rel}\times N_{t}\times K}\) from the source to \(K\) relay nodes for finding the common orthonormal bases, and then, the reconstruction loss is minimized to derive the phase-shift values for designing the required source analog beamformer. This process requires computational cost in the order of \(O(QN_{t}N_{rel}K)\), where \(Q\) is defined as \(Q:=\max\{N_{t}N_{rel}K\}\). The computational complexity in deriving the analog combiner at destination is in the order of matrix addition. Moreover, the size of this matrix depends on the number of antennas \(N_{r}\) and the number of RF-chains \(N_{r}^{RF}\). Therefore, it requires approximately \(N_{r}\times N_{r}^{RF}\) operations to evaluate the desired RF combiner. In \begin{table}
\begin{tabular}{l} \hline \hline
**Algorithm:** Hybrid transceiver and relay selection in a single-user multi-relay MIMO systems based on end-to-end SNR maximization \\ \hline
1. **Initialization:** Let \(\Phi_{1}=\{1,2,\ldots,K\}\), \(I=\{1,\ldots N_{t}\}\), \(J=\{1,\ldots,N_{t}^{RF}\}\) \\
2. **Input:** Channel Matrix \(\mathbf{H}_{\mathbf{U}_{1}}\), \(\mathbf{G}_{\mathbf{U}_{k}}\), \(k\in\Phi_{1}\) \\
**First stage:** Analog RF beamforming at communicating nodes \\ (a) **Source analog beamformer \(\mathbf{V}_{RF}\)** \\
3. Overall channel matrix \(\mathbf{H}_{t}\) from source to relay nodes is given by (18) \\
4. Perform multi-linear SVD on \(\mathbf{H}_{t}\) (19) \\
5. The un-constrained common beamformer at source can be derived as (20) \\
6. The solution of the optimization problem in (21) leads to the required analog RF beamformer \\ \(\mathbf{V}_{RF}=\left(\frac{1}{\sqrt{N_{t}}}\right)exp\left(j\angle\mathbf{F}_{pot}\right)\) \\ (b) **Relay Analog Beamforming (\(\mathbf{F}_{1k}\), \(\mathbf{F}_{2k}\))** \\
7. Define composite channels \(\mathbf{H}_{int,k},\mathbf{G}_{int,k}\) such as \\ \(\mathbf{H}_{int,k}=\mathbf{H}_{k}\mathbf{F}_{opt}\), \(\mathbf{G}_{int,k}=\mathbf{W}_{opt}^{H}\mathbf{G}_{k},k\in\Phi_{1}\) \\
8. **for** each relay node \(k\), \(k=1,2,\ldots,K\) **do** \\
9. \(\mathbf{S}^{*}=max\|\mathbf{H}_{int,k}\|_{F}\) \\
10. \(\mathbf{Z}^{*}=max\|\mathbf{G}_{int,k}\|_{F}\) \\
11. **end for** \\
12. \(\mathbf{F}_{1k}=\left(\frac{1}{\sqrt{N_{tot}}}\right)e^{j\arg(\mathbf{S}^{*})}\), \(\mathbf{F}_{2k}=\left(\frac{1}{\sqrt{N_{tot}}}\right)e^{j\arg(\mathbf{Z}^{*})}\) \\
**Relay Selection:** \\
13. \(k^{*}=\max\left(\underbrace{\|\mathbf{H}_{int,k}\|_{F}+\|\mathbf{G}_{int,k}\|_{F}}_{k \in\Phi_{1}}\right)\) \\ (c) **Analog RF combiner \(\mathbf{W}_{RF}\) at destination** \\
14. \(\mathbf{W}_{opt}=\frac{1}{k}\left(\sum_{k=1}^{K}W_{opt,k}\right)\) \\
15. Phase-shift values are obtained for designing \(\mathbf{W}_{RF}\) by solving the optimization problem (29) \\
16. \(\mathbf{W}_{RF}=\left(\frac{1}{\sqrt{N_{t}}}\right)e^{j\angle\left|\mathbf{W}_{opt,k} \right|}\forall q\in\{1,\ldots,N_{r}\}\), \(m\in\{1,\ldots,N_{r}^{RF}\}\) \\
**Second stage:** Digital baseband processing at communicating nodes \\
17. Calculate the equivalent baseband channels corresponding to \(\mathbf{H}_{k}\), \(\mathbf{G}_{k}\) such as \\  
\(\mathbf{H}_{\text{eq}}=\mathbf{F}_{1k}^{H}\mathbf{H}_{k}\mathbf{V}_{RF}\), \(\mathbf{G}_{\text{eq}}=\mathbf{W}_{RF}^{H}\mathbf{G}_{k}\mathbf{F}_{2k}\) \\
18. Optimal baseband combiner \(\mathbf{W}_{BB,k}\), when \(k\)th relay node is selected for data transmission, can be evaluated by using the expression (48) \\
19. \(\mathbf{V}_{BB,k}\) and \(\mathbf{G}_{BB,k}\) are derived by solving the optimization problem (51) based on MSE \\ diagonalization \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of the proposed algorithm. addition, the major contributing factor in evaluating the analog precoder/combiner at relay node is the matrix multiplication.