# Joint Diagnosis of RIS and BS for RIS-Aided Millimeter-Wave System
## 2 System Model  
As shown in Figure 1, we consider the RIS-aided communication system in the uplink, where the base station (BS) is equipped with \((N\times 1)\)-uniform linear array (ULA) and the RIS is equipped with \((M\times 1)\)- ULA (this algorithm can be also readily extended to uniform planar array (UPA) at BS or RIS.) [12]. We neglect the channel between the BS and user [13]. We consider that there is only one line-of-sight (LoS) path between the BS and RIS (Due to the high path loss of the millimeter wave band, the first scattering path is 13 dB lower than the main path in the LOS channel model [14]. Thus, the LOS channel model is widely used in the RIS-aided mmwave MIMO system [10]. Furthermore, from Equation (7) we find that the proposed algorithm in this paper is not sensitive to the multipath channels). Thus, the BS-RIS channel \(\mathbf{G}^{\text{BR}}\) can be expressed as  
\[\mathbf{G}^{\text{BR}}=c^{\text{BR}}\mathbf{a}_{N}(\vartheta^{BR}) \mathbf{a}_{M}^{\text{H}}(\overline{\vartheta}^{BR}), \tag{1}\]  
where \(c^{\text{BR}}\) denotes the complex channel gains. Furthermore, we define the equivalent angle of aperture (AoA) and angle of departure (AoD) from RIS to BS as \(\vartheta^{BR}=d\sin(\varphi^{\text{BR}})/\lambda\) and \(\overline{\vartheta}^{BR}=d\sin(\overline{\vartheta}^{\text{BR}})/\lambda\), where \(\varphi^{\text{BR}}\) and \(\overline{\vartheta}^{\text{BR}}\) denotes the AoA/AoD from RIS to BS. The scaler \(d\) and \(\lambda\) denote the antenna spacing and the signal wavelength, and typically we have \(d/\lambda=1/2\). The steering vector is defined as  
\[\mathbf{a}_{M}(\vartheta) =[1,e^{\beta\pi\vartheta},\cdots,e^{\beta\pi(M-1)\vartheta}]^{ \text{T}}\in\mathbb{C}^{M\times 1}\] \[\mathbf{a}_{N}(\vartheta) =[1,e^{\beta\pi\vartheta},\cdots,e^{\beta\pi(N-1)\vartheta}]^{ \text{T}}\in\mathbb{C}^{N\times 1}. \tag{2}\]  
Similarly, the RIS-user channel \(\mathbf{g}^{\text{RU}}\) can be expressed as  
\[\mathbf{g}^{\text{RU}}=c^{\text{RU}}\mathbf{a}(v^{\text{RU}}), \tag{3}\]  
where \(c^{\text{BR}}\) denotes the complex channel gains. We have \(\vartheta^{RU}=d\sin(\vartheta^{\text{RU}})/\lambda\), where \(\phi^{\text{RU}}\) denotes the AoD from the user to BS. Thus, without RIS blockage and BS blockage, the uplink signal received by the BS can be expressed as  
\[\mathbf{y}(t)=\mathbf{G}^{\text{BR}}\text{diag}(\boldsymbol{\theta}(t)) \mathbf{g}^{\text{RU}}x(t)+\mathbf{n}(t), \tag{4}\]  
where \(\mathbf{y}(t)\in\mathbb{C}^{N\times 1}\) and \(\mathbf{n}(t)\in\mathbb{C}^{N\times 1}\) denote the received signal and the Gaussian noise vector at the \(t\)-th time slot. We consider the transmit symbol \(x(t)\) as 1 for simply. The vector \(\boldsymbol{\theta}(t)=[e^{\theta t_{1}},\cdots,e^{\theta t_{N}}]^{\text{T}}\) with \(\theta_{n}\in[0,2\pi)\) denotes the phase coefficients of RIS. We consider that the phase coefficients of RIS are generated randomly, which is adopted in reference [13], investigating the channel estimation for a RIS-aided communication system. However, in practice, the RS/RIS may be blocked by the rain, snow, or dust, which will change the channel characteristics and decrease the performance of systems such as sum-rate. In addition, we usually choose cheap antennas and cheap elements on the BS and RIS for reducing the cost, which also causes the blockage to occur. We defined that \(\mathbf{b}\in\mathbb{C}^{N\times 1}\) denotes the blockage coefficient vector of BS, whose \(n\)-th element \(b_{n}\) is the random complex random variable with a modulus less than 1. Particularly, if the \(n\)-th antenna on BS is completely blocked, we have \(b_{n}=0\). If the \(n\)-th antenna on BS is free, we have \(b_{n}=1\). We define the blockage coefficient vector of RIS as \(\overline{\mathbf{b}}\in\mathbb{C}^{M\times 1}\), which has the similar definition to the definition of \(\mathbf{b}\)[10, 11].