Development of Relay Selection Method for Audio Transmission in Cooperative Ad-Hoc Networks

The quality of service parameters, such as Latency and Bit error rate for audio transmission in IEEE 802.11b Wireless ad hoc network are analyzed in this paper. The issue addressed here is that the quality of the audio, when transmitted directly from source to destination in ad hoc network is low. This can be improved by incorporating a relay between source and destination, where the relay uses decode and forward technique before forwarding the information to the destination. Destination applies Maximal ratio combining (MRC), to combine the signal received from the source and the relay. This concept is called Cooperative communication. A location aware channel estimation based relay selection strategy is proposed in this paper for a wireless ad hoc network. Audio is transmitted using 16 QAM modulation scheme over a Rayleigh fading channel in the presence of additive white Gaussian noise (AWGN). This paper focusses on the relay selection method for audio transmission in cooperative ad hoc networks where best relay is selected based on the average channel strength supported between the source and the destination. Audio quality at the destination is observed for the cases of relay presence and relay absence. Results showed that the measured audio quality with the presence of relay was far better than the measured quality in the absence of relay which stresses the importance of cooperative communication. Keywords—Cooperative communication; channel strength; ad hoc networks; maximal ratio combining; IEEE 802.11b; G.711 Codec; Mean Openion Score (MOS)

was developed for WLAN in [2], where users with low data rate maintained a CoopTable, of helper nodes with high data rates to help them in forwarding their data. Relay enabled MAC protocol was developed for wireless ad hoc network in [3], where the source selected the relay based on the channel conditions collected and advertised by the relay. A cross layer triple-busy-tone MAC protocol was designed [4] for wireless networks, where not only control and data frames are protected by busy tones, but also the data forwarded by the relay are protected by busy tone to avoid collisions in the network. A network coding aware MAC protocol was proposed [5] in which the relay delivers its own data, while relaying the data from the source simultaneously. A distributed MAC protocol was proposed [6] to maximize the lifespan of Wireless sensor networks by considering the channel state information and residual energy level in sensor nodes. A vehicular cooperative MAC protocol was designed for gateway downloading scenarios in vehicular networks, where all vehicles are considered to be interested in the information that is alike [7]. A MAC protocol by name CD-MAC was designed [8] to allow the relay to transmit its own data along with source data simultaneously using space-time coding. A distributed cooperative MAC was designed for wireless networks [9] by exploring the concepts such as cooperation region, thereby identifying the benefits of cooperative transmissions. In order to improvise the lifespan of the mobile ad hoc networks, a distributed energy adaptive location aware MAC [10] protocol was designed, where the relay was selected based on the location information and amount of remaining energy.
Work focussing on Call signalling protocols and types of codec, for Voice over IP are presented in [15], [16], [17]. Quality of the ongoing Voice over IP calls were analyzed in [18]. It was also found that, addition of a single call in cell degraded the quality of the calls in progress. Quality of service parameters such as delay, loss rate, jitter and R score were proposed in [19], [20], [21]. To improve performance of voice data, performance optimization schemes such as header compression, label based forwarding and packet aggregation are proposed for a wireless mesh network [22]. Delay components that contributes towards the calculation of end-toend delay for voice type of data are presented in [22]. G.711, G.729 and G.723 VoIP codecs were evaluated in terms of various Quality of service (QOS) parameters over Wi-Fi networks [11] and authors concluded that G.711 showed better performance. Authors developed an analytical model and analyzed the quality of voice using G.711 codec over wireless mesh networks [12], where the maximum mean opinion score attained was 3.3 for a single hop. Quality of VoIP calls were evaluated for three codecs, G.711, G.729 and G.723.1 over MANET in an indoor environment [23]. G.711 codec provided the highest MOS of 4 among all the codecs considered for evaluation.
Cooperative MAC protocols reviewed so for focus on the enhancement of throughput and energy efficiency or Network lifespan for transmission of data. Since most of researches have focussed only on transmission of normal data in cooperative ad hoc networks, there is a need to analyze the performance of voice data in cooperative ad hoc networks. Therefore in this paper, we have focussed on transmission of audio information over a cooperative ad hoc network by modifying the MAC protocol, to select the relay in a distributed manner by estimating the mean channel capacity. As per the literature review, we found that G.711 codec performed best in terms of MOS and therefore we chose the same codec in our simulation. We considered a fixed ad hoc network, where nodes were deployed randomly. We developed a mathematical model to select a suitable relay based on mean channel estimation. We also modified the existing MAC protocol to include the location information of the source and destination in the control frames and developed a new control frame to announce the selected relay in a decentralized manner. Results are used to determine the performance of the network in the absence and presence of the relay node.
The remaining sections of the paper is organized as follows. System model and Assumptions are presented in Section 2. Section 3 explains the distributed relay selection based MAC protocol. In Section 4, we elaborate the relay selection which is based on channel estimation. Details about the modifications carried out at MAC layer are presented in Section 5. Section 6 details about the Audio codec specifications and the formulae used for measurement of audio quality. Performance analysis of the proposed relay selection method and conclusion drawn are explained in Section 7.

