Modeling and optimization of wireless local area network

Modeling and optimization of wireless local area network

Computer Communications 28 (2005) 1204–1213 www.elsevier.com/locate/comcom Modeling and optimization of wireless local area network Jun Yin*, Xiaodon...

301KB Sizes 2 Downloads 74 Views

Computer Communications 28 (2005) 1204–1213 www.elsevier.com/locate/comcom

Modeling and optimization of wireless local area network Jun Yin*, Xiaodong Wang, Dharma P. Agrawal Department of ECECS, OBR Center of Distributed and Mobile Computing, University of Cincinnati, Cincinnati, OH 45221-0030, USA Received 21 July 2004; accepted 21 July 2004 Available online 11 September 2004

Abstract As wireless local area network technology is gaining popularity, performance analysis and optimization of it becomes more important. However, as compared to wired LAN, wireless channel is error-prone. Most of the existing work on the performance analysis of IEEE 802.11 distributed coordination function (DCF) assumes saturated traffic and ideal channel condition. In this paper, modeling of DCF is analyzed under a general traffic load and variable channel condition. A more realistic and comprehensive model is proposed to optimize the performance of DCF in both ideal and error-prone channels, and for both the basic scheme of DCF and DCF with four-way handshaking. Many factors, such as the number of contending nodes, the traffic load, contention window, packet overhead and channel condition, that affect the throughput and the delay of a wireless network have been incorporated. It is shown that under error-prone environment, a trade-off exists between the desire to reduce the ratio of overhead in the data packet by adopting a larger packet size, and the need to reduce the packet error rate by using a smaller packet length. Based on our analytical model, both the optimal packet size and the optimal minimum contention window are determined under various traffic loads and channel conditions. It is also observed that, in error-prone environments, optimal packet size has more significant improvement on the performance than optimal contention window. Our analytical model is validated via simulations using ns-2. q 2004 Elsevier B.V. All rights reserved. Keywords: IEEE 802.11; Optimization; Throughput; Performance evaluation; Packet error rate

1. Introduction Wireless local area network (WLAN) offers the benefit of traditional LAN technologies while greatly increasing the flexibility of not being tethered to a cable. With its increasing popularity, the underlying IEEE 802.11 protocol has become widely deployed [1]. Although advances in the wireless physical layer have dramatically increased the data rate that 802.11 can support [2], all the emerging 802.11x schemes are still using the same MAC protocol based on carrier sense multiple access with collision avoidance (CSMA/CA) [4]. It is important to analyze the performance of the IEEE 802.11 accurately since an accurate analytical model can be helpful to derive the upper bound for the performance, and also provides us with insights on how to optimize the protocol. Most of the existing work on * Corresponding author. Tel.: C1-513-5561768. E-mail addresses: [email protected] (J. Yin), [email protected] (X. Wang), [email protected] (D.P. Agrawal). 0140-3664/$ - see front matter q 2004 Elsevier B.V. All rights reserved. doi:10.1016/j.comcom.2004.07.027

the performance analysis assumes the presence of ideal channel and saturated traffic. In these models [5–8], the performance measures, such as the throughput and the average delay depend only on the backoff parameters and the network configuration. Thus, distributed coordination function (DCF) performance optimizations are done primarily to minimize the contention by choosing an optimal contention window size [8]. Intuitively, traffic load and packet error rate (PER) also affect the maximal achievable performance. As already pointed out in Ref. [10], there exists a tradeoff between the need to reduce the ratio of overhead in the data packet by adopting larger packet size, and the need to reduce the PER under bad channel conditions by using smaller packet length. 1.1. Related work Since its standardization [2], there has been extensive research work on the performance of 802.11 CSMA/CA. One of the difficulties in analyzing CSMA/CA in 802.11

J. Yin et al. / Computer Communications 28 (2005) 1204–1213

DCF lies in modeling the exponential backoff mechanism. Under saturated traffic, each node can always be said to have a packet ready to transmit, and a packet can be assumed to collide with packets from other nodes in a constant probability. This collision probability is dependent on the number of contending nodes and the backoff parameters, such as the minimum contention window (CWmin) and maximum backoff stage. Based on this collision probability, the probability of each node sending a packet can be derived. Thus, CSMA/CA under saturated traffic is assumed to follow a p-persistent protocol [5–8,11–15]. In the p-persistent analysis of the 802.11 DCF, the throughput can be optimized by choosing an optimal sending probability p [8,9], which can be achieved by employing an optimal uniformed backoff window, or by utilizing an optimal minimum contention window while keeping the exponential backoff mechanism. The work mentioned so far assumes the presence of perfect channel condition. Actually, wireless channel is error-prone. Moreover, when there are transmission errors, the sender does backoff similar to the situation when a collision occurs, as the sender cannot receive acknowledgement from the receiver. In error-prone environment, the PER mainly depends on the bit error rate (BER) and the packet length [3]. When the packet size is larger, the packet transmission is more likely to be corrupted. If the packet size is smaller, the packet is more likely to be received correctly, but the increased overhead ratio will degrade the throughput. Therefore, a tradeoff exists in choosing the packet size. 1.2. Our major contributions In this paper, different from existing models in the literature, a more realistic and comprehensive model is proposed for the performance analysis and optimization of DCF. The major contributions of this paper are summarized as follows: To optimize the performance of 802.11 DCF, we need to define an accurate model, and then determine how different factors affect the performance of the 802.11 DCF. These factors include network configuration, traffic load (which determines the intensity of collisions), channel condition (which determines the transmission error rate), and the packet size (which determines the overhead ratio and the PER). A comprehensive analysis and optimization of DCF require all these factors to be incorporated. In this paper, we propose a unified analytical model to analyze the throughput and the delay in DCF with all the aforementioned factors. The analytical results seem to match very well with the simulation results, which indicate that our analytical model is fairly accurate. Performance should be related with the traffic load. Although many results for saturation throughput and delay of 802.11 DCF can be found in previously published papers [5–8], there is no guarantee for the analysis carried out

