Abstract

Networks based on IEEE 802.11 standard are one of the main options for deployment in industrial environment. Degradation of throughput in congested networks and short-term unfairness are well-known drawbacks of 802.11 DCF and similar MAC protocols. Those shortcomings represent significant limitation in forecasted growth of wireless usage. This is especially important in industrial wireless networks (IWN) where the scalability of wireless MAC is one of the main requirements. In this paper, a novel self-adapting MAC protocol (SaMAC) is defined and mathematically modeled. SaMAC employs constrained countdown freezing enhanced with shifted window mechanism. As a result, the protocol outperforms 802.11 DCF standard as well as shifted contention window (SCW) and constrained countdown freezing (CPCF) protocols in achieved throughput, fairness, and jitter, while keeping simple implementation. Despite protocol’s simple design, it is shown that its mathematical model is extremely complex. For proposed protocol, the assumption of constant contention loss probability, which is normally used for modeling of MAC schemes, does not hold. In the presented multidimensional Markov chain model, a unique iterative method for determining contention loss probability is developed as well as a method for throughput calculation based on such a chain. Accuracy of the presented model is verified in several network scenarios. Considering the performance of the proposed protocol, authors believe that it could be of benefit to deploy it in heavily loaded wireless networks with timing constraints, such as IWNs.

1. Introduction

Due to their attractive properties, wireless networks with distributed Medium Access Control (MAC) are being increasingly deployed, and this trend is expected to continue in the foreseeable future. Well-known instance of such network is Wireless Local Area Network (WLAN), specified in IEEE 802.11 standard [1], which uses Distributed Coordination Function (DCF) for distributed medium access. Other examples of networks with distributed MAC include Wireless Sensor Networks (WSNs) [2], Vehicular Ad Hoc Networks (VANETs) [3], and Wireless Personal Area Networks (WPANs) [4]. Hence, multitude of distributed MAC protocols has been proposed in the literature, along with various enhancements of existing protocols.

Besides networks based on IEEE 802.15.4 specifications, wireless networks based on 802.11 standard are one of the main options for industrial wireless networks (IWNs) [5, 6]. While the DCF function from 802.11 generally offers formidable results, it does have certain weaknesses. Its short-term unfairness [7] and throughput degradation in highly saturated networks [8] have been well documented in literature. Furthermore, considerable increase of delay and jitter caused by MAC-level retransmissions in congested networks make DCF unsuited for critical real-time traffic [9]. Consequently, various protocols that try to address these issues have been proposed. However, it seems that most of the developed protocols focus only on fixing one of DCF’s drawbacks [1012], while preserving or even worsening the other [1315]. Other protocols, like idle sense [16] and quadratic backoff [14], improve DCF’s fairness, while obtaining the same or slightly higher throughput.

In this paper we concentrate on the mentioned shortcomings of 802.11 standard, by designing a new MAC protocol that offers higher throughput and fairness as well as lower jitter compared to 802.11 DCF, making it better suited for industrial deployment. Furthermore, achieved reduction of collision occurrences avoids unnecessary waste of energy needed for data transmission and reception, extending the lifetime of battery-powered devices.

The presented protocol, named self-adapting MAC (SaMAC), is based on the use of constrained freezing mechanism [17] and shifted contention window [18]. Constrained freezing reduces collision memory effect which was detected in DCF type of medium contention, offering higher throughput compared to DCF once the number of stations increases. On the other hand, use of shifted contention window (CW) forces selection of new backoff counter (BC) values from low priority window, for both winning stations and stations which are in the countdown for more than specified number of consecutive contentions. Presented SaMAC protocol does not employ any CW management algorithm and uses fixed CW, which is shifted from zero and is common for all active stations. This considerably increases protocol fairness compared to other MAC protocols. The increase in fairness is not accompanied with decline of the throughput, which is usually the case. On the contrary, SaMAC increases the throughput as well. Protocols like DCF need to experience a collision in order to react to increased network congestion by adjusting their CWs. Despite not using any CW management algorithm, SaMAC proactively responds to increasing levels of network congestion by prolonging the average time a station needs to access the medium, lowering number of collisions in the network and demonstrating self-adapting nature of the proposed protocol.

Extensive analysis of the proposed protocol was done through design of the mathematical model. Most MAC protocol models presented in the literature are based on the assumption that, from the observed station’s point of view, the probability that some other station starts transmission, i.e., the probability of contention loss for the observed station, is constant and independent of observed station’s state and of other stations. The validity of this assumption has been verified analytically [19] and experimentally [20] for 802.11 DCF, but for other protocols it is simply justified by the model’s accuracy [20].

However, model of the proposed SaMAC protocol based on the mentioned approach produces significant errors. This has led us to completely reexamine the modeling method in order to identify the source of discrepancy. Surprisingly, it is revealed that the assumption of constant contention loss probability does not hold for our specific protocol design. In order to create an accurate model, completely new modeling approach was developed. While still based on multidimensional Markov chain, our model determines the probability of contention loss individually for each state of the Markov chain. This is done through novel iterative concept, based on the predictable pattern of countdown during a single medium contention. With the appropriate changes in the structure of the underlying Markov chain, the presented iterative modeling approach can be used for modeling of any protocol for which the usual assumption of constant contention loss probability is not true.

The paper is organized as follows. Deployment of 802.11 networks in industrial environment is commented on in Section 2. 802.11 DCF protocol is presented as a basis for development and comparison with other distributed MAC protocols. Two protocols of interest, SCW and CPCF, are also presented in more detail. In Section 3, self-adapting MAC (SaMAC) protocol is defined. In Section 4, the need for new approach in modeling of SaMAC protocol is demonstrated and model of SaMAC is defined. In Section 5, a custom simulation tool and mathematical model of SaMAC are verified. Performance characteristics of the presented protocol are evaluated by comparing its results with other protocols in Section 6. Finally, in Section 7 we draw conclusions and indicate future work.

2.1. IWNs and IEEE 802.11 Standard

Wireless networks have been identified as an attractive option in distributed control systems, automation, and monitoring [22]. They offer flexibility, easy deployment, increased mobility, improved efficiency, and easier analysis of system performances. As such, industrial wireless networks are the key technology for the deployment of Industry 4.0 [23] and Industrial Internet of Things (IIoT) [24]. Some of the requirements that IWNs should satisfy are(i)reliability (reliable delivery of data in harsh environment with high level of interference and errors),(ii)scalability (efficient usage of channel bandwidth in wide range of network sizes),(iii)power-efficiency (avoiding unnecessary consummation of battery energy, improving longevity),(iv)timeliness (delivery of data with low and predictable delay, satisfying specific timing constraints),(v)security (overcoming the threat of the external interference).

Various technologies and standards have been employed in industrial environment, including IEEE 802.15.4 based variants, Bluetooth, and Ultra-Wide Band (UWB). Although it was not designed for use in the industry, IEEE 802.11 standard is one of the main technologies used for IWNs. Commercial products for IWNs from companies like Siemens (Scalance W), Cisco (Aironet 15xx), and Moxa (AWK) are based on 802.11- and 802.11-based solutions which are already applied for conditions monitoring [25] and automation control [26]. WLAN networks offer high data rates, rate adaptation, QoS assurance (802.11e enhancement), spatial multiplexing (802.11n enhancement), and simple interoperability with wired networks. However, high power consumption and expensiveness represent disadvantages of WLANs for industrial deployment [5]. In addition to this, the mentioned throughput degradation in congested networks make 802.11 networks unsuited for industrial deployment in scenarios with large number of communicating devices. Relatively high delay and jitter prevent their use when the small and constant delay is of importance, which is often the case. The throughput degradation additionally increases power consumption of the devices, since the (limited) energy is being wasted on transmission and attempts of reception of collided frames.

