## 4 Coded Cooperation with Soft Information Relaying and Relay Selection
### CC-SIR-RS Scheme with Fuzzy Logic-Based Power-Splitting  
A convenient power-splitting policy is required to improve the performance of the CC-SIR-RS scheme. To this end, the equivalent SNR of each end-to-end channel \(S-R_{r}-D\) is intended to be maximized by means of the appropriate power-splitting ratio. In other words, the optimal PSR, denoted by \(\rho_{r,\text{opt}}^{\text{SIR}}\), is obtained by the following expression:  
\[\rho_{r,\text{opt}}^{\text{SIR}}=\arg\bigg{(}\underset{0<\rho_{r}<1}{\max}\, \{\Gamma_{SR_{r}D}\}\bigg{)}. \tag{31}\]  
It is worth noting that the optimization in (31) is not feasible in real-time, as \(\Gamma_{SR,D}\) depends on, among others, \(\Gamma_{R,}\), which should be measured for each value of \(\rho_{r},0<\rho_{r}<1\), before taking a decision. To address this issue, we make use of the fuzzy logic [32]. The complexity of the fuzzy logic is low where its computational cost is \(O(n)\)[33]. In this work, fuzzy logic is meant to provide a balanced solution between the fading coefficients in the source-relay and relay-destination channels, and the distance between the source and relay nodes on the one hand and the PSR on the other hand. These stated parameters could be conflicting, and thus the proposed fuzzy logic-based approach aims to select the appropriate PSR to improve the performance of the coded cooperative communication. This is attained by properly combining the fading coefficients and source-relay distance to obtain a sub-optimal PSR denoted by \(\rho_{r}^{*}\), leading to a quasi-optimal SNR of the equivalent end-to-end channel denoted by \(\Gamma_{SR,D}^{*}\). The actual input parameters of the proposed fuzzy logic system are the channel coefficients \(h_{SR_{r}}\) and \(h_{R_{r}D}\) and the distance between source and relay nodes \(d_{SR_{r}}\). In order to perform the fuzzification process, the input variables \(h_{SR_{r}},h_{R_{r}D}\), and \(d_{SR_{r}}\) are, respectively, fuzzified in fuzzy sets \(X_{1},X_{2}\), and \(X_{3}\) using the linguistic labels \(X_{1}=\{\text{weak, average, strong}\}\), \(X_{2}=\{\text{weak, average, strong}\}\), and \(X_{3}=\{\text{near, medium, far}\}\). The state's variables in the fuzzy sets \(X_{1}\), \(X_{2}\), and \(X_{3}\) are mapped into the output fuzzy set \(Y=(\rho^{(1)},\rho^{(2)},\cdots,\rho^{(9)})\) referring to the quasi-optimal PSR, where \(\rho^{(i)}=i\cdot 0.1\). In this work, we opt for generic trapezoidal function to describe the implied linguistic elements mathematically [34]. The trapezoidal function maps each element \(x\) into a degree of membership in the interval \([0,1]\), which is denoted by \(\mu(x)\). The fuzzy membership functions for the input and output fuzzy sets are outlined in Figure 3.  
We have 27 fuzzy rules as we have 3 fuzzy input sets and each of them has 3 states. The mapping is realized through the arrangement of the if-then rules in the form:  
**IF \(X_{1}\) is \(x_{1}\) and \(X_{2}\) is \(x_{2}\) and \(X_{3}\) is \(x_{3}\) THEN \(Y\) is \(y\)**. The 27 rules are given in Table 1. For each trial with given inputs, the SNR of the equivalent end-to-end channel \(\Gamma_{SR,D}\) is calculated for each element in the set of PSRs. Accordingly, the quasi-optimal PSR, denoted by \(\rho_{r}^{*}\), is determined by selecting the best one leading to the best \(\Gamma_{SR,D}\). We note that for each trial we have nine possible scenarios. The PSR that leads to the best equivalent SNR is considered. In other words, the statement about \(\Gamma_{SR,D}\) indicates the degree of relevance of the power-splitting fuzzy value. To convert the fuzzy set into the appropriate crisp output, let us consider an example of defuzzification in which \(h_{SR_{r}}=0.85\), \(h_{R,D}=1.8\), and \(d_{SR_{r}}=0.5\).