# A Fair Cooperative MAC Protocol in IEEE 802.11 WLAN
## 3 The Proposed FC-MAC Protocol  
In this section, we propose a new protocol which improves fairness and network lifetime. Therefore, we call this protocol _Fair Cooperative MAC (FC-MAC)_. As indicated in Figure 1, node \(R_{i}\) is a candidate relay between source (\(S\)) and destination (\(D\)). To find the potential relay node (\(r_{i}\)) candidates, the FC-MAC protocol employs a metric called _Cooperation Gain_ which can be calculated by  
\[CG_{i}=\left(\frac{R_{Sr_{i}}^{-1}+R_{r_{i}D}^{-1}}{R_{SD}^{-1}}\right)^{-1} \tag{1}\]  
where, \(R_{Sr_{i}}\), \(R_{riD}\), and \(R_{SD}\) are the data rates of source-relay, relay-destination, and source-destination, respectively. These parameters are obtained from overhearing direct and indirect transmissions. A \(CG_{i}\) value of more than 1 can provide for a database which maintains potential relays and their \(CG_{i}\) parameters. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Category** & **Protocol** & **Technique** \\ \hline \multirow{8}{*}{**Spectrum efficiency**} & CoopMAC [6], rDCF [7] & Replacing with two fast links instead of a slow link \\ \cline{2-3}  & ADC-MAC [8] & Relaying when no direct link is available \\ \cline{2-3}  & RAMA [9], EMR [10], RCD-MAC [18], CRP-CMAC [19] & \multirow{2}{*}{Contention-based relay selection} \\ \cline{2-3}  & CoopMAC [11], RRS-CMAC [12] & Relaying + frame aggregation \\ \cline{2-3}  & CCMAC [13] & Relaying + concurrent transmissions \\ \cline{2-3}  & CODE [14] and EAP-CMAC [15] & Relaying + network coding \\ \cline{2-3}  & MACR-CCT [16] & Relaying + cross-layer approach \\ \cline{2-3}  & CLS-MAC [17] & Interference reduction \\ \hline \multirow{8}{*}{**Energy Efficiency**} & OR [20] & Selection of relay with the highest SNR \\  & & + opportunistic relaying \\ \cline{2-3}  & UTD-MAC [21] & Selection of relay node providing the maximum power ratio \\ \cline{2-3}  & CMAC [22], CD-MAC [23] & Relaying + coding schemes \\ \cline{2-3}  & NCSW [24], PRCSMA [25] & Relaying + ARQ-based schemes \\ \cline{2-3}  & NCCARQ-MAC [26] & Relaying + network coding \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of existing cooperative medium access control (MAC) protocols in the IEEE 802.11 standard. Figure 1: Example of cooperation with several relay nodes. S = source; D = destination. In order to provide fairness in the FC-MAC protocol, a new metric is defined to indicate the _Cooperation Level (CL)_ of each relay node. For a potential relay (\(r_{i}\)), the value of \(CL_{i}\) is calculated by  
\[CL_{i}=[\frac{CG_{i}}{CG_{i-min}}] \tag{2}\]  
where \(CG_{i-min}\) is the minimum value of \(CG_{i}\) existing in the cooperation database and [\(f(. )\)] denotes the greatest integer function. By the \(CL_{i}\) values, FC-MAC determines the cooperation level of all potential relay nodes. For a given destination, each source node has opportunities to select \(k\) relay nodes from the set of {\(r_{1}\), \(r_{2}\),..., \(r_{k}\)} with cooperation levels of {\(CL_{1}\), \(CL_{2}\),..., \(CL_{k}\)}. The number of packets which the source node allocates to each relay node to forward is equal to its \(CL\) values. As a simple example, all possible scenarios of cooperation in IEEE 802.11b are indicated in Table 2 when \(R_{SD}=1\) Mbps. According to this table, the ratio of relayed data packets in each scenario is determined. This ratio is 4, 2, and 1 for relays with a cooperation gain of 5.5, 3.67 (and 2.75), and 1.67 (and 1.47), respectively. The relay selection mechanism of the FC-MAC protocol is illustrated in Algorithm 1. Each time a source node has data packets to send, it allocates the data packets to each relay in proportion to its \(CL_{i}\) parameter, and the parameters of CoopTable are updated as follows:  
1. For a new added relay node, \(CG_{i}\) and \(CL_{i}\) are calculated by (1) and (2), respectively. 2. For an existing relay node in _CoopTable_ (Table 3), its \(CL_{i}\) is decreased by 1 if a transmission via the selected relay fails and it does not change for each successful transmission. 3.