The Monte Carlo analysis of the media access time distribution in 802.11n MAC layer

—Subsequent wireless network standard releases meet better and better the continuously increasing customer requirements in the areas of throughput, coverage and transmission QoS. The network throughput is the key parameter from the user point of view, because the lot of multimedia ﬁles are transmitted in such networks. One of the main sources of problems, reducing the transmission quality, is the DCF itself, the basic MAC access method in WLAN. This paper presents the method of analysis of the access to channel in time domain. This method, based on Monte Carlo simulations, allows simulating and presenting the network activity in time domain. The performed simulations show, which components of the MAC scheme absorb most of the time and cause loss of throughput.


I. INTRODUCTION
T HE POPULARITY of wireless computer networks has been increasing over many last years.WLANs (Wireless LANs) are built in accoradance with the IEEE 802.11 standard (Wi-Fi).Initially, WLAN networks were treated only as an auxiliary technology augmenting traditional fixed networks.However, with the standard evolution, network throughput and coverage has been still increasing and WLAN networks has become the real competitor to the fixed Ethernet networks.Wireless network standards meet better and better the growing customer requirements for transmission quality [13], [12].
Wireless medium allows for more flexibility of available network locations, but, on the other hand, such networks have also some disadvantages.WLANs are susceptible to disadvantageous interferences from other wireless equipment [8].Protection against unauthorized access to the network and transmitted data is much more difficult in wireless networks [5].These networks are based on the shared access to media, what entails many complications in the MAC (media access layer) and the PHY (physical layer) layers.Additionally, in the latest IEEE 802.11 standard version, the MAC layer must deal with the routing tasks in the mesh network (802.11s).Concluding, the wireless standard implementation has much more tasks to perform than fixed network standard implementation.
Wireless networks are very often analyzed in the domain of throughput or in the domain of coverage.Both these domains are important from the point of view of transmission quality providing.But, in the authors opinion, the third domain in which network should be analyzed is the time domain.In the domain of the time we could investigate, if the maximum throughput or the maximum coverage is available during all the transmission time or only during some percentage of time.
One of the key problems, diminishing the transmission quality in the time domain, is the DCF (Distributed Coordination Function) scheme, which is the basic method of MAC access [2], [12].This scheme was introduced in the first version of the standard and is maintained in the subsequent versions to preserve compatibility [9].Communication between stations is organized as follows: data is sent in packets, which are always separated with the obligatory time intervals, i.e. interframe spaces (IFS) and backoff (T BO ) time.DCF scheme uses DIFS (Distributed Inter Frame Space), SIFS (Short Inter Frame Space) and EIFS (Extended Inter Frame Space) time separators, which values are defined for every standard amendment.Operation of the wireless network in the time domain is shown in Fig. 1.Wireless network operation in the time domain does not depend on the number of stations in the network.Fields marked gray represent data or information packets transmission time, fields marked white represent the dead time T DEAD (silent time), it means the time of obligatory spaces.In the other words, gray color means the channel is active (occupied) and the white color means the channel is not active (not occupied).No data is sent in the dead time.In the authors' opinion, in this time the network bandwidth is wasted.Considering the time domain, the channel throughput is used during a part of time only.
The competition for media access impedes the achievement of an adequate level of QoS (Quality of Service) in WLANs [6], [7], [12] and affects the practical throughput [1], [11], [14].The MAC scheme is based on the assumption, that before starting trasmission each station must wait until the channel is free.Than it must wait again, when the channel is free during IFS and T BO time.So this communication method reduces capacity in two ways.Firstly, the need to transmit additional headers and preambles in PLCP (Physical Layer Convergence Procedure) sublayer, acknowledgments and control data reduces the bandwidth available for data.Secondly, IFS and T BO time segments separating different packets reduce the bandwidth available for data.
Expected throughput E T h , taking into account most of these parameters, is described as follows [4]: This formula includes three groups of factors.Some factors such as T DIF S , T SIF S , T BO represents the time (wasted or dead time) when all stations are just waiting.T ACK is the time for sending confirmation (acknowledgment frame).The second group of factors concerning the data structure are K, which is the number of aggregated frames and L data , which is the payload carried per frame.The last group concerns selected parameters of the transmission e.g.PRR -the packet reception rate.The formula corresponds rather to the average value because it takes into account the average T BO .One cannot calculate real transmission time, because T BO value changes in every communication transaction.Formula (1) doesn't discuss the collisions, RTS/CTS (Request to Send/Clear to Send) messages time and the SIFS different share in successful transmissions versus collisions.
The IFS time intervals, separating every frame transmission, do not reduce the theoretical maximum throughput, but they reduce total throughput per time unit in the time domain (see Fig. 1).During some periods of time the radio channel is not working.Some changes are introduced to improve the dead time problem.In 802.11ac (the new release of 802.11 standard) maximum A-MPDU (aggregate MAC protocol data unit) length is increased from 65 535 octets to 1 048 575 octets.Also, the RIFS (reduced interframe space) time interval is not used any more.It is very difficult to estimate the loss of throughput resulting from both mechanisms mentioned above.Some authors suggest that the transmission of whole control data can reduce the throughput available for data by even about 50% [10].The evaluation of a total throughput decrease is difficult, because it depends on the upper layer transmission type, e.g.UDP or TCP [3].
The authors propose the analysis method of access to the media distribution in time domain based on the Monte Carlo simulations, which allows to simulate the real-time network activity.The description of proposed method and analysis of simulation results are presented in this article.Simulations show, which elements of MAC scheme and in what proportion cause the throughput decrease.The rest of the article is organized as follows.The MAC layer activity in the time domain is described in the second section.All components of data transmission in the time domain are defined there.The third section describes the Monte Carlo method and the way of utilizing this method in WLAN network simulation.The authors define the analysis assumptions in the fourth section.The analysis limitations are described in details in this section.The section five give the simulation results description and in the section sixth this results are concluded.