Regarding industrial application of 802.11 standard, great part of the work presented in the literature has been focused on fulfilling the requirements of real-time communication. In [2731] use of time division multiple access (TDMA) functions atop of 802.11 MAC is proposed. Modifications to packet retransmission scheme are considered in [3234]. Rate adaptation techniques are studied in [3537], while [38] aims to improve WLAN’s reliability in industrial environment. In [21] a new MAC protocol, based on 802.11e is proposed for use in IWNs with deadline-constrained periodic traffic. The protocol uses new backoff procedure, which includes doubling of CW after contention loss. Compared to EDCA, protocol from [21] decreases real-time packet losses due to missed deadlines.

2.2. 802.11 Distributed Coordination Function (DCF)

IEEE 802.11 standard [1] specifies Distributed Coordination Function (DCF) as the fundamental technique for distributed medium access. DCF is based on CSMA/CA [39] algorithm and Binary Exponential Backoff (BEB), and each data transmission is preceded by contention period, during which active wireless stations compete for medium access. Medium contention starts after the medium has been idle for Distributed Inter-Frame Space (DIFS) interval.

The contention is priority based: competing stations randomly select their priority numbers, called backoff counters (BC), from a priority space called contention window (CW), defined as , where represents the number of different priorities a station can select. Period of medium contention is divided into short periods called timeslots (TS) and the stations decrement their selected BCs in each timeslot during which the channel remains idle. When a station decrements its BC to zero, it wins the contention and starts transmitting data. Other stations, sensing that the medium has become busy, suspend the countdown process and save current BC values to be used in the next medium contention. Having received the data, the receiver sends a short ACK frame, acknowledging the successful transmission. If the transmitter does not receive the ACK frame, it assumes that there was a collision with another transmitting station. In that case, transmitting stations double their current contention windows, up to predefined upper value (). After each successful transmission, transmitting station resets its CW to minimal (initial) value . This CW management scheme represents BEB algorithm of DCF protocol.

Besides the basic access method, DCF defines a four-way-handshake method in which short RTS/CTS (Request To Send/Clear To Send) frames are exchanged before the data transmission. Station that won medium access sends RTS frame to which receiver responds with CTS. Only after the reception of CTS can the winning station start transmitting data, after which ACK frame is expected. This method introduces additional overhead to the medium contention process, but it shortens collision duration and can be used to eliminate well documented hidden node problem [40]. Both DCF access methods are shown in Figure 1.

The DCF has been extensively studied and various enhancements have been proposed to improve its performance. Great part of research is focused on effects of BEB algorithm in DCF and similar MAC protocols, and many other CW management algorithms have been presented in the literature. In [41], the use of exponential increase–exponential decrease algorithm is proposed as a substitute for standard BEB algorithm. Adaptation of the CW size based on estimated number of active stations is presented in [42]. In [14] authors propose polynomial CW increase after collision, and in [43] resetting of CW to initial size CW0 is proposed to be restricted depending on number of experienced retransmission failures.

While DCF is able to provide high throughput in networks with small number of active stations (), it is known to exhibit throughput degradation if the number of stations increases [7, 44]. To address this problem, different solutions have been presented in the literature. In the next two sections two specific approaches have been presented (SCW and CPCF algorithm) due to their good results and fairly simple implementations.

2.3. Shifted Contention Window (SCW) Algorithm

Although not identical, several authors have presented what can be recognized as the same class of CW management algorithms, called shifted contention window (SCW) algorithm [18, 4547]. The main idea behind SCW algorithm is that in certain conditions a station should not be allowed to randomly select a low value of backoff counter when entering medium contention. That means that the station’s contention window is shifted from zero and is defined as . This way the station is, statistically, given lower priority during the medium contention. By increasing , the station’s priority lowers and it will wait more time for medium access.

Illustration of CW management in a simple SCW algorithm is shown in Figure 2. The stations use un-shifted contention window in the initial backoff stage until experiencing collision, indicating congestion. After each collision, CW is shifted further away from zero, while after each successful transmission it is shifted back towards zero.

In [45, 46, 48] it was shown that SCW mechanism can be used to increase network throughput in congested networks, while not impeding high channel utilization in networks with small number of active stations, both in wireless local and personal area networks.

2.4. Constrained Priority Countdown Freezing (CPCF)

When two or more competing stations obtain the same priority number (i.e., BC) to be used in contention, priority collision occurs. Since in DCF all stations suspend BC countdown process when they sense that the medium is busy and use current values of BC in the next medium contention, every priority collision in a network is preserved through multiple contention periods, until it eventually results in a physical collision. In [17], this preservation of priority collisions is called collision memory. This can lead to an increase of the physical collision rate, which is called collision memory effect.

In order to mitigate or eliminate the collision memory effect, Constrained Priority Countdown Freezing (CPCF) algorithm was presented in [17]. CPCF introduces a new parameter, freezing limit , which limits the number of times a station can freeze and countdown BC, which is represented by the station’s freezing counter (FC). If the station loses in consecutive medium contentions, it is not allowed to freeze its current BC but is forced to randomly select a new BC to be used in the next contention. Thus, priority collisions can potentially be resolved before resulting in physical collisions. Flow diagram of a CPCF station is shown in Figure 3. It was demonstrated that the network throughput can be increased by selecting appropriate value of parameter , especially in congested networks [17].

3. Self-Adapting MAC (SaMAC) Protocol

The initial goal of our research was to develop MAC protocol that would address DCF’s throughput degradation and short-term unfairness, achieving fair allocation of channel bandwidth and high throughput for wide range of network congestion levels.

Stations using SaMAC protocol randomly select BC values from a single shifted contention window , but do not employ any CW management algorithm. Therefore, CW has only one stage; it is constant for all stations and is not changed after a collision or successful transmission. After random selection of BC, a SaMAC station is allowed to freeze BC countdown process due to contention loss in consecutive medium contentions. Once the limit is exceeded or the station wins the medium contention, a new BC is again selected from the shifted window CW. During medium contention, each SaMAC station maintains two variables: backoff counter (BC) and freezing counter (FC). During every idle timeslot of medium contention, selected BC is decremented by 1, and during every busy timeslot (i.e., when the station loses medium contention) FC is incremented by 1. This process continues through multiple medium contentions until the station either decrements its BC to 0, winning the medium access, or until its FC exceeds the value of the freezing limit parameter . In any of those two cases, the station resets its FC to zero and randomly selects new BC from the same shifted CW for next medium contention. Flow diagram of SaMAC protocol is shown in Figure 4.

Using shifted CW penalizes the stations that finished the countdown by not allowing them to access the high priority set of BC values , ensuring that the stations currently in the countdown process have higher chance of acquiring the medium successfully. On the other hand, use of constrained countdown freezing mechanism reduces collision memory effect by restricting the countdown process. SaMAC allows stations in the congested network to increase the total amount of backoff time to be greater than the maximal upper limit () by selecting new BC multiple times, owing to limited countdown freezing.

4. Mathematical Model of SaMAC Protocol

