mobwat_lab2

Upload: sandipg

Post on 14-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 MobWat_lab2

    1/6

    Simulation of EDCA Internal Contention:

    The simulation generated Tx packets comprising both messages DENM and CAM. Below is theaverage number of Tx packets of each message generated as the data rate was increased from1Mbps to 3 Mbps.

    Data Rate (Mbps) Tx Packets: DENM Tx Packets: CAM

    1 2499 2499

    1.5 3749 3749

    2 4998 4998

    2.5 6248 6248

    3 7498 7498

    I used a modified awk command like so:awk '{s+=$2} END {print 1.0," " s/NR}' delayDenm1.dat > DENM_avgDelay.txtawk '{s+=$2} END {print 1.5," " s/NR}' delayDenm1_5.dat >> DENM_avgDelay.txtawk '{s+=$2} END {print 2.0," " s/NR}' delayDenm2.dat >> DENM_avgDelay.txt....

    The part in Red corresponds to the Data Rate used. The awk command operates on the data file, forexample delayDenm1.dat, extracts and sums up each entry in the second column (s+=$2) and thencomputes the average by dividing the sum by NR which is the number of records in the input file.

    The output of the series of awk commands is the file DENM_avgDelay.txt which has the followingcontents:

    1 0.002896171.5 0.004596212 0.004815762.5 0.5648573 1.14085

    This was then used as an input to GNUPLOT to generate the plot:

    set title "DENM Average Delay"set xlabel "Data Rate (Mbps)"set ylabel "Average Delay (ms)"set gridset output "DENM_avgDelay.png"plot "DENM_avgDelay.txt" with lines

    The same steps were used to generate the other plots.

  • 7/27/2019 MobWat_lab2

    2/6

    1 a. Variation of Throughput as a function of data rate

    Plotting the Average Throughput which is given by the ratio of the number of received packets andthe number of transmitted packets:

  • 7/27/2019 MobWat_lab2

    3/6

    2. The Priority sub-field of the QOS Control field in the 802.11 header of the UDP Packets isset to 1 for Background priority (CAM) and 0 for Best Effort priority (DENM).

    6.2 Simulation of general contention

    Data Rate (Mbps) Tx Packets: DENM Tx Packets: CAM

    0.1 249 249

    0.5 1248 1248

    1 2496 2496

    2 6248 6248

    Increasing the data rate from 0.1 Mbps to 2 Mbps and plotting the throughput as a function of datarate for both traffic classes, the following plots are obtained:

  • 7/27/2019 MobWat_lab2

    4/6

    Observations:CAM Throughput drops very sharply as the data rate increases beyond 0.1 Mbps. DENMThroughput also drops but not as sharply since DENM traffic belongs to a higher priority class

    (Voice).

    7 Receiver Model: Evaluating the receiver ability to receive packets and differentiate trafficsources

    1. Reception statistics with only CAM or DENM traffic

    Only Car 1 transmits DENM. The CAM application on Car 2 is disabled. Below are theSNR and PER results:

    SNR=246.019, PER=0

    SNR=19.6677, PER=0

    Only Car 2 transmits CAM. The DENM application on Car 1 is disabled. Below are theSNR and PER results:

    SNR=246.019, PER=0SNR=19.6677, PER=0

    The reception statistics are identical. If only one car is transmitting data, there is no congestion inthe network, consequently the received SNR at Car 0 is the same in both cases. Note that this is dueto identical transmit power configurations for both cars.

  • 7/27/2019 MobWat_lab2

    5/6

    2. Reception statistics with simultaneous transmission:

    start at channel 1start at channel 1start at channel 1sync to signal (power=4.9356e-11W)

    drop packet because already in Rx (power=4.9356e-11W)drop packet because already in Tx (power=3.94571e-12W)drop packet because already in Tx (power=3.94571e-12W)EndREceive: mode=3000000, snr=246.019, per=1, size=1066failureTx packets App 2

    We observe that the PER is 1 which means no packets are received successfully at Car 0.The SNR reported is incorrect due to a bug in the computation at the NS-3 PHY module.

    3. Effect of increasing the transmission power of Node 1 on the reception statistics

    Instead of increasing the tx power by 5 db, I increased the tx power in steps of 3 dB (doubling) inorder to notice the variation of PER with increasing Tx power of one transmitter. The results arebelow:

    8 Congestion Control:

  • 7/27/2019 MobWat_lab2

    6/6

    The average reception probability is the same when only CAM or DENM traffic is trasmitted in thenetwork.

    2.

    3. Reducing