## 3 System Model  
Consider a single-cell downlink RIS-assisted mmWave M-MIMO system, where a BS with \(N_{T}\) transmit antennas communicates with a \(N_{r}\) antenna UE through RIS containing \(N\) RIS elements. It is presumed that the direct channel link between UE and BS is ignored, as it is severely affected by excessive blockage from trees, buildings, etc. Figures 1 and 2 depict sample outdoor and indoor scenarios, respectively. Here, the system model is described for a single-user scenario. The effective channel between BS and UE is expressed as \(\mathbf{D}=\mathbf{G}\mathbf{\Theta}\mathbf{H}\), where \(\mathbf{H}\) is an \(N\times N_{T}\) channel matrix between the BS and RIS, and \(\mathbf{G}\) is an \(N_{R}\times N\) channel matrix between RIS and UE. Here, \(\mathbf{\Theta}=diag\big{(}\left[e^{i\phi_{1}},e^{i\phi_{2}},\ldots,e^{i\phi_ {N_{r}}}\right]\big{)}\) is a diagonal RIS phase shift response matrix. The received signal at the UE reflected from the RIS is expressed as follows:  
\[\mathbf{r}=\mathbf{D}\mathbf{x}\mathbf{+}\mathbf{n} \tag{1}\]  
Figure 1: A single-cell downlink RIS-assisted mmWave M-MIMO considering an outdoor channel environment. where **x** is the transmit signal vector that indicates the signals transmitted from the \(N_{T}\) transmit antennas. **n** is the noise vector with elements following \(\mathcal{CN}\left(0,\ N_{o}\right)\). Expression (1) can be expanded as follows:  
\[\underbrace{\textbf{r}}_{N_{R}\times 1}=\underbrace{\textbf{G}\Theta\textbf{H}}_{N_{R} \times N_{T}}\underbrace{\textbf{x}}_{N_{T}\times 1}+\underbrace{\textbf{n}}_{N_{R} \times 1} \tag{2}\]  
We presume that all the antennas communicate the same information symbol to achieve spatial transmit diversity gain. To explain more clearly, we consider a simplified scenario where the UE is equipped with a single antenna. Equation (2) can be simplified as follows:  
\[r=\underbrace{\textbf{g}\Theta\textbf{H}}_{1\times N_{T}}\underbrace{\textbf{ x}}_{N_{T}\times 1}+n \tag{3}\]  
Here, we can consider the individual elements of channel matrices as \(g_{i}=\beta_{i}e^{-\hat{\psi}_{i}}\) and \(h_{i,k}=\alpha_{i,k}e^{-\hat{\psi}_{i,k}},\ \ i\in\{1,2,\ldots,N\},\ k\in\{1,2,\ldots,N_{T}\}\). As the same symbol \((x)\) is transmitted from all the antennas, the expression (3) can be further reduced as follows:  
\[r=\left(\sum_{i=1}^{N}g_{i}\left[\sum_{k=1}^{N_{T}}h_{i,k}\right]e^{\hat{\psi} _{i}}\right)x+n \tag{4}\]  
Let \(\sum_{k=1}^{N_{T}}h_{i,k}=h_{i}^{s}=\alpha_{i}^{s}e^{-\beta_{i}^{s}}\). Substituting in (4) results in the following:  
\[r=\left(\sum_{i=1}^{N}g_{i}h_{i}^{s}e^{\hat{\psi}_{i}}\right)x+n \tag{5}\]  
The instantaneous SNR at the UE can be composed as follows:  
\[\varepsilon=\frac{\left|\sum_{i=1}^{N}\beta_{i}\alpha_{i}^{s}e^{\hat{\psi} \left(\hat{\psi}_{i}-\hat{\psi}_{i}-\hat{\psi}_{i}^{s}\right)}\right|^{2}E_{s} }{N_{o}} \tag{6}\]  
The RIS phase shift responses \(\phi_{i}\) require optimization to maximize the instantaneous SNR at the UE. In a continuous phase RIS, every reflecting element is considered to produce a uniformly distributed ideal phase shift in [0, 2\(\pi\)], which allows for optimal beamforming. This configuration serves as the theoretical upper bound for RIS-aided systems. The assumption is that RIS elements have complete knowledge of the channels connecting the BS to the RIS and from the RIS to the UE. The optimal choice for RIS phase shifts is attained by considering \(\phi_{i}=\psi_{i}+\theta_{i}^{s}\). With this channel information, the RIS can effectively execute both the pre-compensation and post-compensation phases of the  
Figure 2: A single-cell downlink RIS-assisted mmWave M-MIMO considering an indoor channel environment. channel.