## 4 Numerical Simulations and Analysis
### Hybrid Precoding System  
Next, the performance of the proposed algorithm in a hybrid precoding system is discussed. Figure 9 verifies the sparsity of the beamspace channel \(\mathbf{H}_{b}\) in the GSVD-Sparsity algorithm. Figure 9a shows a 3D beam pattern, while Figure 9b presents the 2D planar beam pattern. In Figure 9a, only a few prominent peaks can be observed, and in Figure 9b, the red-colored elements indicate beams with relatively high power. It is clearly shown that there are only a few strong paths, demonstrating that the sparse beamspace channel \(\mathbf{H}_{b}\) exhibits high directionality. Figure 10 compares the spectral efficiency of the legitimate user under two secure beam hybrid precoding algorithms, GSVD-Sparsity and OMP, in a hybrid precoding system. In the fully digital system, the optimal precoder/combiner pair obtained is \((\mathbf{F}_{opt},\mathbf{W}_{opt})\). Both the GSVD-Sparsity and OMP algorithms decompose \(\mathbf{F}_{opt}\) and \(\mathbf{W}_{opt}\) to derive the hybrid precoder \((\mathbf{F}_{RF}\mathbf{F}_{BB},\mathbf{W}_{RF}\mathbf{W}_{BB})\). The optimal curve in the figure represents the spectral efficiency of the legitimate user achieved by the GSVD-based scheme in the fully digital system, serving as the benchmark for comparison. In the GSVD-Sparsity algorithm,  
Figure 9: Sparsity of beam patterns: (**a**) 3D beam pattern; (**b**) 2D beam pattern. and \(\mathbf{W}_{RF}\) are determined by the sparsity of \(\mathbf{H}_{b}\). From the figure, it can be observed that the GSVD-Sparsity algorithm closely approximates the performance of the optimal digital precoding scheme based on GSVD. This is because the beams constructed by \(\mathbf{F}_{RF}\) and \(\mathbf{W}_{RF}\) are aligned with the paths in the beamspace channel that have the highest power, thereby enhancing the transmission rate. Moreover, the sparsity-based beam selection is location-dependent. Only when the legitimate user is located at a specific position can the corresponding sparse beams at that location be obtained. The power paths are also location-dependent, which ensures the uniqueness of the transmission path. The OMP algorithm performs a search over the entire RF precoder (combiner) candidate set \(\mathbf{A}_{t}(\mathbf{A}_{r})\), selecting the optimal \(N_{RF}^{t}(N_{RF}^{t})\) basis vectors, such that \(\mathbf{F}_{opt}(\mathbf{W}_{opt})\) can be best projected onto these basis vectors. The OMP only selects the column vectors that contribute most to approximating \(\mathbf{F}_{opt}\), which reflects its greedy nature in numerical approximation. Specifically, \(\mathbf{F}_{RF}\) and \(\mathbf{W}_{RF}\) are constructed from the array response vectors that have the highest correlation with \(\mathbf{F}_{opt}\) and \(\mathbf{W}_{opt}\), respectively. This algorithm only approximates \(\mathbf{F}_{RF}\mathbf{F}_{BB}\) (\(\mathbf{W}_{RF}\mathbf{W}_{BB}\)) to \(\mathbf{F}_{opt}\) (\(\mathbf{W}_{opt}\)) as closely as possible from a numerical perspective, without leveraging the inherent sparsity of mmWave channels. Compared with the OMP algorithm, one of the key advantages of the proposed GSVD-Sparsity approach lies in its lower computational complexity. The following presents a comparative analysis of the computational complexity of GSVD-Sparsity, OMP, and exhaustive search algorithms. To ensure a fair comparison, the number of data streams was set to \(N_{s}=1\). For the OMP algorithm, the complexity of step 2(a) in Algorithm 3, which involves the matrix projection operation, was \(\mathcal{O}(N_{cl}N_{ray}N_{t})\); the complexity of step 2(b), which updates the support set, was \(\mathcal{O}(N_{cl}N_{ray})\); the least squares solution in step 2(c) required a complexity of \(\mathcal{O}(N_{ti}i^{2}+i^{3})\); and the residual update in step 2(d) had a complexity of \(\mathcal{O}(N_{ti}i)\). After \(N_{RF}^{t}\) iterations, the total complexity of OMP was \(\mathcal{O}(N_{RF}^{t}N_{cl}N_{ray}N_{t}+N_{t}(N_{RF}^{t})^{3}+(N_{RF}^{t})^{4})\).