## 2 System Model
### Eavesdropping Channel Model and Secrecy Capacity
The decomposition yields two unitary matrices \(\mathbf{U}\) and \(\mathbf{V}\), a matrix \(\mathbf{X}\), and two non-negative diagonal matrices \(\mathbf{C}\) and \(\mathbf{S}\). GSVD can be viewed as a generalization of SVD. It projects both \(\mathbf{H}\) and \(\mathbf{G}\) onto the common basis \(\mathbf{X}\), allowing them to be represented in a decoupled form. In this basis, matrix \(\mathbf{H}\) exhibits strong responses along the directions corresponding to large generalized singular values, whereas matrix \(\mathbf{G}\) exhibits weak responses along these same directions. In step 2, the pseudo-inverse of matrix \(\mathbf{X}^{H}\) is computed, \(\mathbf{X}*pinv(\mathbf{X}^{H})=\mathbf{I}\). In step 3, \(\mathbf{F}_{opt}\) is composed of the rightmost \(N_{s}\) columns of \(\text{pinv}\left(\mathbf{X}^{H}\right)\), corresponding to the \(N_{s}\) largest generalized singular values. Here, \(c\) denotes the number of columns in matrix \(pinv(\mathbf{X}^{H})\), and \(N_{s}\) represents the number of data streams. Step 4 performs normalization on \(\mathbf{F}_{opt}\) to satisfy the transmit power constraint. After obtaining the precoder \(\mathbf{F}_{opt}\), the MMSE algorithm can be used to compute the receiver combiner matrix \(\mathbf{W}_{opt}\)[22]. The MMSE-based combiner minimizes the mean square error (MSE) of the signal estimation in the presence of Gaussian noise and interference. \[ \begin{split}\mathbf{W}_{opt}&=\mathbb{E}[\mathbf{y }\mathbf{y}^{H}]^{-1}[\mathbf{y}\mathbf{s}^{H}]\\ &=(\mathbf{H}\mathbf{F}_{opt}\mathbf{F}_{opt}^{H}\mathbf{H}^{H}+N _{s}\sigma_{b}^{2}\mathbf{I}_{N_{s}})^{-1}\mathbf{H}\mathbf{F}_{opt}.\end{split}  \tag{17}\]  
Thus, we obtain the optimal secure beam precoder/combiner pair \((\mathbf{F}_{opt},\mathbf{W}_{opt})\) based on GSVD. Additionally, as a comparison to the GSVD-based digital precoding scheme, we describe the SVD-based digital precoding scheme, as shown in Algorithm 2. Assuming the eavesdropping channel is not considered and only the legitimate channel undergoes SVD decomposition, we have  
\[[\mathbf{\widetilde{U}},\mathbf{\widetilde{S}},\mathbf{\widetilde{V}}]=svd( \mathbf{H}), \tag{18}\]  
where \(\mathbf{\widetilde{U}}\in\mathbb{C}^{N_{t}\times N_{t}}\) is the left singular matrix, \(\mathbf{\widetilde{V}}\in\mathbb{C}^{N_{t}\times N_{t}}\) is the right singular matrix, and \(\mathbf{\widetilde{S}}\in\mathbb{C}^{N_{t}\times N_{t}}\) is the diagonal matrix composed of singular values. ```
Input:  legitimate user's channel \(\mathbf{H}\);
1: SVD \(\mathbf{[\widetilde{U},\mathbf{\widetilde{S}},\mathbf{\widetilde{V}}]=svd( \mathbf{H})}\), \(\mathbf{H=\widetilde{U}\mathbf{\widetilde{S}}\mathbf{\widetilde{V}}^{H}}\)
2: Extraction \(\mathbf{\widetilde{F}=\widetilde{V}(;,1:N_{s})}\);
3: Normalization \(\mathbf{\widetilde{F}=\sqrt{N_{s}}\frac{\mathbf{\widetilde{F}}}{\left\| \mathbf{\widetilde{F}}\right\|_{F}}}\) Output:  digital precoder \(\mathbf{\widetilde{F}}\)
```  
**Algorithm 2** SVD-based digital precoding. By selecting the \(N_{s}\) leftmost column vectors from \(\mathbf{\widetilde{V}}\), the precoder \(\mathbf{\widetilde{F}}\) is formed, i.e., \(\mathbf{F}=\mathbf{\widetilde{F}}\). The combiner \(\mathbf{W}=\mathbf{\widetilde{W}}\) is still calculated using the MMSE method. The resulting precoder/combiner pair \((\mathbf{\widetilde{F}},\mathbf{\widetilde{W}})\) maximizes the spectral efficiency for the legitimate user. \[R=\log_{2}(|\mathbf{I}_{N_{t}}+\frac{1}{N_{s}}\mathbf{\widetilde{R}}_{b}^{-1} \mathbf{\widetilde{W}}^{H}\mathbf{\widetilde{H}\widetilde{F}}^{-H}\mathbf{H }^{H}\mathbf{\widetilde{W}}|), \tag{19}\]  
where \(\mathbf{\widetilde{R}}_{b}=\sigma_{b}^{2}\mathbf{\widetilde{W}}^{H}\mathbf{ \widetilde{W}}\) is the covariance matrix of the received noise.