II. MAC LAYER ACTIVITY IN TIME DOMAIN
As it was mentioned above, DCF is the basic MAC access method in WLAN networks.One communication session involves transmission of one data frame (or control frame) and one ACK frame.ACK is the obligatory positive acknowledge frame sent by the receiver.In the simulations were used three types of control frames of lenghts as follows: ACK 16 bytes, RTS 20 bytes and CTS 14 bytes.
Before sending a frame, station has to listen to the channel, checking whether the medium is free during DIFS time.If yes, backoff algorithm is started [9].This algorithm differentiates the frame sending start time for many competing stations.The backoff algorithm relies on a draw.Every station has to draw the random value from the (0, CW) interval, where CW means contention window.The TBO (Backoff time) is than calculated as multiplication of this random value and the slot time.After this preparation phase every station has to wait for calculated TBO value.When the two or more stations draw the same shortest value, collision occurs.In this case CW value is doubled (exponentially enlarged) and backoff algorithm starts again.This steps are repeated until successful transmission occurs.The CW may take value between CWmin equal to 15 and CWmax equal to 1023 (dispersion is very big).So, the time needed for one data frame transmission can be described as follows: T D1 is the sum of the transmission times of data frame (involves transmission of obligatory PHY header T P H and data T DAT A ) and ACK frame T ACK and all additional time intervals, when the station is waiting all obligatory time spaces (T DIF S and T BO time before sending data frame, T SIF S before ACK frame).
In the case of collision, this time is wasted.No data was send, when collision occurred, so the collision time T C1 in this communication scheme is equal the data sending time: An extension of the basic communication schema is a method of the two short control frames exchange at the beginning of communication session [9].This frames are RTS and CTS.The RTS frame is sent, when station wins the rivalry and it wants to reserve radio channel for the time of sending RTS/CTS frames (T RT S and T CT S ), data frame, ACK frame and all obligatory time spaces.In this case the time needed for one communication session is longer, than in the basic scheme, and can be defined as follows: But in the case of collision, the time wasted is much shorter than previously, comparing with (3): In the performed simulations this second type of MAC schema has been used (with RTS/CTS).All participants (AP and STAs) of wireless communication have to obey the same rules, i.e. they must win the competition to start data transmission.Both AP and station (STA) can be a sender or a receiver.Sample communication session presenting message exchange with the external stations (i.e.station from external networks) is shown in Fig. 2.This packet exchange includes all obligatory time spaces: DIFS, SIFS and backoff time.In this example we assume, that the first competition was won by STA1 and the second competition was won by STA2.If neither the STA1 nor STA2 wins the competition, data is buffered until success.In the DCF MAC method the T BO parameter has random values (within defined limits) so the authors decided to use the Monte Carlo method in the analysis.