II. SYSTEM MODEL AND ASSUMPTIONS
We considered static wireless ad hoc network consisting of one source, n relays and one destination node. We assume that the reader has the knowledge of IEEE 802.11b Medium access control protocol, which supports a maximum data rate of 11 Mbps. Every node is equipped with a single antenna and constrained to half duplex mode of communication. All the nodes that are randomly distributed in the network use the proposed MAC protocol. Nodes willing to transmit information will contend to access the channel using CSMA/CA. It is also assumed that all the nodes use the same transmission power.

A. Physical Layer
Propagation model considered at this layer is slow faded Rayleigh channel and path loss depends on the distance travelled by the information. Received signal power R P is computed at the destination and the relays by considering the transmitted power T P , the distance travelled by the packets d and attenuation constant α. Power spectral density of the noise (No), is fixed to -60dBm. Channel capacity is computed by considering the received signal power to noise power and the bandwidth. Decode and forward scheme is used at the relay, where signal broadcasted by source in phase 1 is decoded at the relay node. After decoding, the re-encoded data by the selected relay node is broadcasted to destination in phase 2. MRC is used at the receiver to maximize the signal power by combining the information received from the relay and the source. 16-QAM modulation is used at this layer to attain the required data rate.
Let h sr , h sd and h rd represent the gain of the channel from source to relay, from source to destination and relay to destination respectively. The concept of cooperation is modeled in two phases. Source broadcasts information to destination in first phase. All nodes that are in the transmission range of source will overhear the information broadcasted by the source. Signal received from the source to relay and relay to destination are represented as y sr and y rd respectively.
Where Ps represents the power transmitted at the source and information symbol transmitted by the source is represented by x. In phase two, with decode & forward protocol, the node which decodes the symbols of the received information from the source will become the relay node, only that relay node can retransmit the information with power Pr to the destination.
Where Pr represents the power transmitted at the relay. It is assumed that the Channel gains h rd and h sd are known at the destination and also they are independent of each other. Destination, upon receiving signal from the source and the relay, detects the transmitted symbol with the awareness of channel gains h rd and h sd , respectively. Destination performs MRC to maximize the SNR and minimize the bit error rate. Signals received from source and relay are combined at the destination, which is represented as:

B. MAC Layer
At this layer we have assumed that all the transmitted control packets are successfully decoded by all the other nodes that are present in the transmission range. Both the control and data packets are broadcasted with a constant rate and same transmission power is used for both types of packets.
For successful decoding of the control packets, this assumption is necessary. For decoding of the data packets, we have fixed the threshold for number of errors. If the number of errors are less than the threshold, data packets are accepted or else they will be rejected.