1205

under saturated traffic to remain valid in the case of unsaturated traffic. Our analytical model uses a traffic model, which accounts for both un-saturated and saturated traffic conditions. Our results indicate that compared with the basic scheme of DCF, DCF with RTS/CTS is beneficial for heavy traffic load; however, it does not result in any significant throughput improvement for light traffic load. Moreover, the optimal packet size is also dependent on the traffic load. The performance of DCF in error-prone channel is analyzed in Refs. [13–16] by considering the retransmissions due to packet errors. However, all these papers are limited to saturated traffic. Furthermore, none of them analyzes the trade-off in choosing packet size. The idea of optimal frame length is presented in Ref. [10]. Although it provides insights on the optimization of MAC layer under error-prone environment, it does not consider the characteristics of CSMA/CA such as the contention and exponential backoff mechanism. Thus, it cannot be applied to 802.11 DCF directly. Our paper focuses on the performance analysis and optimization of 802.11 DCF under variable traffic loads and channel conditions, and determines how packet size and channel conditions affect the performance. Based on this analytical framework, the maximum throughput is achieved by determining both the optimal packet size and the minimum contention window under a given traffic load, network configuration and channel conditions. The remainder of this paper is organized as follows. Section 2 gives the system model and analysis of packet sending probability. Performance analysis of DCF under both ideal and error-prone channel is presented in Section 3. In Section 4, we give the analytical and simulation results. The final part is the conclusion. 1.3. Overview of the IEEE 802.11 DCF DCF protocol is basically CSMA/CA protocol with exponential backoff [2]. Before sending data, nodes listen until the medium is idle for a period of DCF inter-frame space (DIFS) duration. If no confirmation is received from the receiver after the sender sends a packet, the sender can assume that the receiver has not received the packet. This can be due to either collision or packet corruption. Upon this, the sender will backoff according to the exponential backoff rule. There are two schemes for DCF [2]: four-way handshaking scheme and the basic scheme. In four-way handshaking, the sender first sends out a short request-to-send (RTS) packet before it transmits a packet. If the receiver hears the RTS, it responds with a short clear-to-send (CTS) packet. After this exchange, the sender sends its data packet. When the packet is received successfully, the receiver transmits an acknowledgement (ACK) packet. In the basic scheme, RTS/CTS is not used.

1206

J. Yin et al. / Computer Communications 28 (2005) 1204–1213

2. System model In our previous work [17], optimal packet size in errorprone channel has been determined for saturated 802.11 DCF. Here we present the system model applicable for both unsaturated and saturated traffic loads. In the rest part of the paper, the analysis is carried out in three stages. First the conditional probability of packet collision and unsuccessful transmission probability is derived. Then the state transition probability matrix is presented to derive the conditioning event (i.e. the probability that there are how many backlogged nodes in the network), and all previous results are combined to determine the throughput/delay performance. The last part is the analysis of PER and BER. Consequently, how BER and packet length affect the normalized throughput and the delay in error-prone channel is derived. Based on these analysis and modeling, optimization scheme is proposed and compared with other schemes. 2.1. Traffic model Let us consider a system with M nodes in a single contention area, even though this limits the scope of the analysis. The hidden terminal problem makes the mathematical analysis in multi-hop scenario very complicated [4]. We plan to extend our analysis to multi-hop scenarios in our future work. As we have stated, even in a single-hop scenario, most of the existing analytical work on DCF is limited to saturated traffic and ideal channel condition. Our focus is to propose a model for a general traffic condition and error-prone environment. We assume each node possesses a single packet buffer, and after the packet is sent successfully, the buffer is cleared. The channel’s time axis is slotted with the slot size a [18], which equals 10 times the maximum propagation delay (denoted as g) between any pair of nodes. We denote the rate of packet corruption in receiving packets as pe. Thus, for ideal channel we have peZ0. Since RTS/CTS/ACK are much shorter packets, we assume packet errors occur only for data packets. For simplicity of analysis, we assume each node incurs the same pe in receiving packets. A node can be in one of the two states: backlogged or thinking [18]. Each node is under a traffic load with parameter g. In the thinking state, a node generates a new packet in a slot with probability g (and does not generate a packet with probability 1Kg). Thus, the interval to generate a new packet is geometrically distributed with parameter g. A node is said to be backlogged if it has a packet in transmission or waiting for transmission; otherwise, it is in the thinking state. A node in the backlogged state cannot generate a new packet for transmission since its buffer is full. Thus, a node can only be in either thinking or backlogged state and its state changes between thinking and backlogged states.

