## 4 Ultrasonic-Assisted RIS Phase Shift Matrix Design Based on Subspace Self-Organizing Iterations
### RIS Phase Shift Matrix Design Based on Subspace Self-Organizing Iterations  
The initial phase shift matrix of the RIS \(\mathbf{\Phi}_{0}\) obtained in the previous section is only roughly designed based on the azimuthal angle of the vehicle's ultrasonic signals and BS, and its direct use for the reflection of the mmWave signals will produce large errors. Therefore, in this section, we propose a subspace self-organizing iterative method for adjusting the phase of the RIS reflection elements and finally designing the phase shift matrix. When the RIS is unadjusted, there is a phase error between it and the desired phase distribution at optimal beamforming. We introduce a phase deviation matrix \(\mathbf{G}_{RIS}=diag(\mathbf{g})\) for the RIS, where \(\mathbf{g}\) is the phase deviation vector, which can be expressed as  
\[\mathbf{g}=\left[e^{i\varphi_{1}},e^{i\varphi_{2}},\cdots e^{i\varphi_{N_{RIS}}}\right] \tag{61}\]  
where \(\varphi_{1},\varphi_{2},\cdots\varphi_{N_{RIS}}\) is the angular deviation to be adjusted for each RIS. At this point, the signal arriving at the RIS is expressed as  
\[\mathbf{Y}_{RIS} =\mathbf{G}_{RIS}\mathbf{A}_{RIS}\mathbf{H}_{BR}\mathbf{F}_{all}\mathbf{s}_{2}+\mathbf{N} \tag{62}\] \[=\mathbf{G}_{RIS}\mathbf{A}_{RIS}\mathbf{S}+\mathbf{N}\]  
where \(\mathbf{A}_{RIS}=\left[\mathbf{a}_{RIS}(\overline{\theta}_{1}),\mathbf{a}_{RIS}(\overline {\theta}_{2}),\ldots,\mathbf{a}_{RIS}(\overline{\theta}_{N_{RIS}})\right]\in \mathbb{C}^{N_{RIS}\times N_{RIS}}\) is the array flow pattern matrix in one-dimensional angle of RIS, \(\mathbf{a}_{RIS}\big{(}\overline{\theta}_{i}\big{)}=\left[1,e^{-j\frac{2\pi i}{ \lambda}\sin\overline{\theta}_{i}},\ldots,e^{-j\frac{2\pi(N_{RIS}-1)d}{ \lambda}\sin\overline{\theta}_{i}}\right]^{T}\) is the array oriented vector in one-dimensional angle, and \(\mathbf{S}=\mathbf{H}_{BR}\mathbf{F}_{all}\mathbf{s}_{2}\) is the equivalent signal vector. The autocorrelation matrix of the signal arriving at the RIS can be expressed as  
\[ \begin{array}{l}\mathbf{\mathrm{R}}_{\mathbf{Y}_{RIS}}=\mathbb{E}[\mathbf{Y}_{RIS}\mathbf{ Y}_{RIS}^{H}]\\ =(\mathbf{G}_{RIS}\mathbf{A}_{RIS})E[\mathbf{S}\mathbf{S}^{H}](\mathbf{G}_{RIS}\mathbf{A}_{RIS})^{H}+E[ \mathbf{N}\mathbf{N}^{H}]\\ =(\mathbf{G}_{RIS}\mathbf{A}_{RIS})\mathbf{\mathrm{R}}_{S}(\mathbf{G}_{RIS}\mathbf{A}_{RIS})^{H}+ \mathbf{\mathrm{R}}_{N}\end{array}  \tag{63}\]  
where \(\mathbf{\mathrm{R}}_{S}\) is the signal covariance matrix and \(\mathbf{\mathrm{R}}_{N}\) is the noise covariance matrix. Eigenvalue decomposition of the autocorrelation matrix can be expressed as:  
\[\mathbf{\mathrm{R}}_{\mathbf{Y}_{RIS}}=\mathbf{U}\mathbf{\Pi}\mathbf{U}^{H} \tag{64}\]  
where \(\mathbf{\Pi}\) is the diagonal matrix consisting of eigenvalues \(\lambda_{1},\lambda_{2},\cdots,\lambda_{N_{RIS}}\) and \(\mathbf{U}\) is the matrix consisting of eigenvectors corresponding to the eigenvalues. The eigenvalues are ordered from largest to smallest, then the first \(N_{s}\) corresponding eigenvectors of the eigenvalues form the signal subspace \(\mathbf{U}_{s}\), and the next \(N_{RIS}-N_{s}\) eigenvectors form the noise subspace \(\mathbf{U}_{n}\). The diagonal matrices of the corresponding eigenvalues are \(\mathbf{\Pi}_{s}\) and \(\mathbf{\Pi}_{n}\). Therefore, (49) can be expressed as  
\[\mathbf{R}_{Y_{RIS}}=\mathbf{U}_{s}\mathbf{\Pi}_{s}\mathbf{U}_{s}^{H}+\mathbf{U}_{n}\mathbf{\Pi}_{n}\mathbf{ U}_{n}^{H} \tag{65}\]  
Comparing (63) and (65), the signal subspace \(\mathbf{U}_{s}\) is linearly related to the RIS array prevalence matrix in the presence of phase deviation. Thus, the \(\mathbf{U}_{s}\) can be expressed as  
\[\mathbf{U}_{s}=\mathbf{G}_{RIS}\mathbf{A}_{RIS}\mathbf{\mathcal{Z}} \tag{66}\]  
where \(\mathbf{\mathcal{Z}}\) is the conversion matrix between \(\mathbf{U}_{s}\) and \(\mathbf{G}_{RIS}\mathbf{A}_{RIS}\). According to the MUSIC algorithm [40], the signal subspace and noise subspace are orthogonal.