Performance Analysis of Synchronous Wakeup Patterns in Contention -based Sensor Networks Using a Finite Queuing Model Jun Luo, Lingge Jiang, and Chen He Department of Electronic Engineering, Shanghai Jiao Tong University, Shanghai, 200240, P. R. China Email: {junluo,lgjiang,chenhe}@sjtu.edu.cn Abstract- To conserve energy, periodical active/sleep dynamics is adopted in the design of medium access protocol (MAC) in wireless sensor networks. At the same time, the QoS requirements (e.g. packet delay, packet loss rate and throughput) need to be satisfied. In synchronous wakeup patterns of contention-based sensor networks, nodes wake up simultaneously and compete to access a shared channel for data transmission. We develop a finite queuing model for the sensor nodes and derive the network performance of contention-based sensor networks with the synchronous wakeup patterns. Furthermore, the impact of active/sleep duty cycle, active time scale and node buffer size on the tradeoff between power efficiency and QoS requirements is studied based on the model. Simulation results match well with our analysis results and validate the accuracy of our model and approach. Keywords- Contention-based sensor networks, Synchronous wakeup patterns, Finite queuing model, Power efficiency, QoS requirements
I. INTRODUCTION Wireless sensor networks are composed of a large number of sensor nodes equipped with limited power resources, limited storage capacities and transmission range [1]. They can be deployed in various kinds of fields to perform the data gathering tasks, such as environmental monitoring and measurement. Since the transmission range is limited, sensor nodes often organize themselves into a multi-hop, wireless communication network. In terms of medium access protocols, wireless sensor networks can be classified into two groups. One class schedules nodes onto different sub-channels that are divided either by time (TDMA), frequency (FDMA) or orthogonal codes (CDMA). We refer to them as scheduled wireless sensor networks which are largely contention-free. Another class is based on contention. Nodes compete for a share channel and collision happens during the contention procedure. We call them contention-based sensor networks. Compared with the scheduled wireless sensor networks, they allocate resources on-demand and can be more flexible as topologies change, which gain much interest of researchers. Due to the limited power resources of sensor nodes, much research work has been done to address the power efficiency problem and a number of solutions have been proposed [2-4]. One popular approach is to turn the sensor nodes into a lower-power sleep state periodically. The schedules that the sensors use for turning on and off their radios are called the wakeup patterns, which can be divided into two categories: synchronous and asynchronous. In synchronous wakeup patterns, neighbor nodes in a same region have exactly the same wakeup and sleep times. They exchange packets during the common wakeup periods. In asynchronous wakeup patterns,
the nodes can have different wakeup and sleep times and therefore, they all have extra mechanisms to awake or determine the wakeup times in case of communications. In contention-based sensor networks, the synchronous wakeup patterns are often used and many protocols based on them are proposed [4, 5]. For instance in S(Sensor)-MAC [4], sensor nodes within a same virtual cluster follow a fixed wakeup and sleep time for intra-cluster communication. At the same time, the quality of service (QoS) requirements, such as packet delay, packet loss rate and throughput, need to be satisfied in wireless sensor networks [6]. In particular, buffer space is often scarce in sensor nodes (e.g. Mote [7] has only 512 bytes of data memory). Too much small buffer space will easily cause buffer overflow and packet loss. So it is crucial to minimize the buffer space without causing excessive packet loss. Clearly, a tradeoff exists between power efficiency and QoS requirements [6]. For this purpose, properly choosing the parameters in wakeup patterns (including the duty cycle and time scale) and the buffer space is very important. Revealing the dependency of network performance on active/sleep duty cycle, time scale and node buffer size is necessary in the design of contention-based sensor networks using synchronous wakeup patterns. So far, these network performances are almost evaluated through simulations. Few works focus on the performance modeling in contention-based sensor networks. To the best of our knowledge, [8] used an infinite queuing model to obtain the network performance in contention-based sensor networks. In [9], we proposed a finite queuing model of asynchronous patterns in contention-based sensor networks and analyzed the network performance, assuming that the active/sleep dynamics of nodes are independent. However, modeling the synchronous wakeup patterns had not been done in them. In this paper, based on the synchronous wakeup patterns, we model the sensor node as a finite FIFO queue model using a continuous time Markov chain (CTMC), which enables us to investigate the network performance as the active/sleep duty cycle, time scale and node buffer size vary, and explore the tradeoff between power efficiency and QoS requirements in contention-based sensor networks. Through our elaborate analytical model, we aim at capturing the essential features of the synchronous wakeup patterns in contention-based sensor networks, and giving strong insight into the choice of these parameters that affect the network performance. The remainder of the paper is organized as follows. In section II, we develop a finite node queuing model and obtain some useful performances of sensor nodes. Based on the queuing model, network performance metrics are computed and analyzed in section III. In section IV, we compare the analysis
1334 1930-529X/07/$25.00 © 2007 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE GLOBECOM 2007 proceedings.
results of network performance to the simulation results. The whole paper is finally concluded in section V. II. SYSTEM MODEL AND ASSUMPTIONS We consider a contention-based sensor network composed of N stationary sensor nodes. Nodes are randomly deployed in a 500 × 500m 2 sensor field. We assume that for each node, there exists at least one path connecting it to the sink. For energy conservation, the timeline of each node is divided into alternating active and sleep periods. During the active period, nodes will turn on their radio transceivers to communicate with one another. After one packet transmission has been completed or a certain operation point is reached, the active period ends and the nodes will turn off their radio transceivers to enter a sleep period. In the sleep period, no packet transmission can be started, but the sensing units are still working. So pending packets are stored in a local node buffer and are to be sent in the forthcoming active period. A. Data Flow Model The sensor data of sensor nodes are organized into data packets of a fixed size. All the packets enter the finite buffer of sensor node and wait for the immediate transmission. Observing that each sensor node alternates between active (A) and sleep (S) state. For the convenience of analysis, we assume that in active state, sensor nodes generate packets according to a Poisson process. In contention-based sensor networks, the relay packets may be delayed due to channel contention. However, the relay packets can be also assumed as a Poisson process, because the length of contention window is much smaller than the packet interval, which has slight effect on the data flow. In our paper, we assume that in active period, the sensor node itself will generate packets according to a Poisson process with rate λg , and also relay packets coming from other nodes according a Poisson process with rate λr ; in sleep period, the sensor node itself will generate packets according to a Poisson process with rate λ g and can not relay packets for other nodes. For convenience, λ g of each node is assumed to be the same. B. Node Queuing Model Assume the duration of the active period is exponentially distributed with mean Ta and the duration of the sleep period is exponentially distributed with mean Ts . We can use a CTMC to model the node state. The transition diagram of the node state is shown in Fig. 1.
a
µ
λa (λs ) ""
K
A
s
a S
Figure 2. Sensor node queuing model
where λa = λg + λr is the total packet arrival rate in active state;
λs = λ g is the packet arrival rate in sleep state, K is the node buffer size, µ is the transmission rate of the reference node in active state. Note that in contention-based sensor networks, sensor nodes compete for the common channel access through a random back-off scheme [4, 10]. The back-off time is a random number with a discrete uniform distribution between 0 and CW-1, where CW is the contention window size. So the probability of the reference node wins the channel is: CW − 2 1 CW −1 1 n −1 CW − 2 1 CW − i − 1 n −1 Pwin = ∑ (∑ ) = ∑ ( ) (1) CW i = 0 CW j = i +1 CW i = 0 CW where n is the number of neighboring node of the reference node who have data to transmit and need to compete for the channel. As a result, the equivalent transmission rate of the reference node can be approximated as µ ′ = Pwin µ . The state of the reference node can be represented by the process X ( t ) = ( s( t ), k (t )) , where s( t ) = A and s (t ) = S denote the sensor node in active and sleep state, respectively. k ( t ) is the number of packets in the node buffer and 0 ≤ k (t ) ≤ K . The state transition diagram of the node queuing model can be shown in Fig. 3.
λa
λa A0
µ'
s S1
λa
" µ'
A1
s λs a
a S0
λs "
A K-1
a
s
AK
µ'
λs
SK-1
a
s SK
Figure 3. Transition diagram of queuing model
S
A
We observe that in the synchronous wakeup patterns of contention-based sensor networks, when the reference node is active, all the next-hop nodes of it are awake to be ready for communication. So the reference node can always relay packets to its next-hop nodes in active periods. Now we can model the reference node as a finite single server queue with server shutdown, as depicted in Fig. 2.
s Figure 1. CTMC model of the node state
where a = 1/ Ta is the transition rate from active to sleep state, and s = 1/ Ts is the transition rate from sleep to active state.
Now let Pak denotes the probability at which the reference node is active with k packets in its buffer. Correspondingly, Psk denote the probability at which the reference node is asleep with k packets in its buffer. We can derive the steady-state balance equations from the transition diagram as follows:
1335 1930-529X/07/$25.00 © 2007 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE GLOBECOM 2007 proceedings.
0 0 1 (a + λa ) Pa = sPs + µ ' Pa 0 0 ( s + λs ) Ps = aPa
(2)
k −1 k −2 k −1 k (a + λa + µ ') Pa = λa Pa + sPs + µ ' Pa k −1 k −1 k −2 ( s + λs ) Ps = aPa + λs Ps
(3)
(a + µ ') PaK = λa PaK −1 + sPsK K K K −1 sPs = aPa + λs Ps
(4)
C. Node Performance Metrics Using the balance equations above, we can obtain the following performance metrics of the reference node: i. The probability that the reference node is in active and sleep state, Pa and Ps , respectively: s a Pa = , Ps = (5) a+s a+s ii. The probability that the node buffer is empty with the node in active and sleep state, Pa0 and Ps0 ; the probability that K packets are in the node buffer with the reference node in active and sleep state, PaK and PsK : s a + s Pa0 − 1 K −1 K −1 0 = I + G + " + G + HG a Ps a + s s a + s PaK − 1 K −1 K −1 K −1 K = HG I + G + " + G + HG Ps a a + s where λa λs λs λa µ' µ' µ' µ' H = G= ( a + µ ')λs aλa aλa (a + µ ')λs (s + λ )µ ' (s + λ )µ ' sµ ' sµ ' s s
(6)
Λ 2 = ( Λ1 + Λ 2 )T (8) where T is the matrix of transition probabilities between nodes. Element tij represents the fraction of outgoing traffic of node i that is forwarded to its next-hop j. The reference node always forwards its packets along the highest priority route. When the routing policy is determined, the matrix T can be obtained in our analysis with the following formula: 1, node j is the next hop in the highest piority route tij = 0, node j is not the next hop in the highest piority route
B. Network Performance From our finite node queuing model, we can derive some network performance metrics such as average packet loss rate, network throughput, average packet delay, and average power consumption. i. Average packet loss rate In our model, packet loss is caused by the overflow of node buffer. The average packet loss rate of the whole network can be derived as: N
Ploss = ∑ ( PaK,i λa ,i + PsK,i λs ,i ) N λg
where PaK,i and PsK,i of node i can be obtained from (7), N is the total number of sensor nodes. ii. Network throughput Network throughput is the average packet arrival rate at the sink node, which is simply the overall effective packet generation rate of all the sensor nodes:
(7)
1 0 I = . 0 1
III. NETWORK PERFORMANCE MODEL In this section, we first derive the relay packet rate λr ,i of each node i. Second, using this parameter and the node performance metrics in section II, some useful network performance can be obtained. A. Estimation of the Relay Packet Rate λr ,i Remind that the average generated packet rate of the reference node is Pa ,i λg + Ps ,i λ g = λ g , and the relayed packet rate is Pa ,i λr ,i for each node i. Define Λ1 and Λ 2 as row vectors containing the λ g and Pa ,i λr ,i of all sensor nodes, respectively. λr ,i can be obtained using the balance equation of network flow:
(9)
i =1
N
C = N λ g − ∑ ( PaK,i λa ,i + PsK,i λs ,i )
(10)
i =1
iii. Average packet delay Assume that the mean number of packets in the buffer of the reference node is k , which can be calculated as: K
K
k =0
k =0
k = ∑ kPak + ∑ kPsk
(11) P0 = [1 , 1] G + 2G + " + ( K − 1)G K −1 + KHG K −1 a0 Ps From Little's law [11] of the whole network, the average packet delay can be calculated as: N
Dnet = ∑ ki C
(12)
i =1
iv. Average power consumption The power consumption of sensor nodes can be divided into three parts. The first part is caused by the power consumption due to sensing and processing in active state and sleep state, PWa and PWs . The second part is caused by the power consumption of the transceiver in transmission, reception and idle period: PWtran , PWrecv and PWidle , respectively. The third part is caused by the power consumption during transition from sleep state to active state: PWtr . Obviously the first part is equal to Pa PWa + Ps PWs . The power consumption of reference node in transmission
1336 1930-529X/07/$25.00 © 2007 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE GLOBECOM 2007 proceedings.
20
(13)
The average power consumption of the whole network can be deduced as follows: N
PWnet = ∑ PWi N
(14)
i =1
IV. SIMULATION RESULTS The goal of our research is to study the dependency of network performance metrics in terms of average power consumption, average packet delay, average packet loss rate and network throughput on the active/sleep duty cycle, time scale and the buffer size K. In this section, we present the simulation results on NS-2, and compare them against our analytical results derived from the network model. The maximum transmission range of each node is set to be 150m. We set the system parameters as follows: N=30, CW=64, PWtran = 500mW , PWrecv = 300mW , PWidle = 200mW , Etr = 0.025mJ , λg = 1packet /s , µ = 48packet/s , packet size = 50Bytes . Fig. 4 presents the tradeoff between average packet delay and average power consumption with different values of the duty cycle, which is equal to Pa . Fig. 5 presents the tradeoff between average packet loss rate and average power consumption with different values of duty cycle. In the simulation, the mean active duration is fixed to 0.16s. The simulation and analysis curves are matched closely, which shows the accuracy of our queue model in choosing proper duty cycles. Furthermore, we can see that with the increase of duty cycle, the average packet
0.4
5
0.2
0.3
0.4
0.5
0.6
0.7
0.8
average power consumption (W)
0.6
10
0 0.2
0 0.9
duty cycle
Figure 4. Tradeoff between average packet delay and power consumption with different duty cycles 0.4
0.8
power (simulation) power (analysis)
loss (simulation) loss (analysis) average packet loss rate
λr ) PWrecv µ λ E +[ Pa − Pwin ( Pa − Pa0 )](1 − r ) PWidle + tr µ Tcycle +[ Pa − Pwin ( Pa − Pa0 )](
power (simulation) power (analysis)
15
+[ Pa − Pwin ( Pa − Pa0 )](1 − λr µ ) PWidle The third part is the transition power consumption when nodes switch from sleep state to active state. In each period, the transition occurs once. So the third part can be obtained as: PWtr = Etr Tcycle
where Etr is the transition energy consumption from sleep to 1 1 active state, Tcycle = + is the mean duration of one period. a s So the power consumption of the reference node is: PW = Pa PWa + Ps PWs + Pwin ( Pa − Pa0 ) PWtran
0.8
delay (simulation) delay (analysis)
0.3
0.6
0.2
0.4
0.1
0.2
0
0.2
0.3
0.4
0.5
0.6
0.7
0.8
average power consumption (W)
[ Pa − Pwin ( Pa − Pa0 )](1 − λr µ ) , respectively. The second part can be calculated as: Pwin ( Pa − Pa0 ) PWtran + [ Pa − Pwin ( Pa − Pa0 )](λr µ ) PWrecv
delay and the average packet loss rate decrease at the expense of large average power consumption.
average packet delay (s)
state can be calculated as Pwin ( Pa − Pa0 ) PWtran . Due to the half-duplex transceiver, nodes can not transmit and receive at the same time. So the probability of the reference node in reception and idle state is Pa − Pwin ( Pa − Pa0 ) . Further, the probability of reference node in reception state and idle state can be calculated as [ Pa − Pwin ( Pa − Pa0 )](λr µ ) and
0 0.9
duty cycle
Figure 5. Tradeoff between average packet loss rate and power consumption with different duty cycles
Fig. 6 shows the dependency of average packet delay and average network power consumption on the mean duration of the active period. Fig. 7 shows the dependency of average packet loss rate and average network power consumption on the mean duration of the active period. In both figures, the duty cycle is set to be 30%. Fig. 6 and 7 demonstrate that our analytical model is also accurate for different active time scales. We can also obtain that the average packet delay and average packet loss rate increase with increase of the mean active duration. The reason is that when the active duration is larger, nodes will sleep longer, which increases the packet delay in the node buffer and the overflow probability of node buffer. At the same time, we can see that the average power consumption increases with the decrease of the mean active duration. This is because when the mean active duration decreases, the transition frequency increases and more transition energy are consumed. However the change of average power consumption is not obvious in Fig. 6, 7, because the transition power is only a small fraction of the total power consumption in our simulation. From our analysis, we find that properly choosing the time scale of sleep/active dynamics is also important in the design of an energy-efficient network with QoS requirements.
1337 1930-529X/07/$25.00 © 2007 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE GLOBECOM 2007 proceedings.
average packet delay (s)
curve of network throughput is not shown here, but anyway it can be determined by the average packet loss rate.
0.8
power (simulation) power (analysis)
delay (simulation) delay (analysis) 15
0.6
10
0.4
5
0.2
0 0.002
0.2
0.4
0.6
0.8
average power consumption (W)
20
0 1.26
1
mean active duration (s)
Figure 6. Impact of the active time scale on average packet delay and power consumption 0.8
0.8
loss (simulation)
average packet loss rate
loss (analysis)
average power consumption (W)
power (simulation) power (analysis)
0.6
0.6
0.4
0.4
0.2
0.2
V. CONCLUSION In this paper, we study the synchronous wakeup patterns in contention-based sensor networks where nodes alternate with a fixed schedule between two operation states: active and sleep, for energy conservation. We present an analytical finite queuing model at each node to evaluate the tradeoff between power efficiency and the QoS requirements in the synchronous wakeup patterns of contention-based sensor networks. Using our analytical model, we can investigate the impact of active/sleep duty cycle, time scale and buffer size on the network performance metrics in terms of average power consumption, packet delay, packet loss rate and network throughput. The simulation results match well with the analytical results which validate the accuracy of our model, and provide strong insight into the design of contention-based sensor networks with synchronous wakeup patterns. ACKNOWLEDGMENT This paper was supported by Science & Technology Committee of Shanghai Municipality Grant No. 05DZ15004. REFERENCES [1]
0 0.002
0.2
0.4
0.6
0.8
0 1.26
1
mean active duration (s)
Figure 7. Impact of the active time scale on average packet loss rate and power consumption 0.8
average packet loss rate
loss (simulation) loss (analysis)
power (simulation) power (analysis)
0.6
0.6
0.4
0.4
0.2
0.2
0
2
4
6
8
10
12
14
16
18
average power consumption (W)
0.8
0 20
queue size K
Figure 8. Impact of queue size on average packet loss rate and average power consumption
Fig. 8 shows the impact of node buffer size K on the average packet loss rate and the average power consumption. We can observe that our model can accurately predict the average packet loss rate and power consumption under different buffer sizes. We can also see that when the buffer size K increases, the average packet loss rate decreases and the average power consumption almost remains unchanged. Specially, we observe that when the buffer size K is larger than 12, the curve of the average packet loss rate levels out to a fixed value. So the node buffer size can be properly chosen as 12 without any penalty of power consumption. Due to the limitation of the paper, the
I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci, "A survey on sensor networks," IEEE Communications magazine, Aug.2002, pp. 102-114. [2] T. Zheng, S. Radhakrishnan and V. Sarangan, "PMAC: An Adaptive Energy-Efficient MAC Protocol for Wireless Sensor Networks," 19th IEEE International Proceedings on Parallel and Distributed Processing Symposium, 2005, pp.65-72. [3] S. Singh and C. S. Raghavendra, "PAMAS: power aware multi-access protocol with signaling for ad hoc networks," ACM SIGCOMM Computer Communication Review, July 1998, pp.5-26. [4] W. Ye, J. Heidemann, and D. Estrin, "Medium access control with coordinated adaptive sleeping for wireless sensor networks," IEEE/ACM Trans. Networking, Vol.12, No.3, 2004, pp.493-506. [5] T. V. Dam, K. Langendoen, "An adaptive energy-efficient mac protocol for wireless sensor networks," The First ACM Conference on Embedded Networked Sensor Systems, Los Angels, CA, USA, November 2003. [6] A. Fallahi, E. Hossain and A. S. Alfa, "QoS and energy trade off in distributed energy-limited mesh/relay networks: A queuing analysis," IEEE Transactions on Parallel and Distributed Systems, Vol.17, No.6, 2006, pp. 576-592. [7] http://www.cs.berkeley.edu/~awoo/smartdust/. [8] C. F. Chiasserini, M. Garetto, "Modeling the performance of wireless sensor networks," IEEE Infocom, Vol.1, March 2004, pp.7-11. [9] J. Luo, L. G. Jiang and C. He, "Finite queuing model analysis for energy and QoS tradeoff in contention-based wireless sensor networks," IEEE International Conference on Communications, 2007, to be published. [10] A. Bachir, D. Barthel, M. Heusse and A. Duda, "Hidden nodes avoidance in wireless sensor networks," International Conference on Wireless Networks, Communications and Mobile Computing, 2005Vol.1, June 2005, pp.612-617. [11] T. G. Robertazzi, "Computer Networks and Systems: Queueing Theory and Performance Evaluation," Springer-Verlag World Publishing Corp., 1990.
1338 1930-529X/07/$25.00 © 2007 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE GLOBECOM 2007 proceedings.