coe-541 lan / man simulation & performance evaluation of csma/ca

25
COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA Presented by Muhamad Khaled Alhamwi

Upload: emmet

Post on 06-Jan-2016

30 views

Category:

Documents


0 download

DESCRIPTION

COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA. Presented by Muhamad Khaled Alhamwi. Outline. Introduction & Background Simulation Model Proposed Approaches Event-Driven Approach Implementation Simulation Results Conclusions Q & A. Introduction. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

COE-541 LAN / MANSimulation & Performance Evaluation of CSMA/CA

Presented by

Muhamad Khaled Alhamwi

Page 2: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Outline

Introduction & Background Simulation Model Proposed Approaches Event-Driven Approach Implementation Simulation Results Conclusions Q & A

Page 3: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Introduction

IEEE 802.11 is the standard for Wireless LANs

Has two modes of operations Point Coordination Function (PCF) Distributed Coordination Function (DCF)

CSMA/CA Protocol Contention-based

Page 4: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

CSMA/CA

CSMA/CA: Carrier Sense Multiple Access with Collision Avoidance

Differs from CSMA/CD: CSMA with Collision Detection Collision can not be detected

Inter Frame Space (sorted by length - priority) Short (SIFS) PCF (PIFS) DCF (DIFS)

Page 5: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

CSMA/CA

If a station has data to transmit Sense medium, and if it is idle for DIFS,

transmit Otherwise, defer transmission until the

medium is sensed idle Invoke the backoff algorithm

Page 6: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Backoff Procedure

A station invokes its backoff algorithm when it defers its transmission

A backoff timer is chosen randomly from [0 .. CW] This timer is decremented while the medium is

sensed idle When the timer reaches zero, the station transmits

its frame After each unsuccessful transmission CW is

doubled up to CWmax

Page 7: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

CSMA/CA ExampleFrame

Frame

Frame

Frame

Remaining Backoff

Backoff

Defer

Defer

Defer

Defer

DIFS DIFS DIFS

Station B

Station A

Station C

Station D

Station E

Page 8: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Simulation Model

Event-driven approach Single thread that performs all operations All operations are performed using events An event processing results in changing system

state, and can result in generation of multiple other events

Multi-threaded approach Each station has two threads

One for packets generation The other one for packets transmission applying

CSMA/CA

Page 9: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Event-Driven Approach (1)

Event is defined in terms of Station Id Event Type Occurrence Time

Example An event of packet generation for station 1 at time 500 {1, Generate_Packet, 500}

Maintain an ordered list of events according to their occurrence (time)

Page 10: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Event-Driven Approach (2)

Initialize Variables

Create “Generate_Packet” event for every station

Select Next Event(s)

Update System Variables

Check Event Type

Is Simulation Over?

Generate Report End

Start

YesNo

Process Event

Page 11: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Event-Driven Approach (3) Available events types

GENERATE_PACKET START_CSMA DEFER START_BACKOFF DEC_BACKOFF STOP_BACKOFF TRANSMIT_FRAME TRANSMIT_ACK FREE_MEDIUM RECV_ACK NO_ACK

Page 12: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Event-Driven Approach (4)

Event_Type (1)

Actions to be done

Event_Type (2)

Actions to be done

Condition / Next Event Time

Generate_Packet

Insert packet in q…

Start_CSMA

Check medium…

Queue is empty / +1

When processing “Generate_Packet” event, “Start_CSMA” event will be generated if “Queue is empty”

+1 means that the event will be fired in the next time slot

Page 13: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Event-Driven Approach (5)GENERATE_PACKET

Enqueue packetCheck queue length

START_CSMA

Check Medium

TRANSMIT_FRAME

Medium = BusyFin = cur + Frame lenCheck queue lenCheck collision

FREE_MEDIUM

Medium = Idle

DEFER

Check MediumInitialize backoff

START_BACKOFF

Check MediumCounter++

DEC_BACKOFF

Dec BackoffCompare Backoff

NO_ACK

Increase CWIncrease Retry

q = 0 / +1

Backoff > min / +1Idle / +DIFS

Busy / Fin

+ /Inter-arrival Idle / +DIFS

/ +minBackoff = min / +1

No collision/ Fin+SIFS

/Fin

Collision / Fin + Timeout TRANSMIT_ACK

Medium = BusyFin = cur + ACK len

/Fin

Retry < limit/+1

RECV_ACK

Remove frameDecrease CW /Fin

q > 0 / Fin+1

Page 14: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Implementation

MATLAB is used as development tool Events are maintained in a sorted list

List is kept sorted while adding Multiple scenarios can be created and run Results can be plotted and multiple scenarios

can be compared Simulation results can be saved Simulation can be resumed later

Page 15: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Simulator Snapshot (1)

Main GUI

Page 16: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Simulator Snapshots (2)

Plot Results

Page 17: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Simulation Parameters Packet Inter-arrival Time (Exponential): 2 msec Slot Time: 20 usec SIFS: 10 usec DIFS: 50 usec Data Rate: 1Mbps CWmin: 31 CWmax: 1023 Propagation Delay: 0 Retry Limit: 7 ACK Size: 38 Bytes ACK Timeout: 500 usec Station Queue Size: 300 packets

Page 18: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Performance Measures

LAN Throughput Successful Transmission Time / Simulation Time

Collision Ratio Number of collided transmissions / Overall

transmissions Average Queue Length

Average of queue lengths of all stations Average Queuing Time

Average queuing times of all stations

Page 19: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Simulation Results (1)

WLAN Throughput

Page 20: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Simulation Results (2)

Collision Ratio

Page 21: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Simulation Results (3)

Average Queue Length

Page 22: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Simulation Results (4)

Average Queuing Time (microseconds)

Page 23: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Conclusions

Simulator efficiency is very important to get reasonable results in a limited time period

Event-Driven simulation can be very efficient when it is well implemented

Multi-threaded approach is not scalable When increasing the number of stations

Page 24: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

References (main)

IEEE Std 802.11, 1999 Edition, Information technology – Telecommunications and information exchange between systems – Local and metropolitan area networks – Specific requirements. Part 11: MAC and PHY specifications

A. Al-Akeel, "Optimizing Backoff Procedure for Enhanced Throughput and Fairness in Wireless LANs", MS Thesis, King Fahd University of Petroleum & Minerals 2007

Page 25: COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA

Thank you

Q & A