To understand the protocol’s characteristics and select the optimal values of its parameters, it was important to create appropriate mathematical model of SaMAC [49]. However, as it will be presented in the remainder of the section, creating an accurate mathematical model of the presented new protocol proved to be a very complex task, because of specific properties of SaMAC protocol. Unfortunately, certain assumptions which hold true for other protocols will no longer hold for SaMAC type of protocol. However, those specific properties which make the design of mathematical model complex are actually the reasons behind its good performance results. The model presented in this paper can serve as a foundation for developing mathematical model for any protocol of this type.

4.1. Modeling of Wireless Network Protocols

Most models of wireless networks are based on Bianchi’s model of IEEE 802.11 network [50]. Bianchi uses two-dimensional Markov chain to model the operation of a single observed wireless station, with one dimension representing backoff counter selection and countdown, and the other representing congestion window management processes [50, 51]. Thus, each state in the Markov chain represents a unique combination of the station’s current BC value and its contention window stage. Probability that the observed station starts transmission in a given timeslot is derived as a sum of probabilities of states in which the station’s BC equals zero. From τ and the probability that the station experiences collision when transmitting, throughput of the whole network is calculated.

The key assumption used in [50] is that the collision probability for the transmitting station is constant and independent of its backoff stage, i.e., of the number of retransmissions experienced. As noted in [52], probability of collision for the observed transmitting station is equal to the probability that the observed station experiences busy timeslot (i.e., contention loss) and freezes countdown process in a state with BC > 0. Therefore, the terms probability of collision, probability of busy timeslot, and probability of contention loss from the observed station’s point of view are used interchangeably in this paper. The assumption of constant contention loss probability significantly simplifies Markov chain that represents operation of a wireless station, since this probability determines transition probabilities between states of the chain. Accordingly, all transition probabilities in such a chain are equal..

Other simplifying assumptions used in Bianchi’s model are as follows: the channel is ideal (no unsuccessful transmissions due to errors caused by noise), stations are saturated (each station has always packets ready for transmission), and all stations can hear each other (single-hop network).

Many extensions of Bianchi’s model were published, aiming to better capture various details of 802.11 DCF networks, such as network of unsaturated stations [5355] and network with different traffic classes [56, 57]. The first model to correctly model DCF’s backoff freezing mechanism was presented in [52] where the third dimension was added to original Bianchi’s Markov chain in order to differentiate probability of collision after a busy and after an idle timeslot. Later models that accurately capture backoff freezing mechanism redefine the duration of a busy timeslot or introduce additional states to Bianchi’s model to differentiate the probability of a busy timeslot after an idle or after another busy timeslot [5860].

Besides the modeling of DCF, Bianchi’s model and its key assumption have been used as the basis for modeling of many other distributed wireless MAC protocols, some proposed for use in WLAN networks, and some proposed for use in other wireless networks, such as VANET or VLC (Visible Light Communication) networks [48, 6164].

Models of protocols that use SCW algorithm [46, 48] are also based on Bianchi’s assumptions, but Markov chain representing operation of a single station is formed in a way that, during the random selection of a new BC, a station cannot transit to a state in which BC is lower than for a given contention window stage. Comparing model results with simulations, it was shown that the model’s error in throughput estimation is not greater than 7% for networks with up to 60 stations [48].

A model of CPCF protocol was presented in [65], based on Foh’s three-dimensional model [52]. The operation of a single CPCF station is modeled using a four-dimensional Markov chain, where the additional dimension is used to represent station’s incrementing and resetting of freezing counter (FC). Probability of contention loss is assumed to be constant and dependent only on the state of the previous timeslot (idle or busy). Model’s throughput estimation accuracy is in the 1% range for networks with up to 50 competing stations.

4.2. Model of SaMAC Protocol with the Assumption of Constant Contention Loss Probability

In this section, results of such a conventional approach in mathematical modeling of considered SaMAC protocol are studied. The model itself is not presented in detail, but only its results. The conventional model is based on the model of CPCF presented in [65] and uses the same assumptions, most notably the assumption that the probability of a contention loss is constant. In accordance with the SaMAC protocol, Markov chain used for modeling of single station’s operation contains only one contention window, shifted from zero. In order to examine its accuracy, results of the model are compared with the results obtained from software simulations of SaMAC. The comparison reveals great discrepancies between the two sets of results. To illustrate, in Figure 5 relative errors in the model’s throughput results for four sets of parameter values of the considered SaMAC protocol with 1040B frames are presented.

Obviously, the model highly overestimates the network throughput, especially in the congested network with many active stations. Compared to simulation results, relative error of estimated throughput in considered scenarios reaches up to 40%. Error depends on various parameters, such as size of used data frames, parameter values, and network size. Generally, it increases with a shift of used contention windows from zero and with the number of active stations in the network, while decreasing with the increase of the freezing limit . Given the results presented in Figure 5, it is clear that the conventional approach to modeling of SaMAC protocol is not applicable.

4.3. Validity of Constant Collision Probability Assumption

Several network scenarios have been considered in order to determine contention loss probability of the SaMAC protocol. Probability of a busy timeslot for each simulated network station was recorded. The results show that contention loss probability is not constant for SaMAC but that it depends on the station’s backoff counter and freezing counter values. To illustrate, Figure 6 shows the probability of contention loss for a single station in a SaMAC network, obtained from MATLAB simulations. The simulated SaMAC protocol had the following parameter values: (i.e., and ), . Contention loss probability is shown for a network of 20 active stations, as a function of the observed station’s BC and FC values.

As can be seen from the figure, the contention loss probability function can be divided into three domains:(1)low BC values domain: the probability increases with the decrease of BC and FC;(2)central domain: the contention loss probability is constant, independent of BC and FC values;(3)high BC values domain: the probability increases with the decrease of BC and FC.

Due to space limitations, graphs for SaMAC with different parameter values are omitted, but it should be noted that the recorded probability of contention loss follows the same pattern in all simulated network scenarios. The widths of the first and the third domain are roughly equal and determined by value, with central domain occupying the rest.

This leads to the conclusion that the constant contention loss probability is obviously not an inherent property of distributed MAC protocols that use BC countdown in medium contention process. Therefore, validity of the usual assumption should be confirmed beforehand if the conventional approach is used for modeling of new proposed MAC protocols. On the other hand, in order to accurately model a protocol with inconstant contention loss probability, one should estimate the contention loss probability for each state in the underlying Markov chain. This approach is presented in more detail in the following sections.

4.4. Medium Contention Observations

In this section, a detailed inspection of medium contention process in SaMAC network is performed. Figure 7 shows an example of medium contention where five active stations (x1-x5) use the same contention window, shifted from zero, with and . Additionally, stations employ CPCF algorithm with the freezing limit set to . Each station’s state during a contention is determined by its BC and FC values and represented by the station’s position in the depicted BC-FC matrix. Five discrete moments are shown, delimiting four consecutive timeslots, starting with t = 0 when the contention is started (e.g., in t = 0 station x4 has BC = 5 and FC = 1).

Since no station has the right to access medium in t = 0, during the first timeslot the stations decrement their respective BC values, shifting to the left by one position in the BC-FC matrix. The same decrementing of BC recurs after t = 1 and t = 2. Since it decrements its BC to zero, in t = 3 the station x2 wins the medium and transmits data during the fourth timeslot. During the busy timeslot, other stations increment their FC, if permitted by their current FC value and the value of freezing limit (stations x1, x4, and x5). On the other hand, the winning station (station x2) and stations not allowed to increment FC (station x3) reset their FC and randomly select new BC, taking one of the shaded initial states in BC-FC matrix.

