# A Partitioned IRS-Aided Transmit SM Scheme for Wireless Communication
## 3 Performance Analysis  
In this section, we make a theoretical analysis of the error performance for the PIRS-TSM scheme. The theoretical average pairwise error probability (APEP) for ML detection is derived, and then, the theoretical ABER can be obtained [23; 24]. The conditional pairwise error probability (CPEP) with ML detection using (3) can be expressed as follows:  
\[P_{\varepsilon}(t,x\rightarrow\hat{t},\hat{x})|\mathbf{H},\mathbf{g})=P\Big{\{}|y -Lx|^{2}>\big{|}y-\hat{L}\hat{x}\big{|}^{2}\Big{\}}, \tag{4}\]  
where  
\[\hat{L}=\sum_{i=(\hat{t}-1)n+1}^{\hat{t}n}\alpha_{t,i}\beta_{i}+\sum_{ \begin{subarray}{c}k=1\\ k\
eq t\end{subarray} }^{N_{t}}\sum_{i=(k-1)n+1}^{kn}\alpha_{t,i}\beta_{i}e^{i \left(\theta_{k,i}-\theta_{ij}\right)}. \tag{5}\]After calculation, it can be concluded that  
\[ \begin{split} P_{e}&=P\Big{\{}-\big{|}Lx-\hat{L}x\big{|}^ {2}-2[w^{*}(Lx-\hat{L}\hat{x})]_{\mathbb{R}}>0\Big{\}}\\ &=P\{v>0\},\end{split}  \tag{6}\]  
where \(\
u=-\big{|}Lx-\hat{L}x\big{|}^{2}-2[w^{*}(Lx-\hat{L}\hat{x})]_{\mathbb{R}}\) with \(w^{*}\) being the complex conjugate of \(w\). It can be obtained that \(\
u\) follows complex Gaussian distribution with mean \(\mu_{v}\) and variance \(\sigma_{v}^{2}\) since \(w\) follows complex Gaussian distribution. We can calculate \(\mu_{v}=-\big{|}Lx-\hat{L}x\big{|}^{2}\), \(\sigma_{v}^{2}=2N_{0}\big{|}Lx-\hat{L}x\big{|}^{2}\). Let \(B=Lx-\hat{L}x\), using Gaussian \(Q\)-function, we have  
\[P_{e}=Q\Big{(}\sqrt{\frac{|B|^{2}}{2N_{0}}}\Big{)}. \tag{7}\]  
Assuming \(\lambda=|B|^{2}\), the APEP can be obtained as follows:  
\[ \begin{split}\bar{P}_{e}&=\int_{0}^{\infty}Q\Big{(} \sqrt{\frac{\lambda}{2N_{0}}}\Big{)}f_{\lambda}(\lambda)d\lambda\\ &=\frac{1}{\pi}\int_{0}^{\frac{\pi}{2}}M_{\lambda}\Big{(}\frac{- 1}{4N_{0}\sin^{2}\eta}\Big{)}d\eta,\end{split}  \tag{8}\]  
where \(f_{\lambda}(\lambda)\) and \(M_{\lambda}(s)\) are the probability density function (PDF) and moment-generating function (MGF) of \(\lambda\), respectively. Then, we will discuss the distribution of \(\lambda\) in different cases to obtain the corresponding MGF. In (7), it can be easily written that \(|B|^{2}=B_{\mathbb{R}}^{2}+B_{\mathbb{3}}^{2}\). _(1) First case \((t=\hat{t})\)_: Assume that the activated antenna index is correctly detected. We have \(B=L(x-\hat{x})\). Then, we obtain  
\[\lambda=|B|^{2}=|L|^{2}\cdot|x-\hat{x}|^{2}=\Big{(}L_{\mathbb{R}}^{2}+L_{ \mathbb{3}}^{2}\Big{)}|x-\hat{x}|^{2}, \tag{9}\]  
where  
\[L_{\mathbb{R}}=\sum_{i=(t-1)n+1}^{tn}\alpha_{t,i}\beta_{i}+\sum_{ \begin{subarray}{c}k=1\\ k\
eq t\end{subarray} }^{N_{t}}\sum_{ \begin{subarray}{c}k=1\\ k\
eq t\end{subarray} }^{kn}\Big{(}\alpha_{t,i}\beta_{i}e^{i\big{(}\theta_{k,i} -\theta_{i,j}\big{)}}\Big{)}_{\mathbb{R}^{\prime}},\]  
\[L_{\mathbb{3}}=\sum_{ \begin{subarray}{c}k=1\\ k\
eq t\end{subarray} }^{N_{t}}\sum_{ \begin{subarray}{c}k=1\\ k\
eq t\end{subarray} }^{kn}\Big{(}\alpha_{t,i}\beta_{i}e^{i\big{(}\theta_{k,i} -\theta_{i,j}\big{)}}\Big{)}_{\mathbb{3}}.\]  
Next, we will analyze the distribution of \(\lambda\), and then obtain the MGF based on its distribution. In order to analyze the distribution of \(\lambda\), we need to express \(\lambda\) as the sum of two components, i.e., \(\lambda=\lambda_{1}+\lambda_{2}\), where \(\lambda_{1}=L_{\mathbb{R}}^{2}|x-\hat{x}|^{2}\), \(\lambda_{2}=L_{\mathbb{3}}^{2}|x-\hat{x}|^{2}\). Then, the MGF satisfies the following relationship:  
\[M_{\lambda}(s)=M_{\lambda_{1}}(s)\cdot M_{\lambda_{2}}(s). \tag{10}\]  
It is known that \(\beta_{i}\) and \(\alpha_{t,i}\) are independent and follow Rayleigh distribution with mean \(\frac{\sqrt{\pi}}{2}\) and variance \(\frac{4-\pi}{4}\). We consider the characteristics of mean and variance between independent random variable (RV)s and utilize the relevant derivations.