## 3 Proposed Algorithm
### The Design of Initial Value of Analog Precoding Matrix  
From the above, we can see that Algorithm 1 needs an initial analog precoding matrix input \(\mathrm{F}_{0}\) to begin the iteration. If \(\mathrm{F}_{0}\) is set randomly, the algorithm will converge too slowly and fall into a suboptimal solution. Therefore, it is necessary to design the initial value of the analog precoding matrix. Firstly, it can be known from Formulas (9) and (10) that \(\left\{\mathrm{S}_{\mathrm{j}}\right\}_{\mathrm{j=1}}^{\mathrm{N}_{\mathrm{rf} }^{\mathrm{N}_{\mathrm{rf}}^{\mathrm{N}_{\mathrm{rf}}}}}\) actually represents the position of non-zero elements in the analog precoding matrix, which means that the function of the analog precoder is to match the optimal channel conditions for the signal to obtain the maximum effective channel gain, so the objective function for designing the analog precoding matrix can be set to maximize \(\left\|\mathrm{H}_{\mathrm{eff}}\right\|_{\mathrm{F}}^{2}\), which can be transformed into:  
\[\left\|\mathrm{H}_{\mathrm{eff}}\right\|_{\mathrm{F}}^{2} =\mathrm{tr}\left(\mathrm{H}_{\mathrm{eff}}^{\mathrm{H}}\mathrm{ H}_{\mathrm{eff}}\right) \tag{18}\] \[=\mathrm{tr}\left(\overline{\mathrm{F}}^{\mathrm{H}}\mathrm{H}^{ \mathrm{H}}\mathrm{H}\overline{\mathrm{F}}\right)\]  
Therefore, the problem of designing the analog precoder can be expressed as:  
\[ \begin{array}{l}\max_{\mathrm{rf}}\mathrm{tr}\left(\overline{\mathrm{F}}^{ \mathrm{H}}\mathrm{H}^{\mathrm{H}}\mathrm{H}\overline{\mathrm{F}}\right)\\ \mathrm{s.}\ t.\ \ \ \overline{\mathrm{F}}=\mathrm{F}\left(\mathrm{F}^{ \mathrm{H}}\mathrm{F}\right)^{-\frac{1}{2}}\\ \left\|\ \mathrm{F}_{\mathrm{i},\mathrm{j}}\right\|_{0}=1,\forall\mathrm{i}\\ \left|\mathrm{F}_{\mathrm{i},\mathrm{j}}\right|=1_{\mathrm{S}}(\mathrm{i}),\ \ \ \forall\mathrm{i},\mathrm{j}\\ \left\|\mathrm{F}_{\mathrm{j}}\right\|_{0}\
eq 0,\forall\mathrm{j}\\ \mathrm{S}_{\mathrm{j}}\in\mathrm{S}\end{array}  \tag{19}\]  
where \(\|\cdot\|_{0}\) represents the zero norm, \(\mathrm{F}_{\mathrm{i},\mathrm{j}}\) represents the i-th row of matrix \(\mathrm{F}\). To ensure the utilization of the RF chains, each column of \(\mathrm{F}\) has at least one non-zero element. Since the constraints are discrete and non-convex, it is hard to directly solve the problem (19). Inspi by [15], the reference [15] gives the optimal solution of problem (19) under the unconstrained condition:  
\[\widehat{\mathrm{F}}=\mathrm{V}_{\mathrm{R}}\mathrm{A} \tag{20}\]  
where \(\mathrm{V}_{\mathrm{R}}\) is the first \(\mathrm{N}_{\mathrm{rf}}^{\mathrm{t}}\) column of the left eigenvector matrix of \(\mathrm{H}^{\mathrm{H}}\mathrm{H}\), and \(\mathrm{A}\) is an arbitrary \(\mathrm{N}_{\mathrm{rf}}^{\mathrm{t}}\times\mathrm{N}_{\mathrm{rf}}^{\mathrm{t}}\) unitary matrix with full rank. This is the optimal solution when the rank of the channel matrix is not greater than the number of RF chains. Since Formula (20) is the optimal solution of problem (19) under unconstrained conditions, the designing problem of the initial value \(\mathrm{F}_{0}\) can be written as:  
\[ \begin{array}{l}\min_{\mathrm{F}_{0}\in\mathrm{F}}\left\|\mathrm{F}_{0}- \widehat{\mathrm{F}}\right\|_{\mathrm{F}}^{2}\\ \mathrm{s.t.}\ \left\|\mathrm{F}_{0_{\mathrm{i},\mathrm{j}}}\right\|_{0}=1,\ \ \forall\mathrm{i}\\ \left\|\mathrm{F}_{0_{\mathrm{i},\mathrm{j}}}\right\|_{1_{\mathrm{S}}}( \mathrm{i}),\ \ \ \forall\mathrm{i},\mathrm{j}\\ \left\|\mathrm{F}_{0_{\mathrm{i},\mathrm{j}}}\right\|_{0}\
eq 0,\forall \mathrm{j}\end{array}  \tag{21}\]  
Based on the above analysis, we propose a heuristic algorithm that uses the matrix \(\widehat{\mathrm{F}}\) to calculate the initial value \(\mathrm{F}_{0}\). The algorithm flow is shown in Algorithm 2. First, in steps 1 to 16, sort the elements in each row of the matrix \(\widehat{\mathrm{F}}\), keep the maximum value, and set the remaining elements to zero.