Two IEEE 802.11 DCF Simulators Written in Python

Last year I proposed a topic for an engineering thesis and I’m happy to report that two students have separately developed two Python-based IEEE 802.11 channel access simulators:

Both tools simulate channel access for 802.11’s distributed coordination function (DCF) assuming 802.11a PHY parameters and network saturation. Also, the code for both tools is available on GitHub.

DCF-NumPy is a Monte Carlo simulator which loops over 802.11 contention rounds to determine if a single station wins the contention (successful transmission) or if more than one (leading to a collision). The NumPy library is used to store various simulator parameters (such as stations’ current backoff values) in matrices. The simulator is a Python adaptation of the Matlab simulator used in Downlink channel access performance of NR-U.

DCF-SimPy is a discrete event simulator based on the SimPy library. Each contending station is instantiated as a separate process and the channel – as a shared resource. The simulator iterates over events (things that change the state of the system), such as the start and end of a transmission. This is a similar approach as used in ns-3, although here we do not simulate the whole Internet stack but only the data link layer.

Both simulators have been validated with analytical DCF models, a Matlab simulator, and ns-3 yielding very good results:

The code of both simulators is easy to follow and they can be used as playgrounds for implementing and testing various channel access mechanisms in shared channels.

Related

comments powered by Disqus