According to CSMA/CA, when a new packet arrives at a thinking node, it transmits the packet if the channel has been idle for DIFS, or it switches to backlogged state and starts backoff. For a backlogged node, if the transmission is unsuccessful, it remains in backlogged state, until it successfully completes the transmission of the packet, at which time it changes to the thinking state. There is a slight difference between our model and the behavior defined in the 802.11 standard. In the 802.11 standard, to improve fairness, after the completion of each successful transmission, a node resets its contention window, and starts backoff timer with a random value again, which can help other contending nodes to seize the channel. In our model, when a new packet arrives at a thinking node, it will be transmitted immediately if the channel has been sensed idle for DIFS period. As the average backoff timer for the first backoff stage is 31/2, this inaccuracy of modeling can be ignored when g is less than 2/31, since it is very rare for a thinking node to generate a new packet before its backoff timer stops. As we can see later, system becomes saturated far before g reaches 2/31. 2.2. Analysis for backlogged nodes As we have described earlier in Section 2.1, the behavior of a thinking node is simple. It generates a packet according to probability g and transmits the packet if the channel is sensed idle for DIFS period. However, a backlogged node sends its packet according to the exponential backoff rule. Since each backlogged node might be in a different backoff stage and its backoff counter also depends on how many retransmissions have occurred, the exponential backoff process increases the complexity of computing a backlogged node’s packet transmission probability. Here we borrow the idea of analyzing the node’s behavior under saturated traffic to analyze the backlogged nodes in our system. In the analysis for DCF under saturated traffic with n contending nodes [6,7], it is approximated that when each node transmits a packet, it collides with other packets with constant probability p. This assumption is reasonable because the backoff situation of the whole system can be seen as stationary when the system is stable. Thus, the collision probability can be seen as a constant too. It is further assumed that each node transmits a packet with probability v (the average packet transmission probability for each node) [6,7], which covers the whole backoff stage and can be calculated as a constant value. We derive v in Section 2.3 from the average backoff timer. The following expression shows the relationship between the sending probability v and the collision probability p in a saturation system with n contending nodes p Z 1 K ð1 K vÞnK1 :

(1)

In our system with i backlogged nodes and (MKi) thinking nodes, it is also reasonable to approximate that when each of the backlogged nodes sends a packet, it collides with other

J. Yin et al. / Computer Communications 28 (2005) 1204–1213

nodes with a constant probability pi, and we assume each backlogged node transmits the packet with probability vi when there are i backlogged nodes in the system. The probability that none of the other (iK1) backlogged nodes transmits packets, and none of the (MKi) thinking nodes generates packets can be expressed as (1Kvi)iK1(1Kg)Ki. We can express pi using vi and g as Eq. (2) iK1

pi Z 1 K ð1 K vi Þ

ð1 K gÞ

MKi

:

(2)

When the channel is error-prone, unsuccessful transmission occurs when more than one node simultaneously transmits packets or unsatisfactory channel conditions corrupt the packet at the receiver even if the packet contends successfully. When its packet is corrupted at the receiver, the behavior of the sender is the same as when a collision occurs. In both the situations, the sender will not be able to receive CTS or ACK from the receiver, and as a result, it will backoff and re-transmit until the packet is transmitted successfully or the retry limit is met. Since the occurrence of a collision and the packet error are independent, p~ i ; the unsuccessful transmission probability of each backlogged node can be expressed as follows [19]: p~i Z 1 K ð1 K pi Þð1 K pe Þ Z pi C ð1 K pi Þpe Z 1 K ð1 K vi ÞiK1 ð1 K gÞMKi C ð1 K ni ÞiK1 ð1 K gÞMKi pe : (3) 2.3. Unsuccessful transmission probability and packet sending probability

Pl ðiÞ Z ðp~ i Þl ð1 K p~ i Þ:

or after the long retry count (LRC, defined as 4 in Ref. [2]) is reached in the basic scheme. We define the contention window after l times of backoff as CWl, and it is doubled each time after a backoff occurs. The actual backoff timer is set as a uniform random value selected from 0,1,.,(CWlK1). CWl can be expressed as follows: CWl Z 2l CWmin ;

(4)

To improve fairness in 802.11, after completion of each successful transmission, a backlogged node needs to wait for a random backoff time. Thus, the backoff stage can increase from 0 to m (the maximum backoff stage). For CWminZ32, mZ5, the possible values of the contention window size are: 32, 64, 128, 256, 512, 1024. Once the backoff stage reaches m, it will no longer be increased. The contention window is reset to the minimum contention window size after the short retry count (SRC, defined as 7 in Ref. [2]) is reached in four-way handshaking scheme,

l Z ½0; 1; .; m:

(5)