III. DISTRIBUTED RELAY SELECTION BASED MAC PROTOCOL
With the intention of improving the audio/voice quality over wireless ad hoc networks, we present a novel MAC protocol, where the relay is selected in a distributed manner.
When a relay is involved, there is a need to extend the reservation of the channel in terms of time and space, so that the relay can coordinate with the source and destination.
Aside from the Control frames such as ACK, RTS and CTS, new control frames are needed for relaying the information in the network. In this MAC protocol, a new control frame is used to assist the source, i.e., Ready-To-Forward (RTF). The RTF frame is used for announcing the selected suitable relay in a decentralized manner, where RTF is broadcasted by the winning relay to announce its selection to source, destination and other lost relays. Here, Suitable helper node (relay) means the one that relays the information with maximum mean channel capacity which is explained in section V. Time required for transmission of RTF, ACK, RTS and CTS frames are T RTF , T ACK , T RTS and T CTS , respectively.  Fig. 1 gives the procedure which can be used by the Source node, Fig. 2 represents the procedure to be followed at the relay node and similarly, Fig. 3 represents the methodology at the Receiving node.

A. Methodology at the Source Node
The flowchart shown in Fig. 1 provides the methodology which can be used by the source node. It is required to sense the channel, to check if the channel is idle.
Whenever the source has the data to transmit, it checks for the idleness of the channel by sensing the channel. If it finds the channel idle for a DIFS time, source node selects a Backoff timer (BT) randomly between Zero and CW. As soon as the BT reaches 0, source broadcasts RTS in the Network. Here RTS includes the information about the location of the source. NAV present in the RTS, will provide information about duration for which the source wants to hold the channel, because of which other nodes will refrain themselves from using the channel for a period of NAV. Source node has to wait for a duration of back off time, if the channel is found to be busy.
If CTS is not received by the source before the expiry of T RTS + SIFS + T CTS , Source performs retransmission of RTS. If source receives CTS before the expiry of T RTS + SIFS + T CTS , then source node waits for another SIFS + T min Backoff + T RTF , where T min Backoff is the minimum backoff counter set by the winning relay. If source does not receive RTF before the expiry of SIFS + T min Backoff + T RTF , it means no suitable relay exists. Then, source broadcasts data directly to the destination with the available channel capacity between the source and the destination. If RTF is received at the source, then the source originates a communication cooperatively with the winning relay to the destination by transmitting the data on the channel.
If the source receives the Acknowledgement within Transmission delay Source + Transmission delay Relay + Propagation delay SR + Propagation delay RD + 2SIFS + T ACK , transmission is declared to be successful, otherwise source assumes that collision has occurred and begins a backoff timer randomly similar to that of DCF.

B. Methodology at the Destination Node
Initially the destination node is in idle state as shown in Fig. 2. If the RTS from the source is received at the destination, Destination node computes the channel capacity available between itself and the source node.
Destination node generates a CTS packet, where the CTS includes the channel capacity provided between the destination & the source, information about the location of the destination apart from NAV and destination MAC address.
If the destination does not receive RTS, then it is forced to wait for the duration of time specified in back off timer. After broadcasting CTS, Destination waits to receive RTF from the winning relay.

C. Methodology at the Relay Node
If the destination does not receive RTF within SIFS + T min Backoff + T RTF, it thinks that no suitable relay exists and waits for the direct transmission of data from the source.
Otherwise, the destination node waits for the data from both the winning relay and the source. Upon receiving the data, the destination performs MRC and then extracts the information. If destination decodes and extracts original data correctly, it broadcasts the ACK. Or else, it lets the source to timeout and make a retransmission of the same data. All the nodes other than source and destination compute to take the position of the relay node in the networks. All these nodes will be in idle state as shown in Fig. 3. If the RTS is received from source, all these nodes will wait to receive CTS from destination node. If they haven't received either of them then they goes back to idle state. Once the CTS is received, all these nodes will compute the channel capacity supported (C 1 ) between themselves and the source node. Similarly, all these nodes will compute the channel capacity (C 2 ) supported between themselves and the destination. All these nodes will compute the average of C 1 and C 2 respectively and checks if the computed average channel capacity is greater than that supported between source and destination. Every node whose average channel capacity is greater than C will compute their backoff timer value, which is explained in the Section V. Node with the least backoff value will backoff earlier and broadcasts the RTF first. This node will be chosen as the relay in the network. Upon hearing to the RTF, other nodes will stop contending and sets their timer value to the one received in RTF. After the expiry of SIFS, winning relay node waits for the data to arrive from source node. Received data packets at the relay are decoded, re-encoded and broadcasted to the destination.

