## 3 Proposed CG-LIB Algorithm and User Vehicle Localization  
### Proposed CG-LIB Algorithm  
Let \(N_{\text{s}}=N_{\text{RF}}\), \(\mathbf{F}=\mathbf{F}_{A}\mathbf{F}_{D}\in\mathbb{C}^{N_{\text{s}}\times N_{ \text{s}}}\), and \(\mathbf{W}=\mathbf{W}_{A}\mathbf{W}_{D}\in\mathbb{C}^{N_{\text{u}}\times N_{ \text{s}}}\). The objective function is to maximize the rate of the user vehicle while satisfying the maximum transmission power constraint. Using (4) and (12), the sub-rate maximization problem is written as  
\[ \begin{split}&\underset{\mathbf{F},\boldsymbol{W},\boldsymbol{ \vartheta}}{\max}\,f(\mathbf{F},\mathbf{W},\boldsymbol{\vartheta})=\sum_{i}^ {N_{\text{s}}}log_{2}\bigg{(}1+\frac{p}{N_{\text{s}}\sigma_{z}^{2}}\mathbf{ \check{H}}_{\text{s}}\mathbf{\check{H}}_{\text{s}}^{H}\bigg{)}\,\text{ s.t. }||\mathbf{F}||_{F}^{2}\leq P,\\ &|\mathbf{F}(i,j)|^{2}=|\mathbf{W}(i,j)|^{2}=1,\forall_{i,j},\ \ \text{and}\ \ |\theta_{n}|^{2}=1,\forall_{m=1,\ldots,N_{\text{R}}},\end{split}  \tag{20}\]  
where \(i=1,2,\ldots,N_{\text{s}}\). The sub-rate maximization problem (20) is a sub-problem with respect to the digital beamformer \(\mathbf{F}_{D}\). To maximize the sub-rate, \(\mathbf{F}_{D}\) should be optimized to minimize \(||\mathbf{F}_{A}\mathbf{f}_{D,i}||^{2}\) based on the following multi-object optimization problem (20) as  
\[ \begin{split}&\underset{\mathbf{f}_{D,i}}{\min}\,||\mathbf{F}_{A} \mathbf{f}_{D,j}||^{2},\,i=1,\ldots,N_{\text{s}},\\ &\text{ s.t. }\mathbf{H}_{\text{s}}\mathbf{F}_{A}\mathbf{f}_{D,i}= \mathbf{I},\end{split}  \tag{21}\]  
where \(\mathbf{F}_{A}\), \(\mathbf{W}_{A}\) and \(\boldsymbol{\vartheta}\) are fixed. We see from (21), the \(N_{\text{s}}\) column of \(\mathbf{F}_{D}\) can be optimized separately according to  
\[ \begin{split}&\underset{\mathbf{f}_{D,i}}{\min}\,||\mathbf{F}_{A} \mathbf{f}_{D,j}||^{2},\,i=1,\ldots,N_{\text{s}},\\ &\text{ s.t. }\mathbf{H}_{\text{s}}\mathbf{F}_{A}\mathbf{f}_{D,i}= \mathbf{\xi}_{i},\end{split}  \tag{22}\]where \(\varsigma_{i}\) denotes an all-zero vector except for the \(i\)-th entry being unity. Using the stream-specific error expressions in (22), we apply Karush-Kuhn-Tucker (KKT) conditions and the Lagrangian method for the convex problem as  
\[\frac{\partial f(\mathbf{f}_{D,i},\kappa)}{\partial\mathbf{f}_{D,i}}=(\mathbf{ f}_{D,i}^{H}\mathbf{A}\mathbf{f}_{D,i})^{T}+(\kappa^{T}\mathbf{H}_{e}\mathbf{F}_{A} \mathbf{f}_{D,i})^{T}, \tag{23}\]  
where \(\mathbf{A}=\mathbf{F}_{A}^{H}\mathbf{F}_{A}\) denotes the equivalent \(N_{s}\times N_{s}\) analog beamforming matrix, \(\kappa\) is the Lagrangian multiplier and the corresponding Lagrangian is  
\[f(\mathbf{f}_{D,i},\kappa)=\mathbf{f}_{D,i}^{H}\mathbf{A}\mathbf{f}_{D,i}+ \kappa^{T}(\mathbf{H}_{e}\mathbf{F}_{A}\mathbf{f}_{D,i}-\varsigma_{i}). \tag{24}\]  
If \(\partial f\mathbf{f}_{D,i},\kappa)/\partial\mathbf{f}_{D,i}=0\), then \(\mathbf{f}_{D,i}\) and \(\kappa\) is given by  
\[\mathbf{f}_{D,i}=-\mathbf{A}^{-1}\mathbf{F}_{A}^{H}\mathbf{H}_{e}^{H}\kappa, \tag{25}\]  
and  
\[\kappa=-[\mathbf{H}_{e}\mathbf{F}_{A}\mathbf{A}^{-1}\mathbf{F}_{A}^{H} \mathbf{H}_{e}^{H}]^{-1}\varsigma_{i}. \tag{26}\]  
Thus, combining (25) and (26), the digital beamforming vector \(\mathbf{f}_{D,i}\) is given by  
\[\mathbf{f}_{D,i}=\mathbf{A}^{-1}\mathbf{F}_{A}^{H}\mathbf{H}_{e}^{H}[ \mathbf{H}_{e}\mathbf{F}_{A}\mathbf{A}^{-1}\mathbf{F}_{A}^{H}\mathbf{H}_{e}^ {H}]^{-1}\varsigma_{i}. \tag{27}\]  
Since \(\mathbf{F}_{A}\) is a constant modulus in (27), we optimize the phase of the analog beamformer for transforming a complex problem into an unconstrained optimization problem.