Implementation of Simulation to Enhance Wireless Ad-hoc Networks Performance using the Medium Access Control (MAC) Protocol GRADUATE PROJECT REPORT Submitted to the Faculty of The School of Engineering & Computing Sciences Texas A&M University-Corpus Christi Corpus Christi, TX In Partial Fulfillment of the Requirements for the Degree of Master of Science in Computer Science By Avinash Royal Thammineni Spring 2015 Committee Members Dr. Mario A. Garcia Committee Chairperson _____________________________ Dr. Dulal Kar Committee Member _____________________________ Abstract Wireless ad-hoc networks (WANETs) are innately different from the well-known wired networks and have a totally new architecture. A few problems arise from the two main traits of WANETs: self-organization and data transfer. Research work has been done to find out an efficient way to transfer data between nodes. The structure of a WANET keeps constantly changing making data transfer even more difficult. In this research project, two specific techniques are integrated. Cooperative communication and network coding can improve the performance of a WANET. Cooperative communication in a WANET makes use of alternate/neighboring nodes to pass on the information that is overheard. This helps in dealing with network performance issues. Network coding combines several packets together for communication, is very useful to reduce redundancy and can increase overall throughput of the network. Adding network coding to cooperative communication helps the nodes to assist other nodes while they serve their own traffic. To make use of the benefits brought by both network coding and cooperative communication, an efficient medium access control (MAC) protocol is required. In this research project, a network coding aware cooperative MAC protocol (NCAC-MAC) for wireless ad-hoc networks is used to enhance the performance of the WANET. i TABLE OF CONTENTS Abstract…………………………………………………………………………………............... i Table of Contents………………………………………………………………………………... ii List of Figures…………………………………………………………………………………… iv 1. 2. 3. Background and Rationale………………………………………………………….. .. 1 1.1 Introduction…………………………………………………………………… .. 1 1.1.1 CSMA………………...……………………………………. .................. 1 1.1.2 Fading………………………………………………………………….. 2 1.1.3 Routing in Wireless Networks…………………………………… ......... 2 1.2 Cooperative MAC Protocol............................................................................. .... 3 1.3 A MAC Protocol for Cooperative Communication.................................... ......... 4 1.4 Using Multi-Channel Multi-Interface Protocol in Wireless Ad hoc Networks... 6 1.5 Blind Cooperative Communication…………………………………… ............. 7 1.6 A New Cooperative MAC Strategy……………………………………………. 8 1.7 Proposed Approach: A Network Coding Aware Cooperative MAC Protocol… 10 1.8 Two-Relay Based Cooperative Communication………………….. ................... 11 Narrative……………………........................................... ............................................ 12 2.1 Problem Statement……………………………………………………… .............. 12 2.2 Motivation………………………………. .............................................................. 12 2.3 Functionalities……………………………….. ....................................................... 13 System Design…………………………………………………….. ............................ 14 3.1 Proposed System/System Protocol………………………………….. ................... 14 3.2 Overview of Various Software Packages ……….. ................................................ 17 ii 4. System Implementation…………………………………… ........................................ 19 4.1 Configuring and Creating Nodes………………………………. ........................... 19 4.2 Selecting Relay Nodes for Data Transmission…………………………… ........... 20 4.3 Exchanging Frames (ACK and NACK)………………………………… ............. 21 4.4 Analyzing Throughput……………………… ........................................................ 21 Evaluation and Results………………………………………… .................................. 22 5.1 Testing……………………………………………………………......................... 22 5.1 Test Cases……………………………………………………. .............................. 22 6. Conclusion and Future Work…………………………………. ................................... 37 7. Bibliography and References……………………………………… ............................ 39 8. Appendix ……………………………………………… .............................................. 41 5. iii LIST OF FIGURES Figure 1 Routing in Wireless Network……………………………………………….……..3 Figure 2 Cooperation at MAC Layer......................................................................................3 Figure 3 Cooperative Communication....................................................................................5 Figure 4 Multi-route from Source to Destination…...............................................................8 Figure 5 Cooperative Group Model........................................................................................9 Figure 6 Scenario of Coded Re-transmission, Both Source and Relay Node having the Same Destination………….............................................................................................................10 Figure 7 Frame Exchanging Process under the Condition that Direct Transmission Fails...15 Figure 8 Flowchart of the State Transmission for a Transmitting Packet ............................16 Figure 9 Source, Destination and Relay Nodes…………………………….……………....20 Figure 10 Number of Nodes Set to 120 ……………..……………………………………………………….…….23 Figure 11 Network Animator with 120 Nodes …………………………………………….……………………24 Figure 12 Source, Destination and Relay Nodes in a Network Animator (NAM) ………..25 Figure 13 Closer Look at Source, Destination and Relay Nodes ……….………………...26 Figure 14 Data Transmission Starts …………………………………….………………...26 Figure 15 Graphical Output for Throughput...............................................................….....27 Figure 16 Number of Nodes Set to 5 ………………………………..……...……….…….28 Figure 17 Network Animator with 5 Nodes …………………………………..………..…29 iv Figure 18 Source and Destination Nodes in a Network Animator (NAM) ……..............30 Figure 19 Graphical Output for Throughput………………………………......................31 Figure 20 Number of Nodes Set to 75…………………………………............................32 Figure 21 75 Nodes in Network Animator ………............................................................33 Figure 22 Source, Destination and Relay Nodes in Network Animator-A ……………...34 Figure 23 Source, Destination and Relay Nodes in Network Animator-B..………......…34 Figure 24 Graphical Output for Throughput ….……………...………………………….35 Figure 25 Success Rate……………………………..……………………………………36 v 1. Background and Rationale 1.1 Introduction Cooperative Communication has a lot of advantages and disadvantages/challenges. Every algorithm/technique involving cooperative communication is an attempt to overcome the disadvantages and make use of the advantages it offers. In cooperative communication, nodes take the help of relay nodes to complete the communication or to complete the data transfer from source to destination. Issues like fading and collisions are very common in this case and have to be tackled for a decent network performance. 1.1.1 CSMA Carrier sense multiple access is a MAC protocol in which a node checks if the channel is not serving other traffic in a shared medium. Sensing a carrier means getting notified by a node to which data transfer is attempted that it is currently handling other traffic and so it cannot participate in another transmission until it completes its current transmission. In such case, the carrier is sensed and the station has to wait before it attempts to transfer data again. It simply follows a principle called “Listen before you talk.” CSMA with collision detection; In this case, performance has been improved by canceling the transmission whenever a collision is detected. Thereby reducing the time before the source node/transmitter attempts again to transfer data. CSMA with collision avoidance; in this case, if a channel is sensed busy it simply waits for a random time before attempting for transmission again. Thereby reducing the chances of collisions. 1 1.1.2 Fading Fading in wireless communication occurs due to loss in intensity of the signal through propagation media. Fading depends on factors like time, radio frequency [6]. A channel that experiences fading is known as a fading channel. Fading can be a consequence of multipath distribution or shadowing. Shadowing is loss of signal due to large obstructions like a hill or a building between transmitter and receiver. However just solving network fading and collision problems will not make the data transfer simple and effective. Many other issues come into picture when using cooperative communication in a wireless ad hoc network. Some of those network issues and the solutions proposed in the literature are discussed in the following section. 1.1.3 Routing in Wireless Networks There are basically two ways of sending packets to the destination in a wireless environment, they are: Uni-path routing and full-flood [9]. Uni-path routing choses a single path in a network to complete the data transmission (Figure 1). If there is a node or link failure, the data transmission fails because there is no back-up path to complete the transfer. The power and time to complete the transfer is minimum because the number of hops to reach the destination is less. But reliability is not taken care in such a method. Whereas in full-flood, the source node simply broadcasts the packets through all the neighbor nodes. This approach has higher reliability but also has more unnecessary transmissions. 2 Figure 1. Routing in Wireless Network [9]. 1.2 A Cooperative MAC Protocol A cooperative MAC protocol is used to improve the speed at which data is transferred. In wireless Ad hoc network, the network topology is dynamic and a fixed routing algorithm for transferring data will not work. If data transmission from source to destination without any interference from other nodes is called direct transmission. When the rate of transferring the data is slow between the source and destination, continuing with the transmission will lead to longer wait times and further performance degradation [1]. 3 Figure 2. Cooperation at MAC Layer To avoid this the neighboring nodes help the source node to transfer data to the destination node [1]. In Figure 2, the source node tries to transfer data to destination node at 1Mbps, whereas the data transfer using a relay node can be completed at a very higher speed. This cooperative MAC protocol outruns the traditional methods of data transfer in a wireless Ad hoc network in terms of network performance and throughput. 1.3 A MAC Protocol for Cooperative Communication The source node with the help of neighboring nodes sends the information to the destination node. These nodes that help the source node for completing the communication are known as relay nodes. Selecting these relay nodes is a very challenging task because if all the nodes 4 participate in the communication there will be an increase in the network overhead and power is also wasted in this process [5]. So, instead of each and every node taking part in completing the data transfer, the source node decides which relay nodes should help its data transfer. When a relay node gets a data packet it checks for the group ID (Figure 3). If the group ID is same, it will become a relay node for the communication else it will simply drop the packet. Figure 3. Cooperative Communication. The number of nodes aiding in the data transfer is strictly linked with the network density. Results show that the network performance has increased when the network density is low and has no effect when the network density is high [5]. 5 1.4 Using Multi-Channel Multi-Interface Protocol in Wireless Ad hoc Networks Improving overall performance of an ad hoc network is a priority because of the growing demand of these kind of networks. Nodes compete to transfer data in a single shared channel, in such an environment the throughput degrades whenever there is a rapid increase in the network density or when the network density is high. Collisions also occur as different nodes cannot transfer data at the same bandwidth. To address these issues, a concept called multiple interfaces was introduced [3]. Nodes can now transfer data without worrying about different nodes transferring data simultaneously with the same bandwidth. With the decrease in interface costs, it has become easy to deploy nodes with multiple wireless interfaces. There exist wireless networks that use multiple interfaces, but they have limited features. In these multiple interface wireless networks, a node can use a different interface only when it has an exclusive purpose for it to do so. Moreover, these multiple interfaces cannot be utilized when the nodes are participating only in reception or data transmission [3]. Therefore, a new protocol for multiple interfaces in a MAC layer was introduced to overcome the drawbacks of the already existing systems, thereby making complete use of the features offered by multiple interfaces in wireless networks with multi-channel for improved network performance. This protocol dynamically assigns channels to nodes and schedules data transfers to make sure that there are no collisions. 6 1.5 Blind Cooperative Communication The performance of a cooperative communication mainly depends on the relay selection. For selecting a relay node, network state information and channel state information are considered. But in wireless Ad hoc networks the channel state information is random, and the network state information changes rapidly because there is no fixed network topology. In such an environment, the task of scheduling a relay node is extremely challenging. There have been methods to implement cooperative communication by handling network state information and channel state information. But it is evident from this discussion that these methods are complex and need a lot of additional signaling for data transmission to be successful. A method for cooperative communication has been proposed. In the proposed approach, there is no need for the data transmission/communication to worry about the network state information or the channel state information. It simply makes use of the broadcast feature of the wireless Ad hoc network to reduce the transmission power. 7 Figure 4. Multi-route from Source to Destination As a result, overhead due to forwarding of redundant data will be removed. This procedure helps the relay node and the destination node to overhear or listen to the data from two-hop away upstream nodes along a multi-hop route as shown in Figure 4. 1.6 A Cooperative MAC Strategy This approach focuses on deciding which relay nodes should help the transmission and which relay nodes should not help. In Section 1.3, an approach has been discussed in which a network generates a random group ID and through which data transfer mechanism works. Here, cooperative groups among the nodes are formed. These cooperative groups are not fixed; they keep changing, and a node can belong to two different cooperation groups. To create this cooperation group, a node’s radio coverage is taken into consideration, and the nodes that fall into this radio range are said to be in one group. 8 Figure 5. Cooperative group model. In Figure 5, assume that node A and node B are source and destination nodes respectively. Given their radio coverage ranges, node C and node D can become the relay node. As these nodes come under both the radio coverage ranges of nodes A and B. This method consumes a lot of power which is a major disadvantage. Apart from that, simulation and analysis results reveal that this method has significantly increased network performance. 9 1.7 Proposed Approach: A Network Coding Aware Cooperative MAC Protocol Despite all the discussed approaches for data transfer in wireless ad hoc networks, the extent to which research and development can be done in this area is high. In the traditional methods for data transfer, the relay node will stop serving its own traffic to help the source node. However, in heavy traffic conditions such an approach is not recommended, so the relay node can serve its own traffic and also help the source node simultaneously. For this to happen, as shown in Figure 6, the two packets x and y have to be combined. Network coding is a useful method for combining such packets in a network. Figure 6. Scenario of Coded Re-transmission, Both Source and Relay Node having the Same Destination. 10 1.8 Two Relay Based Cooperative MAC Protocol for Wireless Ad hoc Networks: The main goal of cooperative communication approach is improved network throughput and reliability and minimum network overhead. Usually when the network throughput is improved it decreases reliability to some extent, maintaining balance between both throughput and reliability is important in building a MAC protocol. CoopMAC (Cooperative MAC protocol) proposed by Lui either choses a direct path or a relay path based on the transfer rates. This increases the average throughput of the network to some extent. But in fading conditions, the network is not reliable because it is not handling failures and has only one path. Agarwal proposed another MAC protocol which has improved average throughput and delay performance when compared with lui’s CoopMAC protocol. This approach has a back-up path in case of link or node failures. This increases the reliability of the network which helps the throughput of the network too [10-12]. 11 2. NARRATIVE 2.1 Problem Statement Cooperative MAC protocol is usually categorized into two types 1) proactive-cooperative MAC and 2) Reactive cooperative MAC. The proactive-cooperative MAC approach enables the neighboring node (relay node) selection before the direct transmission starts. This approach will introduce consistent overhead to all transmissions irrespective of required cooperative communication. Further, reactive cooperative MAC selects the neighboring node (relay node) only when the direct transmission fails. One main disadvantage here is every neighbor node has to listen to the source node that requires additional energy. In this paper, the focus is on reactive cooperative transmission when the direct transmission fails. The general assumption in reactive cooperative transmission is that relay nodes help the source node without serving their own traffic (delivering their own data). But the relay nodes prioritize their own traffic over the source node packets. 2.2 Motivation Introducing network coding retransmission in cooperative communication is a growing concern in recent years. Making use of the advantages of both network coding and cooperative transmission is the prime objective to improve the network performance. With this approach, the relay nodes can serve their own traffic and help the source node for data transfer simultaneously. Some of the major drawbacks in the existing systems are [8]: 12 1) Network coding is not warranted. And there is a lot of ambivalence that a selected relay node will hold a packet that can be coded with the retransmission packet. 2) Selecting a relay node with good data transfer rate is not considered. A selected relay node may have a data rate very low compared to other relay nodes in the network. 3) Queues are not considered. A relay node with large queueing packets have to be considered over other relay nodes to decrease the overall delay. 2.3 Functionalities In order to address all the problems discussed, a novel cooperative MAC protocol using network coding is proposed with the following features: 1) Involving relay nodes in cooperative coded retransmission. 2) Selecting relay nodes based on their characteristics and making use of cooperative communication. 3) Using efficient collision-free relay selection methods instead of the random backoff scheme. 13 3. System Design 3.1 Proposed System/Protocol Design In this section, the proposed protocol is discussed in detail by introducing the frame exchanging process for network coding aware cooperative MAC protocol. In this protocol, there are two approaches: 1) Network coding aware cooperative retransmission and 2) pure cooperative retransmission. Considering a common assumption made in previous work in this protocol, the network has multiple nodes (wireless stations/devices) which have equal transmitting strength, buffer size, and data rates. Apart from the traditional ACK (acknowledgment) and NACK (negative acknowledgment) frames, there is an (ETH) Eager to help frame to decide on the relay node in a network. If the surrounding channel is busy, the source node waits for the distributed inter-frame space for some random backoff time. Once the backoff counter is zero, it starts transferring the packet. However, it tries to transfer the packet through direct transmission, if direct transmission fails this protocol will be used (Figure 7). There are four possible cases in this method. They are: 1) Successful transmission, the payload will be decoded at the destination node ad acknowledgment will be sent to the source node and the source node handles next packets in the queue, if any. 14 2) If the signal to interference noise ratio is above the threshold value, but the payload is corrupted, the destination node will send a negative acknowledgment with SINR flag set to 0 indicating that the packet is capable for coded retransmission. Figure 7. Frame Exchanging Process under the Condition that direct Transmission Fails. 3) If signal to interference noise ratio is below the threshold value and the payload is corrupted, the destination node will send a negative acknowledgment with SINR flag set to 1 indicating that coded retransmission is not recommended. 4) If the payload and header both are corrupted, harsh channel conditions can lead to such situations, the source node will time out and start the transfer again. 15 Figure 8. Flowchart of the State Transmissioon for a Trannsmitting Paacket. Any nodee in the netw work will firsst be in idle state till it reeceives a paccket. Once a node receivves a packet it checks if the channel is idle or not, if it is idle itt will back ooff for some random timee and start dataa transmissio on. After the data transm mission the noode will waiit for acknow wledgment, iif it receives acknowledg gment it goess back to idlee state else itt starts pure cooperativee retransmisssion and then goes back to o idle state (Figure 8). 16 After the creation of an Ad hoc network with the number of nodes given by the user, the process selects the source and destination dynamically and selects the relay nodes between source and destination to reach the destination. These relay nodes are selected based on the nodes information like the energy of a node, number of hops required, and distance. Once these relay nodes are selected, data transmission takes place between source and destination through the relay nodes. Based on the time delay for transmission the process confirms if the node is transmitting the data or not, by giving acknowledgment. A cooperative neighbor node is being selected, through which data will be transmitted from the previous relay node that now acts as a source node. This is done after getting the negative acknowledgment, and the node simply drops the packet. So there is no need for the transmission to start again from the initial source node. Every event in the network will be recorded in the trace file. As this trace file difficult to read, network animator with the help of a scripting language can generate graphical output from the trace file. 3.2 Overview of Various Software Packages To implement this project, NS2 simulator and NAM (network animator) have been used, and it’s done on Linux platform. There are two languages in which the project was implemented Tcl (tool command language) and cpp. NS2 Simulator: NS2 simulator is a network simulator which plays a very crucial role in network research and development. The main advantage of this simulator is that it is open source software and available for everybody to use. With a scripting language like Tcl, one can configure his network 17 according to his architecture and check the way his network behaves with the help of this simulator. And with this one can calculate the network performance and work accordingly for better results. NS2 also offers default implementations for transport layer protocols like TCP and UDP. NAM-Network Animator: Nam is a network animator that is a part of Tcl tool-kit( Tcl/Tk). It helps by checking network simulation traces. These traces are considered as output for the network simulator 18 4. System Implementation Steps Involved in implementing this project: Configuring and creating nodes Dynamically selecting source and destination for data transmission Selecting relay nodes between source and destination Exchanging frames (ACK and NACK) Analyzing throughput 4.1 Configuring and Creating Nodes Before the process is implemented on an ad hoc network, a network is created with the specifications given, to implement the project on it through simulation. For that, a network is first configured and then created in Tcl. After the creation of the nodes, they are assigned positions in the network initially. The energy levels and other information of the nodes are updated throughout the process, as this information is required along with the distance between nodes and number of hops for selecting the cooperative node. All this information is updated in the trace file, every event in this process is updated in a trace file. That trace file is the output for this simulation. As it is difficult to understand the trace file, a network animator is used to show the output of the simulation. After the network is configured and created with the number of nodes given by the user. The Source and destination for transmitting data are selected (Figure 9). 19 4.2 Selecting Relay Nodes for Data Transmission Selecting relay nodes for data transmission is one of the main steps in this project, as this plays an important role in enhancing the overall performance of the network. Before selecting the relay nodes, parameters like: Energy, Distance and Number of hops are checked. Figure 9. Source, Destination and Relay Nodes Once the relay nodes are selected, the data transmission is started via the relay nodes. 20 4.3 Exchanging frames (ACK and NACK) After the nodes, source, destination and relay nodes are ready for the transmission, the source node will have to inspect the medium to see whether the channel is idle or not. If the carrier is not idle, it waits for the random backoff time. Or else it will be checking till the channel becomes idle. After which, the packet transmission starts, if a packet is corrupted the source gets a negative acknowledgment and the node will simply drop the packet. The source node will now transfer the packet through a relay node, without requiring the whole transmission to start again. In case the transmission is successful, the destination node will send ACK to the source and the source can now handle the next packet. 4.4 Analyzing throughput Throughput for the protocol is calculated considering the received packets. The received packets will be denoted by r in the trace file. Calculating number of received packets from the trace file and the control bit rate the throughput is calculated. The initial packet size and the final packet size are also considered in calculating the throughput. 21 5. Evaluation and Results 5.1 Testing Testing is very important for any project. It primarily focuses on whether the project is generating desired outputs or not in different scenarios, and helps the developer to make sure that the project is working fine in all possible scenarios that are in developing terms called test cases. This phase of the project is important due to number of reasons like if the user purchases the product developed and released without testing. There will be high probability that the product may not work fine in all cases. And so the user will finally not be satisfied and will have complaints about that product that is a negative sign for any growing software company. This type of cases will have a very bad impact on the company’s sales. Customer or user satisfaction is the highest priority for any software developer. Therefore testing plays a very important role in software development. 5.2 Test Cases A test case deals with a scenario that can be used to test a functionality of a project in software engineering. It helps find out errors and is used to make sure if the output of the project is working as per the requirements of the project. This is the final phase of development, testing and debugging is done before the product is released into the market or before it is given to the user. However in this paper, testing the project will not be the same as normal software engineering projects as this paper implements a routing protocol in an ad hoc network using a network simulator for implementation. A network simulator mainly uses the position of the 22 nodes in defining how the network behaves. How the network behaves and how is the output consistent when the number of nodes is changed will be tested in the test cases in following sections. Test Case 1 Simulation Results with High Network Density: The number of nodes is set to 120 in this case. The source and destination nodes are selected to be 10 and 20 respectively [10]. Figure 10. Number of Nodes Set to 120. 23 Then the neighboring nodes are analyzed to decide which neighboring nodes will become relay nodes for the transmission. Selecting the relay nodes for communication is done dynamically, based on the node information, number of hops and transmission time. To make the simulation clear, the source and destination nodes have been color-coded in one color and the relay nodes are color-coded in one color and the remaining nodes are color coded in a different color. As everything cannot be shown in a simulation environment, such as selecting the relay nodes, sending an acknowledgment and negative acknowledgment cannot be seen. However, every event is recorded in a trace file, this file can be referred for any particular event. After the simulation is successful. A network animator is used to display the simulation traces, as it is difficult for the user to read a trace file. The initial position of 120 nodes before the simulation starts is shown in Figure 11. Figure 11. Network Animator with 120 Nodes. 24 After the simulation is complete, one can see the simulation through the network animator to understand how the process is executed. As it can be seen in Figure 11, the network has 120 nodes and these nodes are spread to different positions as they were given positions in the network initially. And then the source and destination and the route through the relay nodes from source and destination are displayed in the network animator (Figure 12) (Figure 13), after which the data transmission starts (Figure 14). Figure 12. Source, Destination and Relay Nodes in a Network Animator (NAM). 25 Figure 13. Closer look at Source, Destination and Relay Nodes. As the simulation time progresses the relay nodes are selected based on the node characteristics before the data transmission is started, but before that direct transmission is checked. And then the data transmission starts (Figure 14). Figure 14. Data Transmission Starts. 26 Before selecting the relay nodes direct transmission is considered and checked because in a few cases direct transmission might be the best way to transmit data like in this test case. This case is very important because selecting the relay nodes and transmitting data when the direct transmission is the best way to transmit data might decrease the network performance as the simulation takes more time. And so it might not be a good option, not to check direct transmission before selecting relay nodes for data transmission. P a c k e t s Simulation Time Figure 15. Graphical Output for Throughput. 27 After the simulation is complete, based on the number of packets received a throughput graph is generated with simulation time on x axis and number of packets on the y axis. As it can be seen in Figure 15, initially the throughput is high because before the data transmission starts the nodes exchange node information. Then the throughput drops, because when the relay nodes are calculated there are no packets delivered. And then it again rises back when the data transmission starts. Test Case 2 Low Network Density (data transmission failed): The number of nodes is set to 5 in this case. The source and destination are selected to be 1 and 2 respectively (Figure 16). Figure 16. Number of nodes set to 5. 28 As it can be seen in Figure 16, user can give the input for number of nodes. The source and destination nodes are selected and then the nodes will be analyzed to decide, which neighboring nodes will become relay nodes for the transmission. Figure 17. Network Animator with 5 nodes. After the simulation is complete, one can see the simulation process using a network animator. As it can be seen in Figure 17, the network has 5 nodes. And these nodes are spread to different positions initially. And then the source and destination and the route through the relay nodes 29 from the source and destination are displayed in the network animator (Figure 18). After which the data transmission starts. In Ad hoc networks, it is very important for the nodes to be in the transmission range of each other. Communication without the nodes being in the transmission range is not possible. So network density plays a vital role in data transmission as far as ad hoc networks are concerned. When the number of nodes are less the chances of failed data transmissions are high as the network density will be low. As per the given network area, this protocol works fine for any input which is more than a 100. It also works for fewer nodes but the possibility of failed transmissions will be high. Figure 18. Source and Destination Nodes in a Network Animator (NAM). 30 As in this case there are no relay nodes because there are no neighboring nodes for the source node to start the data transmission(Figure 18),the data transmission fails. P a c k e t s Simulation Time Figure 19. Graphical Output for Throughput. 31 A graph for throughput is generated for this test case. The x axis indicates the simulation time and the y axis indicates the number of packets. In the graph the throughput goes down when the relay nodes are calculated for data transmission and again goes down as there are no relay nodes to help the data transmission (Figure 19). Test case 3 low network density (successful data transmission): In this test case, the number of nodes is set to 75 (Figure 20).As the number of nodes are not too low, the chances of successful data transmission slightly improve compared to the test case 2. The source and destination nodes are selected to be 10 and 20 respectively. Figure 20. Number of Nodes Set to 75. 32 As per the user’s input for number of nodes the 120 nodes which have to form an ad hoc network are shown in the network animator (Figure 21). Figure 21. 75 Nodes in Network Animator. As it can be seen (Figure 22) the source and destination nodes are in one color and are labelled source node and destination node. The relay nodes are selected based on the node positions and their characteristics. These relay nodes are also color coded and are in a different color (Figure 23). After the relay nodes are dynamically selected, the data transmission starts. 33 Figure 22. Source, Destination and Relay Nodes in Network Animator-A. Figure 23. Source, Destination and Relay Nodes in Network Animator-B. 34 These are the test cases in which the project is tested. Whenever the number of nodes is less, the probability of successful data transmission decreases because of the network density. As the network density decreases the probability of mobile nodes to be available in the neighbor nodes data transmission range decreases, this means there will be no connectivity between those nodes until they move to the data transmission range of neighbor nodes. P a c k e t s Simulation Time Figure 24. Graphical output for Throughput. 35 After the simulation is complete, based on the number of packets received a throughput graph is generated with simulation time on the x-axis and number of packets on the y axis. As it can be seen in Figure 24, initially the throughput is high because before the data transmission starts the nodes exchange node information. Then the throughput drops, because when the relay nodes are calculated there are no packets delivered. And then it again rises back when the data transmission starts. Number Of Nodes Success Rate 199 100% 150 100% 100 100% 75 33% 50 0% 25 0% Figure 25. Success Rate. The trend in the success rate of data transmission is calculated and tabulated while varying network density (Figure 25). 36 6. Conclusion and Future Work In this paper, a unique cooperative MAC protocol is implemented, by taking advantage of the features of cooperative communication. A new approach for selecting relay nodes is also introduced in this paper. Firstly, the nodes in the network have been configured and created on which the protocol is to be tested and then the source and destination nodes which have to communicate are selected dynamically. After selecting the source and destination nodes for data transmission the neighbor nodes are analyzed to select the relay nodes to help the data transmission between source and destination nodes. But before analyzing the neighbor nodes the direct transmission is checked. If direct transmission is an efficient way of transferring data, selecting relay nodes is skipped else the relay nodes are selected based on their characteristics like energy, number of hops, distance. The data transmission starts after selecting the relay nodes. If the relay nodes in between fail or if there is link failure the source node gets a negative acknowledgement, and it selects a cooperative node to complete the data transmission. This is called pure co-operative retransmission. Once the packet reaches the destination node, it sends out acknowledgment to the source node and it serves the next packet in the queue. The standard collision avoidance methods have been followed for optimal performance of the network. The results show that the network performance was consistent under a few assumptions made for forming the network. However, there is still plenty of room for improvement. This protocol can be implemented for larger networks with more number of nodes and no network constraints. The mobility of the nodes can be increased, at the same time making sure that the network performance does not degrade. In this method, the mobility of the nodes is 37 minimized. The functionality where the input for source and destination nodes can be given by the user, can also be added. The general network traffic can also be introduced to make the evaluation of the network more realistic. 38 7. Bibliography and References [1] Li Yi; Ji Hong, “A New Cooperative Communication MAC Strategy forWireless Ad Hoc Networks” in Computer and Information Science, 2007. ICIS 2007. 6th IEEE/ACIS International Conference, 2007. [2] Yun Li; Zhenghua Zhang; Chonggang Wang; Weiliang Zhao; Hsiao-Hwa Chen , “Blind Cooperative Communications for Multihop Ad HocWireless Networks Vehicular Technology”, IEEE Transactions on Volume: 62 , Issue: 7 , 2013. [3] Eunsook Shim; Seunghoon Baek; Joungsik Kim; Dongkyun Kim, “Multi-Channel Multi-Interface MAC Protocol in Wireless AdHoc Networks Communications”, 2008. ICC '08. IEEE International Conference, 2008. [4] Hui-Hsin Chin; Chun-Cheng Lin; Der-Jiunn Deng, “Contention resolution algorithm for MAC protocol in wirelessad-hoc networks”, Wireless Communications and Mobile Computing Conference (IWCMC), 2012 8th International, 2012. [5] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.331.9088&rep=rep1&type=pdf [6] http://en.wikipedia.org/wiki/Fading [7] http://en.wikipedia.org/wiki/Carrier_sense_multiple_access [8] Xiaoyan Wang, “Network Coding Aware Cooperative MAC Protocol for Wireless Ad Hoc Networks”, Grad. Sch. of Syst. & Inf. Eng., Univ. of Tsukuba, Tsukuba, Japan, 2014. [9] https://www.youtube.com/watch?v=sVnmU90-_c4 39 [10] http://academic.research.microsoft.com/Publication/4304519/ieee-802-11b-cooperativeprotocols-a-performance-study [11] http://scholar.google.com/citations?view_op=view_citation&hl=en&user=0Brxa0QAAAA J&citation_for_view=0Brxa0QAAAAJ:u5HHmVD_uO8C [12] Khalid, Murad, “Two-Relay-Based Cooperative MAC Protocol for Wireless Ad hoc Networks”, Dept. of Electr. Eng., Univ. of South Florida, Tampa, FL, USA, 2011. 40 8. Appendix Source Code for Tcl(Tool Command Language) 41 42 43 44 45 46
© Copyright 2024