## 3 Performance Analysis
### Ber
#### 3.1.2 Derivation of \(\text{P}_{\text{pm}}\)  
The modulated bit is transmitted from S, forwarded by R, and then recovered at D. The first step is to analyze the error probability of the DF protocol, which is determined by the erroneous detection of SR-DCSK at R. To obtain the decision metric (i.e., \(Z_{sr}\)) for SR-DCSK detection, the mean and the variance of \(Z_{sr}\) can be expressed as  
\[E[Z_{sr}]=b_{h}\sum_{l=1}^{L_{sr}}\alpha_{sr,l}^{2}\frac{NE_{s}}{(N+1)U} \tag{32}\]  
\[V_{sr}[Z_{sr}]=\sum_{l=1}^{L_{sr}}\alpha_{sr,l}^{2}\frac{NE_{s}N_{0,sr}}{(N+1)U }+\frac{N_{0,sr}^{2}}{4}N\text{\emph{U}} \tag{33}\]  
Based on the central limit theorem, the decision metric \(Z_{sr}\) follows a normal distribution [32], and the conditional error probability of the DF protocol can be calculated as  
\[P_{df}(e|\gamma_{sr})=\frac{1}{2}erfc\!\left\{\left[\frac{2V_{sr}[Z_{sr}]}{ \{E[Z_{sr}]\}^{2}}\right]^{-\frac{1}{2}}\right\}=\frac{1}{2}erfc\!\left\{\left[ \frac{2(N+1)U}{N\gamma_{sr}}+\frac{(N+1)^{2}U}{2N\gamma_{sr}^{2}}\right]^{- \frac{1}{2}}\right\} \tag{34}\]where \(\gamma_{sr}=\sum\limits_{l=1}^{L_{sr}}\alpha_{sr,l}^{2}\frac{E_{s}}{N_{0,sr}}\) is the instantaneous SNR of the S\(\rightarrow\)R link. Thus, the average error probability of the DF protocol can be obtained as  
\[P_{df}=\int_{0}^{\infty}P_{df}(e|\gamma_{sr})f(\gamma_{sr})d\gamma_{sr} \tag{35}\]  
At D, EGC is utilized to obtain the decision metric \(Z_{qgc}\) of the polarity-modulated bit. Indeed, the decision metric can be computed by those of the S\(\rightarrow\)D and R\(\rightarrow\)D links, i.e., \(Z_{qgc}=(Z_{sd}+Z_{rd})/2\). When the Walsh code detection is accurate, the decision metric of the R\(\rightarrow\)D link can be denoted as \(Z_{rd}=Z_{nd}\), and the resulting decision metric can be expressed as \(Z_{qgc}=\left(Z_{sd}+Z_{nd}\right)/2\). In other cases, \(Z_{rd}=Z_{nd}(\{q\in 1,2,\ldots,Q\}andq\
eq\hat{q})\), leading to the decision metric of \(Z_{qgc}=\left(Z_{sd}+Z_{nd}\right)/2\). When calculating the BER of the polarity-modulated bit, there are four possible situations that can arise in the MCIM-SR-DCSK-CC system. Specifically, these four situations are defined as follows:  
Case 1: Correct Detection at Relay and Correct Detection at Destination  
In this case, both the relay and the destination correctly detect the polarity-modulated bit. This is the ideal scenario where no errors occur in the transmission. \[P_{r}(\Theta=1)=\Big{(}1-P_{df}\Big{)}(1-P_{ed}) \tag{36}\]  
Case 2: Correct Detection at Relay and Incorrect Detection at Destination  
Here, the relay correctly detects the polarity-modulated bit, but the destination makes an error in detection. \[P_{r}(\Theta=2)=P_{df}(1-P_{ed}) \tag{37}\]  
Case 3: Incorrect Detection at Relay and Correct Detection at Destination  
In this scenario, the relay makes an error in detecting the polarity-modulated bit, but the destination correctly detects it. This could happen if the S\(\rightarrow\)R link is impaired but the R\(\rightarrow\)D link is clear. \[P_{r}(\Theta=3)=P_{ed}\Big{(}1-P_{df}\Big{)} \tag{38}\]  
Case 4: Incorrect Detection at Relay and Incorrect Detection at Destination  
This is the worst-case scenario where both the relay and the destination incorrectly detect the polarity-modulated bit.