Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA"— Presentation transcript:

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

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

3 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

4 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)

5 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

6 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

7 CSMA/CA Example Station A Station B Station C Station D Station E
Frame Defer Station B Frame Defer Station C Frame Defer Station D Frame Defer Station E DIFS DIFS DIFS Remaining Backoff Backoff

8 Simulation Model Event-driven approach Multi-threaded 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

9 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)

10 Event-Driven Approach (2)
Start Initialize Variables Create “Generate_Packet” event for every station Select Next Event(s) Check Event Type Process Event Update System Variables Is Simulation Over? Generate Report End No Yes

11 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

12 Event-Driven Approach (4)
Condition / Next Event Time Event_Type (1) Actions to be done Event_Type (2) Actions to be done Queue is empty / +1 Generate_Packet Insert packet in q Start_CSMA Check medium 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

13 Event-Driven Approach (5)
GENERATE_PACKET Enqueue packet Check queue length START_CSMA Check Medium DEFER Check Medium Initialize backoff q = 0 / +1 Busy / Fin / + Inter-arrival Idle / +DIFS Idle / +DIFS Backoff > min / +1 Retry < limit/+1 q > 0 / Fin+1 TRANSMIT_FRAME Medium = Busy Fin = cur + Frame len Check queue len Check collision DEC_BACKOFF Dec Backoff Compare Backoff START_BACKOFF Check Medium Counter++ Backoff = min / +1 / +min No collision/ Fin+SIFS / Fin TRANSMIT_ACK Medium = Busy Fin = cur + ACK len RECV_ACK Remove frame Decrease CW Collision / Fin + Timeout / Fin FREE_MEDIUM Medium = Idle / Fin NO_ACK Increase CW Increase Retry

14 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

15 Simulator Snapshot (1) Main GUI

16 Simulator Snapshots (2)
Plot Results

17 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

18 Performance Measures LAN Throughput Collision Ratio
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

19 Simulation Results (1) WLAN Throughput

20 Simulation Results (2) Collision Ratio

21 Simulation Results (3) Average Queue Length

22 Simulation Results (4) Average Queuing Time (microseconds)

23 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

24 References (main) IEEE Std , 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

25 Thank you Q & A


Download ppt "COE-541 LAN / MAN Simulation & Performance Evaluation of CSMA/CA"

Similar presentations


Ads by Google