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

Post on 06-Jan-2016

32 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

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

COE-541 LAN / MANSimulation & 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

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

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)

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

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

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

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

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)

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

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

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

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

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

Simulator Snapshot (1)

Main GUI

Simulator Snapshots (2)

Plot Results

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

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

Simulation Results (1)

WLAN Throughput

Simulation Results (2)

Collision Ratio

Simulation Results (3)

Average Queue Length

Simulation Results (4)

Average Queuing Time (microseconds)

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

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

Thank you

Q & A

top related