III. THE MODEL OF 802.11N MAC LAYER INCORPORATING THE MONTE CARLO METHOD
Some real world systems contain a lot of elements connected in complex ways.Some of these elements are difficult to define.In such situations, it is sometimes impossible or difficult to define the problem so that it can be solved analytically.We can then attempt to carry out a simulation by using the Monte Carlo method.Monte Carlo methods are a broad class of computational algorithms.They rely on repeated random sampling to obtain numerical results.The word "simulation" means experimenting on the actual system model.Simulation can be made not only, when the problem is difficult to solve analytically.Simulation can be also useful when it is impossible to experiment on a real system.The Monte Carlo method can be used in our situation of the wireless network to model phenomena with significant uncertainty in inputs.It will be mainly used to generate samples from different probability distributions, because we assume that some of our inputs are random variables.Running simulations many times over allows to calculate results similar to those obtained from real experiment.
The basic idea is to construct a mathematical simulation model of the system and introduce into it properly selected data.Then one checks the data of the output of the model and compares them with the available data of the actual system.If the Monte Carlo model meets the expectations and the results appear to be reasonable, then it can be run a sufficient number of times in order to estimate the value of the output to the required level of accuracy.In this way, this method can be used to solve some problems of optimization connected with the proposed model.The very important variable in DCF method is the value which is drawn by each station for T BO computing.Let us recall that, at first each station draws randomly this value from (0, 15) range.Then the station, which drew the smallest number, gains the access to the channel.The DCF scheme could produce the conflicts, when two or more stations have drawn the same smallest number.In this case the draw is repeated, but with a range that is twice longer i.e. (0, 31).In the case of the next conflict, the range will be increased twice again and so on, until reaching the maximum value of 1023.The station can decrease the range to the initial value of (0,15) only after winnig the competition and succesful sending a frame.Because there are a lot of possible solutions it is difficult to find a proper analytical formula.

IV. ASSUMPTION FOR ANALYSIS
As it was mentioned above the analysis and simulations were conducted for DCF with RST/CTS communication schema (see Fig. 2) with assumption of ideal channel conditions.For the purpose of analysis the wireless network includes AP and stations: one or ten.The main assumption was to simulate the wireless communication as precisely as possible, but with some additional restrictions to make this simulation manageable and workable.Only data frames were taken into account in simulations, not management frames.Every station has always data ready to send.The DCF schema is slightly simplified.It means that retransmission issues, Packet Reception Rate and EIFS are not taken into account.Each transmission is independent session, for wich the new T BO value is chosen.We simulate successful transmissions and collisions, depending on the drawn TBO value for every station.In the case of collision CW value is exponentially enlarged.In the case of successful transmission CW value is reset to minimum.In both these cases TBO is drawn again before next transmission.
Table I presents the most important parameters of radio channel and frames and defined time intervals, used in simulations.The authors assumed that the 2.4 GHz band is used with 20 MHz radio channel width.The data and ACK frame rate is 26 Mbit/s which is the middle rate value for the SISO (single input single output) type of channel.The RTS and CTS frames rate is 6.5 Mbit/s [9].One communication cycle has contained 200 sessions.The next assumption is that in whole communication cycle the frame length is the same.
In the following formulas the value n describes the number of communication sessions, n 1 -the number of successful sessions, and n 2 -the number of collisions, so n 1 + n 2 = n.Transmission time of every DCF schema elements has been calculated, based on parameters showed Table I and control frame lengths.Frame transmission time can be calculated as follows: T transmission = T P H + 8    where N is data amount in bytes and C is the transmission rate in Mbit/sec.Transmission time of different frame lengths is calculated for a spectrum of possible throughputs.The results are presented in Table II and in Table III.Two different packet lengths are used in the simulation.The length of the typical Ethernet packet is 1540 bytes, while the length of the maximal possible non aggregated packet in the WLAN networks is 2346 bytes.Finally in performed simulations following frame transmission times are used for frame with preamble: for 1540 bit time is equal to 505,85 µsec, for frame 2346 bit time is equal to 721,85 µsec, for CTS 14 bit time is equal to 49,23 µsec, for RTS 20 bit time is equal to 56,62 µsec and for ACK 20 bit time is equal to 36,37 µsec.
For the purpose of analysis some parameters have been defined to describe phenomena on the timeline.The basic information is the dead time, i.e. time, when all users are waiting, although the radio channel is idle.In the case of communication sessions, as showing formula (4), the dead time is the sum of T DIF S , 3 T SIF S and T BO (see Fig. 2).In the case of collisions the dead time is the sum of T DIF S , T SIF S and T BO , so it is a little shorter, like showing formula (5).The dead time can be described, as follows: Second parameter defines the percentage of dead time in one communication cycle and could be described as follows: when T D2i means the time of one successful session and T C2i means the time of one collision session.Next three parameters define the percentage of T DIF S , T SIF S and T BO in one communication cycle: Additionally, for T DEAD and T BO the average values and the maximum values for every simulation cycle and distribution as a function of the number of communication sessions have been calculated.

