Comparison of AODV and DSDV MANET routing using the FUZZY logic

Mobile ad hoc network is a type of ad hoc wireless networks which has become highly important in wireless communication. This network has composed of a set of wireless nodes and mobile phones and computer can play role of these nodes. Routing in these networks is complex and difficult because there is no fixed topology and nodes are freely displaced. In these networks, each node plays role of a router. Military networks, crime management networks etc. can be among the examples of mobile ad hoc network. One of the most important issues in ad hoc networks is routing. There are different types of routing protocols such as AODV and DSDV routing protocols. This report analyses and evaluates these two protocols with fuzzy logic and NS-2 simulator. This report is organized as follows: previous works, relates to concepts mentioned in this paper, the designed fuzzy system, results of simulation are mentioned.


I. Introduction
Ad hoc networks are classified into two groups including mobile ad hoc network and intelligent sensor network. Mobile ad hoc network has composed of wireless nodes. Nodes are freely displaced. In other words, this network has dynamic topology. Figure 1 shows an mobile ad hoc network. Routing is difficult in this network. In order to send data soundly and with low delay to destination, routing protocols should be used. DSDV and AODV protocols are of the popular protocols which are evaluated and compared with different nodes size. DSDV routing protocol performs routing with Bellman-Ford algorithm. Each node has a routing table which is updated continually and periodically. The inputs which are located in routing table include the number of nodes for reaching destination, sequence numbers for reaching destination which is generated by the destination node and is the destination address [2,5]. Data packets are transferred to nodes with routing table. Preventing creation of loop is one of the features of this protocol. AODV routing protocol This protocol discovers route with request approach. In other words, this protocol finds routes with RREQ, RREP and RERR messages. When the source node wants to send data to destination, source node first broadcasts messages called RREQ to its neighbour nodes. When the RREQ message reaches destination node, the destination node will send its response to the source node from the same previous path with RREP message and it means that the route has been found from source to destination and the source node can send its data. One of the features of this protocol is that it performs routing action only if necessary. ADOV protocol uses a routing method and acts similarly to DSR [6, 7, 8]. As mentioned above, the source node first broadcasts its route request among neighbours and the node forwards its response message into the source node. Figure 2 shows message broadcasting procedure. This figure has 8 nodes in which node A has role of source and H has role of destination. Node a broadcasts route request among the neighbouring nodes and also neighbouring nodes route request source node to another node. When request message reaches node H or destination node is found, the destination node forwards the response message to node A and the source can send its data. Figure 3 shows response of destination node to the source node.Sending route request from node a (source) Sending node H response (destination) to sphere a (source).

II. Fuzzy system
Fuzzy models based on Zadeh's compositional rule of inference. The fuzzy system use the raw data to make calculation on whatever the input is given and it begins with an introduction of fundamental ideas of fuzzy conditional (if-then) rules. A collection of fuzzy if-then rules formulates the so-called knowledge base, which formally represents the knowledge to be processed during approximate reasoning.

Related Work
Studies have been conducted so far to evaluate and analyse routing protocols in ad hoc networks some of which we describe here. Morshed et al. in their paper compared AODV and DSDV protocols with different parameters. In their test, they showed that AODV protocol was better than DSDV routing protocol for real time applications. Mohapatra et al. in their paper analysed function of several routing protocols on ad hoc network and studied delay, throughput and packet delivery. Odeh et al. analysed and compared function of two protocols i.e. DSR and AODV. Criterion for their comparison was data packet size. They found that DSR protocol had better function for packet of below 7 bytes. Boukerche et al. studied and compared AODV, PAODV, CBRP, DSR, DSDV protocols and found that DSR and CBRP routers had higher power compared with other protocols .in this project here we have analysed things by using fuzzy logic by taking of the outputs of both AODV and DSDV like throughput, packet dropping etc.

Fuzzy system
Fuzzy systems are able to make decision and control a system The term "system" is usually understood as a set of interacting components with well-defined structure and organized as an intricate whole that can be distinguished from the "external" environment. A system communicates with the environment through so-called inputs and outputs. Fuzzy systems are structures based on fuzzy techniques oriented towards information processing, where the usage of classical sets theory and binary logic is impossible or difficult. In the literature, terms such as fuzzy system, fuzzy model, system based on fuzzy rules, fuzzy controller, or fuzzy associative memory are used interchangeably depending on the application type.
Utilized membership functions are triangular, yet they have different number of variables. This difference roots in natural quiddity of parameters such as degree of anemia.
• The sophistication of natural world which leads to an approximate description or a fuzzy system for modeling.
• Necessity of providing a pattern to formulate mankind knowledge and applying it to actual systems.
Thus, the following procedure is considered to define expert fuzzy system: • Defining input-output sets which accept normalized input-output pairs.
• Generating if-else fuzzy rules based on input output pairs.
• Creating fuzzy rule base.
• Implementing fuzzy system based on fuzzy rules.