In the presented medium contention a specific countdown pattern can be recognized. All stations behave in the same manner from the beginning (t = 0) until the end of the contention (t = 4). Their positions in the BC-FC state plane are shifted to the left by the amount of empty timeslots in the contention, relative to t = 0 (Figure 8). This pattern of stations in the BC-FC matrix is only broken during the busy timeslots, when the winning station (or more winning stations, in case of a collision) and the stations that are not allowed to increment FC randomly select new BC, taking one of the initial states, while all other stations shift up by one position.

From these observations, one can conclude that the probability distribution of station’s states at the end of the medium contention is the same as the distribution at the start of contention, but shifted to the left by the number of idle timeslots in contention. The number of idle timeslots represents the duration of the contention expressed in timeslots. Additionally, with a given probability distribution of states at the start of a busy timeslot, the distribution after the timeslot can be obtained by shifting up by one the probabilities of states with BC > 0 and , and assigning all initial states equal probability. These conclusions are used as the basis for the mathematical model of SaMAC protocol.

4.5. Markov Chain Model of a Single SaMAC Station’s Operation

Consider a network of active wireless stations communicating using SaMAC protocol defined in Section 3. In modeling of such a network, several common assumptions are used:(i)channel is ideal,(ii)there are no hidden stations (one-hop network),(iii)there is an unlimited number of retransmissions,(iv)timeslots are synchronized for all stations,(v)ACK and CTS timeouts and EIFS times are ignored.

However, the usual assumption of the constant contention loss probability is not used.

The presented model is defined as follows. Let and represent the values of the BC and FC for a given station at a timeslot t, respectively, and let represent the channel state during the previous timeslot ( if channel was busy during the previous timeslot, and if it was idle). This extra information is needed since the probability of contention loss depends heavily on the channel state during the previous timeslot. Then defines the state of the station at timeslot , and during operation each station goes through a sequence of such states. After idle timeslot a station will decrement its BC to find itself in the state . If the observed station does not start transmitting in the current timeslot, and some other station starts its transmission, the observed nontransmitting station will increment its FC to find itself in the state . This procedure continues until the observed station decrements its BC to 0 and starts transmitting or loses the contention when its FC equals . In any of these two cases, the station resets FC to zero and randomly selects a new BC, to find itself in the state , where . These states are called initial states (the lowest row of states in Figure 9), and from one of them a station reenters the countdown process. The contention window is constant, and a new BC is uniformly selected from the range . Therefore, the probability of selecting each BC is the same and equals , where .

In the proposed model, operation of a single station is modeled using the three-dimensional Markov chain presented in Figure 9, and the state represents the state of the station. Let us adopt the notation . One-step transition probabilities in the chain are given withProbabilities of all other one-step transitions equal zero. Probability that a station experiences a busy timeslot (i.e., a contention loss) following an idle timeslot is not constant but depends on the station’s current BC and FC values and is denoted by for a station with and . Accordingly, probability of an idle timeslot following another idle timeslot is denoted by . Since all stations in the modeled SaMAC protocol use shifted contention windows, there is no possibility that any station randomly selects BC=0. As a result, there is no possibility of two or more consecutive busy timeslots and the probability of an idle timeslot after a busy timeslot equals 1.

In order to effectively model SaMAC wireless network, probability distribution of states and their transition probabilities in the underlying Markov chain must be determined. Since contention loss probability in SaMAC is not constant, these probabilities cannot be determined simply from transmission probability, as in conventional MAC models. In the presented model of SaMAC protocol, probabilities of all possible trajectories that lead the observed station from an arbitrary initial state back to one of initial states are determined first. These trajectories represent transitions of the station in Markov chain during multiple and at most medium contentions (because of limited freezing mechanism). Calculation of the station’s transition probabilities from the start of a contention to the start of the next contention is based on observations from Section 4.4. By accounting for all possible combinations of contention durations for consecutive contentions, conditional states’ probability distribution after a busy timeslot is obtained. Probability distribution of all states in the Markov chain is determined in two steps:(i)first, conditional probability distribution is estimated using the iterative procedure described below; distribution represents the conditional probability of states after a busy timeslot (states with ), given that the previous timeslot was busy;(ii)afterwards, the probability distribution of all states in the Markov chain (including the states after an idle timeslot) and probabilities of contention loss in each of these states are derived.

Once the probabilities of all states in the Markov chain and of one-step transitions have been determined, probability of an idle timeslot and of a collision is calculated, and the model is completed with network throughput calculation.

4.6. Iterative Procedure for Determining the Probability Distribution of States after a Busy Timeslot

Calculation of the probability distribution is based on the observation that the probability distribution of states at the start of contention can be obtained from the known probability distribution at the beginning of the previous contention, by shifting probability matrix appropriate number of positions to the left and one position up, while assigning initial states an equal probability.

Iterative process of estimating probability distribution is carried out as follows:(1)Initially, probability distribution is assumed to be uniform; i.e., all states in the Markov chain that represent the station after a busy timeslot (states with ) are assumed to have equal probability. These are the states from which the station enters medium contention. Distribution is assumed to be the same for all active stations.(2)For the observed station in one of the initial states , probabilities of all possible combinations of contention durations, expressed in the number of idle timeslots, for consecutive contentions, are derived from the probability distribution .(3)New probability distribution is derived from the probabilities of contention duration combinations.(4)Filtering of the probability distribution is made in order to assure that the distribution converges to a stable state , where is a filtering constant of common EWMA algorithm tuned for best stability-complexity compromise.(5)Steps (2)–(4) are iteratively repeated until probability distribution of states becomes stable (up to a predefined threshold).

It is important to note that we have no prior knowledge on the appropriate probability distribution . For that reason, uniform distribution has been selected as the initial distribution in the first step of the iterative process. Fixed value of the filtering constant has been used in this paper, since it has been empirically determined that this value provides good compromise between the stability and computation speed for wide range of considered scenarios.

4.6.1. Probability Distribution of Combination of Contention Durations

The goal of the second step of the iterative process is to determine, given a presumed distribution (initial or obtained in the previous iteration), the probability of each combination of contention durations for consecutive contentions from the point of view of the observed station occupying one of the initial states.

First, the probability for each possible duration of the first contention is calculated, using expressionwhere represents the probability that the medium contention consists of idle timeslots and denotes the (assumed) conditional probability of state given that the station is in one of the states representing a station after a busy timeslot (states with ). The minuend in (2) is the probability that each of remaining stations has BC greater than , while subtrahend is the probability that the BCs of all remaining stations are greater than .

After the probabilities of all possible durations for the first contention have been calculated, for each of these durations distribution is suitably adapted using procedure described below. Using the adapted distribution and (2), probabilities of all possible durations for the second contention are calculated. For each combination of the first two contention durations, distribution is adapted again, and probabilities of all possible third contention durations are determined. This continues until probabilities of all combinations of contention durations for consecutive contentions are obtained.

4.6.2. Adaptation of the Probability Distribution b1

