wsn lab2 report

9
Submitted By: Dushyant Singh 201311027 Page 1 Arun Krishnan 201311041 IT456 WIRELESS SENSOR NETWORKS LAB EXPERIMENT 2 COMPARISON OF DSR AND DSDV ROUTING PROTOCOLS The objective of this lab is to compare the performance of the two routing protocols in wireless domain- DSR and DSDV. The comparison is done for three scenarios –a dense large network, a dense small network and a sparse large network. The experiment setup is as follows. Since in any of the three scenarios we may have a large number of nodes and since the performance comaprison of the two routing protocols is done by studying their respective plots for Packet Delivery Ratio(PDR) vs Speed(Mobility) we have used two tools – cbrgen and setdest in our lab experiment whose purposes are to produce cbr/tcp traffic(according to the parameters given) between various pair of nodes, given the number of nodes , maximum number of connections and rate of data transmission, and to generate mobility in the nodes randomly given the maximum speed of movement and the limit of the area in which the movement is possible respectively. Our simulation is done for speeds varying from 4m/s to 60m/s in step sizes of 4m/s. So for each of the three scenarios we have compared PDR vs Speed for both DSR and DSDV and have plotted the graphs which is given below. Also since all setdest and cbrgen introduces mobiltity and connections randomly we have done the simulations in such a way that for each value of mobility we have done ten iterations and have taken the mean as our PDR and also have taken the Standard Deviation of the ten values with respect to the mean to show the error introduced due to the randomness. For the initial setup of comparing two protocols we have generated CBR traffic using cbrgen tool with a seed value of 1.0 and a data rate of 2.0 . Hence we use PDR as performance measure. The tcl script for the same sources the cbrgen and setdest files to get the node motions and the connections between the nodes and executes them for the scenario specified. The three scenarios are specified using the number of nodes and the topology used. For a dense large network we have used 100 nodes in a topology of dimension 1000x1000. Dense small network uses 50 nodes in 250x250 dimension area while sparse large network has 50 nodes distributed in a 1000x1000 topological area. From the trace file of each simulation using an awk script a new trace file having PDR for corresponding mobility value is created . So in this new trace file which from hereon will be specified as 'final.tr' , we will have for each mobility value, 10 values of PDR, as explained in the earlier graph. From the 'final.tr' file using another awk script a third trace file is created which will have the mean PDR value and Standard Deviation with respect to the mean for each mobility value which is then plotted in the graphs for various scenarios. The graphs are as shown below: Scenario 1 – Dense Small Network The first graph (Fig 1.1)shown below is for dense small network that is a network having 50 nodes distributed in a 250x250 dimensional topological area. We have plotted the mean PDR vs the mobility values and at each point plotted the standard deviation with respect to the mean is shown. This simulation was done using DSDV as the routing protocol. Fig 1.2 shows the same graph for the same scenario but when using DSR as the routing protocol. Fig 1.3 shows the PDR(mean value) plots for both the DSR and DSDV protocols in a single

Upload: dushyant-singh

Post on 25-Nov-2015

38 views

Category:

Documents


3 download

DESCRIPTION

ns2 simulation