V. SIMULATION RESULTS
The simulations were carried out using spreadsheet and the Monte Carlo statistical method.Four simulation variants were used and each variant was characterized by two parameters: the number of stations and the length of the data packet.Variant parameters are presented in the Table IV.The number of stations equal to 1 means that we analyze the network consisting of one AP and one station.
The maximal and average values of the T DEAD and its components (T SIF S , T DIF S and T BO ) both in microseconds and as their ratio to the total transmission time (T d2 + T c2 ) were calculated.The sum of T SIF S and T DIF S is constant and could be represent by two values.The first value equals 80 microsec (one DIF S and three SIF S) and it occurs, when the transmission is completed.The second value of 60 microsec (one DIF S and one SIF S) is the result of the collision.Dispersion of T DEAD is mainly the result of the dispersion of T BO .The maximal and average deviation of the T DEAD and T BO values is presented in the Table IV.We can observe, that dispersion of values is very big, what results from CWmax dispersion.
The ratio of time distribution of average and maximal values of T DEAD and its components to the summary transmission time is presented in Fig. 3.The relative ratios (in %) of different components are not constant due to the influence of two factors.Collisions diminish the active time, because there is no data transmission during collision.However, the influence of the T BO value on the T DEAD value is more significant and exists in both situations: when the transmission is successful and when there is a collision.The maximal value of T DEAD (e.g.900 microsec) could exceed the time necessary for the packet transmission for both packet sizes used in analysis (1540 and 2346 bytes), when the pure data transmission time is respectively 505 and 753 microsec.
T BO is the dominant component of T DEAD , when the network consist of one AP and one station.The situation changes, when the network consist of one AP and 10 stations.T DIF S is the dominant component for average values while T BO is dominant for maximal values.The distribution of relative (in %) ratio of T DEAD and its components to the summary time is presented in Table VI.The presented results indicate that there is: • Significant difference between maximal and average value especially for T BO , • Quite stable and recurrent ratio (in %) of T DEAD in the summary time for all analyzed variants, • Increase of average T DIF S influence for AP + 10 stations variant.
Significant deviation between average and maximal value of different dead time components shows, that there is a large difference of single transmission session parameters.The large spread of QoS of the transmission occurs and there is no simple method to predict high value delay resulting from high T BO value.
The distribution of the collision number as a function of the variant of the analysis is shown in Fig. 4.There is a significant increase of the collision number, when the network consist of one AP and 10 stations.The collision probability (ratio of collision in one simulation to 200 i.e. the number of sessions in one simulation) is about 6-7% for the network configuration consisting of one AP + one station.This means that we have approximately 12-14 collisions per 200 sessions.The collision probability increases for the network consisting of one AP + 10 stations and reaches the value of 27% what means 54 collisions per 200 sessions.The increase of collision number for the network consisting of one AP and 10 stations doesn't produce any significant increase neither of average nor of maximal dead time values.The distribution of the dead time value for 200 sessions within one simulation is presented in Fig. 5.We could conclude, that average and maximal value are recurrent, while the actual transmission conditions could have a large dynamism.This is caused by the DCF scheme itself.

VI. CONCLUSIONS
Typical analysis of the DCF scheme in literature concerns rather the possible achievable throughput, which is the most important parameter from the point of view of the best transmission QoS.There are however some root phenomena in the time domain.
Simulation results show that : a/ T DEAD could reach very high value for single transmission (even 900 microsec, the actual values for present simulation have a significant deviations), while the average and maximal values for repeated simulations are quite stable,    b/ the most important component of the dead time is T BO , however for the variant with one AP and 10 stations average values for T DIF S are higher than for T BO .
The final conclusions are as follows: • the presently used DCF scheme produces quite high differences between QoS of single transmission conditions, • the average dead time value could be estimated as about 20%.The further work concerning the reduction of the dead time (especially T BO ) could be interesting, while up till now some works concern rather the prioritization issue.

Fig. 1 .
Fig. 1.The activity (gray) and lack of activity (white) in the WLAN radio channel.Source: own preparation.

Fig. 2 .
Fig. 2. The example of communication with external station (not belonging to this network).Source: own preparation.

Fig. 3 .
Fig. 3. Ratio of T DEAD and its components to the summary time.Source: own preparation.

TABLE II TRANSMISSION
TIMES FOR DIFFERENT FRAME LENGTHS AND SOME STANDARD THROUGHPUT VALUES

TABLE I THE
CHOSEN PARAMETERS OF DCF AND RADIO CHANNEL