IV. MODIFICATIONS AT THE MAC LAYER
CSMA/CA DCF is used at MAC Layer to facilitate cooperative communication. Few modifications are proposed to the frame formats of existing RTS and CTS. RTF is the new frame developed, which is broadcasted by the winning relay node. The winning relay node selected in a distributed manner is the one which is used to cooperate between the source and destination.

A. Modified RTS Frame
Modified RTS frame format is as shown in Fig. 4. Source node broadcasts the RTS in the network. FCS field is not used in our work.
In order to incorporate the location information of the source, two bytes are included between FCS and destination MAC address. These two bytes carry the X-Y coordinates of the source. X-Y coordinates of the source provides the location information of the source. Fig. 5 shows the modified CTS frame. Destination broadcasts the CTS in response to the RTS broadcasted by the source. X-Y coordinates of the destination are carried in the last two bytes of the CTS frame. Four bytes are included between the destination location information and destination MAC address of the CTS frame to carry the data rate supported between the source node and destination node.

C. RTF Frame
All nodes in the network will receive a copy of both CTS and RTS. Location information of source is available in RTS and location information of destination is available in CTS. Every node in the network other than source and destination are also aware of their location information. All the nodes can compute the data rate supported between themselves and destination, also between themselves and source. Euclidean distance between the nodes, transmitted power, channel attenuation constant and Rayleigh fading coefficients are considered in computing the data rate in the network. Nodes located at different positions with varying fading coefficients provide different Signal to Noise ratio, which in turn results in different supported data rates. As the data rate supported between source and destination is included in CTS, all nodes willing to help the source can compare their computed data rate with the one received in CTS. Using the eqs. (7) and (8), which is explained in Section V, a node that is willing to cooperate as a relay will be selected as suitable relay node. The node which is selected as relay node should broadcast RTF frame in the network. Frame format of RTF frame is as shown in the Fig. 6.

V. CHANNEL ESTIMATION BASED RELAY SELECTION
Performance of MAC protocol will be affected significantly by the selection of suitable relay in distributed manner. We assume that the condition of the channel is not variant during one transmission session. Suitable relay selection based on the instantaneous location may be more appropriate than relay selection based on instantaneous channel condition in a wireless ad hoc network. We propose a location aware channel estimation based relay selection strategy, where location information are included in the handshaking packets. Localization algorithms or GPS can be used to obtain the location information of the wireless devices. Location information of the source node and destination node are included in RTS and CTS respectively. Every node willing to become relay will learn about the location information through RTS and CTS that are broadcasted in the network. CTS frame also carries the channel capacity(C) supported between destination and source nodes. As the nodes willing to become relay nodes are aware of their own location information, every node can compute the distance between themselves and the source. Received signal power at the relay node is based on the distance travelled, transmitted power at the source and channel attenuation constant. Possible Channel capacity between relay and source(C 1 ) is computed using Bandwidth and Signal power to Noise power ratio. Similarly possible Channel capacity between destination and relay(C 2 ) is also computed. C Mean is computed at each relay node, where C Mean is given by: If C Mean is greater than C, then highest channel capacity is computed as: D= Maximum Channel capacity -C Mean (8) Where maximum channel capacity for IEEE 802.11b is 11Mbps. The relay with minimum value of D become the winning relay which will backoff first and broadcasts RTF in the network. This is a completely distributed strategy where every relay node makes its decision independently.