Suppose that the distribution before the previous contention is known and that the contention lasted idle timeslots. Before the calculation of probabilities of durations for the next contention, must be adapted in such a way that the probabilities of states are annulled if or , since the stations occupying those states would have counted their BC values down to zero during the previous contention or would not be allowed to increment their FC after the loss of the contention. Afterwards, probabilities of all other states in are shifted positions to the left and one position up, mimicking the stations’ process of decrementing BC and incrementing FC during the contention. The probabilities of all initial states , where , are assigned the probability equal to the sum of probabilities that have been annulled and divided by , assuring that the sum of probabilities of all states remains 1. Therefore, given that the previous contention consisted of idle timeslots, adaptation of distribution for the calculation of probability of the next contention duration is performed using

The adapted distribution is used to calculate probabilities of all possible durations of the next contention, given that the distribution before the previous contention was and it contained idle timeslots.

Figure 10 is an example of such a probability distribution adaptation process for SaMAC protocol with , , and . Each position in BC-FC matrices represents assumed probability of one state in Markov chain at the beginning of contention: the first contention in Figure 10(a), the second in Figure 10(b), and the third contention in Figure 10(c). Shaded positions represent probabilities that might be greater than zero. Certain probabilities (pA, pB, and pC) are particularly noted in order to improve understanding of the shifting of the probability matrix during the adaptation process.

Let denote the probability that the observed station loses in the th medium contention after idle timeslots, given that the first contention lasted idle timeslots, the second lasted , the third , etc. Matrices shown in Figure 10 represent the adaptation of distribution for the calculation of probability of duration of the third contention if the first contention contained two and the second contained three idle timeslots . Figure 10(a) shows probability distribution b1 obtained in step (1) or step (4) of the iterative process. This distribution is used to determine probability that the first contention contains two idle timeslots . Figure 10(b) represents probability distribution used for calculation of the second contention’s duration probability, given that the first contention consisted of two idle timeslots. The distribution is obtained by shifting the initial assumed distribution, shown in Figure 10(a), by two steps to the left and one up in (3). While doing this, some probabilities are shifted outside of the probability matrix. Those probabilities are added together and divided by , defining probabilities of initial states (4), shaded purple in Figure 10(b). This distribution is then used to calculate probability that the second contention contains three idle timeslots, given that the first contained two . Afterwards, the distribution is adapted again in order to obtain probability distribution for the calculation of the third contention’s duration probability. The distribution is shifted three positions to the left and one position up. Again, probabilities from positions that are annulled are added together and used to determine probability of initial states (shaded green in Figure 10(c)). Finally, this distribution is used for the calculation of probability of duration of the third contention, given that the first contained two and the second contained three idle timeslots .

After repeating this process for consecutive medium contentions, the probability that the observed station transitions from the initial state to state can be expressed as the sum of probabilities of all combinations of consecutive contention durations that last idle timeslots combined:such that

To illustrate, Figure 11 shows six possible trajectories that take a station from the state to the state . Transitions from to and from to are omitted from the figure since they happen with probability 1 for all trajectories. Each matrix cell in Figure 11 represents certain combination of station’s BC and FC values after an idle timeslot, and coordinates of dots on trajectories represent station’s BC-FC values when it loses medium contention. For example, green line represents the trajectory that a station would take if the first contention contained one idle timeslot (contention loss at and FC = 0) and the second and the third contention contained two idle timeslots each. That means that the probability of the green trajectory is . To calculate the probability , one needs to calculate probabilities of all 6 trajectories and sum them as in (6).

Thus, probability of all states that represent a station after a busy timeslot can be expressed as a sum of probabilities that the station gets to that state from one of the initial states, using the following equation:where is the probability of each initial state after a busy timeslot. From the normalization conditionthe probabilities of initial states are calculated, and consequently probabilities of all other states in the chain.

The presented process represents steps (2) and (3) of the iterative modeling of SaMAC station’s operation, and the probability distribution obtained from (7) and (8) is filtered (step (4) of the iterative process) and used in the next iteration. Obviously, the process of deriving the probability distribution of combination of contention durations for consecutive contentions is very computationally expensive process, with computational complexity of .

4.7. Probability Distribution and Probability of Contention Loss

After the probability distribution becomes stable, iterative calculation of is terminated and the probability distribution of all states is determined, as well as the probability of contention loss in every state . Since is the probability of state given that the station is in one of the states following a busy timeslot, and is unconditional probability of that state (i.e., in any timeslot, following a busy or an idle timeslot), it is obvious thatThus, probabilities can be easily expressed as a function of for every .

From the regularities of Markov chain shown in Figure 9, one can conclude that . Similarly, for the rightmost states in every chain row, holds. State can only be reached from the state , and the probability of transition is , the following holds:Probabilities of other states in the underlying Markov chain are calculated from

Using (10), (11), and (12), probabilities of all states in Markov chain can be expressed as a function of the probability of the initial state , and probabilities of contention loss in those states are calculated. Finally, from normalization condition, probabilities of all states in Markov chain are determined.

4.8. Probability of an Idle Timeslot and Collision Probability

After determining the probability distribution of states and the probability of a contention loss in each state , the probability of an idle timeslot and collision probability can be calculated.

In various models presented in the literature and based on Bianchi’s assumptions, these probabilities are calculated from the probability, usually denoted by , that the observed station starts to transmit in a random timeslot. However, this approach cannot be applied to SaMAC protocol modeling, since the probability that a random station starts transmitting is not constant, as shown in Figure 6.

In the model proposed it is assumed that the probability that an observed station starts to transmit is constant only in those timeslots in which at least one of active stations (including the observed station) transmits data. Therefore, the assumption of a constant probability of a medium access is replaced with more stringent assumption and limited only to busy timeslots.

Probability is the probability that at least one of remaining () stations wins the medium when the observed station is in the state . If ,   represents the probability that the observed station experiences collision when it wins the medium in the state . Hence, the probability that the observed station experiences a collision, given that it wins the medium, is calculated as the weighted sum:Probability represents the conditional probability that at least one of the remaining () stations starts transmission, given that the observed station transmits. Hence, assuming constant probability of transmission in busy timeslots for all active stations, the probability of transmission in busy timeslot for each station is given withNow collision probability and probability of successful transmission can be obtained as

The probability of an idle timeslot is determined as a sum of probabilities that the observed station experiences an idle timeslot in each state of Markov chain. Of course, states with BC = 0 are omitted, since in those states the observed station wins the medium:

Product in the square brackets represents the probability of an idle timeslot after another idle timeslot, while represents the probability of an idle timeslot after a busy timeslot.

4.9. Throughput Calculation

Finally, throughput for wireless network of active SaMAC stations can be obtained aswhere represents the duration of an idle timeslot, is average payload size, and and are average times of channel being sensed busy during successful transmission and during collision, respectively.

Duration of collision and that of successful transmission depend on the technology and parameter set used in the physical layer and should be differentiated based on the access method used (basic method versus RTS/CTS). Let , , and denote durations of control frames RTS and CTS and MAC acknowledgement, respectively, let denote average time needed for transmission of MAC data frame, including preamble and PHY and MAC headers, and let be propagation delay. For basic access method, times and areFor RTS/CTS access mechanism, we have can be obtained as a sum of durations of PLCP preamble, PLCP header, MAC header, and, finally, the average duration of MAC frame payload itself:

5. Simulation Tool and Model Verification

5.1. Simulation Tool Verification

