# Joint Hybrid Beamforming Design for Millimeter Wave Amplify-and-Forward Relay Communication Systems
## 3 Hybrid Beamforming Design for HD AF Relay Systems
### MO-Based HBF Design
\begin{split}\mathbf{W_{B}}&=\Big{(}\mathbf{W}_{\text{RF}}^{H} \mathbf{H}_{2}\overline{\mathbf{G}}\mathbf{H}_{1}\overline{\mathbf{F}}\overline {\mathbf{F}}^{H}\mathbf{H}_{1}^{H}\overline{\mathbf{G}}^{H}\mathbf{H}_{2}^{H} \mathbf{W}_{\text{RF}}+\gamma_{1}^{-2}\sigma_{\mathbf{R}}^{2}\mathbf{W}_{ \text{RF}}^{H}\mathbf{H}_{2}\overline{\mathbf{G}}\overline{\mathbf{G}}^{H} \mathbf{H}_{2}^{H}\mathbf{W}_{\text{RF}}\\ &+\gamma_{1}^{-2}\gamma_{2}^{-2}\sigma_{\mathcal{D}}^{2}\mathbf{W }_{\text{RF}}^{H}\mathbf{W}_{\text{RF}}\Big{)}^{-1}\mathbf{W}_{\text{RF}}^{H} \mathbf{H}_{2}\overline{\mathbf{G}}\mathbf{H}_{1}\overline{\mathbf{F}}.\end{split}  \tag{21}\]  
Substituting (21) into (20a), let \(\mathbf{B}_{31}\)=\(\gamma_{1}^{-2}\sigma_{\mathbf{R}}^{2}\mathbf{W}_{\text{RF}}^{H}\mathbf{H}_{2} \overline{\mathbf{G}}\overline{\mathbf{G}}^{H}\mathbf{H}_{2}^{H}\mathbf{W}_{ \text{RF}}+\gamma_{1}^{-2}\gamma_{2}^{-2}\sigma_{\mathcal{D}}^{2}\mathbf{W}_{ \text{RF}}^{H}\mathbf{W}_{\text{RF}}\), we can recast the objective function as  
\[\text{T3}(\mathbf{W}_{\text{RF}})=\text{tr}\bigg{[}\big{(}\mathbf{I}_{\text{N }_{\text{S}}}+\overline{\mathbf{F}}^{H}\mathbf{H}_{1}^{H}\overline{\mathbf{G} }^{H}\mathbf{H}_{2}^{H}\mathbf{W}_{\text{RF}}\mathbf{B}_{31}^{-1}\mathbf{W}_{ \text{RF}}^{H}\mathbf{H}_{2}\overline{\mathbf{G}}\mathbf{H}_{1}\overline{ \mathbf{F}}\Big{)}^{-1}\bigg{]}. \tag{22}\]  
Likewise, the gradient is given by  
\[ \begin{split}&\
abla\text{T3}(\mathbf{W}_{\text{RF}})=\Big{(} \gamma_{1}^{-2}\sigma_{\mathbf{R}}^{2}\mathbf{H}_{2}\overline{\mathbf{G}} \overline{\mathbf{G}}^{H}\mathbf{H}_{2}^{H}\mathbf{W}_{\text{RF}}\mathbf{B}_{3 1}^{-1}\mathbf{W}_{\text{RF}}^{H}\\ &+\gamma_{1}^{-2}\gamma_{2}^{-2}\sigma_{\mathcal{D}}^{2}\mathbf{W }_{\text{RF}}\mathbf{B}_{31}^{-1}\mathbf{W}_{\text{RF}}^{H}-\mathbf{I}_{\text {N}_{\text{D}}}\Big{)}\mathbf{B}_{33}\mathbf{B}_{32}^{-2}\mathbf{B}_{33}^{H} \mathbf{W}_{\text{RF}}\mathbf{B}_{31}^{-1},\end{split}  \tag{23}\]  
where we define \(\mathbf{B}_{32}=\mathbf{I}_{\text{N}_{\text{S}}}+\overline{\mathbf{F}}^{H} \mathbf{H}_{1}^{H}\overline{\mathbf{G}}^{H}\mathbf{H}_{2}^{H}\mathbf{W}_{\text{ RF}}\mathbf{B}_{31}^{-1}\mathbf{W}_{\text{RF}}^{H}\mathbf{H}_{2}\overline{ \mathbf{G}}\mathbf{H}_{1}\overline{\mathbf{F}}\) and \(\mathbf{B}_{33}\)=\(\mathbf{H}_{2}\overline{\mathbf{G}}\mathbf{H}_{1}\overline{\mathbf{F}}\). _(4) Overall Algorithm_: On the basis of the above description, the proposed HBF-MO algorithm for the HD relay system is summarized in Algorithm 1. The original joint IMSE problem can be decomposed into three sub-problems, which are optimized alternately until the stopping criterion is met, as shown in Step 3 to Step 12. Moreover, the MO-based approach generates a local optimal solution instead of a global one. As a consequence, the performance of our proposed algorithm depends on the initialization of system parameters. In practice, the HBF matrix keeps approaching to the full DBF matrix with the number of iterations increasing. In this paper, we start with the full DBF matrix calculated by the singular value decomposition (SVD). ```
0:\(\mathbf{H}_{1}\), \(\mathbf{H}_{2}\), \(\sigma_{\mathcal{D}}^{2}\). 0:\(\gamma_{1}\), \(\gamma_{2}\), \(\mathbf{F}_{\text{RF}}\), \(\mathbf{F}_{\text{U}}\), \(\mathbf{G}_{\text{RF}_{1}}\), \(\mathbf{G}_{\text{U}}\), \(\mathbf{G}_{\text{RF}_{2}}\), \(\mathbf{W}_{\text{RF}}\), \(\mathbf{W}_{\text{B}}\). 1:Initialize \(\mathbf{F}_{\text{RF}}\), \(\mathbf{W}_{\text{RF}}\), \(\mathbf{G}_{\text{RF}_{1}}\) and \(\mathbf{G}_{\text{RF}_{2}}\) randomly. 2:Initialize \(\mathbf{F}_{\text{U}}\), \(\mathbf{G}_{\text{U}}\) and \(\mathbf{W}_{\text{B}}\) with full DBF matrixes, and set \(\gamma_{1}=\gamma_{2}=1\), \(k=1\). 3:while\(\text{IMSE}_{k}-\text{IMSE}_{k-1}>\varepsilon\)do
4: Calculate \(\
abla\text{T1}(\mathbf{F}_{\text{RF},k})\) according to (13) and compute \(\mathbf{F}_{\text{RF},k+1}\) by using the MO method. 5: Update \(\gamma_{1,k+1},\mathbf{F}_{\text{U},k+1}\) and \(\mathbf{F}_{k+1}\) according to (9) and (10).