TRANSCRIPT

  • Submitted By: Dushyant Singh 201311027 Page 1 Arun Krishnan 201311041

    IT456 WIRELESS SENSOR NETWORKS LAB EXPERIMENT 2

    COMPARISON OF DSR AND DSDV ROUTING PROTOCOLS The objective of this lab is to compare the performance of the two routing protocols in wireless domain- DSR and DSDV. The comparison is done for three scenarios a dense large network, a dense small network and a sparse large network. The experiment setup is as follows. Since in any of the three scenarios we may have a large number of nodes and since the performance comaprison of the two routing protocols is done by studying their respective plots for Packet Delivery Ratio(PDR) vs Speed(Mobility) we have used two tools cbrgen and setdest in our lab experiment whose purposes are to produce cbr/tcp traffic(according to the parameters given) between various pair of nodes, given the number of nodes , maximum number of connections and rate of data transmission, and to generate mobility in the nodes randomly given the maximum speed of movement and the limit of the area in which the movement is possible respectively. Our simulation is done for speeds varying from 4m/s to 60m/s in step sizes of 4m/s. So for each of the three scenarios we have compared PDR vs Speed for both DSR and DSDV and have plotted the graphs which is given below. Also since all setdest and cbrgen introduces mobiltity and connections randomly we have done the simulations in such a way that for each value of mobility we have done ten iterations and have taken the mean as our PDR and also have taken the Standard Deviation of the ten values with respect to the mean to show the error introduced due to the randomness. For the initial setup of comparing two protocols we have generated CBR traffic using cbrgen tool with a seed value of 1.0 and a data rate of 2.0 . Hence we use PDR as performance measure. The tcl script for the same sources the cbrgen and setdest files to get the node motions and the connections between the nodes and executes them for the scenario specified. The three scenarios are specified using the number of nodes and the topology used. For a dense large network we have used 100 nodes in a topology of dimension 1000x1000. Dense small network uses 50 nodes in 250x250 dimension area while sparse large network has 50 nodes distributed in a 1000x1000 topological area. From the trace file of each simulation using an awk script a new trace file having PDR for corresponding mobility value is created . So in this new trace file which from hereon will be specified as 'final.tr' , we will have for each mobility value, 10 values of PDR, as explained in the earlier graph. From the 'final.tr' file using another awk script a third trace file is created which will have the mean PDR value and Standard Deviation with respect to the mean for each mobility value which is then plotted in the graphs for various scenarios. The graphs are as shown below: Scenario 1 Dense Small Network The first graph (Fig 1.1)shown below is for dense small network that is a network having 50 nodes distributed in a 250x250 dimensional topological area. We have plotted the mean PDR vs the mobility values and at each point plotted the standard deviation with respect to the mean is shown. This simulation was done using DSDV as the routing protocol. Fig 1.2 shows the same graph for the same scenario but when using DSR as the routing protocol. Fig 1.3 shows the PDR(mean value) plots for both the DSR and DSDV protocols in a single

  • Submitted By: Dushyant Singh 201311027 Page 2 Arun Krishnan 201311041

    graph which helps us to study the difference in their performances for this particular scenario.

    Fig 1.1 PDR vs Speed for dense small network using DSDV protocol

    Fig 1.2 PDR vs Speed for dense small network using DSR Protocol.

  • Submitted By: Dushyant Singh 201311027 Page 3 Arun Krishnan 201311041

    Fig 1.3 PDR vs Mobility for both DSR and DSDV

    Scenario 2- Sparse large network This scenario uses a topology of 1000x1000 dimension and 50 nodes distributed in it. Fig 2.1 here shows the PDR vs Speed plot while using DSDV protocol , this plot shows the mean PDR value for each value of mobility alongwith the Standard deviation of the values with respect to the mean.

    Fig 2.1 PDR vs Speed for sparse large network using DSDV protocol

  • Submitted By: Dushyant Singh 201311027 Page 4 Arun Krishnan 201311041

    Fig 2.2 shows the same PDR vs Speed plot but using DSR Routing Protocol

    Fig 2.3 PDR vs Speed Plot having both DSR and DSDV components

    Scenario 3 Dense Large Network As in the above two scenarios we have three plots here also:

  • Submitted By: Dushyant Singh 201311027 Page 5 Arun Krishnan 201311041

    Fig 3.1 - PDR vs Speed using DSDV routing Protocol Fig 3.2 - PDR vs Speed using DSR Routong Protocol Fig 3.3 - PDR vs Speed for both DSR and DSDV.

    Fig 3.1 - PDR vs Speed using DSDV routing Protocol

    Fig 3.2 - PDR vs Speed using DSR Routong Protocol

  • Submitted By: Dushyant Singh 201311027 Page 6 Arun Krishnan 201311041

    Fig 3.3 - PDR vs Speed for both DSR and DSDV

    Now since we have compared the performances of both DSR and DSDV protocols we have further extended our experiments by comparing TCP and UDP in a wireless scenario wherein the mobile nodes are in a state of motion . For this we used a scenario of 50 nodes scattered in a 1000x1000 topological area for our comparison . Furthermore due to the reliability feature of the TCP protocol we have not used PDR as a comparison measure but Throughput, hence the following graph depicts Throughput vs Speed for both TCP and UDP packets in the above mentioned scenario. The experiment has been programmed in such a way that half the number of nodes uses TCP connections while half the number of nodes use CBR traffic (that is UDP data). This has been done using the cbrgen tool by using the 'tcp' and 'cbr' types respectively for each of the cases.The graph for the above is as shown:

  • Submitted By: Dushyant Singh 201311027 Page 7 Arun Krishnan 201311041

    Hypothesis Testing Since all our reading are based on randomisation of node movements and traffic generation we have done hypothesis testing on the values to ensure that our approximations are acceptible. In Hypothesis testing we have a null hypothesis and an alternative hypothesis which usuallu negates the former. For our case we have taken the null hypothesis that the mean PDR values which we generated in each of the three scenarios for different values of mobility are correct. Hypothesis testing can be done using two methods Z test and T test. We chose T-test for our use because Z-test can be performed on a sample size of 30 or more only. We have generated 10 PDR values for each value of mobility, we have not generated more values because of the computational complexiry and the time requred for the same. From the 10 values generated for each value we calculate the population mean and population standard deviation which we have plotted in the above graphs. Now to test whether our null hypothesis was correct out of the 10 samples we take 2 samples , calculate their mean value(sample mean) and perform T-test for the same . The T value is calculated as follows: T= (population mean sample mean) / (population Standard Deviation/sqrt(sample size)) We are using a two sided T-test and use a 95% confidence interval of acceptance . The t-values are checked using the standard t-table . The same process is repeated for 4,6 and 8 samples.We have observed from our computation that our null hypothesis is correct and hence the mean PDR values which we used on our plots are acceptible. The t-values for two scenarios dense small network using DSR and dense small network using DSDV are provided here with for reference .

  • Submitted By: Dushyant Singh 201311027 Page 8 Arun Krishnan 201311041

    Fig 5.1 the last four columns shows the t-values for 2,4,6 and 8 sample. It can be observed that for all these cases t-test gives a value 1 which we used to denote the acceptiblility. This is for 50 node network in a 1000x1000 topology using DSDV protocol.

    Fig 5.2 t-test done for 50 node 1000x1000 topology scenario using DSR protocol

  • Submitted By: Dushyant Singh 201311027 Page 9 Arun Krishnan 201311041