1 / 25

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

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.

emmet
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COE-541 LAN / MANSimulation & 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 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 • 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_Type (1) Event_Type (2) Generate_Packet Start_CSMA Actions to be done Actions to be done Insert packet in q … Check medium … Event-Driven Approach (4) Condition / Next Event Time 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

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

  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 • 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 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

  25. Thank you • Q & A

More Related