## 5 Rate Adaptive MAC (RA-MAC)
RA-MAC has three main components: polling, PRR table (_i.e._, the values of function PRR(RSSI, R), which represent the relationship between PRR and RSSI & RATE) and rate selection algorithm (described in Section 5.). When the upper layer has a packet to send, RA-MAC uses the rate selection algorithm to decide the optimal data rate (which is based on PRR table). When RA-MAC receives an ACK, it extracts the PRR data that is piggybacked from the ACK packet and updates PRR table. When a transceiver (PHY component in Figure 3) receives a packet, RA-MAC calculates the PRR and updates the PRR table. If the packet is received correctly (by passing CRC check), RA-MAC constructs an ACK packet and piggybacks the PRR data in the packet before sending the packet back. Figure 2: RA-MAC. **L**: Polling (11 ms). **T**: Tone(12 ms). **R**: Data rate (1 byte). **Pre**: preamble(6 bytes). **F**: data frame (34 bytes). **A**: Acknowledgement (6 bytes). **RSSI**: (1 byte). **PRR** (1 byte). ### Goals, Metrics and Methodology

The goals of our experimental evaluation are two-fold. First, we want to study, in a single-hop environment, whether RA-MAC can reduce energy consumption compared to a fixed transmission data rate MAC protocol such as SCP-MAC. Second, we want to study the performance of the proposed RA-MAC in a multi-hop environment. We use several evaluation metrics as follows:

* _Packet delivery ratio:_ packet delivery ratio is calculated as the number of packets received by the receiver divided by the number of packets sent by the sender. This metric characterizes the percentage of successful source data packet delivery; ideally, this should be 100%. * _Network energy consumption:_ this metric characterizes the network's energy consumption at any given instant of time. We calculate the node's energy consumption by logging the different (transmitting, listening, sleeping) states together with time stamps. The energy consumption of a radio state is calculated as a function of power consumption level (listed in Table 1) multiplied by the duration of the state. The energy consumption of a node is the summation of the energy consumption of all three states. Ideally, the energy consumption should be as low as possible. * _Energy consumption per received packet_: this metric is calculated as a function of network energy consumption divided by the number of packets successfully received by the receiver. This metric characterizes the energy cost of successfully packet delivery. Ideally, energy consumption per received packet should be as low as possible. For ease of comparison, we normalize the energy consumption per received packet of different strategies with respect to RA-MAC. Therefore, if a normalized value is larger than 1, the corresponding strategy consumes more energy, when compared to RA-MAC, in delivering one packet from source to destination. We ran the experiment in an outdoor environment (non-line-of-sight) for a period of 10 hours (from 10 p.m. to 8 a.m.). The period was chosen so that challenging weather conditions such as fog had a larger

Figure 3: RA-MAC components in TinyOS. probability of occurring (when \"midnight crisis\" [3] is mostly likely to happen). The distance between a sender and a receiver is typically 50 meters. We repeated the experiments for five days using different network topology and traffic pattern scenarios, shown in the next section. For ease of comparison, we did not enable link-layer retransmissions in the experiments. ### The Impact of Traffic Load on Network Energy Consumption

First, we study the applicability of the rate-adaptive algorithm at different network traffic loads. Figure 4 shows the transceiver duty cycle of nodes with different traffic loads (2, 8, 14, 20 seconds per packet respectively). Transceiver duty cycle is a popular metric to measure energy consumption in WSNs [10, 11, 14, 18] because one can calculate transmission energy consumption by multiplying transceiver current consumption by its duty cycles.