Input-output parameters of the fuzzy systems
As mentioned before, 1 factor of the number of nodes has been used in this system for evaluation of two AODV, DSDV routing protocols as input parameter and based on this input factor, effect of the factor on two AODV, DSDV routing protocols is studied but as mentioned above, other factors such as nodes searching speed, number of packets etc. are also effective on evaluation of two AODV and DSDV routing protocols. As a result, it is not possible to determine efficiency of two AODV and DSDV routing protocols under different conditions but attempt has been made to calculate efficiency of two AODV and DSDV routing protocols with a fuzzy system using this single factor for taking suitable measures. Therefore, the above fuzzy system has four outputs which show efficiency of two AODV and DSDV routing protocols based on different input states. In this research, FIS tools were used in Matlab software to determine efficiency of test technique and its general diagram is shown in Figure 5. This system has 1 input field which relates to factor affecting evaluation of two AODV and DSDV routing protocols and three classes i.e. low, normal and high verbal words have been assigned to each factor and 4 output fields which show efficiency of two AODV and DSDV routing protocols and the output has been classified into three groups and low, normal and high verbal words have been assigned to each factor. In Figures 6 and 7, one of the membership functions of input and output parameters is shown.

Construction of rules database
A simple method for generation of fuzzy rules is clustering of input features with specified number of fuzzy membership functions (for example, triangular membership function and assignment of verbal words to each cluster). With the classified space for each model, one way for generation of fuzzy rules is to consider all possible combinations of antecedents (input features) and this method has been also used in this research.
. Simulations and statement of results of fuzzy system

V. Result and discussion
As mentioned above, MATLAB software which is a suitable medium for simulation of such systems has been used. Simulation of two cases of tests with 20 and 30 nodes is given in Figures 8A and 8B we then showed results obtained from effect of the number of node on output as 2D which has been obtained in the simulation model. Results of fuzzy expert system for two outputs of delay and throughput are given in Table 1. The results for two protocols which have been tested with nodes 10, 20, 30, 35, 40, 55 and 65 are shown in Figure 10A and 10B. The obtained results show that AODV protocol has lower delay signed fuzzy system for the number of different nodes are exactly mentioned in Table 1. Now, we have evaluated and simulated two AODV and DSDV routing protocols for the number of similar nodes with NS-2 software in order to show performance and reliability of the proposed fuzzy system by comparing results of executing fuzzy system and NS-2 software with each other. Ruler viewer result for 10 nodes NS-2 software has been used to simulate the protocols and NS2 Visual Trace Analyser software has been used to analyse the results. Our evaluation criterion is condition of the sent packets, the maximum delay and maximum forwarded data per second. Each one of them is discussed here. The settings which have been done for analysis of this test are shown in Table 2. Figure  11 shows. Simulation medium and Figure 12 shows layout of nodes in which number zero is source node and node number 1 is destination node. Figure. 12. Layout of nodes with 20 nodes in which node number zero is source and node number 1 is destination

The forwarded packets
In this Section, condition of the packets which have been generated, dropped and transferred are shown with different nodes with both protocols. Figure 13 shows the generated packets, dropped packets and transferred packets for AODV protocol with different nodes. For example, a test has been done on 10 nodes in this Figure. There are 4038 TCP packets and 13 packets have been transferred from source to destination is 4025. Considering this Figure, it can be said that with increasing the number of nodes, the number of packets forwarded from source to destination increases Figure 14 shows the generated packets, the dropped packets and transferred packets for DSDV protocol with different nodes. For example, there are 4726 TCP packets in the test which has been performed on 10 nodes and the number of the dropped packet is 41 and also the number of transferred packet from source to destination is 4685. Figure 14 Generated packets and the Dropped packets

VI. Conclusion
In this report, fuzzy system has been designed to analyses both DSDV and AODV protocols in MANET and to prove truth of the fuzzy system, we compare results by comparing two protocols with NS-2 software and the results show that the designed fuzzy system has suitable efficiency for proposing and selecting one of these two routing protocols principally and logically under different conditions and based on different applications. Generally, AODV protocol has better performance than the DSDV protocol in terms of the data transfer rate per second and delay rate with increasing the number of node in the network. Generally, we can say that goal of designing the fuzzy system in this report is to help ordinary user select type of the routing protocol only based on information of ordinary user (even if the user has no accurate information about routing protocols of MANET networks) and only based on personal discernment of the user regarding the number of nodes based on application of network as verbal words (high low-medium).