## 3 Space Time Block Code (STBC)
### Alamouti STBC System Model  
Alamouti scheme considers two antennas at the transmitting side and one antenna at the receiving side (\(2\times 1\)). In this scheme, a pair of complex information symbols (\(x_{1}\) and \(x_{2}\)) are selected from the symbol mapper (\(M\)-QAM) constellation to be transmitted from two transmit antennas over two symbol intervals [37]. The code rate in the Alamouti scheme is 1, which is known by full rate diversity. The transmission is carried out in an orthogonal manner, and the following codeword is used in the transmission. The transmission orthogonal symbol matrix \(\mathbf{X}\)[38] is:  
\[\mathbf{X}= \begin{bmatrix}x_{1}&-x_{2}^{*}\\ x_{2}&x_{1}^{*}\end{bmatrix} , \tag{2}\]  
where in the first transmission period the symbols \(x_{1}\) and \(x_{2}\) are transmitted simultaneously from the first and second antenna, respectively. In the second transmission period, antenna one transmits the symbol \(-x_{2}^{*}\) and antenna two transmit the symbol \(x_{1}^{*}\). To check the orthogonality, an identity matrix results when multiplying the codeword matrix by its Hermitian (\(\mathbf{X}^{\rm H}\)), where \(\mathbf{X}^{\rm H}\) is the conjugate transpose of the matrix \(\mathbf{X}\)[35]. The received baseband signal reflected through the IRS with \(N\) passive elements can be expressed as [39]:  
\[\mathbf{Y}=\mathbf{H}\mathbf{X}+\mathbf{W}, \tag{3}\]  
where \(\mathbf{Y}\in\mathbb{C}^{1\times N_{t}}\) is a row vector for the received signals whose elements are \(y_{\rm i}\) which represents the received signal at time slot i. \(\mathbf{H}\) is the cascaded fading channel coefficient, which is the summation of the channel gain of the direct link from the transmitting antenna and the reflection from the IRS elements. The cascaded fading channel coefficient from the first transmitting antenna to the receiving antenna is denoted by \(h_{1}\), and the cascaded channel between the second transmitting antenna and the receiving antenna is denoted by \(h_{2}\). Assuming that the fading coefficients, \(h_{1}\)_and_\(h_{2}\), are constant across two consecutive symbol transmission periods [40], \(\mathbf{W}\in\mathbb{C}^{1\times N_{t}}\) is the Additive White Gaussian Noise vector (AWGN) term with zero mean and unit variance. The received signal \(\mathbf{Y}\) can be defined as [25]:  
\[\mathbf{Y}=\sqrt{\frac{E_{s}}{2}}\mathbf{H} \begin{bmatrix}x_{1}&-x_{2}^{*}\\ x_{2}&x_{1}^{*}\end{bmatrix} +\mathbf{W}, \tag{4}\]  
\(\mathbf{H}\) can be defined as [41; 42; 43]:  
\[\mathbf{H}=[h_{1}\;h_{2}]=\mathbf{H}_{bU}^{H}+\mathbf{H}_{bU}^{H}\mathbf{\varphi}\mathbf{H}_{bI} \tag{5}\]  
\[\mathbf{\varphi}=\alpha\;\text{diag}\Big{(}e^{i\theta_{1}},e^{i\theta_{2}},e^{i \theta_{3}},\ldotsldotsldots e^{i\theta_{N}}\Big{)}, \tag{6}\]\(\mathbf{\varphi}\in\mathbb{C}^{N\times N}\) is a diagonal matrix of the adjustable phase of the \(j^{th}\) reflector. \(\mathbf{\varphi}=\alpha\,\text{diag}(e^{i\theta_{1}},\)\(e^{i\theta_{2}},\)\(e^{i\theta_{3}},\)\(\ldots\ldots\)\(e^{i\beta_{N}})\), where \(N\) is the number of the reflecting elements and \(N_{i}\) is the number of the antennas at the transmitting side.\(\theta_{\text{j}}\) is a random value from \(0^{\text{\textdegree}}\) to \(90^{\text{\textdegree}}\). \(\alpha\) is the amplitude coefficient with values from 0 to 1. \(\mathbf{X}\) is the transmitted data symbol matrix. \(\mathbf{H}_{bl}\ \in\mathbb{C}^{N\times N_{i}}\) is the channel between the gNodeB and the IRS. \(\mathbf{H}_{lU}\in\mathbb{C}^{N\times 1}\) is the channel between the UE and the IRS. \(\mathbf{H}_{bU}\in\mathbb{C}^{N_{i}\times 1}\) is the channel between the UE and the gNodeB. \(\mathbf{H}_{bU}^{H},\mathbf{H}_{lU}^{H},\)_and_\(\mathbf{H}_{bI}\) are modeled as Rayleigh flat fading channel, with \(\mathcal{CN}\) (0, 1) distribution, i.e., with zero mean and unit variance. \(E_{s}\) is the energy per symbol, which is independent on the number of active transmitting antennas [44; 45].