To evaluate SaMAC performance, two simulators are used: ns-3 and custom MATLAB simulation tool. ns-3 [66] is a discrete-event network simulator that is often used in network research, and implementation of 802.11 set of standards in ns-3 has been validated in literature [67]. However, it uses whole protocol stack in order to simulate network operation as accurately as possible. This can introduce significant overhead, specifically when testing MAC protocols. Therefore, a custom simulation tool was written in MATLAB to evaluate SaMAC protocol’s performance.

To verify accuracy of our custom simulation tool, its results are compared with the results obtained from ns-3 simulator, for several network scenarios and for both SaMAC and 802.11 networks. For that reason, SaMAC protocol (as defined in Section 3) was added to ns-3 and simulations of single-hop ad hoc network with ideal channel and saturated stations with turned off frame capture effect were run on both simulators. 802.11 and SaMAC networks were considered and the number of active stations was varied from 3 to 50. In order to examine simulation results for both older and newer versions of 802.11 standard, two sets of simulations were run, with one considering 802.11g and the other 802.11n standard. Accordingly, two sets of simulations were run for SaMAC protocol, with the other set, denoted SaMACn, mirroring advances of the 802.11n standard. 802.11n has new mechanisms implemented in physical layer, manifested in MAC layer primarily through increased data rate. Same as 802.11n standard, SaMACn protocol is capable of sending more than one data frame in a single medium access. Maximum amount of data sent per transmission is determined by max MSDU and max MPDU parameters. Since only saturated stations are considered, the amount of data sent in every transmission is defined by these parameters. Network parameters used in both simulators are presented in Table 1.

It should be mentioned that and do not denote the same thing in DCF and SaMAC protocols. In DCF, and denote the upper bound of the initial () and maximal contention window, respectively, while the lower bound is zero for all DCF contention windows. On the other hand, SaMAC uses only one congestion window (shifted from zero) and does not include any CW size manipulation algorithm. Thus, for SaMAC protocol, and denote lower and upper bound of the used CW.

Figure 12 shows the difference in recorded MAC throughput between MATLAB and ns-3 simulators, expressed as a percentage of throughputs recorded in ns-3 simulator for considered scenarios. As can be seen, the simulators produce almost identical results for both simulated protocols and both versions of each protocol, with the greatest difference in recorded throughput being less than 0,3% in networks with up to 50 stations. Thus, it can be concluded that the custom MATLAB simulator provides quite reliable results. MATLAB simulator is much simpler and faster than ns-3 simulator, optimized for MAC-level network simulation, and allows simple extraction of results. Therefore, further simulations are performed using this simulator.

5.2. SaMAC Model Verification

To verify presented model, its results are compared with the results of simulations of a SaMAC network. Single-hop ad hoc network of saturated stations was simulated. The simulation time was measured in timeslots. Each network scenario was run 30 times and lasted 1 million timeslots. Only data from the final 0,9 million timeslots were taken into account in order to capture steady state condition results. Network parameters used in simulations and model calculations are the same as in Table 1. These values are in accordance with 802.11-2007 and 802.11n-2009 standards. Simulation scenarios included various numbers of active stations in the network (from 3 to 50), window sizes , lower bounds , and one of two MSDU sizes: 1040B and 290B. These sizes were selected in order to detect possible deficiencies in model’s throughput estimation. Namely, in the case of a network with small number of active stations and small payloads (290B), a large part of time is spent in medium contention, so it is important to correctly estimate probability of an idle timeslot. On the other hand, in networks with greater number of active stations and large data frames (1040B), transmissions take up most of the time. Thus, to correctly estimate network throughput, model should give correct estimations of collision and successful transmission probabilities.

In the first step of model validation, we verify the iterative process used to obtain conditional probability distribution of states after a busy timeslot. Stable distribution from the model is compared with the conditional probability of states after a busy timeslot recorded in simulations. Figure 13 shows these probabilities for SaMAC network with 20 active stations, contention window size , lower bound , and freezing limit . Probabilities for each FC value are shown as a function of BC.

The figure shows that the iterative algorithm fairly accurately predicts probabilities of states after a busy timeslot. However, certain discrepancies exist in the areas where the probability of a state is not constant, but increases or reduces with the increase of BC for a given FC. We suspect that this difference is due to some correlations between stations that were ignored by our model (e.g., the fact that, owing to use of shifted window, there must be at least idle timeslots during consecutive medium contentions). In scenarios with different network parameters values it was noticed that these discrepancies in probabilities slightly increase with the increase in number of active stations and .

The conditional probability distribution obtained from model’s iterative process is used to obtain the (unconditional) probability distribution of all states and the probability of contention loss in each state. These probabilities are shown in Figure 14 and compared with the results obtained from simulations. Again, results for network with 20 active stations, , , and , are shown. Certain errors in model’s results for both sets of probabilities can be observed, caused exclusively by the errors in model’s estimation of conditional probability distribution . Indeed, if the conditional probability distribution recorded in simulations is used in the model for calculation of unconditional probabilities of states and of contention loss in those states, model provides accurate results, verifying correctness of the method presented in Section 4.7. However, it is important to notice that the model accurately estimates probabilities of contention loss when the observed station’s BC equals zero. Correct estimation of these probabilities is significant for the accuracy of the model’s network throughput estimation, since they are used for the calculation of the collision probability.

Probabilities of an idle timeslot and timeslots containing a collision or successful data transfer obtained from the model and simulations are compared in Figure 15. It should be noted that and . Results of SaMAC protocol with and different values of () and freezing limit () are shown as a function of the number of active stations in the network. Model’s results, depicted with lines, and simulation results, represented by dots, coincide in Figure 15, since the errors in model’s estimation of depicted probabilities are less than 2%.

Finally, using these probabilities network throughput is obtained, and the results are presented in Figure 16. Additional scenarios with different values of network parameters are also shown in order to verify model’s accuracy in various conditions. Dots represent simulation results which are compared with presented model’s results. Network throughput is expressed as a portion of channel bandwidth and shown as a function of the number of active stations in the network, from 3 up to 50 stations. Two sets of data are presented, for MSDU sizes of 1040B and 290B. It can be seen that the presented model closely follows the simulation results. The largest error in throughput estimated by model is recorded for scenario with 35 stations, , , , and 1040B payload, where the relative error in estimated throughput equals 1,9%. As shown in Section 4.2, unjustified use of constant contention loss probability assumption would result in model’s errors of up to 40%. However, by determining contention loss probability individually for each state of the Markov chain, the presented model of SaMAC network manages to accurately estimate network throughput.

In order to examine reliability of presented model in networks with higher data rates, in Figure 17, we compare throughput obtained from model and simulations for SaMACn network. Since the medium access procedure for both SaMAC and SaMACn is the same, model based on the chain in Figure 9 can be applied for SaMACn. The only adjustments needed are setting the payload size to the one defined by max MSDU and max MPDU parameters and setting the appropriate transmission durations (for successful transmissions and for collisions), as well as IFS and ACK durations. Parameters used in model and simulations are the same as those in Table 1. Only results of scenario with 1040B frames are presented. Again, the presented model is shown to accurately predict the network throughput, regardless of the network size and protocol parameters’ values, with relative errors compared to simulation results being less than 2%.

The main causes of inaccuracies in our model’s throughput evaluation are errors in the estimation of the probability distribution and of the collision probability . These two have approximately the same contribution to the overall error. Indeed, when the distribution obtained from simulations is used for calculation of the distribution and transition probabilities in our model, is correctly estimated while the overall relative error in throughput estimation halves.

