# A Power-Optimized Cooperative MAC Protocol for Lifetime Extension in Wireless Sensor Networks
## 5 Power-Optimized Cooperative MAC Protocol
### Cooperative Node Selection Phase
#### 5.2.2 Optimal Cooperative Node Group  
All the cooperative nodes that transmit their HTS packet successfully to the sender from the beginning of the cooperative node contention phase to its end form the optimalcooperative node group to participate in the power-optimized cooperative transmission. According to different ending manners of the cooperative contention phase, there are three cases to determine the optimal cooperative node group. 1. The first case is that the number of HTS packets transmitted to the sender reaches the predefined maximum number of selected cooperative nodes \(M\). As shown in Figure 3, on receiving the \(M\)-th HTS packet, the sender calculates the optimal transmission powers of itself and all the cooperative nodes based on the information of \(M\) HTS packets (including the corresponding cooperative nodes' residual energy and channel gain) and the channel gain estimated by itself. Then it broadcasts the optimization results to the cooperative nodes through an optimized-power-declaration (OPD) packet. Meanwhile, all the other cooperative nodes that have not transmitted their HTS packets stop their predefined HTS packet transmissions because they sensed \(M\) HTS packet transmissions and received the OPD packet. 2. As shown in Figure 4, the second case lies in that there are no HTS packet transmissions during the time interval of \(T_{\text{E}}\) after a certain HTS packet transmission. When the cooperative nodes that prepare to transmit their HTS packets sense this phenomenon, they will not transmit their HTS packets anymore. Because the sequence of HTS packet transmissions reflects the cooperative gains of the nodes to take part in the cooperative transmission, if the sender has received a few HTS packets, it indicates that some cooperative nodes with higher cooperative gain can participate in the cooperative transmission. In this case, the waiting time for the subsequent HTS packet transmissions should decrease gradually in order to avoid wasting too much time on waiting for the HTS packets of the cooperative nodes with lower cooperative gain and thus leading to more overhead than their incurred cooperative gain. \(T_{\text{E}}\) can be set as follows:  
Figure 3: First case of optimal cooperative node group: The number of cooperative nodes reaches \(M\). \[T_{\rm E}=\frac{M-k}{M}\left(T_{\rm W}-t_{\rm k}\right),\] (24) where \(k\) is the number of already-transmitted HTS packets in the network. The value of \(T_{\rm E}\) decreases as \(k\) increases, which illustrates that the more HTS packets have been received by the sender, the shorter the time of waiting for the subsequent HTS packet transmissions is. If there are no HTS packet transmissions during an interval of \(T_{\rm E}\), the cooperative contention phase prematurely ends. Furthermore, based on \(k\) HTS packets, the sender calculates the optimal transmission powers of itself and its \(k\) selected cooperative nodes, and declares the results through an OPD packet. 3. Figure 5 shows the third case that the HTS packets transmitted by different nodes collide with each other. In this case, other cooperative nodes sense the collisions and give up transmitting their own HTS packets. When the sender senses the collisions, it transmits a negative RTS (NRTS) packet, which includes the addresses of the nodes whose HTS packets have been received correctly. After the nodes that lead to the HTS packet collisions receive the NRTS packet, they realize that their HTS packets are not received correctly. On receiving the NRTS packet, these nodes select a random time from (0, \(T_{\rm R}\)) as the new access delay of the HTS packets and begin counting. Meanwhile, these cooperative nodes keep sensing the channel. When a cooperative node senses the HTS packet transmission from another cooperative node, it pauses the counting and continues the counting after the current HTS transmission. It transmits its HTS packet at the end of its access delay counting.