## 2 System Model
### Eavesdropping Channel Model and Secrecy Capacity  
Assuming the presence of an eavesdropper in the system, as shown in Figure 4, the eavesdropper [PERSON] is equipped with \(N_{e}\) antennas. [PERSON] needs to transmit confidential information \(\mathbf{x}\) to [PERSON]. The received signals at [PERSON] and [PERSON] are, respectively, expressed as  
\[ \begin{split}\mathbf{y}_{b}&=\mathbf{H}\mathbf{x}+ \mathbf{n}_{b},\\ \mathbf{y}_{e}&=\mathbf{G}\mathbf{x}+\mathbf{n}_{e}, \end{split}  \tag{7}\]  
where \(\mathbf{H}\in\mathbb{C}^{N_{e}\times N_{t}}\) and \(\mathbf{G}\in\mathbb{C}^{N_{e}\times N_{t}}\) represent the channel matrices of the legitimate user and the eavesdropper, respectively. \(\mathbf{x}\in\mathbb{C}^{N_{t}\times 1}\) represents the signal transmitted by [PERSON], with its covariance matrix given by \(\mathbb{E}\big{\{}\mathbf{x}\mathbf{x}^{H}\big{\}}=\mathbf{Q}_{\mathbf{x}}\). The total transmission power is constrained by \(\mathrm{Tr}(\mathbf{Q}_{\mathbf{x}})\leq P_{t}\). \(\mathbf{n}_{b}\in\mathbb{C}^{N_{t}\times 1}\) and \(\mathbf{n}_{e}\in\mathbb{C}^{N_{e}\times 1}\) represent the additive complex Gaussian noise vectors for [PERSON] and [PERSON], respectively, with \(\mathbf{n}_{b}\sim\mathcal{CN}(\mathbf{0},\sigma_{b}^{2}\mathbf{I})\) and \(\mathbf{n}_{e}\sim\mathcal{CN}(\mathbf{0},\sigma_{e}^{2}\mathbf{I})\). Assuming that [PERSON] has perfect CSI for the channel matrices \(\mathbf{H}\) and \(\mathbf{G}\). Under the assumption of a single receive antenna, the spectral efficiencies of the legitimate user's  
Figure 4: Eavesdropping channel model. Figure 3: Response characteristics of the channel: (**a**) the antenna domain channel \(\mathbf{H}\); (**b**) the beamspace channel \(\mathbf{H}_{\
u}\). channel and the eavesdropping channel can be expressed based on [PERSON]'s theorem as follows:  
\[ \begin{array}{l}R_{b}=\log_{2}\det(\mathbf{I}+\mathbf{H}\mathbf{Q}_{x}\mathbf{H }^{H}),\\ R_{e}=\log_{2}\det(\mathbf{I}+\mathbf{G}\mathbf{Q}_{x}\mathbf{G}^{H}).\end{array}  \tag{8}\]  
The system's secrecy rate can be expressed as the difference between the spectral efficiency of the legitimate user's channel and that of the eavesdropping channel. Considering the non-negativity of the secrecy rate, we have  
\[R_{s}=\left\{\begin{array}{l}R_{b}-R_{e},\ \ \ R_{b}>R_{e},\\ 0,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
```
1:
2:\(\mathbf{P}=\mathbf{p}\mathbf{i}\mathbf{v}(\mathbf{X}^{H})\);
3: Extraction \(c=column(\mathbf{P})\); \(\mathbf{F}_{opt}=\mathbf{P}(:,c:-1:c-N_{s}+1)\);
4: Normalization \(\mathbf{F}_{opt}=\sqrt{N_{s}}\frac{\mathbf{F}_{opt}}{\left\|\mathbf{F}_{opt} \right\|_{F}}\) Output:  digital precoder \(\mathbf{F}_{opt}\)
```  
**Algorithm 1** GSVD-based secure beam digital precoding.  
The channel matrices \(\mathbf{H}\in\mathbb{C}^{N_{r}\times N_{t}}\) and \(\mathbf{G}\in\mathbb{C}^{N_{e}\times N_{t}}\) have the same number of columns. In the first step, GSVD is performed on \((\mathbf{H},\mathbf{G})\)  
\[[\mathbf{U},\mathbf{V},\mathbf{X},\mathbf{C},\mathbf{S}]=gsvd(\mathbf{H}, \mathbf{G}), \tag{14}\]  
where \(\mathbf{U}\in\mathbb{C}^{N_{r}\times N_{t}}\) and \(\mathbf{V}\in\mathbb{C}^{N_{e}\times N_{e}}\) are unitary matrices, \(\mathbf{C}\in\mathbb{C}^{N_{r}\times q}\) and \(\mathbf{S}\in\mathbb{C}^{N_{e}\times q}\) are non-negative diagonal matrix. We also obtain \(\mathbf{X}\in\mathbb{C}^{N_{t}\times q}\), with \(q=\min(N_{t},N_{r}+N_{e})\). The matrices above satisfy the following equations:  
\[\mathbf{H} =\mathbf{U}\mathbf{C}\mathbf{X}^{H}, \tag{15}\] \[\mathbf{G} =\mathbf{V}\mathbf{S}\mathbf{X}^{H}.\]  
Furthermore, the matrices \(\mathbf{C}\) and \(\mathbf{S}\) satisfy  
\[\mathbf{C}^{T}\mathbf{C}+\mathbf{S}^{T}\mathbf{S}=\mathbf{I}. \tag{16}\]  
GSVD is designed to extract the dominant directions of two matrices and align them within a unified coordinate system for comparison. For the legitimate user's channel \(\mathbf{H}\) and the eavesdropper's channel \(\mathbf{G}\), GSVD is performed on the matrix pair \((\mathbf{H},\mathbf{G})\), simultaneously diagonalizing them.