We define the average backoff timer value of nodes as BKðiÞ when there are i backlogged nodes in the system. After the lth backoff, the contention window is CWl, and the average selected backoff timer value is (CWlK1)/2. For the basic scheme of DCF, since m(LRC, BKðiÞ can be computed as:  LRC  X CWl K 1 BKðiÞ Z (6) Pl ðiÞ: 2 lZ0 For four-way handshaking with RTS and CTS, since  can be computed as: SRCOm, BKðiÞ   m  SRC  X X CWl K 1 CWm K 1 BKðiÞ Z Pl ðiÞ C Pl ðiÞ: 2 2 lZ0 lZmC1 (7) The average backoff timer denotes the period that a node spends in the backoff stage before a transmission attempt. Then we can obtain vi, the average probability of each node in category i to send a packet if the medium is idle [8]: vi Z

Under saturated traffic, CSMA/CA has been addressed as a p-persistent protocol in many papers [6–8,12,13]. The way we determine the unsuccessful transmission probability and packet sending probability is different from the model used in the literature [6,7,12,13], which employ a complicated Markovian chain. Here, we calculate p~ i and vi by deriving the average backoff timer of each node. In a system with i backlogged nodes, each backlogged node’s sending probability vi is dictated by its average backoff timer, and its average timer is decided by the unsuccessful transmitting probability p~ i : For each backlogged node, the probability to send a packet successfully after l times unsuccessful transmission is Pl ðiÞ:

1207

1 : ðBKðiÞ C 1Þ

(8)

Eqs. (3)–(8) represent a non-linear system with solutions for p~i and vi. Given CWmin, m, pe, M, g and i, we can get the numerical results of p~i and vi by using Matlab.

3. Performance evaluation So far, we have considered the behavior of the thinking and backlogged nodes under a general traffic model with the presence of transmission errors. Although a node can only be in either thinking or backlogged state, the transition from thinking state to backlogged state depends on the traffic load and the collision intensity. More nodes are in the backlogged state and the collision probability may as well be larger if the traffic load is increased. Since the number of contending nodes is M, the number of backlogged nodes of the whole system changes with time, it can be 0,1,.,M. Thus, the system will have (MC1) states, and the Markov chain for state transitions will have (MC1) states, too [18]. In the following analysis, we consider the system’s state transition probability matrix in stationary state among M nodes. The reason we are interested in state transition matrix is to find out how many nodes are in thinking or backlogged states, then we can derive the expression of the system throughput and delay.

1208

J. Yin et al. / Computer Communications 28 (2005) 1204–1213

3.1. State transition probability matrix The main idea behind computing normalized throughput is to consider the time axis to have a sequence of cycles, and each cycle includes an idle and busy period [18]. The average stationary channel throughput is computed as the ratio of the average time the channel carries successful transmission during an average cycle length. We observe on the time axis an alternate sequence of idle and busy periods as shown in Fig. 1. We follow the properties of regenerative processes used in Refs. [18,19] and consider the imbedded Markov chain identified by the first slot of each idle period. The channel can be sensed busy due to an ongoing successful transmission (only one user transmits packet as well as no transmission error), or an ongoing but unsuccessful transmission (only one user transmits packet but it can not be received correctly by the receiver due to transmission error), or a collision (more than one user simultaneously transmits packets). We denote the duration for a successful transmission as Ts, duration of transmission of a packet, which contends successfully but corrupts at the receiver as Te and the duration of a collision period as Tc. Thus, in Fig. 1, the busy period can be Ts, Te or Tc. It should be noted that in our model, we include the DIFS duration in the busy periods. Since we assume packet errors occur only for data packets, TeZTs in both the basic and four-way handshaking scheme. Here, Ts, Te and Tc are expressed as time slots. We consider the ACK and CTS timeout and use the same expression as [7]. For basic access scheme, we have: ( Ts Z Te Z DIFS C DATA C g C SIFS C ACK C g : Tc Z DIFS C DATA C g C SIFS C ACK (9) For four-way handshaking with RTS/CTS: 8 < Ts Z Te Z DIFS C RTS C SIFS C CTS C SIFS CDATA C SIFS C ACK C 4g : : Tc Z DIFS C RTS C g C SIFS C CTS

Wði; kÞ Z PrfnðtðrC1Þ Þ ZkjnðtðrÞ Þ Z ig; 0%i; k%M:

(11)

The number of backlogged nodes remains unchanged during the idle period. Thus, in Fig. 1, for t2[t(r),t(r)CIK1], we have n(t)Zn(t(r)). When a new packet arrives at a thinking node, if the medium is idle, it transmits its packet. A backlogged node transmits the packet when its backoff timer decreases to zero. For either of the cases, the idle period ends and the state transition occurs between the last slot of the idle period (t(r)C IK1) and the first slot of busy period (t(r)CI) as shown in Fig. 1. Busy period succeeds the idle period. During the busy period, if a new packet arrives at a thinking node, this node will switch to the backlogged state, and the number of backlogged nodes will increase by 1. The number of backlogged nodes might also increase by more than 1, if there are more than one new packets arriving at the thinking nodes. After the busy period, the number of backlogged nodes will decrease by 1 if the busy period was a successful transmission, or it will remain unchanged if the transmission was unsuccessful. Since the state transition occurs between the last slot of the idle period (t(r)CIK1) and the first slot of busy period (t(r)CI), we denote R as the state transition probability matrix between slot (t(r)CIK1) and (t(r)CI). The busy period can be a successful transmission or an unsuccessful transmission. The state transition probability matrix U is denoted to express the process that a transmission is successful and F is denoted to express the process that a transmission is unsuccessful. The (i,k)th element of U and F are defined and expressed as: Uði;kÞZPrfnðtðrÞ CIÞ ZkhðTransmissionissuccessfulÞjnðtðrÞ CI K1ÞZig: (12)

(10)

Let n(t) denote the number of backlogged nodes at the beginning of a slot t. As shown in Fig. 1, we define a cycle which includes the idle and busy period as an imbedded slot. Let t(r) and t(rC1) be two consecutive imbedded slots [18]. Thus, the period of time between t(r) and t(rC1) be a cycle. We denote W to be the transition probability matrix between t(r)

Fig. 1. The cycle of an idle and busy period.

and t(rC1). We define W(i,k) to be the (i,k)th element of the transition probability matrix W, denoting the change in the number of backlogged nodes from i to k, then:

Fði;kÞZPrfnðtðrÞ CIÞ ZkhðtransmissionisunsuccessfulÞjnðtðrÞ CIK1ÞZig: (13) For U, successful packet transmission occurs in two situations. The first one is: none of the (MKi) thinking nodes generates a new packet, only one of i backlogged nodes transmits a packet, and the packet gets received correctly at the receiver. This probability is ð1KgÞMKi ! ½ini ð1Kni ÞiK1 ð1Kpe Þ: The second situation is: none of the i backlogged nodes transmits a packet, only one of the (MKi) thinking nodes generates and transmits a packet, and the packet is received correctly at the receiver. This probability is ðMKiÞgð1KgÞMKiK1 ð1Kni Þi ð1Kpe Þ: It should be noted that although transmission is successful, the number of backlogged nodes in the system changes only after Ts time slots because the packet transmission will not be finished before Ts time slots. Thus, in the first situation kZi and in

J. Yin et al. / Computer Communications 28 (2005) 1204–1213

1209

8 0; > > > > > > > > ð1 KgÞMKi ½ivi ð1 Kvi ÞiK1 pe > < ; 1 Kð1 Kvi Þi ð1 KgÞMKi Fe ði; kÞ Z > > ðM KiÞgð1 KgÞMKiK1 ð1 Kvi Þi pe > > > ; > > 1 Kð1 Kvi Þi ð1 KgÞMKi > > : 0;

the second situation k becomes equal to (iC1) at slot (t(r)C I). Conditioned on the probability that at least one node uses the channel, U(i,k) can be expressed as Eq. (15). We denote Q as the state transition probability matrix for all the remaining slots of the busy period. During the busy period, all the thinking nodes receiving new packets will switch to the backlogged state. Thus, Q denotes the one-step transition matrix that the number of backlogged nodes is increased by (kKi), when (kKi) thinking nodes generate packets, and the medium is busy. Among all (MKi) thinking nodes, (kKi) thinking nodes generate packets and the remaining (MKk) thinking nodes do not generate packets. Since the medium is busy, these thinking nodes switch to the backlogged state and consequently the number of backlogged nodes gets increased by (kKi). The situation that a successful transmission decreases the number of backlogged nodes in the system by 1 is defined by matrix J. Thus, UQTs J describes the state transition process during a successful transmission period [18]. Similarly, there are two parts for F. We denote Fc as the state transition probability matrix to present the situation that collision occurs, and Fe as the state transition probability matrix to present the situation that packet contends successfully but is corrupted at the receiver. The state transition process during a collision period is described as Fc QTc : The state transition process during a transmission error period is described as Fe QTe : Thus, FZFcCFe. Based on the conditional probability that at least one node uses the channel, Fc(i,k) and Fe(i,k) can be expressed as Eqs. (16) and (17). Since the success or the failure of the transmission is a function of the number of nodes already available in slot (t(r)), we have RZUCF. Thus, the transition matrix W can be computed as:

Let Ptr(i) be the probability that there is at least one transmission in the considered idle slot time when there are i backlogged nodes and (MKi) thinking nodes. We have:

W Z UQTs J C Fc QTc C Fe QTe ;

Ptr ðiÞ Z 1 K ð1 K vi Þi ð1 K gÞMKi :

(14)

where U, Fc, Fe, Q, J are given by: 8 0; > > > > > > > > ð1 KgÞMKi ½ivi ð1 Kvi ÞiK1 ð1 Kpe Þ > < ; 1 Kð1 Kvi Þi ð1 KgÞMKi Uði; kÞ Z > > ðM KiÞgð1 KgÞMKiK1 ð1 Kvi Þi ð1 Kpe Þ > > > ; > > 1 Kð1 Kvi Þi ð1 KgÞMKi > > : 0; 8 0; > > > > > > > > ð1 KgÞMKi ½1 Kð1 Kvi Þi Kivi ð1 Kvi ÞiK1  > > ; > > 1 Kð1 Kvi Þi ð1 KgÞMKi > > > < MKiK1 ½1 Kð1 Kvi Þi  Fc ði; kÞ ðM KiÞgð1 KgÞ ; i > 1 Kð1 Kvi Þ ð1 KgÞMKi > > > ! > > M Ki > > > > ð1 KgÞMKk gkKi > > > > k Ki > : ; 1 Kð1 Kvi Þi ð1 KgÞMKi

for k!i; for k Z i; for k Z i C1; for kOi C1; (17)

Qði; kÞ Z

8 0; > > < > > :

( Jði; kÞ Z

for k!i; M Ki k Ki

! ð1 KgÞMKk gkKi ; for kRi;

1; for k Z i K1; 0; otherwise;

(18)

(19)

Let pZ[p0,p1,.,pM] denote the stationary probability distribution of n(t(r)). From the state transition probability matrix, we can calculate the stationary probability distribution by recursive solution of pZpW [18,20], which means no matter what the starting state of the system is, or how the system has changed from one state to another, the probability that a system has i backlogged nodes is constant with value pi under the stationary state. That is, the probability that a system has 0 backlogged nodes is p0, the probability that a system has 1 backlogged nodes is p1,.,and so on. 3.2. Performance analysis

(20)

We denote Ps(i) as the probability of a successful contention among all the M nodes when there are i backlogged nodes. Conditioned on the probability that there is at least one transmission, Ps(i) can be expressed as:

for k!i; for k Z i; for k Z i C1; for kOi C1; (15) for k!i;

Ps ðiÞZ

ðMKiÞgð1KgÞMKiK1 ð1Kvi Þi Civi ð1Kvi ÞiK1 ð1KgÞMKi : Ptr ðiÞ (21)

Considering the transmission errors, the probability of a successful transmission (denoted as P~ s ðiÞ) among all the M nodes with i backlogged nodes in the system can be expressed as:

for k Z i;

P~ s ðiÞZPs ðiÞð1Kpe Þ

for k Z i C1;

Z

for kOi C1; (16)

½ðM KiÞgð1KgÞMKiK1 ð1Kvi Þi Civi ð1Kvi ÞiK1 ð1KgÞMKi ð1Kpe Þ : Ptr ðiÞ (22)

As we have stated, the average throughput is defined as the ratio of the average time the channel carries successful transmission during an average cycle length, and a cycle includes an idle and a busy period. Here, we focus on

1210

J. Yin et al. / Computer Communications 28 (2005) 1204–1213

the calculation of the average idle time and busy time and then derive the expression for the throughput.  as the average idle time between two We denote IðiÞ consecutive busy periods in the cycles. Since for each idle timeslot, the probability of packet transmission is Ptr(i), we  using the mean of geometric distribution can compute IðiÞ [19], and express it as:

of backlogged nodes over all slots in a cycle (averaged over all cycles), to the average cycle length [18]. Therefore, we have: PM iZ0 pi ½BðiÞCAðiÞ : N Z PM  p f I CP ðiÞð1Kp iZ0 i i s e ÞTs Cð1KPs ðiÞÞTc CPs ðiÞpe Te g (27)

1  Z 1 Z IðiÞ : Ptr ðiÞ 1 K ð1 K vi Þi ð1 K gÞMKi

The average stationary channel throughput can be considered as the ratio of the effective utilization of bandwidth to the overall system bandwidth. This effective bandwidth is shared fairly by N nodes. On the average, the share of each  By using Little’s law [21], the normalized node is S=N: packet delay can be expressed as:  p PM NT iZ0 pðiÞ½BðiÞCAðiÞ DZ Z PM : (28) S iZ0 pðiÞPs ðiÞð1Kpe Þ

(23)

The busy period can be a successful transmission or an unsuccessful transmission period. The successful transmission period lasts for Ts and it occurs with the probability P~ s ðiÞ: The unsuccessful transmission period can due to a collision, with probability (1KPs(i)) and lasting for Tc; or a successful contention but data packet corrupted at the receiver, with probability as (Ps(i)!pe) and lasting for Te. We denote Tp as the transmission duration for the payload in MAC layer data packet. Since throughput is defined as the fraction of time that the channel is used to successfully transmit payload bits, we can derive the normalized throughput [19] as: PM iZ0 pi Ps ðiÞð1Kpe ÞTp : SZ PM  p f IðiÞCP ðiÞð1Kp s e ÞTs Cð1KPs ðiÞÞTc CPs ðiÞpe Te g iZ0 i (24) Having derived the throughput, we need to compute the average delay. For M nodes within the transmission range of each other, when a new packet arrives at a thinking node, it will transmit the packet immediately if the channel has been sensed idle, or it changes to the backlog state when the channel is busy. Thus, delay occurs only for backlogged nodes. First, we compute the average number of backlogged nodes. The number of backlogged nodes remains unchanged during the idle period. The expected sum of backlogged nodes in the idle period with i backlogged nodes in the system, denoted as B(i), is given by [19]: BðiÞZ

i : 1Kð1Kvi Þi ð1KgÞMKi

(25)

We denote A(i) as the expected sum of backlogged nodes over all slots in the busy period, A(i) is given by [18]: AðiÞZ

Ts X M X

J½UQh ij

hZ0 jZi

C

Tc X M X

h

J½Fc Q ij C

hZ0 jZi

Z

M X jZi

"

J U

Te X M X

hZ0

h

Q CFc

Tc X hZ0

h

3.3. Analysis on packet error rate Basically, the PER is determined by the packet length and the BER, and BER is determined by the received SNR, the modulation and the coding scheme. Here, BER (we denote it by pb) and packet length are used to express PER (pe) [3]: pe Z 1 K ð1 K pb Þ8L ;

J½Fe Q ij

Q CFe

(29)

h

hZ0 jZi Ts X

The main difference between saturation performance and un-saturated performance is the traffic model. Since all nodes in the saturation condition are in the backlogged state, while un-saturated nodes might be in two states, and the state transition matrix for un-saturated condition is somewhat complicated. While, saturated condition can be taken as a special form of un-saturated condition and these two analytical models can be combined to a unified one. In un-saturated condition, nodes are in two states: backlogged or thinking. If all nodes are in backlogged state, there is no state transition for system. Thus, state transition matrix does not exist for saturation condition. We can take transition matrix p as p0,p1,.,pnK1Z0, pnZ1 for saturation condition. Also, because iZn, all the equations in un-saturation condition such as expressions Ps(i), Ptr(i), and S, are exactly the same as the equations in Ref. [7], which is under saturated traffic load. From this point of view, the analytical model of un-saturated condition can incorporate the saturated condition, which also validates that our analytical model of un-saturated condition is correct.

Te X hZ0

# Q

:

h

ð26Þ

ij

Here, for a matrix B, the notation [B]ij is denoted to represent the (i,j)th element of B. Similarly, the average number of backlogged nodes  is computed as the ratio of the expected sum (denoted by N)

where L is the data packet length in bytes, which includes physical layer header (Hp), MAC layer header (HM) and packet payload. It is somehow straightforward to derive the relationship between the pb and pe as Eq. (29) since pe is also dependent on the coding schemes. A more complicated method for deriving pe based on pb and the specific modulation and coding scheme can be found in Ref. [22]. In this paper, we follow the simplified equation stated above since our

J. Yin et al. / Computer Communications 28 (2005) 1204–1213 Table 1 System parameters used for analysis and the network configuration for simulation Slot time

20 ms

Propagation delay

2 ms

PHY header Channel bit rate CTS SIFS M

24 bytes 1 Mbps 38 bytes 10 ms 5

MAC header RTS ACK DIFS CWmin, CWmax

28 bytes 44 bytes 38 bytes 50 ms 32, 1024

analytical work is targeted for identifying the tradeoff in choosing the packet size, and it can be extended for different physical data rate and coding scheme easily. If we denote the data rate of 802.11 as r, and the duration of a time slot as a, then payload Tp in Section 3.2 is [17]: Tp Z

ðL K Hp K HM Þ8 : ra

(30)

module. Thus, in our simulation, there are no routing overheads or broadcast packets. To simulate the unsaturated traffic, we let the traffic generator access the interface queue length of MAC protocol, and generate UDP packets according to geometric distribution with parameter g when the queue is empty. Error model in ns-2 is used to generate bit and packet errors. All reported results are averaged over multiple 1000 s simulations. All the parameters used in analytical model and simulations follow the parameters in Refs. [2,6,7] and are listed in Table 1. 4.1. Optimal packet size under different channel conditions Figs. 2 and 3 show the varying of the throughput and delay in DCF basic scheme in both ideal and error-prone channels with the change of packet size. The number of stations is 20, g is 0.01, CWminZ32 and the packet length various from 100 to 2000 bytes. From Fig. 2, we can see that a trade-off exists between a desire to reduce the overhead by adopting larger packet size, and the need to reduce packet error rates in the error-prone environments by using smaller packet length. There is a packet size that maximizes the DCF throughput under a given channel condition. For an

Combining Eqs. (24), (29) and (30), we can derive the normalized throughput and the delay. Here we repeat the equations of throughput and delay to show how pb and packet length L affect them PM 8L iZ0 pi Ps ðiÞðð1 K pb Þ ÞTp S Z PM : 8L 8L  iZ0 pi fI i C Ps ðiÞðð1 K pb Þ ÞTs C ð1 K Ps ðiÞÞTc C Ps ðiÞ½1 K ð1 K pb Þ Te g PM  p NT pðiÞ½BðiÞ C AðiÞ Z PMiZ0 DZ : 8L S iZ0 pðiÞPs ðiÞð1 K pb Þ

(32)

1211

(31)

In this section, we give the results of our analytical model as well as the simulation results. We do simulation under ns-2 [23]. Since our analysis is for a single-hop scenario, modifications are made to the codes to disable the routing

ideal channel, throughput increases with the packet length. In Fig. 2, for error-prone channel, when BER is 2e-5, for the packet size 900 bytes, the throughput reaches the maximal value 0.6049; when BER is 5e-5, for the packet length 500 bytes, the throughput reaches the maximal value 0.5317. Therefore, we can see there is an optimal packet size Lo in error-prone channel. When packet size is smaller than Lo, excessive overhead in each packet limits the throughput. When packet size is larger than Lo, increased packet error probability limits the throughput. Through our

Fig. 2. Throughput of the basic DCF scheme with varying packet sizes.

Fig. 3. Delay of the basic DCF scheme with varying packet sizes.

4. Analytical and simulation results

1212

J. Yin et al. / Computer Communications 28 (2005) 1204–1213

Fig. 4. Throughput of the basic DCF scheme with varying packet sizes and traffic loads. Fig. 6. Optimization of the basic DCF scheme.

analytical model, the value of Lo can be determined accurately. A shorter packet is preferred for more errorprone channels. From Fig. 2 we can see that, the optimal packet length that maximizes the throughput becomes smaller when the channel is more error-prone. 4.2. Optimal packet size under different traffic load Fig. 4 shows the throughput for basic DCF scheme in error-prone channel under different traffic loads and packet lengths. M is 20, CWminZ32, BER is 5e-5. From Fig. 4, we can see that, the optimal packet length varies with the change of traffic load, and the optimal packet size under light traffic load is larger than the optimal packet size under higher traffic load. 4.3. Effects of packet size and minimum contention window size Fig. 5 shows the throughput of DCF basic scheme with the varying of both packet size and minimum contention

window size. MZ20, BERZ1!10K4, and gZ0.01. CWmin changes from 8 to 408, and packet size changes from 100 to 2000 bytes. From Fig. 5, we can see that both contention window and packet size do affect the throughput. As identified in Refs. [8,20], there is an optimal choice of the contention window, but we can see that varying the packet sizes has more significant impact on the throughput. 4.4. Optimial choice of both minimum contention window and packet size Based on our analysis, we can then derive the optimal selection of both packet size and the minimum contention window size under a given network configuration, traffic load and channel condition. Fig. 6 shows how the optimal CWmin, optimal packet size and optimal choice of both of them improve the throughput respectively. In Fig. 6, we set MZ20, BERZ1!10K4. From our computation, for gZ 0.01, there is a maximum value of throughput: 0.5233, with the optimal CWminZ224 and the optimal packet sizeZ 400 bytes. When CWmin is fixed at 32, the maximum throughput is 0.4591 with the optimal packet size 400 bytes. If packet size is fixed at 1000 bytes, the maximum throughput is 0.3841 with optimal CWminZ196. We can see that the optimal packet size provides a better value of the throughput. Optimal CWmin can help enhance the throughput when the traffic load is heavier. When we adopt optimal choices for both CWmin and packet size, the throughput can have significant improvement over the situation that CWmin is fixed at 32 and packet size is fixed at 1000 bytes.

5. Conclusions

Fig. 5. Throughput of the basic DCF scheme with varying packet lengths and CWmin.

In this paper, different from existing models in the literature, a more realistic and comprehensive model is proposed for the performance analysis and optimization of DCF. A general traffic model is considered which accounts

J. Yin et al. / Computer Communications 28 (2005) 1204–1213

for both saturated and unsaturated traffic conditions. Besides this, other factors that affect DCF performance, such as transmission errors, packet sizes and the minimum contention window are also incorporated. Our model is accurate as observed from simulation results. It is shown that under error-prone environment, a trade-off exists between the desire to reduce the ratio of overhead in the data packet by adopting a larger packet size, and the need to reduce the packet error rate by using a smaller packet length. Based on our analysis, both optimal packet size and optimal contention window value can be determined to achieve the maximum throughput from our analytical model. It is shown that under error-prone channel, our approach of choosing both optimal packet size and optimal minimum contention window can lead to much more enhancements than the existing schemes [8,9,20].

Acknowledgements This work has been supported by the Ohio Board of Regents Doctoral Enhancements Funds and the National Science Foundation under grant CCR-0113361.

References [1] D.P. Agrawal, Q.A. Zeng, Introduction to Wireless and Mobile Systems, Brooks/Cole Publishing, 2003 (ISBN No. 0534-40851-6, 436 p.). [2] IEEE 802.11, Part 11: wireless LAN medium access control (MAC) and physical layer (PHY) specifications, IEEE August (1999). [3] J.G. Proakis, Digital Communications, third ed., McGraw Hill, New York, NY, 1995. [4] V. Bharghavan, A. Demers, S. Shenker, L. Zhang, Macaw: a media access protocol for wireless LANs, Proceedings of the ACM SIGCOMM Conference, 1994. [5] Y.C. Tay, K.C. Chua, A capacity analysis for the IEEE 802.11 MAC protocol, ACM/Baltzer Wireless Networks 7 (2001) 159–171. [6] G. Bianchi, Performance analysis of the IEEE 802.11 distributed coordination function, IEEE Journal on Selected Areas on Communications 18 (3) (2000).

1213

[7] H-T. Wu, Y. P, K. Long, S-D. Cheng, Performance of reliable transport protocol over IEEE 802.11 wireless LAN: analysis and enhancement, Proceedings of the IEEE INFOCOM 2002, June, 2002. [8] F. Cali, M. Conti, E. Grergori, Dynamic tuning of the IEEE 802.11 protocol to achieve theoretical throughput limit, IEEE/ACM Transactions on Mobile Compting 1 (1) (2002). [9] R. Bruno, M. Conti, E. Gregori, Optimization of efficiency and energy consumption in p-persistent CSMA-based wireless LANs, IEEE Transactions on Mobile Computing 1 (1) (2002). [10] P. Lettieri, M.B. Srivastava, Adaptive frame length control for improving wireless network link throughput. Range and energy efficiency, Proceedings of the IEEE INFOCOM 1998, March, 1998. [11] D. Qiao, S. Choi, A. Jain, K.G. Shin, MiSer: an optimal low-energy transmission strategy for IEEE 802.11 a/h, Proceedings of ACM MobiCom ’2003, September, 2003. [12] Y. Xiao, Saturation performance metrics of the IEEE 802.11 MAC, Proceedings of The IEEE Vehicular Technology Conference (IEEE VTC 2003 Fall) Orlando, FL, October 6–9, 2003. [13] Z-H. Velkov, B. Spasenovski, Saturation throughput—delay analysis of IEEE 802.11 DCF in fading channel, Proceedings of the IEEE ICC’03, Anchorage, Alaska, USA, May, 2003. [14] J.-H. He, Z-Y. Tang, Z-K. Yang, W-Q. Cheng, Ch. Tung, Performance evaluation of distributed access scheme in error-prone channel, Proceedings of the IEEE TENCON ’02, Beijing, China, vol. 2, 28–31 October 2002. [15] J. Yeo, A. Agrawala, Packet error model for the IEEE 802.11 MAC Protocol, Proceedings of the PIMRC03, vol. 2, September 2003. [16] V. Vishnevsky, A. Lyakhov, 802.11 LANs: saturation throughput in the presence of noise, Proceedings of the IFIP Networking, 2002. [17] J. Yin, X. Wang, D.P. Agrawal, Optimal packet size in error-prone channel for IEEE 802.11 distributed coordination function, Proceedings of WCNC’04, March 2004. [18] F.A. Tobagi, Distributions of packet delay and interdeparture time in slotted ALOHA and carrier sense multiple access, Journal of the ACM 29 (4) (1982) 907–927. [19] J. Yin, Q-A. Zeng, D.P. Agrawal, Performance evaluation of IEEE 802.11 DCF in error-prone channel and ideal channel, Proceedings of the Communication Networks and Distributed Systems Modeling and Simulation Conference, January 2004. [20] Y. Chen, Q-A. Zeng, D.P. Agrawal, Performance of MAC protocol in ad hoc networks, Proceedings of Communication Networks and Distributed Systems Modeling and Simulation Conference, 2003 pp. 55–61. [21] J. Little, A proof of the queueing formula LZlW, Operation Research 9 (1961) 383–387. [22] D. Qiao, S. Choi, A. Jain, A. Soomro, K.G. Shin, Energy-efficient PCF operation of IEEE 802.11a wireless LAN, Proceedings of Infocom ’2002, April, 2002. [23] “ns-2”, URL http://www.isi.edu/nsnam/ns/