The presented results show that too constrained countdown freezing (e.g., ) results with lower throughput, since the stations are frequently forced to restart the countdown process by selecting new BC value. In small networks, SaMAC with small () achieves high throughput, but it quickly degrades if the number of station increases. On the other hand, selection of too great value of parameter () results with better throughput in large networks, but worse in small networks with small data frames. Considering all scenarios, the best results are provided by protocol with and .

6. Performance Evaluation of SaMAC Protocol

6.1. Throughput of SaMAC Protocol

In order to evaluate performance of SaMAC protocol, we compare its throughput results with 802.11 network. Results for both lower (802.11g and SaMAC) and higher (802.11n and SaMACn) data rate networks are compared. Additionally, results of SCW (as defined in [46]) and CPCF protocols are also presented. For higher data rate network, these protocols were enhanced with data aggregation mechanism and are denoted SCWn and CPCFn. Again, single-hop network with ideal channel and saturated stations was simulated. Values of network parameters used are the same as in Table 1. Simulation scenarios included various numbers of active stations in the network (from 3 to 50) and one of two MSDU sizes: 1040B and 290B. For the higher data rate scenarios, only 1040B frames were used, since frame aggregation negates the influence that frame size has on overall throughput in saturated conditions. Recorded throughput is expressed as a portion of channel bandwidth and is shown as a function of the number of active stations in the network.

Despite not including CW size manipulation algorithm, Figure 18 shows that SaMAC provides higher network throughput in networks with a large number of active stations, in both low and high data rate networks. Compared to DCF, the increase in throughput is more than 20%. The reason for this is the fact that in congested network, and owing to imposed freezing limit , SaMAC stations are frequently forced to reset FC and select new BC, restarting medium contention process. This prolongs the time needed to count BC down to zero and reduces the probability of accessing the medium in a random timeslot, decreasing collision probability. While DCF, SCW, and CPCF stations need to experience a collision to adapt their CW, a mere increase of network congestion causes SaMAC stations to more frequently abort current BC countdown process and select new BCs from shifted window. The duration of the countdown process is adaptively increased by frequent random selections of new BC, which serves as an equivalent to the increase of CW size in other protocols. Therefore, SaMAC protocol is proactive in responding to higher network congestion levels, avoiding collisions. For networks with small number of active stations (), SaMAC achieves lower throughput, because of longer duration of medium contention owing to its use of shifted contention window.

As evidenced in Figure 19, good throughput results of SaMAC are consequence of its reduced collisions compared to other protocols. DCF with has from 200% to 50% greater probability of collision (from channel’s point of view) than SaMAC protocol, for networks with 3 and 50 stations, respectively. For DCF with probability of collision is from 80% to 40% greater. Since SCW and CPCF protocols react to collisions more aggressively than DCF, they experience 60% to 7% more collisions than SaMAC.

To further demonstrate adaptive nature of SaMAC protocol, network with varying number of active stations was considered and SaMAC throughput results are compared with DCF, SCW, and CPCF protocols. In a simulated scenario, only 5 stations were active at the start of simulation time. In the 10th second of the simulated time additional 10 stations were added to the network. In the 20th second of the simulation time, 20 new stations were added, bringing the total number of active stations to 35. In the 25th second 30 stations were removed from the network, lowering the number of active stations back to 5. The stations used 1040B frames and lower data rates (6Mbps channel). Network throughput was recorded every 0,2s and the results are shown in Figure 20(a). Not only does SaMAC offer the highest throughput during the whole simulation time, but it is also the fastest among considered protocols to converge to steady throughput levels at the times of congestion increase. This is evident at t = 10s and t = 20s, when the number of stations in the network increases from 5 to 15 and from 15 to 35, respectively. Throughput of other examined protocols significantly deteriorates at those moments, before rising to steady value for the considered congestion level. The time needed to recover after congestion increases and reaches steady value is about 1s for all other protocols. On the other hand, SaMAC does not experience such a throughput decline but immediately adjusts to steady state throughput simply by experiencing more frequent contention losses caused by increased congestion. This is evidenced in Figure 20(b). While other protocols have spikes in recorded collision probability at times of congestion increase (t = 10s and t = 20s), SaMAC does not experience such maximums. All protocols are shown to be equally fast in reaction to network congestion decrease (t = 25s).

6.2. Fairness Evaluation of SaMAC Protocol

In Figure 21 fairness results of SaMAC and other considered protocols are compared. Jain’s fairness index (JFI) [68] is calculated for various intervals (0,2s–10s) and shown for networks with 6 and 20 active stations. As expected, SaMAC clearly outperforms other considered protocols by considerate margin. JFI value of 0,95 is often considered as a threshold for differentiation between fair and unfair resource allocation [6971]. In a network with 6 stations, SaMAC attains threshold value (i.e., JFI > 0,95) in less than 0,2s, while other protocols require from 0,5s (DCF with ) to 2s (DCF with ). In a network with 20 stations, SaMAC is again the fairest protocol, reaching fair allocation in less than 0,7s. Other protocols require from 7s (DCF with , CPCF) to more than 10s (DCF with 6, SCW) for JFI to reach 0,95.

The reason for such a superior performance of SaMAC in terms of fairness is its use of a single contention window, common for all network stations. While SCW and CPCF can be used to improve DCF’s throughput in congested networks, they still employ CW management mechanism and do not alleviate DCF’s unfairness. On the contrary, by the use of those mechanisms they can even decrease network fairness, as evident in the case of SCW in a network with 20 stations. On the other hand, SaMAC does not discriminate against the stations that experienced a collision by increasing the size or shift of its CW. Considering CW used for BC selection, all stations are always equal in SaMAC. Thus, SaMAC can achieve fair resource allocation even in very short intervals.

6.3. Jitter and Delay of SaMAC Protocol

In saturated conditions, total delay that a generated frame experiences depends on how congested the transmission buffer has become and this is determined by the difference in the offered load and saturation throughput. Therefore, the delay depends on duration and degree of saturation conditions. On the other hand, delay experienced by head of line (HOL) frame depends on the rate of successful transmission of data frames and is reciprocal to the network throughput (Figure 18). Since low delay and jitter are one of the main requirements for real-time traffic, in this section we focus on HOL jitter and maximal experienced delay. Jitter results of SaMAC are compared with other protocols in Figure 22(a). Average jitter per station is shown for 6Mbps network with 1040B frames, and the results are normalized to SaMAC. Among the considered protocols, SaMAC offers the lowest jitter: 2 to 4 times lower than others, depending on the number of active stations. This is, again, due to common and fixed CW used in SaMAC. Owing to this, all stations have similar BC values and excessive waiting for medium access after (consecutive) collisions is avoided. Additionally, Figure 22(b) shows maximal delay recorded during the simulation (50s) experienced by any successfully transmitted HOL frame, averaged over 10 simulation runs. Increase of delay because of retransmissions is especially evident in CPCF protocol (Figure 22(b)), where stations that experienced collisions can get locked in high BC values for a long time. This is not so accentuated for DCF and SCW stations. Still, the recorded maximal delay for DCF is from 2,2 to 12,1 times greater than in SaMAC network (in a network with 50 and 3 stations, respectively). Results for smaller frames (290B) and higher data rates (n-version) are omitted since the results are very similar to those in Figure 22.

6.4. Traffic Differentiation Using SaMAC

