Full text
Distributed DBP: A (m,k)-firm Based Distributed Approach for QoS Provision in IEEE 802.15.4 Networks Tiago Semprebom, Carlos Montez, Ricardo Moraes, Francisco Vasques♣, Ricardo Cust´ odio† Automation and Systems Department - Federal University of Santa Catarina, Brazil IT - Instituto de Telecomunicac¸ ˜ oes, University of Aveiro, Portugal ♣IDMEC - Faculdade de Engenharia, University of Porto, Portugal †LabSEC - Computer Security Laboratory - Federal University of Santa Catarina, Brazil {tisemp, montez}@das.ufsc.br, {rmoraes, vasques}@fe.up.pt, [email protected] Abstract IEEE 802.15.4/Zigbee is one of the most widespread Wireless Sensor Network technologies. It may work either in beacon-enabled mode or in beaconless mode. When operating in beacon-enabled mode, it divides the superframe in sixteen equally-sized time slots, where the request for slot allocation is achieved through a CSMA/CA approach. This allocation method does not allow the provision of any service differentiation scheme, which is required for the transfer of time constrained messages. This paper proposes a QoS provision approach with minimal changes to existing protocols. Our approach improves the CSMA/CA algorithm by assigning decentralized priorities based on the (m,k)-firm task model. In this paper, a set of experimental results is presented and compared with the traditional approach currently offered by the standard. This set of experiments highlight the promising behavior of the proposed approach, when dealing with high network load scenarios. 1. Introduction In the last few years, the industrial Ethernet networks become a de facto standard for industrial communication environments. After a long period of development, these networks are widely disseminated in all types of automation applications. Thus, it is not expected significant developments in this area over the coming years. Nowadays, recent advances in wireless network technologies have motivated their employment in industrial automation systems, even at their lower levels, where timing constraints are often required [14]. One of the most obvious motivations is the need to reduce the amount of cabling in industrial plants, allowing the reduction of configuration and systems maintenance costs. Moreover, it is simpler to deal with moving machines, offering mobility and flexibility for industrial control systems. Within this context, a significant number of research works are addressing the provision of Quality of Service (QoS) within wireless networks [2, 12, 16, 17]. Therefore, it is expected that in the near future, the availability of wireless network solutions will also create a de facto standard for wireless communication in industrial environments. The IEEE 802.11 [3] and IEEE 802.15.4 [4] family of protocols are the main contenders to become this standard. One of the main reasons for the interest of the IEEE 802.11 protocol is that it is easily able to replace Ethernet in a transparent way. Implementing the two lowest layers of the ISO/OSI model, this protocol provide all the required functionalities to enable the support of the Internet Protocol (IP) that is virtually the basis for applications over Ethernet networks. Conversely, the use of the IEEE 802.15.4 protocol has been driven by its low power consumption. It allows the setup of communicating nodes powered-up by battery cells, which are able to be kept running during several years. This behavior allows the use of IEEE 802.15.4 miniaturized devices in environments where both power or data cables are difficult to install. This paper addresses Wireless Sensor Networks (WSNs) applied to industrial communications scenarios [17]. More specifically, we are investigating the realtime characteristics of the IEEE 802.15.4 protocol [4] that was specified by the IEEE 802.15.4 task group together with the ZigBee Alliance1. This standard was not developed for WSNs purposes, but it appears to be appropriate. Characteristics such as low energy, low transmission rate and low cost typically fit with the needs of WSNs. In order to support real-time communication in WSNs, a prioritized MAC mechanism should be used for traffic differentiation. One of the most promising solutions intended to provide real-time guarantees is the Guaranteed- Time Slot (GTS) mechanism, proposed in the IEEE 802.15.4 standard. This mechanism is quite attractive, because, when the network operates in beacon-enabled mode, the bandwidth can be reserved for devices that require time guarantees. The GTS mechanism works in the 1ZigBee Specification - www.zigbee.org/ 978-1-4244-2728-4/09/$25.00 ©2009 IEEE
Contention Free Period (CFP). However, the original CSMA/CA MAC protocol proposed by the standard does not support QoS for real-time applications, including requests for GTS allocation, alarm or network control messages. Many activities in industrial environments, such as sampling and actuation, must be periodically accomplished, and executed within bounded time. Figure 1 shows a typical control application, where sensor nodes sample information serving as the input to a controller, which in turn generates an actuation signal that is output to one or more actuator. In traditional approaches, many of these controllers assume no data losses during the control cycle. However some more recent studies [2, 10, 13, 16] indicate that the effect of control messages discards upon the performance of the control systems may be significantly encompassed. Therefore, they proposed the use of techniques where activation discards (or deadline misses) are supported, provided that such discards occur sparsely. x1x2x3x10 y1y3y10 y2 computation time tt+1 sampling actuation y4 x4 ms Figure 1. Industrial application control loop. Unfortunately, the appropriate use of real-time mechanisms in wireless sensor networks has not been thoroughly investigated. The provision of the required QoS for industrial control applications, providing timeless guarantees in WSNs is still an open issue. Considering the flexibility of some real-time applications that are able to tolerate deadline misses without failure, we explore the need for a QoS mechanism for real-time applications in IEEE 802.15.4 networks. Basically, this work investigates mechanisms for prioritization of real-time traffic, considering the (m,k)-firm task model, where tasks that have their execution near to a failure state, receive the highest system priorities. In order to implement the proposed prioritization scheme, there is just the need to manipulate two IEEE 802.15.4 CSMA/CA parameters: MacMaxCS- MABackoffs and MacMinBE. The remainder of this paper is structured as follows: In Section 2, the state of the art in the related subjects is presented. Section 3 presents an overview of both the IEEE 802.15.4 standard and the slotted CSMA/CA protocol. It also addresses some of the physical limitations imposed by the IEEE 802.15.4 standard when supporting time constrained applications. Section 4 describes the proposed algorithm for dynamic priorities allocation according to the (m,k)-firm task model, followed by the system model and assumptions used in this work. Afterwards, experimental results are presented in Section 6. Finally, in Section 7 some conclusions are drawn. 2. Related Work Recently, there have been relevant research efforts to reduce the transmission latency in WSNs. Particularly in the case of IEEE 802.15.4 standard, some research works tried to improve the slotted CSMA/CA mechanism originally proposed, in order to provide timing guarantees. Some of these works are briefly described below. In [7] the authors modify the CSMA/CA algorithm so that urgent messages are quickly delivered, using the priority toning technique. Devices that have frames with high priority to be transmitted, send a signal tone before receiving a beacon. If the tone signal is detected by a central node (PAN coordinator), an emergency notification is transferred in the beacon frame. This notification will alert other devices that do not have urgent messages to defer their transmissions, favoring the transmission of frames with higher priorities at the start of the contention access period (CAP). In [6], it is proposed an extension to [7] implementing just one clear channel assessment (CCA) instead of two CCAs – as proposed by the IEEE 802.15.4 specification – in order to prioritize urgent messages. These solutions improve the response time for real-time applications, but introduce significant changes to the IEEE 802.15.4 standard, impairing the use of COTS (commercial-off-the-shelf) hardware. In [9], instead of having the same parameters for all traffic types, the authors define service classes, where each class has configured its own attributes. The following parameters must be configured in a different way for traffic with low and high priority: MacMinBE, aMaxBE and CWInit. The authors evaluated four scenarios with FIFO and priority queues using OPNET simulator in different configuration settings. In the middle 90’s, Hamdaoui and Ramanathan introduced the notion of (m,k)-firm deadlines to schedule periodic tasks2in the context of soft real-time applications [1]. The adopted task model considers that a task misses its deadline if it cannot complete its execution until the beginning of the next period (deadline equal to the period). An algorithm was proposed using the concept of distance to failure as the heuristic to prioritize tasks (DBP – Distance Based Priority). In the DBP scheme, a task in the proximity of missing more than mdeadlines within a window of kservice requests (kperiods), receives the highest priority of the system. Similarly, the work entitled Skip-over from [8] considers a set of periodic tasks that tolerate discards (skips). These discards are characterized by a discard parameter s, which represents the tolerance of the task for deadline misses. The distance between two consecutive skips must be at least speriods. In [11], it is proposed an adaptive scheduling model called (p+i,k)-firm. This work extends the (m,k)-firm model, allowing the tasks also to specify time constraints 2The term task, in real-time context, means a resource that needs to be scheduled. In this work, a task refers to a message sent by a node. 2
as imprecise computation. The concept of distance to failure and the allocation of priorities by the DBP algorithm were extended. In overload conditions, the heuristic is used at runtime to schedule tasks according to their distances to failure, seeking to avoid dynamic failures. The proposal presented in this paper seeks to attend real-time tasks with (m,k)-firm deadlines running over IEEE 802.15.4. Our adopted approach follow some of the ideas presented in the works above. Similarly to the work of [9], our proposal also prioritizes some messages to offer quality of service to applications, but our task model considers tasks with (m,k)-firm constraints, which tolerates deadline misses and discards. Moreover, unlike [9] that just have a simulation assessment, we have used a real network environment, comprising of MicaZ motes. We also adopted the (m,k)-firm deadline scheduling proposed by [1]. However, we extend the original approach by proposing a new decentralized algorithm, the Distributed Distance Based Priority (DDBP). 2.1 Contributions of the paper In this paper, it is proposed a mechanism for distributed prioritization during the contention access period (CAP) in IEEE 802.15.4 networks, according to the (m,k)-firm guarantee model. The proposed model provides QoS for devices that wants to transmit higher priority messages. The main contributions of this work are: •Proposal of an extension to DBP (Distance Based Priority) scheduling approach, called DDBP (Distributed DBP). Unlike the traditional approach, DDBP operate in a decentralized manner, without any central scheduler. •A new communication approach for QoS provision to real-time applications based on the (m,k)-firm task model. The proposal is in accordance with the IEEE 802.15.4 standard, proposing just slightly changes to the standard, seeking to be compatible with equipment designed according to this specification. •The experimental evaluation of the proposed communication mechanism through a specifically designed setup, considering the overheads imposed by the environment and the physical limitations imposed by the standard. 3. IEEE 802.15.4 MAC Protocol The IEEE 802.15.4 [4] protocol supports two operational modes, which may be selected by a central node called PAN Coordinator. These two modes are: 1. beacon-enabled mode: in this operation mode, beacons are periodically sent by the PAN coordinator to identify its PAN and to synchronize nodes that are associated with it. 2. non beacon-enabled mode: in this operation mode, devices may simply send data ruled by a non-slotted CSMA/CA approach. In this mode, the superframe structure is not implemented. In this paper, we focus on the beacon-enabled mode, as it is specifically suited to provide timeliness guarantees to time-sensitive applications. When the coordinator selects the beacon-enabled mode, it forces the use of the superframe structure to manage the communication between devices associated with the PAN. The superframe is hold by a beacon interval (BI) and limited by two consecutive beacon frames, which includes an active period (divided into 16 equally-sized time slots) and an inactive period (Figure 2). The Coordinator interacts with the PAN during active periods, and all nodes may enter in a saving energy mode (sleep mode) during inactive periods. The Beacon Interval and the Superframe Duration (SD) are determined by two parameters, the Beacon Order (BO) and the Superframe Order (SO), respectively. The Beacon Interval is defined as follows: BI =aBaseSuperframeDuration . 2BO,(1) for 0≤BO ≤14 The Superframe Duration (SD), which corresponds to the active period, is defined as follows: SD =aBaseSuperframeDuration . 2SO,(2) for 0≤SO ≤BO ≤14 In Eqs. (1) and (2), aBaseSuperframeDuration denotes the minimum duration of the superframe, corresponding to SO=0. The IEEE 802.15.4 standard sets this duration to 960 symbols (a symbol corresponds to 4 bits). This value corresponds to 15.36 ms, assuming a data rate of 250 kbps, in the 2.4 GHz ISM frequency band. The active portion of each superframe is composed of three parts: beacon, CAP and CFP. The beacon shall be transmitted without contention periods (and without CSMA/CA), at the start of slot 0. The CAP must begin immediately after the beacon. The Contention Free Periods (CFP), if any, follows immediately after the CAP and extend the end of the active portion of the superframe. All the allocated Guaranteed Time Slots (GTSs) should be located within the CFP. If the communication mechanism exclusively uses the CAP, a device that wants to communicate must compete for the medium access using the slotted CSMA/CA approach. A device transmitting within the CAP ensures that its transaction is completed (including the reception of any acknowledgement) before the end of the CAP, or before the start of an inactive period (if exist). Figure 2 illustrates a superframe structure, where the Beacon Interval (BI) is twice as long as the active superframe duration (SD). There are also two allocated GTSs during the CFP. 3
GTS GTS (Inactive) CAP CFP Beacon Beacon 0123456789101112131415 SD = * 2 symbolsaBaseSuperframeDuration SO BI = * 2 symbolsaBaseSuperframeDuration BO (Active) 0<SO<BO<14 Figure 2. Superframe structure in IEEE 802.15.4 (assuming BO=SO+1, that is, BI is equal the twice the value of SD). 3.1 Slotted CSMA/CA protocol The IEEE 802.15.4 defines two CSMA/CA versions: a slotted CSMA/CA that is adopted in beacon-enabled mode and an unslotted CSMA/CA in beacon-less mode. In both cases, the CSMA/CA protocol is based on backoff periods, where a backoff period is equal to aUnitBackoffP eriod =20symbols. In the slotted CSMA/CA, the backoff period shall be aligned with the boundaries of the superframe slots. In the unslotted CSMA/CA, the devices backoff periods are completely independent of any other device backoff periods in the PAN. The CSMA/CA protocol uses three variables to schedule the medium access: 1. NB: is the number of times that the CSMA/CA algorithm enter in the backoff state while attempting to access the medium. 2. CW: contention window size, defines the required number of backoff periods with channel free before being able to start a transfer. 3. BE: backoff exponential, related to how many backoff periods a device must wait before checking the activity of the channel (busy or idle). Figure 3 shows the slotted CSMA/CA flowchart, which can be summarized in five steps. Slotted CSMA/CA Battery life extension? BE = macMinBE Locate backoff period boundary BE= min (2,macMinBE) yes no (1) Delay fo r (2 -1) backoff periods andom BE Perform CCA Channel idle? CW=CWinit, NB++, BE=(BE++,aMaxBE) NB > macMaxCSMA Backoffs ? Failure Success CW-- CW=0 yes no no yes yes no (2) (3) (4) (5) NB=0, CW=CWinit Figure 3. Slotted CSMA/CA algorithm. 1. NB, CW and BE initialization: 2. Random backoff delay: the algorithm seeks to avoid collisions waiting a random time from a interval generated in the range of [0,2BE −1] backoff periods. 3. CCA: is used to check if the channel is busy, running after the backoff time. 4. Busy Channel: if the channel is found busy, CW is reset and both NB and BE values are incremented. If the NB value exceeds the MacMaxCSMABackoffs value, the algorithm ends with a channel error access. Otherwise, the algorithm returns to step 2. 5. Idle Channel: if the channel is idle, the CW value is decreased. If the CW value expires (CW =0), the MAC protocol should begin its transmission successfully, otherwise, the algorithm returns to step 3. The CSMA/CA unslotted version is similar to the slotted version, except in what concerns the CW variable that is not used. 3.2 IEEE 802.15.4 Timing Upper-Bounds Despite the attempt to establish a generic and flexible communication standard, the IEEE 802.15.4 standard presents several restrictions at the application level in what concerns the support of real-time applications. For instance, there is small flexibility to establish period values and slots sizes. Figure 4 shows a superframe structure for SO=1 and BO=2. In this case, there is a superframe bounded by a beacon interval (BI) with 61.44 ms, that comprise an active period (SD) and an inactive period with 30.72 ms. Each of the sixteen slots that form the active period has 60 bytes (1.92 ms). Considering that, only one device is allocating one slot during the CFP, this device will have guaranteed access over the 15 slot, in other words, 28.8 ms after the begin of the superframe. It is worth mentioning that the maximum payload, for an acknowledged message with 24 bytes, is no more than 18 bytes. (Inactive Period) CAP CFP Beacon Beacon 0123456789101112131415 SD = 30.72 ms BI = 61.44 ms (Active Period) 60 bytes tack LIFS 24 bytes (payload) 16 bytes 20 bytes SO=1 BO=2 Figure 4. Beacon Interval, Superframe Duration and slot values in GTS slot allocation. Table 1 highlights the possible period values for the time slot lengths, according to the IEEE 802.15.4 standard [4]. Additionally, it also presents the slots size in the 4
active period. It can be observed that tasks periodicity in IEEE 802.15.4 applications can range from 15.36 ms to 4.2 minutes, with slot times varying from 960 μs to 15.7 seconds and the maximum number of bytes that can be transmitted according to the time slots varying from 30 bytes up to 491 Kbytes. BO=SO Period (ms) Time Slot (ms) Slot size (bytes) 0 15.4 0.96 30 1 30.7 1.92 60 2 61.4 3.84 120 3 122.9 7.68 240 4 245.8 15.36 480 5 491.5 30.72 960 6 983.1 61.44 1,920 7 1,966.1 122.88 3,840 8 3,932.2 245.76 7,680 9 7,864.3 491.52 15,360 10 15,728.6 983.04 30,720 11 31,457.3 1,966.08 61,440 12 62,914.6 3,932.16 122,880 13 125,829.1 7,864.32 245,760 14 251,658.2 15,728.64 491,520 Table 1. Superframe periods in IEEE 802.15.4 (assuming no inactive period). Table 2 presents the payload values available for applications in each slot during the active period (SD), within one superframe. It considers the IFS time interval and the acknowledge message duration within the same slot, as illustrated in Figure 4. The relation between slot sizes and tasks periods presented in Table 1 and, the maximum payload sizes presented in Table 2 are drawbacks from the use of guaranteed time slots (GTS) for some real-time applications, mainly because the need for slots with larger transmission capacity implies the imposition of longer periods for applications. 4. Distributed DBP Algorithm In this section, we propose the Distributed DBP (DDBP) algorithm, intended to be used at the MAC level of IEEE 802.15.4 networks. It works in slotted CSMA/CA during the Contention Access Period (CAP). Therefore, this algorithm has not the hard limitations previously presented in the GTS scheme. This proposal is built upon the distance-based priority concept, which was introduced in [1]. In order to apply this concept, it is necessary to maintain a state that captures the recent history of the deadline accomplishment for each message. This execution history is a k-tuple that stores the kmost recent information about the messages. Let 0 and 1 represent a deadline miss and a deadline meet, respectively. For each new produced state, the history is moved (from right to left) and the new state added to the far right position. For instance, a message Acknowledged Unacknowledged SO LIFS SIFS LIFS SIFS 0 0 8 10 24 1 24 38 40 54 2 84 98 100 114 3 204 218 220 234 4 444 458 460 474 5 924 938 940 954 6 1,884 1,898 1,900 1,914 7 3,804 3,818 3,820 3,834 8 7,644 7,658 7,660 7,674 9 15,324 15,338 15,340 15,354 10 30,684 30,700 30,698 30,714 11 61,404 61,418 61,420 61,434 12 122,844 122,858 122,860 122,874 13 245,724 245,738 245,740 245,754 14 491,484 491,498 491,500 491,514 Table 2. IEEE 802.15.4 real payload (bytes). with k=3and history “110” denotes that the most recent message missed its deadline and, the other two met their deadlines. Considering a message j(hereafter referred as a task j), it is possible to get the distance to failure dj(k)following the calculation scheme proposed in [1]: Let metj(n, h)denote the position (from the right) of the nth meet deadline in history h. If there is less than n1sin h, then metj(n, h)=k+ 1. For instance, metj(1,“011”)=1, metj(1,“010”)=2, metj(2,“101”)=3, metj(2,“001”)=4. Then using this function, the distance to failure is given by: dj(k)← (k−metj(m, h)+1). Figure 5 shows the state transition diagram for a task with (2,3)-firm constraints. Thus, task jcan be in one of 2kjpossible states. The shaded states have less than two meets and therefore are failing states. 000 001 010 011 110111 101 100 1 00 0 0 1 1 0 1 0 1 1 0 1 0 1 000100010 111History 011 101 110 001 d (k) j00011220 Figure 5. Distance to failure for (2,3)-firm task (based on [1]). There are some studies that propose scheduling algorithms considering tasks with (m,k)-firm constraints [1, 11, 15]. However, all these algorithms consider a cen- 5
tral node – a scheduler – that is aware of the history of all tasks and makes decisions based on the overall system knowledge. In this paper, we are interested in investigate dynamic scheduling algorithms (online), where the schedule is done in a decentralized way, considering the local conditions at each node. That is, the case where there is no omniscient scheduler. Figure 6 outlines the proposed Distributed DBP algorithm, which intend to provide QoS between devices that compose the PAN. This algorithm is based on the (m,k)-firm task model and seeks to minimize the occurrence of the dynamics failures in the system. 1send(message); 2 3// Event fired after sending the message 4// (received ACK or a timeout) 5event(results) 6{ 7switch(results) 8{ 9case SUCCESS: 10 answer =1; 11 break; 12 case CSMA_FAIL: 13 case NO_ACK: 14 answer =0; 15 break; 16 default: 17 } 18 19 dist_failure =up_dist_fail(answer); 20 priority_change(distance_failure); 21 } Figure 6. Distributed DBP algorithm (running in each node). In general terms, the algorithm works as follows: any device implementing the Distributed DBP algorithm, after sending a message addressed to the Coordinator, verify if the message was successfully transmitted by an ACK frame detection, which means a deadline accomplishment (line 9 in Figure 6). On the other hand, if a device does not transmit its message within the current superframe, a deadline miss occurs (line 12). Finally, if an acknowledgment message is not received during a specific time by the device that sent the message, a deadline miss is also signaled (line 13). Afterwards, the distance to failure of the device is updated based on the state of deadlines attendance (variable answer) and the device priority is updated. If a device is close to a dynamic failure condition (dj(k)=1), it will receive the highest system priority level , i.e., the value of the variable MacMinBE is updated to 5 and the variable MacMaxCSMABackoffs to 6, thereby increasing the success probability in the next transmission; otherwise MacMinBE =0and MacMaxCSMABackoffs =5. The use of these CSMA/CA parameters to implement the dynamic priorities in the network nodes has been adopted in our approach, after several experimentation done using the prototype built with MicaZ motes3. Those parameters were previously investigated in [9]. But just based upon simulation studies. They shown in that work that in some specific conditions the probability of success increases for high MacMinBE values. 5. System Model and Assumptions In this paper, it is considered an IEEE 802.15.4 cluster composed of a set of sensor nodes in the range of a PAN coordinator. The star topology was adopted in our model (Figure 7). This star topology can be extended for a large-scale sensor network using clustering or two-tiered architectures. ... dev (m,k)-firm constraints PAN dev dev dev dev dev dev PAN Coordinador dev dev dev Figure 7. System model in star topology. It is assumed that the PAN coordinator sets up the network determining the superframe structure through the BO (beacon order) and SO (superframe order). The chosen SO value is assumed to be appropriate for the periods of tasks being executed in the network (Section 3.2). The main problem addressed in this paper is how the PAN devices may dynamically control its priorities seeking to minimize the occurrences of dynamics failures. That is, the target is to guarantee the (m,k) QoS constraints of each node i. Formally, our approach can be described as follows. A set with Nindependent periodic tasks can be represented as Γ={τ1,τ 2, ...τn}. Each task is non-preemptive and characterized by a 5-tuple (Ti,D i,C i,m i,k i), where Ti represents the task period, Direpresents the task deadline, Cirepresents the task worst-case execution time, miand kirepresent the (m,k)-firm constraints of a task i(1≤ mi≤ki). In the specific case of our model, a periodic task represents an application that runs in a network node and the tasks periods are the superframe periods. In this paper, we consider the relative deadline equal to the task period, i.e. a task misses its deadline if it is not able to transmit its message in the present superframe period. The worst-case execution time from a task is the message transmission time. Finally, as mentioned before, miand kirepresent 3http://www.xbow.com 6
the (m,k)-firm constraints for τi, which defines that at least mout any kconsecutive jobs in a periodic task τimust meet their deadlines to avoid a dynamic failure condition. Considering pas the superframe period (Beacon Interval, composed of CAP, CFP and Inactive Period), the following assumptions are considered in the system model: Ti=ptask periods are coincident with the superframe period; Di=Ti: deadline equal to period; and miand ki: ∈Z+,1≤m≤k. 6. Experimental Results Finally, the main target of this section is to present an experimental assessment of the proposed Distributed DBP, when compared with the conventional approach offered by IEEE 802.15.4 standard. Remember that this standard does not offer any mechanism for service differentiation between devices that compose the PAN. The experimental assessment was conducted using a network composed of MicaZ motes running OpenZB4. OpenZB implements the protocols stack specified by IEEE 802.15.4 standard, developed in NesC language on TinyOS operating system. The experimental setup is composed of eleven MicaZ nodes. One of the nodes was chosen to be the coordinator and three other were configured to send periodical messages to the coordinator, containing (m,k)- firm constraints. Seven other nodes were programmed to send messages continuously, emulating background traffic load, aiming to overload the medium. Such three nodes with (m,k)-firm constraints have its (m,k) values equal to m=2and k=3(see Figure 5). Those nodes were configured to wait for an acknowledge message (ACK) after sending a data message. All network nodes send messages with 93 bytes – taking into account a header of 13 bytes. The superframe structure has been configured using the parameters BO = 5and SO =4therefore, with BI = 491.5ms. The (m,k)- firm nodes had their periods fixed to the same value of BI. The external network load imposed to the system was implemented through the use of background nodes generating messages with different periodicity. Table 3 and Figure 8 present the network load as a percentage rate, where the 100% value represents the calculated network upper bound, assuming a real maximum data rate of 130 Kbps [5]. In the experiments, the minimum network load imposed to the system was 3%. This network load was obtained just considering the messages from (m,k)-firm nodes, without interference from background nodes. Conversely, the other network loads, i.e. 12%, 20%, 36%, 48%, 61%, 70%, 84% and 104% were obtained varying the periodicities from the messages being generated by the background nodes (500ms, 250ms, 125ms, 90ms, 70ms, 60ms, 50ms and 40ms). For each network load, at least 10 experiments were carried out, 4http://www.open-zb.net IEEE standard approach Distributed DBP Network Deadline Deadline Load Misses Failures Misses Failures 3% 15.1% 5.9% 15.2% 4.2% 12% 32.0% 24.1% 29.5% 18.7% 20% 34.4% 26.4% 31.6% 19.9% 36% 36.5% 29.6% 31.9% 21.2% 48% 36.2% 29.2% 33.5% 24.3% 61% 37.6% 31.3% 35.3% 27.0% 70% 37.7% 31.9% 36.6% 28.6% 84% 39.6% 34.4% 38.6% 30.8% 104% 41.1% 35.9% 39.2% 32.8% Table 3. Standard and DDBP approaches. using the proposed Distributed DBP approach or the standard CSMA/CA. Each experiment was run during about 60 seconds. Table 3 presents the behavior of the standard approach (without priorities, as specified in the IEEE 802.15.4 standard) versus the DDBP approach. It can be observed that for the case of the standard approach, under moderate network load conditions, the dynamic failures were about 30%, while in severe network load conditions the dynamic failures have remained close to 35%. In DDBP, to prioritize the traffic of messages from nodes with (m,k)-firm constraints, the parameters MacMaxCSMABackoffs and MacMinBE of the CSMA/CA protocol are not statically predetermined. By default, these parameters begin with values MacMaxCSMABackoffs =5and MacMinBE =0, whose values represent a node with low priority. However, when the distance to failure in a node reaches the value 1 (or 0), this node is near from (or on) a dynamic failure. In this case, its parameters are dynamically changed to MacMaxCSMABackoffs =6 and MacMinBE =5. These parameter values increase the successful message transmission probability, as it represents the highest priority in the system. 0% 5% 10% 15% 20% 25% 30% 35% 40% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 110% Load Dynamic Failures Standard Approach Distributed DBP Figure 8. Dynamic failures vs utilization. Table 3 and Figure 8 present the experimental results comparing the proposed DDBP and the standard approaches. It is clear that there is a decrease in the number of dynamic failure occurrences. During moderate network 7
load conditions, dynamic failures were close to 20%. In conditions of severe overload, the occurrence of dynamic failures remained close to 30%. We can concluded that the behavior of a IEEE 802.15.4 WSN can be improved with respect to non-occurrence of dynamic failure, if it is used a suitable algorithm for allocation of priorities. 7. Conclusions This paper proposed a decentralized approach to the WSN traffic prioritization, seeking to reduce the occurrence of dynamic failures. Experimental results show a considerable reduction in the number of dynamic failures in the nodes using the Distributed DBP in contrast with the IEEE 802.15.4 standard approach. Furthermore, the proposed DDBP approach requires only minimal add-ons to the IEEE 802.15.4 protocol, ensuring compatibility with the standard and with the use of COTS devices. It was also observed that using MicaZ + OpenZB nodes it is not possible to guarantee the performance levels and timing specified by the IEEE 802.15.4 standard. Another important point that needs to be highlighted refers to the PAN Coordinator behavior when subjected to severe overloads. For example, it was observed that when the number of messages addressing the PAN Coordinator increase, it will take longer than expected to generate beacons frames, because the PAN coordinator needs to handle all the received messages to create the related ACK messages. The proposed decentralized approach is not optimal, mainly because there is no global vision of the system. However, this approach is more scalable than a centralized one. In addition, the use of a decentralized approach avoid synchronization messages between the scheduler (presumably, the PAN Coordinator) and other nodes that compose the PAN. To our best knowledge, there is no other work offering Quality of Service for applications that tolerate skips in WSNs. More specifically, approaches based on the (m,k)- firm task model that seek to provide mechanisms reflecting the tolerance to deadline misses without failure. References [1] M. Hamdaoui and P. Ramanathan. A dynamic priority assignment technique for streams with (m,k)-firm deadlines. IEEE Trans. Computers, 44(12):1443–1451, 1995. [2] J. P. Hespanha, P. Naghshtabrizi, and Y. Xu. A survey of recent results in networked control systems. Proc. of the IEEE, 95(1):138–162, 2007. [3] IEEE. IEEE Standard for Information Technology - Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. ANSI/IEEE Std 802.11, 1999 Edition (R2003), 2003. [4] IEEE. Part 15.4: Wireless medium access control (mac) and physical layer (phy) specifications for low-rate wireless personal area network (lr-wpan). in IEEE-SA Standards Board 802.15.4-2006, 2006. [5] Jennic. Calculating IEEE 802.15.4 Data Rates. Application Note, 2006. [6] T. Kim and S. Choi. Priority-based delay mitigation for event-monitoring ieee 802.15.4 lr-wpan. IEEE Communications Letters, 2005. [7] T. Kim, D. Lee, and J. Ahn. Priority toning strategy for fast emergency notification in ieee 802.15.4 lr-wpan. In Proc. of the 15th Joint Conference on Communications & Information (JCCI), 2005. [8] G. Koren and D. Shasha. Skip-over: Algorithms and complexity for overloaded systems that allow skips. Proc. Real-Time Systems Symp., pages 110–117, 1995. [9] A. Koubaa, M. Alves, B. Nefzi, and Y.-Q. Song. Improving the ieee 802.15.4 slotted csma/ca mac for time-critical events in wireless sensor networks. in proc. of the 5th International Workshop on Real-Time Networks, pages 35– 40, 2006. [10] M. Lemmon, Q. Ling, and Y. Sun. Overload management in sensor-actuator networks used for spatially-distributed control systems. Proc. of the International Conference on Embedded Networked Sensor Systems, 5(7):162–170, 2003. [11] C. Montez, J. Fraga, R. Oliveira, and J.-M. Farines. An adaptive scheduling approach in real-time corba. In The 2nd IEEE Int. Symp. on Object-oriented Real-time distributed Computing, pages 301–309, 1999. [12] F. D. Pellegrini, D. Miorandi, S. Vitturi, and A. Zanella. On the use of wireless networks at low level of factory automation systems. Proceedings of the IEEE on Ind. Informatics, 2(2):129–143, 2006. [13] L. Schenato, M. Franceschetti, and S. S. Sastry. Foundations of control and estimation over lossy networks. Proc. of the IEEE, 95(1):163–187, 2007. [14] S. Vitturi, I. Carreras, D. Miorandi, L. Schenato, and A. Sona. Experimental evaluation of an industrial application layer protocol over wireless systems. IEEE Trans. on Industrial Informatics, 3(4):275–288, 2007. [15] R. West and Y. Zhang. Dynamic window-constrained scheduling of real-time streams in media servers. IEEE Trans. on Computers, 53(6):744–759, 2004. [16] A. Willig. Recent and emerging topics in wireless industrial communications: A selection. IEEE Trans. on Indust. Informatics, 4(2):102–124, 2008. [17] A. Willig, K. Matheus, and A. Wolisz. Wireless technology in industrial networks. Proceedings of the IEEE, 93(6):1130 – 1151, 2005. 8