VI. AUDIO CODEC
ITU-T defines all its audio codecs with certain specified characteristics and operation methodologies. For G.711 audio codec, ITU-T defined the specifications as 8kHz sampling www.ijacsa.thesai.org frequency, each packet size of 20 ms, speed of 64 kbps, and maximum size of the payload to be 160 bytes.
Initially, after the audio signal matching specifications in .wav format is accepted at the application layer, it has been sampled at the rate of 8 kHz. The samples so received are modulated using Additive Differential Pulse Code Modulation as per ITU-T standards of G.711 codec. This modulated signal is then Huffman encoded and sent to the physical layer for further physical transmission after 16 QAM modulation.
At the receiver end, the QAM demodulation is performed at the physical layer and then sent to MAC layer. Datagrams received are then Huffman decoded and then converted back to original samples at the application layer.
E-model is the suitable method for evaluating the quality of voice, which is defined by ITU-T [13] [14]. R Factor defined by E-model, provides the overall measurement of quality of voice, which is given by: R 0 represents the quality of the voice in the absence of distortion which is considered to be equal to 100 in our work, I s represents impairments due to packet loss, I d represents impairments due to delay and jitter and impairments due to encoding are represented by I e . AF represents the advantage factor which can be tolerated by the user. AF is chosen to be 5 for ad hoc networks and impairments due to jitter is not considered in our work.
One of the approaches to translate the ratings of R factor into an overall measurement from which the quality of the speech can be judged is MOS. MOS = 1+ (0.035 *R) + (7*10 -6 *R*(R-60)*(100-R)) (10) MOS value ranges from 1 to 5, where 4 and above 4 is considered to provide better quality of conversational voice [12].
Total delay incurred in transmission of audio in a cooperative ad hoc network includes packetization delay (P d ) at the source, transmission delay from source to link (Ts), transmission delay from relay to link (Tr), propagation delay from the source to the relay (Psr), propagation delay from the relay to the destination (Prd), processing delay for each bit at the relay (Bp) plus 3*SIFS. Processing delay for each bit at the relay is considered to be 0.1µsec.
Total enr-to-end latency in one direction from source to destination Total Delay is: Total Delay = Pd + Ts + Tr + Psr + Prd + Bp + 3*SIFS

VII. PERFORMANCE EVALUATION AND CONCLUSION
A distributed relay selection algorithm based on mean channel capacity is developed for a cooperative ad hoc network for transmission of Audio signals. Rayleigh fading channel is considered with AWGN for transmission of audio information is in this work. Existing 802.11b is modified for inclusion of location information in RTS and CTS, and data rate in CTS. New frame RTF is generated for announcing the selected relay in a distributed manner. Above mentioned algorithm is simulated using MATLAB 2018. The proposed MAC protocol is evaluated by comparing it with IEEE 802.11b DCF. Since main purpose of this protocol is to improve the quality of audio when transmitted over a cooperative ad hoc network, System performance is analyzed by computing Throughput, Packet delivery ratio and Mean Opinion Score (MOS). Parameters used in our work for simulation are listed in Table I. We considered four cases to analyze the performance of the network. In case 1, Audio quality was observed at the destination in the absence of relay. In case 2, we selected the relay which supported maximum Channel capacity between itself and the source. In case 3, we selected the relay which supported maximum Channel capacity between itself and the destination. In case 4, we selected the relay with mean channel capacity, which is explained in Section V. Fig. 7 shows the positioning of the nodes with 20 nodes deployed in the network. Node 10 is chosen to be the source and node 11 is chosen to be the destination. In case 2, node 5 is chosen as the relay and in case 3, node 17 is chosen as the relay node. Whereas in case 4 as per the relay selection method, node 15 is chosen as the relay node. Performance analysis of the system is depicted in Table II. The Total endto-end delay incurred by the packet from source-to relay & from relay to destination is 20.286 msec in case 4. 160 bytes of data are transmitted in one frame. For decoding of the data packets, we have fixed the threshold for number of errors as 604. The threshold for number of errors was fixed by averaging the number of error bits for ten transmissions. If the number of errors are less than the threshold, data packets are accepted or else they are rejected.
We demonstrated that the proposed MAC protocol for distributed relay selection in cooperative ad hoc network can significantly improve the quality of the audio received at the destination when compared with the normal wireless ad hoc network and 802.11 DCF. We also proposed a mathematical model to select the relay based on mean channel estimation. In our future work, we would like to work on transmission of video over cooperative ad hoc networks. This work can also be extended by considering the hidden node problem and exposed node problem in ad hoc networks.