In this section we explore a possibility of traffic differentiation based on SaMAC protocol. To do so, we consider a network consisting of high priority stations and low priority stations. High priority stations transfer real-time data, such as media streams or some real-time controlling data. Low priority stations transfer background data whose timely delivery is not of critical importance. However, low priority stations should not be completely shut off from the medium by high priority stations. For that reason, high priority stations use and low priority stations use . Congestion windows are selected so there is an overlap between CWs of high and low priority stations, giving low priority stations a chance to win medium access. Freezing limit is set to 3 for all stations.

Figure 23(a) shows portion of channel time used by an average high and low priority station, and average delay experienced by a station is shown in Figure 23(b). It should be noted that logarithmic scale is used. Each network consisted of 5 high priority stations, and the number of low priority stations was varied from 5 to 45, making total of 10 to 50 active stations. Low rate network (6Mbps) and 1040B frames were considered. Figure shows that traffic prioritization can be easily accomplished by selecting appropriate SaMAC parameters’ values for different classes of traffic (similar to 802.11e EDCA). By shifting a CW closer to zero, or by increasing the freezing limit, a station’s priority is increased. High priority stations used the most of the channel time (92% in a network with 5 low priority stations, and 73% in a network with 45 such stations). Consequently, high priority stations experienced very small delays, even in a network with total of 50 stations (16ms). The same approach can also be applied on different priority classes of traffic transmitted by the same station.

In [21], a deadline-constrained MAC protocol with QoS differentiation was proposed for use in soft real-time networked control systems (NCSs). The protocol builds on 802.11e EDCA and, compared with EDCA, lowers probability of frame losses caused by not satisfying timing deadlines for periodic real-time traffic. To evaluate applicability of traffic differentiation based on SaMAC in IWNs, we compare it with MAC protocol from [21]. In the simulated scenario, there were 10 high priority stations with periodic traffic, and the number of saturated low priority stations with background traffic was varied from 10 to 40, making total of 20 to 50 network stations. Different periods of frame generation for high priority stations were considered (20ms, 15ms, and 10ms), with the deadline for delivery being equal to the period. All stations used 290B frames, and parameters for 802.11g from Table 1 with 6Mbps channel were used. Parameter values for high and low priority SaMAC stations were the same as in the previous simulation. The exception is that the freezing limit for high priority stations was increased from to , giving them higher probability of accessing the medium. Parameters for MAC from [21] are the same as in the original paper. Figure 24 shows packet loss ratio due to missed deadline. Logarithmic scale is used in the figure. Taking into account channel rates, the results are in agreement with those from [21]. Evidently, SaMAC is more successful in satisfying the imposed timing constraints, for all considered deadlines and numbers of low priority stations. This is especially apparent in highly congested network with 40 low priority stations, where SaMAC achieves from 2 to 30 times lower loss ratio, for 10ms and 20ms periods, respectively. This is because low priority stations in MAC from [21] quickly reach retry limit and reset their CWs to , selecting low BC values and clogging the medium. Contrarily, after reaching retry limit SaMAC low priority stations select BCs from the same shifted with relatively high BC values, giving high priority stations greater probability to successfully transmit. Considering the longest period (20ms), MAC from [21] does not experience missed deadlines if there are 10 additional low priority stations, while SaMAC does not experience them even in network with 15 low priority stations. For better readability, the same results are presented in Table 2.

7. Conclusion

The contribution of the presented work is twofold: new MAC protocol for distributed wireless networks is defined and evaluated, and a novel approach to MAC protocol modeling is developed and used in design of proposed protocol’s mathematical model.

The presented self-adapting MAC (SaMAC) protocol aims to eliminate throughput degradation and short-term unfairness exhibited in 802.11 DCF and similar protocols. Unlike other distributed MAC protocols presented in the literature, SaMAC employs fixed CW, common for all active stations and lacks any CW management algorithm. As a consequence, the presented protocol exhibits exceptional fairness, achieving fair resource allocation order of magnitude faster than other MAC protocols. Also, the use of the same CW by all stations and at all times significantly lowers jitter and maximal delay when compared to other protocols. For instance, SaMAC has from 2 to 3,5 times lower jitter than 802.11 DCF and up to 12 times lower maximal HOL frame delay, depending on number of stations in the network. These numbers are even greater when SaMAC is compared with other protocols, such as SCW and CPCF, which use more aggressive CW management in order to achieve better throughput in congested network. However, the advantages of SaMAC are not obtained by lowering network throughput. Despite its simple design, SaMAC exhibits significant throughput increase when compared to DCF protocol, avoiding sharp throughput decline if the number of active stations increases. By using constrained countdown freezing mechanism and having its CW shifted from zero, SaMAC achieves up to 20% higher throughput than 802.11 network. Additionally, comparison with SCW and CPCF protocols shows that SaMAC offers superior throughput results for most studied scenarios. SaMAC is shown to be very adaptive to differing network congestion levels, being the only among considered protocols to avoid unnecessary collisions and throughput degradation in the moments of congestion increase.

Lower jitter and delay and higher throughput in networks with a wide range of active stations mean that SaMAC can satisfy IWNs’ requirements of timeliness and scalability better than 802.11 DCF and other considered protocols. Collision reduction offered by SaMAC can reduce the power consumption and prolong the lifetime of battery-powered devices. Additionally, preliminary results show that SaMAC can be used for traffic differentiation and transport of high priority real-time data, with high delivery ratio for deadline-constrained frames.

In the presented paper, a mathematical model of the SaMAC protocol is developed. We focus on the widely used assumption that the probability of a contention loss, from the observed station’s point of view, is constant and independent of that station’s current state and of other stations’ states. While the assumption holds for models of other distributed MAC protocols, it is shown that the use of the assumption in modeling of SaMAC results in great model’s inaccuracies, since the probability of contention loss varies highly for SaMAC stations. Therefore, a new approach to MAC modeling is presented, while still using Markov chain to represent a single SaMAC station’s operation. The new approach is based on the observation that the probability distribution of Markov chain states after a contention (i.e., busy timeslot) can be obtained from the known (or assumed) probability distribution before the contention, by shifting probability matrix in an appropriate manner depending on contention duration. Iterative algorithm is introduced and used to obtain probabilities of a combination of several consecutive contention durations. From this and Markov chain regularities, states’ probability distribution is calculated, as well as probability of a busy timeslot in each state. A new method for calculation of idle timeslot and collision probability from Markov chain is presented, since the conventional method is applicable only if busy timeslot probability is constant. Finally, throughput of modeled SaMAC network is calculated. Proposed modeling approach is validated by comparing model’s results with simulation results for network scenarios with different protocol parameter values and various numbers of active stations.

The proposed protocol has been studied only in a limited number of scenarios, of which all include one-hop network, saturated stations, and ideal channel with constant data rates (6 or 65Mbps). In our future work we plan to further investigate characteristics of SaMAC, including analysis of protocol performance in unsaturated conditions, multihop networks and with lossy channel. Of special interest should be traffic differentiation based on SaMAC and its use in highly deadline-constrained networks. In order to facilitate deployment of SaMAC in real-life networks, its coexistence with 802.11 networks should be studied as well. In a mixed network composed of both 802.11 and SaMAC stations, the stations using SaMAC might be negatively affected by the imposed minimum value during BC selection process, with 802.11 stations gaining unfairly high share of the bandwidth. Therefore, SaMAC should be tuned in order to allow such a coexistence and gradual inclusion to real-life networks.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.