06812138

Embed Size (px)

Citation preview

  • 8/19/2019 06812138

    1/14

    End-to-End Communication Delay Analysisin Industrial Wireless Networks

    Abusayeed Saifullah, You Xu, Chenyang Lu, and Yixin Chen

    Abstract—WirelessHART is a new standard specifically designed for real-time and reliable communication between sensor and

    actuator devices for industrial process monitoring and control applications. End-to-end communication delay analysis for

    WirelessHART networks is required to determine the schedulability of real-time data flows from sensors to actuators for the purpose of

    acceptance test or workload adjustment in response to network dynamics. In this paper, we consider a network model based on

    WirelessHART, and map the scheduling of real-time periodic data flows in the network to real-time multiprocessor scheduling. We then

    exploit the response time analysis for multiprocessor scheduling and propose a novel method for the delay analysis that establishes an

    upper bound of the end-to-end communication delay of each real-time flow in the network. Simulation studies based on both random

    topologies and real network topologies of a 74-node physical wireless sensor network testbed demonstrate that our analysis provides

    safe and reasonably tight upper bounds of the end-to-end delays of real-time flows, and hence enables effective schedulability tests for

    WirelessHART networks.

    Index Terms—Wireless sensor networks, scheduling, real-time and embedded systems

    Ç

    1 INTRODUCTION

    WIRELESS   Sensor-Actuator Networks (WSANs) are anemerging communication infrastructure for monitor-ing and control applications in process industries. In a feed- back control system where the networked control loops areclosed through a WSAN, the sensor devices periodicallysend data to the controllers, and the control input data arethen delivered to the actuators through the network. Tomaintain the stability and control performance, industrialmonitoring and control applications impose stringent end-

    to-end delay requirements on data communication betweensensors and actuators [1]. Real-time communication is criticalfor process monitoring and control since missing a deadlinemay lead to production inefficiency, equipment destruction,and severe economic and/or environmental threats. Forexample, in oil refineries, spilling of oil tanks is avoided bymonitoring and control of level measurement in real-time.

    WirelessHART [2] has been designed as an open WSANstandard to address the challenges in industrial monitoringand control. To meet the stringent real-time and reliabilityrequirements in harsh and unfriendly industrial environ-ments, the standard features a centralized network manage-

    ment architecture, multi-channel time division multipleaccess (TDMA), redundant routes, and channel hopping [1].These unique characteristics introduce unique challenges inend-to-end delay analysis for process monitoring and con-trol in WirelessHART networks.

    In this paper, we address the problem of end-to-end delayanalysis for periodic real-time flows from sensors to

    actuators in a network that is modeled based on Wireles-sHART (simply named WirelessHART network throughoutthe paper). We derive upper bounds of the end-to-end delaysof the flows under fixed priority scheduling where the trans-missions associated with each flow are scheduled based onthe fixed priority of the flow. Fixed priority scheduling is acommon class of real-time scheduling policies in practice.

    Analytical delay bounds can be used to test, both atdesign time and for online admission control, whether a set

    of real-time flows can meet all their deadlines. Compared toextensive testing and simulations, an end-to-end delay anal-ysis is highly desirable in process monitoring and controlapplications that require real-time performance guarantees.It can also be used for adjusting the workload in response tonetwork dynamics. For example, when a channel is black-listed or some routes are recalculated, the delay analysiscan be used to promptly decide whether some flow has to be removed or some rate has to be updated.

    A key insight underlying our analysis is to map the real-time transmission scheduling in WirelessHART networks toreal-time multiprocessor scheduling. This mapping allows

    us to provide a delay analysis of the real-time flows in Wire-lessHART networks by taking an analysis approach similarto that for multiprocessor scheduling. By incorporating theunique characteristics of WirelessHART networks into thestate-of-the-art worst case response time analysis for multi-processor scheduling [3], we propose a novel end-to-enddelay analysis for fixed priority transmission scheduling inWirelessHART networks. The proposed analysis calculatesa safe and tight upper bound of the end-to-end delay of every real-time periodic data flow in pseudo polynomialtime. Furthermore, we extend the pseudo polynomial timeanalysis to a polynomial time method that provides slightly

    looser bounds but can calculate the bounds more quickly.We evaluate our analysis through simulations based on both random network topologies and the real networktopologies of a wireless sensor network testbed consisting

      The authors are with the Department of Computer Science and Engineer-ing, Washington University in St. Louis, St. Louis, MO 63130.E-mail: {saifullaha, yx2, lu, chen}@cse.wustl.edu.

     Manuscript received 9 Nov. 2012; revised 18 Nov. 2013; accepted 17 Apr.

    2014. Date of publication 7 May 2014; date of current version 8 Apr. 2015.Recommended for acceptance by H. Shen. For information on obtaining reprints of this article, please send e-mail to:[email protected], and reference the Digital Object Identifier below.Digital Object Identifier no. 10.1109/TC.2014.2322609

    IEEE TRANSACTIONS ON COMPUTERS, VOL. 64, NO. 5, MAY 2015 1361

    0018-9340 2014 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

  • 8/19/2019 06812138

    2/14

    of  74   TelosB motes. The simulation results show that ourdelay bounds are safe and reasonably tight. The proposedanalysis, hence, enables an effective schedulability test forWirelessHART networks.

    In the rest of the paper, Section 2 reviews related works.Section 3 presents the network model. Section 4 defines thescheduling problem. Section 5 presents the end-to-enddelay analysis. Section 6 extends our delay analysis to a

    polynomial time method. Section 7 presents evaluationresults. Section 8 concludes the paper.

    2 RELATED WORK

    Real-time transmission scheduling in wireless networks has been widely studied in previous works [4]. However, veryfew of those are applicable to WirelessHART networks.Scheduling based on CSMA/CA protocols has been studiedin [5], [6], [7], [8], [9], [10]. In contrast, WirelessHART adoptsa TDMA-based protocol to achieve predictable latency bounds. Although TDMA-based scheduling has been stud-

    ied in [11], [12], [13], these works do not focus on schedul-ability or delay analysis. The real-time schedulabilityanalysis has been studied in [14], [15] for single-hop wire-less network where communications happen between anaccess point and a set of clients on a single active channel ata time. In contrast, our work focuses on multi-channel andmulti-hop wireless mesh network. The authors in [16] pro-pose a schedulability analysis for multi-hop wireless sensornetworks (WSNs) by upper bounding the real-time capacityof the network. However, in their model, taking the advan-tage of TDMA or frequency division has no effect. Theschedulability analysis for WSNs has also been pursued in

    [17], [18]. But these are designed only for data collectionthrough a routing tree using single channel, and do notaddress multi-channel communication or multi-path rout-ing supported by WirelessHART.

    For WirelessHART networks, routing [19], schedulemodeling [20], real-time transmission scheduling [21], [22],and rate selection [23] have been studied recently. Ourwork in [21] proves the NP-hardness of the optimal real-time transmission scheduling in a WirelessHART network.It also presents an optimal scheduling algorithm based on branch-and-bound and a heuristic policy. Neither algorithmemployed fixed priority. Moreover, no efficient worst-casedelay analysis was provided for either algorithm. We stud-

    ied priority assignment in [22] and rate selection methods in[23] for real-time flows in WirelessHART networks, both of which leverages worst-case delay analysis which is thefocus of this paper. To summarize, none of our previousworks addresses worst-case delay analysis. In contrast, thispaper presents an end-to-end delay analysis that is suitablefor any fixed priority scheduling policy. An efficient delayanalysis is particularly useful for online admission controland adaptation (e.g., when network route or topologychanges) so that the network manager is able to quicklyreassess the schedulability of the flows.

    3 NETWORK MODEL

    We consider a network model inspired by WirelessHART.A WirelessHART network consisting of a set of field devices

    and one gateway. These devices form a mesh network thatcan be modeled as a graph G  ¼ ðV; E Þ, where V  is the set of nodes (i.e., field devices and the gateway), and E   is the setof communication links between the nodes. A  field device  iseither a sensor node, an actuator or both, and is usually con-nected to process or plant equipment. The gateway connectsthe WirelessHART network to the plant automation system,and provides the host system with access to the network

    devices. For any link   e ¼ ðu; vÞ   in   E , devices   u 2  V    andv 2  V  can communicate with each other. For a transmission,denoted by~uv, that happens along link   ðu; vÞ, device   u   isdesignated as the  sender  and device  v   the   receiver. All net-work devices (i.e., field devices and the gateway) are able tosend, receive, and route packets.

    For process control, the controllers are installed in controlhosts connected to the gateway through the plant automa-tion network. The sensor devices deliver their sensor data tothe gateway. The control messages from the gateway arethen delivered to the actuators through the wireless meshnetwork. The unique features that make WirelessHART

    particularly suitable for industrial process control are as fol-lows [1], [2].

    Centralized management.   A WirelessHART network ismanaged by a  centralized network manager   installed in thegateway. The network manager collects the network topol-ogy information, and determines the routes. It then createsthe schedule of transmissions, and distributes the schedulesamong the devices. The centralized management limits thenumber of nodes under a gateway [24] that makes the cen-tralized management practical and desirable, and enhancesthe reliability and real-time performance.

    Time division multiple access.  In WirelessHART networks,

    time is synchronized, and communication is TDMA-based.A time slot is 10 ms long, and allows exactly one transmis-sion and its associated acknowledgement between a devicepair. For transmission between a receiver and its senders, atime slot can be either dedicated or shared. In a dedicated timeslot, only one sender is allowed to transmit to the receiver. Ina shared slot, more than one sender can attempt to transmit tothe same receiver. Since collisions may occur within a sharedslot, a transmission within a shared slot may be successfulonly when other senders do not need to send.

    Route diversity. To enhance the end-to-end reliability, both upstream and downstream communications are sched-uled based on graph routing. A   routing graph  between two

    devices is a directed list of paths that connect two devices,thereby providing redundant paths between them. On onepath from the source to the destination, the scheduler allo-cates a dedicated slot for each en-route device starting fromthe source, followed by allocating a second dedicated sloton the same path to handle a retransmission. Then, to offsetfailure of both transmissions along a primary link, thescheduler again allocates a third shared slot on a separatepath to handle another retry.

    Spectrum diversity. Spectrum diversity gives the networkaccess to all 16 channels defined in IEEE 802:15:4 and allowsper time slot channel hopping in order to avoid jamming

    and mitigate interference from coexisting wireless systems.Besides, any channel that suffers from persistent externalinterference is blacklisted  and not used. Due to difficulty indetecting interference between nodes and the variability of 

    1362 IEEE TRANSACTIONS ON COMPUTERS, VOL. 64, NO. 5, MAY 2015

  • 8/19/2019 06812138

    3/14

    interference patterns, WirelessHART networks typicallyavoid spatial reuse of a channel within the same time slot.Thus all transmissions in a time slot use different channels.This strategy effectively avoids transmission failure due tointerference between concurrent transmissions, thereby pro-viding a high degree of reliability for critical process moni-toring and control applications. Henceforth we assumethere is no spatial reuse of channels in this work.

    Each device is equipped with a half-duplex omnidirec-tional radio transceiver and, hence, cannot both transmit andreceive in the same time slot. In addition, two transmissionsthat have the same intended receiver interfere each other.Therefore, two transmissions~uv  and~ab  are  conflicting  and,hence, are not scheduled in the same slot if  ðu ¼  aÞ _ ðu ¼bÞ _ ðv ¼  aÞ _ ðv ¼  bÞ. Since different nodes experience dif-ferent degrees of conflict during communication, transmis-sion conflicts play a major role in analyzing the end-to-enddelays in the network.

    Simplifying assumptions. As the first step toward a real-time schedulability analysis for WirelessHART networks,

    we make some simplifying assumptions on routing. Insteadof a general graph routing, we assume a multi-path routing between every source and destination pair. To simplify theanalysis further, we also assume that the packets are sched-uled using dedicated slots only. The simplifying assump-tion facilitates the development of the first end-to-end delayanalysis based on real-time scheduling theory. While ouranalysis leverages these simplified assumptions, it providesfundamental building blocks for the analysis based on gen-eral graph routing.

    4 END-TO-END SCHEDULING PROBLEM

    We consider a WirelessHART network  G ¼ ðV; E Þ with a setof end-to-end flows denoted by  F. Each flow  F j 2 F is char-acterized by a period P  j, a deadline  D j  where D j   P  j, anda set of one or more routes F j. Each f  2 F j is a route from anetwork device   Source j 2  V , called the   source of   F j, toanother network device Destination j 2  V , called the destina-tion of   F j, through the gateway. Each flow   F j   periodicallygenerates a packet at period  P  j  which originates at  Source jand has to be delivered to  Destination j within deadline D j.For flow   F j, if a packet generated at slot   r   is delivered toDestination j  at slot  f  through a route  f 2 F j, its  end-to-enddelay through f is defined as L jðfÞ ¼  f   r þ 1.

    A flow  F j  may need to deliver its packet through morethan one route in  F j. If the delivery through a route fails,the packet can still be delivered through another route inF j. Therefore, in a TDMA schedule, for a flow F j, time slotsmust be reserved for transmissions through each route inF j   for redundancy. Hence, for end-to-end delay analysispurpose, through each of its routes flow  F j   is treated as anindividual flow  F i   with deadline and period equal to   F j’sdeadline and period, respectively. That is, F j is now consid-ered jF jj  individual flows, each with a single route. There-fore, from now onward the term ‘flow’ will refer to anindividual flow through a route. We denote this set of flows

     by   F  ¼ fF 1; F 2; . . . ; F N g. Thus, associated with each flowF i; 1   i    N;  are a period P i, a deadline  Di, a source nodeSourcei, a destination node   Destinationi, and a route   fifrom   Sourcei   to   Destinationi. For each flow   F i, if every

    transmission is repeated  x   times to handle retransmissionon a single route, then the number of transmissions requiredto deliver a packet from Sourcei  to Destinationi  through itsroute  f i   is C i  ¼  lengthðfiÞ x, where lengthðfiÞ  is the num- ber of links on   fi. Thus,   C i   is the number of time slotsrequired by flow F i.

     Fixed priority scheduling.   For fixed priority scheduling,each flow  F i  has a fixed priority. We assume that all flows

    are ordered by priorities. Flow  F i  has higher priority thanflow F  j if and only if  ilt; j. We use hpðF iÞ to denote the set of flows whose priorities are higher than that of flow  F i. Thatis,  hpðF iÞ ¼ fF 1; F 2; . . . ; F i1g. In practice, priorities may beassigned based on deadlines, rates, or the criticality of thereal-time flows. Priority assignment policies are not thefocus of this paper, and our delay analysis can be applied toany fixed priority assignment. Under a  fixed priority schedul-ing policy, the transmissions of the flows are scheduled inthe following way. Starting from the highest priority flowF 1, the following procedure is repeated for every flow  F i  indecreasing order of priority. For current priority flow F i, the

    network manager schedules its transmissions along its route(starting from the source) on earliest available time slots andon available channels. A time slot is available if no conflictingtransmission is already scheduled in that slot. In a Wireles-sHART network, the complete schedule is divided intosuperframes. A   superframe   represents transmissions in aseries of time slots that repeat infinitely and represent thecommunication pattern of a group of devices.

    Problem formulation. Transmissions are scheduled usingm channels. The set of flows  F  is called  schedulable under ascheduling algorithm A, if A is able to schedule all transmis-sions in   m  channels such that no deadline is missed, i.e.,L

    i   D

    i; 8F 

    i 2  F 

    , with L

    i  being the end-to-end delay of  F 

    i.For  A, a schedulability test  S is  sufficient  if any set of flowsdeemed schedulable by   S   is indeed schedulable by   A. Todetermine schedulability of a set of flows, it is sufficient toshow that, for every flow, an upper bound of its worst caseend-to-end delay is no greater than its deadline. Thus, giventhe flows F  and a fixed priority algorithm A, our objective isto decide schedulability of  F  based on an end-to-end delayanalysis. Theorem 1 proves that an exact schedulabilityanalysis (i.e., both sufficient and necessary) problem forfixed priority scheduling in a WirelessHART network isNP-hard by proving that its decision version is NP-com-plete. Note that this proof is based on the reduction used in

    Theorem 1 of [21] where the NP-completeness of decidingthe schedulability of a set of periodic real-time flows in aWirelessHART network was proven under dynamicscheduling.

    Theorem 1. Given a real-time scheduling problem for a Wire-lessHART network under a fixed priority scheduling policy,it is NP-complete to decide whether the problem is schedu-lable or not.

    Proof. The problem belongs to NP as, for any instance of thefixed priority real-time scheduling problem for a Wireles-sHART network with   N   flows, we can verify in   OðN Þ

    time whether all the flows meet their deadlines. To proveNP-hardness, we reduce an arbitrary instance   <   G ; k >of the graph edge-coloring problem to an instance  S of thefixed priority real-time scheduling for a WirelessHART

    SAIFULLAH ET AL.: END-TO-END COMMUNICATION DELAY ANALYSIS IN INDUSTRIAL WIRELESS NETWORKS 1363

  • 8/19/2019 06812138

    4/14

    network and show that graph G is k edge-colorable if andonly if S is schedulable (Fig. 1).

    The reduction is as follows. Let   G  ¼ ðV;EÞ   has   nnodes. We create a depth-first search tree of  G  rooted atan arbitrary node   r 2 V. For every   u 2 V frg, a treeedge is directed from   u   to its  parent; and zero or moreancestors connected by a non-tree edge directed from  uare its  virtual parents. Every node in  V frg   is given aunique label   vi, where   1   i    n  1. Create a node   v0.

    For every node   vi,   1   i    n  1, add   i  1   additionalnodes   vi;1; vi;2; . . . ; vi;i1   and connect   v0   to   vi   throughthese nodes (i.e., create   v0  vi;1  vi;2  vi;i1  vipath). Now, following is an instance  S of the fixed prior-ity real-time scheduling for a WirelessHART network.The reduced graph   G 0 ¼ ðV0;E0Þ   is a network with   v0 being the gateway. The parent and the virtual parents of every node   vi,  1   i    n  1, are the destination nodes,and   v0   is a source node. For every   vi,   1   i    n  1, aflow   F i   periodically generates a packet starting at   ðniÞ-th slot at v0  and follows the route v0  vi;1 vi;2  vi  and is, then, forwarded by  vi   to its parent and everyvirtual parent. Each flow  F i   is assigned fixed priority  i.For simplicity, we consider only the first packet of everyflow F i. For F i, the release time and the absolute deadlineof this packet are   n i   and   n  1 þ k, respectively. Allflows have the same period    n  1 þ k. The number of channels is n  1. This reduction runs in Oðn2Þ time.

    Let G  is edge-colorable using k colors. Let Q be the setof all last one-hop transmissions in   G 0. These transmis-sions involve edges  E  E0, one transmission per edge.Using all  n  1  channels, we can complete all transmis-sions in G 0 except those in Q in first n  1 slots, when thetransmissions of each flow are scheduled based on its(fixed) priority. Since the transmissions along the edges

    having the same color can be scheduled on the same slot,all transmissions in  Q   can be scheduled in next  k   slots.Hence, all packets meet the deadline. Now, let S is sched-ulable based on the fixed priorities of the flows. If allchannels are used in scheduling, then all but the trans-missions in   Q  are completed in first   n  1   slots in thefixed priority scheduling. Hence, all transmissions in  Qare schedulable using next  k  slots. For transmissions thathappen on the same slot, the corresponding edges can begiven the same color. Hence, graph G  is k edge-colorable.If  A does not use all channels, then no transmission in  Qcan happen in first  n  1  slots. Let there are  t  slots start-

    ing from the earliest slot at which some transmission inQ can be scheduled to the latest slot by which all trans-missions in Q  must be scheduled. Since all packets meetthe deadline,   t   k. The value of   t   is the smallest when

    we can schedule all non-conflicting transmissions in   Qon the same slot. That is, the smallest value of   t   is theedge chromatic number  x  of  G . Thus,  x    t    k. Since  G is x edge-colorable, it is k edge-colorable also.   tu

    Uses of a sufficient analysis.  Since an exact analysis is NP-hard, we pursue an end-to-end delay analysis which servesas a sufficient condition for schedulability. For real-time

    flows in industrial process control applications that requirehard real-time guarantees, this analysis can thus be usedfor online admission control and to adjust workload inresponse to network dynamics. For example, when a chan-nel is blacklisted or some routes are recalculated, the net-work manager can execute our sufficient analysis to verifywhether the current set of flows remain schedulable. If the analysis cannot guarantee the schedulability of all theflows, the network manager may remove a subset of theflows (e.g., based on criticality) or reduce the data rates of some of the flows so that the new set of flows becomesschedulable under our analysis.

    5 END-TO-END DELAY ANALYSIS

    In this section, we present an end-to-end delay analysis forthe real-time flows in a WirelessHART network. An efficientend-to-end delay analysis is particularly useful for onlineadmission control and adaptation to network dynamics sothat the network manager is able to quickly reassess theschedulability of the flows (e.g., when network route ortopology changes, or some channel is blacklisted). In ana-lyzing the end-to-end delays, we observe two reasons thatcontribute to the delay of a flow. A lower priority flow can be delayed by higher priority flows (a) due to channel conten-

    tion   (when all channels are assigned to transmissions of higher priority flows in a time slot), and (b) due to  transmis-sion conflicts   (when a transmission of the flow and a trans-mission of a higher priority flow involve a common node).At first, we analyze each delay separately. We, then, incor-porate both types of delays into our analysis and end upwith an upper bound of the end-to-end delay for everyflow. A holistic approach that can analyze two types of delays combining into a single step might lead to tighterdelay bound, but we opt for the divide-and-conquerapproach to simplify the theoretical analysis of the safety of the bound. If every transmission is repeated x  times to han-

    dle retransmission on a single route, then every time slot issimply multiplied by  x  in delay calculation. For simplicityof presentation we use retransmission parameter  x  ¼  1.

    5.1 Delay Due to Channel Contention

    5.1.1 Observations between Transmission Scheduling 

    and Multiprocessor CPU Scheduling 

    A key insight in this work is that we can map the multi-channel fixed priority transmission scheduling problem forWirelessHART networks to the fixed priority real-time CPUscheduling on a global multiprocessor platform. Towards

    this direction, we make the following observations betweenthese two domains.

    In a WirelessHART network, each channel can accom-modate one transmission in a time slot across the entire

    Fig. 1. Reduction from edge-coloring.

    1364 IEEE TRANSACTIONS ON COMPUTERS, VOL. 64, NO. 5, MAY 2015

  • 8/19/2019 06812138

    5/14

    network. Thus, a flow executing for one time unit on aCPU of a multiprocessor system is equivalent to a packettransmission on a channel which takes exactly one timeslot in a WirelessHART network. That one flow cannot be scheduled on different processors at the same time issimilar to the fact that one flow cannot be scheduled ondifferent channels at the same time. In addition, flowsexecuting on multiprocessor platform are considered

    independent while the flows being scheduled in a Wire-lessHART network are also independent. Again, execu-tion of flows on a global multiprocessor platform isequivalent to switching of a packet to different channelsat different time slots due to channel hopping. Finally,completing the execution of a flow on a CPU is equiva-lent to completing all transmissions of a packet from thesource to the destination of the flow.

    Thus, in absence of conflicts, the worst case responsetime of a flow in a multiprocessor platform is equivalentto the upper bound of its end-to-end delay in a Wireles-sHART network. Therefore, to analyze the delay due to

    channel contention, we can map the transmission schedul-ing in a WirelessHART network to global multiprocessorCPU scheduling.

    5.1.2 Mapping to Multiprocessor CPU Scheduling 

    Based on the observations discussed above, the mappingfrom multi-channel transmission scheduling in a Wireles-sHART network to multiprocessor CPU scheduling is asfollows:

      Each channel is mapped to a processor. Thus, m chan-nels correspond to m processors.

      Each flow F i  2  F , is mapped to a  task  that executeson multiprocessor with period  P i, deadline  Di, exe-cution time  C i, and priority equal to the priority of flow F i.

    While the proposed mapping allows us to potentiallyleverage the rich body of literature on real-time CPU sched-uling, the end-to-end delay analysis for WirelessHART net-works remains an open problem. An important observationis that we must consider transmission conflicts in the delayanalysis. Note that transmission conflict is a distinct featureof wireless networks that does not exist in traditional real-time CPU scheduling problems. A key contribution of our

    work, therefore, is to incorporate the delays caused by trans-mission conflicts into the end-to-end delay analysis. Byincorporating the delay due to these conflicts into the multi-processor real-time schedulability analysis, we establish anupper bound of the end-to-end delay of every flow in aWirelessHART network.

    In the proposed end-to-end delay analysis, we first ana-lyze the delay due to channel contention between the flows.Whenever there is a channel contention between two flows,the lower priority flow is delayed by the higher priorityone. Based on the above mapping, the analysis for the worstcase delay that a lower priority flow experiences from the

    higher priority flows due to channel contention in a Wireles-sHART network is similar to that when the flows are sched-uled on a multiprocessor platform. Therefore, instead of establishing a completely new analysis for the delay due to

    channel contention, the proposed mapping allows us toexploit the results of the state-of-the-art response time anal-ysis for multiprocessor scheduling [3].

    5.1.3 Response Time Analysis for Multiprocessor 

    To make our paper self-contained, here we present theresults of the state-of-the-art response time analysis for mul-tiprocessor scheduling proposed by Guan et al. [3]. Assum-ing that the flows are executed on a multiprocessorplatform, they have observed that a flow experiences theworst case delay when the earliest time instant after whichall processors are occupied by the higher priority flowsoccurs just before its release time. Therefore, for flow  F k, alevel-k   busy period   is defined as the maximum continuoustime interval during which all processors are occupied byflows of priority higher than or equal to  F k’s priority, untilF k  finishes its active instance. We use the notation BPðk; tÞto denote a level-k   busy   period of   t  slots. The delay thatsome higher priority flow   F i  2  hpðF kÞ   will cause to   F kdepends on the workload of all instances of   F i   during a

    BPðk; tÞ. Flow F i  has  carry-in workload in a BPðk; tÞ, if it hasone instance with release time earlier than the BPðk; tÞ  anddeadline in the BPðk; tÞ. When  F i  has no carry-in, an upper bound W nck   ðF i; tÞ of its workload in a BPðk; tÞ, and an upper bound I nck   ðF i; tÞ of the delay it can cause to F k are as follows:

    W nck   ðF i; tÞ ¼  t

    P i

    : C i þ minðt mod P i; C iÞ;   (1)

    I nck   ðF i; tÞ ¼  min

    W nck   ðF i; tÞ; t C k þ 1

    :   (2)

    When  F i  has carry-in  mi  and the worst case response time

    Ri, an upper bound  W cik ðF i; tÞ  of its workload in a BPðk; tÞ,

    and an upper bound   I cik ðF i; tÞ   of the delay that it cancause to F k are as follows:

    W cik ðF i; tÞ ¼  maxðt C i; 0Þ

    P i

    : C i þ C i þ mi;   (3)

    I cik ðF i; tÞ ¼  min

    W cik ðF i; tÞ; t C k þ 1

    ;   (4)

    where

    mi ¼  minðmaxð ðP i  RiÞ; 0Þ; C i  1Þ

     ¼  maxðt C i; 0Þ mod P i:

    With the observation that at most  m  1  higher priorityflows can have carry-in, an upper bound  VkðtÞ  of the totaldelay caused by all higher priority flows to an instance of  F kduring a BPðk; tÞ is

    VkðtÞ ¼  X kðtÞ þX

    F i2hpðF kÞ

    I nck   ðF i; tÞ;   (5)

    with X kðtÞ being the sum of the minðjhpðF kÞj; m  1Þ largestvalues of the differences   I cik ðF i; tÞ I 

    nck   ðF i; tÞ   among all

    F i  2  hpðF kÞ.

    SAIFULLAH ET AL.: END-TO-END COMMUNICATION DELAY ANALYSIS IN INDUSTRIAL WIRELESS NETWORKS 1365

  • 8/19/2019 06812138

    6/14

    5.2 Delay Due to Transmission Conflicts

    Now we analyze the delay that a flow can experience due totransmission conflicts. Whenever two transmissions con-flict, the transmission that belongs to the lower priority flowmust be delayed, no matter how many channels are avail-able. Since different transmissions experience differentdegrees of conflict during communication, these conflictsplay a major role in analyzing the end-to-end delays in thenetwork. In the following discussion, we derive an upper bound of the delay that a lower priority flow can experiencefrom the higher priority ones due to conflicts.

    Two flows   F k   and   F i   are said to be   conflicting   when atransmission of  F k   conflicts with a transmission of  F i, i.e.,their transmissions involve a common node. When  F k  andF i  2  hpðF kÞ   conflict,   F k   has to be delayed due to havinglower priority. Intuitively, the amount of delay depends onhow their routes intersect. A transmission~uv   of   F k   is

    delayed at most by  v slots by an instance of  F i, if  F i  has  vtransmissions that involve node   u   or   v. For example, inFig. 2a, a transmission~uv  or~vw  of  F k  has to be delayed atmost by two slots by an instance of  F i. Let Qðk; iÞ be the totalnumber of  F i’s transmissions that share nodes on F k’s route.Since two routes can intersect arbitrarily, in the worst case,flow F k may conflict with each of these Qðk; iÞ transmissionsof  F i. As a result,  Qðk; iÞ  represents an upper bound of thedelay that  F k  can experience from an instance of  F i  due toconflicts.

    Qðk; iÞ often overestimates the delay because when thereis “too much” overlap between the routes of  F i  and  F k,  F i

    will not necessarily cause “too much” delay to F k. We defineDðk; iÞ  as a more precise upper bound of the delay that  F kcan experience from an instance of  F i  due to transmissionconflicts. In Fig. 2a, an instance of  F k  can be delayed by an

    instance of  F i  at most by five slots since  Qðk; iÞ ¼  5, but inFig. 2b,  F k   can be delayed by an instance of  F i  at most bythree slots while Qðk; iÞ ¼  8. To obtain a value of Dðk; iÞ, weintroduce the concept of a   maximal common path (MCP) between   F k   and   F i   defined as a path   v1 !  v2 ! ! vh,where   vl 6¼ vq   for   l 6¼ q   (where   1   l; q    h), on   F i’s routesuch that   v1 !  v2 ! ! vh   or   vh  !  vh1  ! ! v1   is apath on   F k’s route and it is maximal, i.e., no such longer

    path contains it (Fig. 2b). On an MCP between  F k   and  F i,denoted by   M  jðk; iÞ,   F k   can be directly delayed by   F i   atmost by three slots, no matter how long the MCP is. ForM  jðk; iÞ, we define its   length  b jðk; iÞ  as the total number of F i’s transmissions along it. That is, for   M  jðk; iÞ ¼v1 ! ! vh, if there exist   u; w 2  V    such that   u !   v1 ! ! vh  !  w   is also on   F i’s route, then   b jðk; iÞ ¼  h þ 1. If only  u  or only  w  exists, then  b jðk; iÞ ¼  h. If neither  u  nor  vdoes exist, then   b jðk; iÞ ¼  h  1. During the time when   F iexecutes these transmissions (i.e.,~uv1,~v1v2 . . . ;~vhw), it cancause delay to F k  at most by 3 of these transmissions. Thus,Lemma 2 establishes a value of Dðk; iÞ.

    Lemma 2.   Let   b0 jðk; iÞ   denote the length of an MCP   M 0 jðk; iÞbetween F k  and  F i  2  hpðF kÞ with length at least four. If thereare total  s ðk; iÞ MCPs between F k  and  F i  each with length atleast four, then

    Dðk; iÞ ¼  Qðk; iÞ Xs ðk;iÞ j¼1

    b0 jðk; iÞ  3

    ;   (6)

    Proof. Let an MCP M 0 jðk; iÞ be  v1 ! ! vh. Let there existu and  w  such that the path  u  !  v1 ! ! vh  !  w  is onF i’s route. Now, either   v1 ! ! vh   or   vh  ! ! v1must lie on F k’s route (Fig. 2b). If  v1 ! ! vh is on F k’sroute, then a transmission~vlvlþ1, 1    l < h, of  F k  on thispath shares node with at most three transmissions of  F ion  u !  v1 ! ! vh  !  w. Similarly, if  vh  ! !  v1   ison F k’s route, then a transmission~vlvl1, 1   < l   h, of  F kon this path shares node with at most three transmissionsof   F i   on   u !  v1 ! ! vh  !  w. Therefore, in eithercase, a transmission of  F k  on  M 

    0 jðk; iÞ  can be delayed by

    the transmissions of  F i  on M 0

     jðk; iÞ at most by three slots.Again, in either case, once the delayed transmission of  F kis scheduled, the subsequent transmissions of  F k  and F ion   M 0

     jðk; iÞ  do not conflict and can happen in parallel.

    That is, for any  M 0 jðk; iÞ with length at least four, at leastb0 jðk; iÞ  3  transmissions will not cause delay to  F k. ButQðk; iÞ   counts every transmission of   F i   on   M 

    0 jðk; iÞ.

    Therefore,   Qðk; iÞ Ps ðk;iÞ

     j¼1

    b0 jðk; iÞ  3

      represents the

     bound Dðk; iÞ.   tu

    According to Lemma 2, we need to look for an MCP onlyif  Qðk; iÞ  4  and at least four consecutive transmissions of F i  share nodes on  F k’s route. This is because in such caseslooking for an MCP will no longer reduce the bound as thedelay is (already) at most  three (as  Qðk; iÞ is at most three).Again, when b0 jðk; iÞ is calculated for an M 

    0 jðk; iÞ, we look for

    the next MCP only if  Qðk; iÞ b0

     jðk; iÞ  4.The number of instances of flow  F i  2  hpðF kÞ that contrib-

    ute to the delay of an instance of flow  F k during a time inter-val of  t slots is upper bounded by d  tP ie

    . Hence, the total delay

    Fig. 2. An example when F k can be delayed by F i.

    1366 IEEE TRANSACTIONS ON COMPUTERS, VOL. 64, NO. 5, MAY 2015

  • 8/19/2019 06812138

    7/14

    that an instance of  F k can experience from flow F i is at mostd tP ieDðk; iÞ. An upper bound of the total delay that flow  F kcan experience from all higher priority flows due to trans-mission conflicts during a time interval of  t  slots is denoted by QkðtÞ and can thus be expressed as

    QkðtÞ ¼X

    F i2hpðF kÞ

    t

    P i

    :Dðk; iÞ:   (7)

    5.3 A Tighter Bound on Conflict Delay

    The upper bound derived in Equation (7) for the transmis-sion conflict delay experienced by a flow is based on pessi-mistic assumptions that will result in overestimate of theend-to-end delay of the flow. In this section, we avoid thepessimistic assumptions, and establish a tighter bound onthe delay of a flow that occurs due to transmission conflict.

    Since a flow is a chain of transmissions from a source to adestination, in considering the conflict delay caused by mul-tiple instances of  F i  on flow  F k, we observe that at the time

    when a transmission of  F k  conflicts with some transmissionof  F i, the preceding transmissions on F k  are already sched-uled. These already scheduled  transmissions of  F k  are no lon-ger subject to delay by the subsequent instances of  F i. Forexample, in Fig. 2a let us consider that one instance of  F i   isconflicting and causing delay on F k’s transmission~vw. Thisimplies that F k’s transmission~uv is already scheduled (sincetransmission~vw  can be ready only after transmission~uv   isscheduled). Hence, the next instance of   F i  must not causedelay on transmission~uv (since this transmission is alreadyscheduled). That is, in calculating   QkðtÞ   for   F k, only thetransmissions that have not yet been scheduled should beconsidered for conflict delay by the subsequent instances of F i   (that will be released in future in the considered timeinterval). These observations lead to Lemma 3, and then toTheorem 4 to upperbound the total delay (due to transmis-sion conflict) caused on F k by all instances of  F i.

    Lemma 3. Let us consider any two instances of a higher priority flow F i  such that each causes conflict delay on a lower priority flow F k  in a time interval. Then, there is at most one commontransmission on F k that can be delayed by both instances.

    Proof. Let these two instances of  F i  be denoted by  F i;1  andF i;2, where   F i;1   is released before   F i;2. Suppose to thecontrary, both of these instances cause delay on two

    transmissions, say   t  j   and   t r, of the lower priority flowF k. Without loss of generality, we assume that   t  j   pre-cedes  t r  on the route of flow  F k.  F i;1  causes delay on  t r because  t r  is ready to be scheduled. This implies that  t  jhas already been scheduled. Hence,   F i;2  which releasesafter   F i;1   cannot cause any delay on   t  j, thereby contra-dicting our assumption.   tuBased on Lemma 3, we can now determine a tight upper

     bound of the conflict delay caused by multiple instances of F i  on F k  in any case. To do so, we introduce the notion of abottleneck transmission (of  F k  with respect to  F i) which is thetransmission of   F k   that may face the maximum conflict

    delay from F i. An upper bound of the conflict delay caused by one instance of   F i   on   F k’s bottleneck transmission isdenoted by  dðk; iÞ, and is determined in the following way.For every transmission t  of  F k, we count the total number of 

    F i’s transmissions that share a node with  t . Then, the maxi-mum of these values (among all transmissions of   F k) isdetermined as   dðk; iÞ. In other words, there are at mostdðk; iÞ transmissions of (one instance of) F i such that each of them share a node (and hence may conflict) with the sametransmission of  F k. By Lemma 3, for any two instances of  F i,F k  has at most one transmission on which both instancescan cause delay. In the worst case, the bottleneck transmis-

    sion of  F k can be delayed by multiple instances of  F i. Hence,the value of   dðk; iÞ  plays a major role in determining thedelay caused by F i on  F k as shown in Theorem 4.

    Theorem 4.   In a time interval of  t  slots, the worst case conflictdelay caused by a higher priority flow  F i  on a lower priority

     flow F k is upper bounded by

    Dðk; iÞ þ  t

    P i

     1

    : dðk; iÞ þ minðdðk; iÞ; t mod P iÞ:

    Proof.   For the case when   t < P i, there is at most one

    instance of  F i  in a time interval of  t  slots. Hence, the totalconflict delay caused by F i  on  F k  is at most Dðk; iÞ whichclearly follows the theorem. We consider the case witht   P i for the rest of the proof.

    There are at most d  tP ie instances of  F i in a time interval

    of  t  slots. Let the set of transmissions of  F i   which cause

    conflict delay on F k  be denoted by G. When one instance

    F i;1   of   F i   causes conflict delay on   F k, a subset   G1   of   G

    causes the delay. Now consider a second instance  F i;2  of 

    F i. For   F i;2, another subset   G2   of   G   causes delay on   F k.

    When all subsets G1;G2; . . . ;Gd tP i

    e are mutually disjoint, by

    the definition of Dðk; iÞ, the conflict delay caused by G onF k is at most Dðk; iÞ. Hence, the total conflict delay caused

     by all G1;G2; . . . ;Gd tP i

    e in this case is at most Dðk; iÞ. That is,

    the total conflict delay on F k caused by F i is at mostDðk; iÞ.Now let us consider the case when the subsets

    G1;G2; . . . ;Gd tP ie  are not mutually disjoint, i.e., there is

    at least one pair   G j;Gh   such that   G j \ Gh  6¼ ;, where1   j; h  d  tP ie. Let the total delay caused by all instancesof  F i on  F k is Dðk; iÞ þ Z ðk; iÞ, i.e., the delay is higher thanDðk; iÞ by Z ðk; iÞ time slots. The additional delay (beyondDðk; iÞ) happens because the transmissions that are com-mon between G j and Gh  cause both instances of  F i  to cre-

    ate delay on F i. By Lemma 3, for any two instances of  F i,F k has at most one transmission on which both instancescan cause delay. If there is no transmission of  F k   that isdelayed by both the pth instance and the p þ 1th instanceof  F i, then no transmission of  F k   is delayed by both the pth instance and the q th instance of  F i, for any q > p þ 1,where  1   p <   d tP ie

    . Thus,  Z ðk; iÞ  is maximum when foreach pair of consecutive instances (say, the  pth instanceand p þ 1th instance, for each p, 1    p <   d tP ie

    ) of  F i, thereis a transmission of  F k  that is delayed by both instances.Hence, at most d  tP ie  1

     instances contribute to this addi-tional delay   Z ðk; iÞ, each instance causing some addi-

    tional delay on a transmission. Since one instance of  F ican cause delay on a transmission of  F k  at most by  dðk; iÞslots,   Z ðk; iÞ ðd  tP ie  1Þdðk; iÞ. Since the last instancemay finish after the considered time window of   t   slots,

    SAIFULLAH ET AL.: END-TO-END COMMUNICATION DELAY ANALYSIS IN INDUSTRIAL WIRELESS NETWORKS 1367

  • 8/19/2019 06812138

    8/14

    the delay caused by it is at most   minðdðk; iÞ; t mod P iÞslots. Taking this into consideration,   Z ðk; iÞ ðb  tP ic1Þdðk; iÞ þ minðdðk; iÞ; t mod P iÞ. Thus, the total delaycaused on   F k   by all instances of   F i   is at mostDðk; iÞ þ Z ðk; iÞ Dðk; iÞ þ ðb  tP ic  1Þ : dðk; iÞ þ minðdðk; iÞ;t mod P iÞ tu

    From Theorem 4, now QkðtÞ (i.e., an upper bound of the

    total delay flow  F k  can experience from all higher priorityflows due to transmission conflicts during a time interval of t slots) is calculated as follows:

    QkðtÞ ¼X

    F i2hpðF kÞ

    Dðk; iÞ þ

      t

    P i

     1

    : dðk; iÞ

    þ minðdðk; iÞ; t mod P iÞ

    :

    (8)

    Since usually   dðk; iÞ Dðk; iÞ, the above value of   QkðtÞ   issignificantly smaller than that derived in Equation (7). Our

    simulation results (in Section 7) also demonstrate that theabove bound is a significant improvement over the boundderived in Equation (7).

    5.4 End-to-End Delay Bound

    Now we consider both types of delays together to developan upper bound of the end-to-end delay of every flow. For aflow, we first derive an upper bound of its end-to-end delayassuming that it does not conflict with any higher priorityflow. We then incorporate its worst case delay due to con-flict into this upper bound. This is done for every flow indecreasing order of priority starting with the highest prior-

    ity flow as explained below.For  F k, we use  R

    ch;conk   to denote an upper bound of the

    worst case end-to-end delay considering delays due to bothchannel contention and conflicts between flows. We use thefollowing two steps to estimate Rch;conk   for every flow F k  2  F in decreasing order of priority starting with the highest pri-ority flow.

    5.4.1 Step 1

    First, we calculate a pseudo upper bound (i.e., not an actualupper bound), denoted by  Rchk   , of the worst case end-to-enddelay of  F k assuming that F k  is delayed by the higher prior-

    ity flows due to channel contention only. That is, we assumethat F k  does not conflict with any higher priority flow. Thiscalculation is based on the upper bounds  Rch;con of the worstcase end-to-end delays of the higher priority flows whichare already calculated considering both types of delay.Based on our discussion in Section 5.1, to determine Rchk  , theworst case delay that flow   F k   will experience from thehigher priority flows can be calculated using Equation (5).The amount of delay that a higher priority flow F i will causeto   F k   depends on   F i’s workload during a BPðk; xÞ   (i.e., alevel-k  busy period of  x   slots). Note that, in Equations (1)and (3), the workload bound of  F i was derived in absence of 

    conflict between the flows. Now we first analyze the work-load bound of  F i  2  hpðF kÞ in the network where both chan-nel contention and transmission conflicts contributed to theworst case end-to-end delay of  F i.

    From Equation (1), if flow  F i  does not have carry-in, itsworkload W nck   ðF i; xÞ  during a BPðk; xÞ  does not depend onits worst case end-to-end delay. Therefore, if   F i   has nocarry-in, W nck   ðF i; xÞ during a BPðk; xÞ  still can be calculatedusing Equation (1), no matter what the worst case end-to-end delay of  F i is. That is,

    nc

    k   ðF i; xÞ ¼

      x

    P i

    : C i þ min

    ðxmod

    P i; C iÞ:  (9)

    Now   I nck   ðF i; xÞ   is calculated using Equation (2) and isguaranteed to be an upper bound of the delay thatF i  2  hpðF kÞ can cause to F k due to channel contention.

    From Equation (3), when flow  F i  has carry-in, its work-load W cik ðF i; xÞ  during a BPðk; xÞ  depends on its worst caseresponse time Ri. Equation (3) also indicates that  W 

    cik ðF i; xÞ

    is monotonically nondecreasing in  Ri. Now, in the Wireles-sHART network, an upper bound of the end-to-end delayof  F i  must be no less than  Ri  since both channel contentionand transmission conflicts contribute to its end-to-enddelay. That is,  Rch;con

    i   R

    i. Therefore, if we replace R

    i with

    Rch;coni   in Equation (3),   W cik ðF i; xÞ   is guaranteed to be an

    upper bound of  F i’s workload during a BPðk; xÞ. Thus,

    W cik ðF i; xÞ ¼  maxðx C i; 0Þ

    P i

    : C i þ C i þ mi;   (10)

    where   mi  ¼  minðmaxð ðP i  Rch;coni   Þ; 0Þ; C i  1Þ   and    ¼

    maxðx C i; 0Þ mod P i. Similarly,   I cik ðF i; xÞ  calculated using

    Equation (4) is guaranteed to be an upper bound of thedelay that F i can cause to F k due to channel contention.

    Once the bounds I nck   ðF i; xÞ and I cik ðF i; xÞ of the delay from

    every higher priority flow   F i 2  hpðF kÞ   are calculated, thetotal delay VkðxÞ that an instance of  F k  experiences from allhigher priority flows during a BPðk; xÞ  due to channel con-tention is calculated using Equation (5). Now assuming thatF k  does not conflict with any higher priority flow, an upper bound of its end-to-end delay can be found using the sameiterative method that is used for multiprocessor scheduling[3]. Since there are m channels, the pseudo upper bound  Rchkof the worst case end-to-end delay of  F k  can be obtained byfinding the minimal value of  x that solves Equation (11):

    x ¼  VkðxÞ

    m

    þ C k:   (11)

    Equation (11) is solved using an iterative fixed-point algo-rithm starting with x ¼  C k. This algorithm either terminatesat some fixed-point x  Dk that represents the bound R

    chk   or

    x will exceed Dk eventually. In the latter case, this algorithmterminates and reports the instance as “unschedulable”.

    Effect of channel hopping. To every transmission, the sched-uler assigns a channel offset between 0 and m  1 instead of an actual channel, where m  is the total number of channels.Any channel offset c (i.e., 1; 2; . . . ; m  1) is mapped to differ-ent channels at different time slots s as follows:

    channel ¼ ðc þ sÞ mod m:

    That is, although the physical channels used along a linkchanges (hops) in every time slot, the total number   m   of available channels is fixed. The scheduler only assigns a

    1368 IEEE TRANSACTIONS ON COMPUTERS, VOL. 64, NO. 5, MAY 2015

  • 8/19/2019 06812138

    9/14

    fixed channel index to a transmission which maps to differ-ent physical channels in different time slots, keeping thetotal number of available channels at m  always, and sched-uling each flow on at most one channel at any time. Hence,channel hopping does not have effect on channel conten-tion delay.

    5.4.2 Step 2 

    Once the value of   Rchk   is computed, we incorporate thetransmission conflict delay into it to obtain the boundRch;conk   . Namely, for flow F k, the bound R

    chk  has been derived

    in Step 1 by assuming that   F k  does not conflict with anyhigher priority flow. Therefore, in this step, we take intoaccount that  F k  may conflict with the higher priority flowsand, hence, can experience further delay from them. Anupper bound  QkðyÞ of the total delay that an instance of  F kcan experience due to conflicts with the higher priorityflows during a time interval of   y   slots is calculated usingEquation (8). Note that when  F k  conflicts with some higherpriority flow it must be delayed, no matter how many chan-

    nels are available. Therefore, we add the delay QkðyÞ to thepseudo upper bound Rchk   to derive an upper bound of  F k’sworst case end-to-end delay. Thus, the minimal value of  ythat solves the following equation gives the bound   Rch;conkfor F k that includes both types of delay:

    y ¼  Rchk   þ QkðyÞ:   (12)

    Equation (12) is solved using an iterative fixed-point algo-rithm starting with y  ¼  Rchk  . Like Step 1, this algorithm alsoeither terminates at some fixed-point  y  Dk that is consid-ered as the bound   Rch;conk   or terminates with an“unschedulable” decision when y > D

    k. Thus, termination of 

    the algorithm is guaranteed.

    Theorem 5. For every flow  F k  2  F , let Rchk   be the minimal value

    of  x    C k  that solves Equation (11), and  Rch;conk   be the mini-

    mal value of  y    Rchk   that solves Equation (12). Then Rch;conk   is

    an upper bound of the worst case end-to-end delay of  F k.

    Proof.   Flows are ordered according to their priorities asF 1; F 2; . . . ; F N  with F 1 being the highest priority flow. Weuse mathematical induction on priority level   k,1   k    N . When k  ¼  1, i.e., for the highest priority flowF 1, Equations (11) and (12) yield R

    ch;con1   ¼ C 1, where C 1 is

    the number of transmissions along   F 1’s route. Since no

    flow can delay the highest priority flow  F 1, the end-to-end delay of   F 1   is always  C 1. Hence, the upper boundcalculated using Equation (12) holds for  k ¼  1. Now letthe upper bound calculated using Equation (12) holds forflow F k, for any k, 1    k < N . We have to prove that theupper bound calculated using it also holds for flow F kþ1.

    To calculate Rch;conkþ1   in Step 2, we initialize y  (in Equa-tion (12)) to  Rchkþ1. Note that  R

    chkþ1  is computed in Step 1

    for flow   F kþ1. In Step 1,   Rchkþ1   is computed considering

    upper bounds   Rch;conh   of the worst case end-to-enddelays of all  F h  with  h < k þ 1  which are already com-puted considering both types of delay. Equation (11)

    assumes that F kþ1  does not conflict with any higher pri-ority flow. This implies that the minimal solution of  x, i.e.,  Rchkþ1   is an upper bound of the worst case end-to-enddelay of   F kþ1, if   F kþ1   is delayed by the higher priority

    flows due to channel contention only. If   F kþ1   conflictswith some higher priority flow, then it can be furtherdelayed by the higher priority flows at most byP

    F h2hpðF kþ1Þd  yP h

    eDðk þ 1; hÞ slots during any time intervalof length   y. Equation (12) adds this delay to   Rchkþ1   andestablishes the recursive equation for   y. Therefore, theminimal solution of  y, i.e.,  Rch;conkþ1   is guaranteed to be anupper bound of the worst case end-to-end delay of  F kþ1

    that includes the worst case delays both due to channelcontention and due to conflicts between flows.   tu

    The end-to-end delay analysis procedure calculatesRch;coni   , for   i ¼  1; 2; . . . ; N   (in decreasing order of prioritylevel), and decides the flow set to be schedulable if, forevery F i  2  F , R

    ch;coni    Di. According to Equations (11) and

    (12), each   Rch;coni   can be calculated in pseudo polynomialtime for every F i. The correctness of this upper bound of theworst case end-to-end delay follows from Theorem 5.

    Note that our above analysis has been derived consid-ering the retransmission parameter   x ¼  1. If every trans-mission is repeated   x   times to handle retransmission ona single route, then every time slot is simply multiplied by   x   in delay calculation. Hence, to adopt the abovedelay analysis for any general value of   x, we simplyreplace the values of   C i;Dðk; iÞ;   and   dðk; iÞ   with   C i:x,Dðk; iÞ:x;   and   dðk; iÞ:x, respectively. Our model is moti-vated by WirelessHART [2] that uses a fixed number of retransmissions for all links. It is trivial from the aboveanalysis to handle varying the number of transmissionsfor different links based on link qualities. Specifically,instead of multiplying the above values by a uniformvalue of   x, we have to consider different values for dif-ferent links.

    6 DELAY ANALYSIS IN POLYNOMIAL TIME

    We now extend the pseudo polynomial time analysis to apolynomial time method. While this may provide compara-tively looser bounds, it can calculate the bounds morequickly, and hence is more suitable for online use whentime efficiency is critical.

    Exploiting the same mapping presented in Section 5, wecan use the polynomial time response time analysis forglobal multiprocessor scheduling proposed in [25] to calcu-late the channel contention delays. In particular, using thisanalysis, the maximum channel contention delay, denoted

     by VkðDkÞ, that a flow F k  can experience during its lifetimefrom the higher priority flows can be expressed as follows:

    VkðDkÞ ¼X

    F i2hpðF kÞ

    minðW kðiÞ; Dk  C k þ 1Þ;   (13)

    where

    W kðiÞ ¼  Dk þ Di  C i

    P i

    : C i

    þ min   C i; Dk þ Di  C i   Dk þ Di  C i

    P i

    : P i

    :

    Therefore, similar to Equation (11),   Rchk   of   F k   (i.e., theworst case end-to-end delay of   F k   assuming that it is

    SAIFULLAH ET AL.: END-TO-END COMMUNICATION DELAY ANALYSIS IN INDUSTRIAL WIRELESS NETWORKS 1369

  • 8/19/2019 06812138

    10/14

    delayed by the higher priority flows due to channel conten-tion only) can be calculated as follows:

    Rchk   ¼  VkðDkÞ

    m

    þ C k:   (14)

    To calculate the conflict delay of  F k  in polynomial time,we can estimate the maximum delay in an interval of   Dkslots from Equation (8) as follows:

    QkðDkÞ ¼X

    F i2hpðF kÞ

    Dðk; iÞ þ

      Dk

    P i

     1

    : dðk; iÞ

    þ minðdðk; iÞ; Dk mod P iÞ

    :

    (15)

    Like Equation (12), the worst case end-to-end delay  Rch;conkof flow  F k  considering both channel contention delay andtransmission conflict delay is calculated as

    Rch;conk   ¼ Rchk   þ QkðDkÞ:   (16)

    7 EVALUATION

    We evaluate our end-to-end delay analysis through simula-tions based on both random topologies and a real wirelesssensor network testbed topologies. Evaluations are per-formed in terms of acceptance ratio and pessimism ratio.

     Acceptance ratio  is the proportion of the number of test casesdeemed schedulable by the delay analysis method to thetotal number of test cases. For each flow,   pessimism ratio   isquantified as the proportion of the analyzed theoretical

     bound to its maximum end-to-end delay observed in simu-lation. In particular,  pessimism ratio   quantifies our overesti-mate in the analytical delay bounds. Due to thisoverestimate in the delay bounds, some test case that isschedulable may be determined as unschedulable by ourconservative delay analysis, and hence is rejected by admis-sion control based on our analysis. The impact of a sufficientdelay analysis on the pessimism of admission control isquantified by the   acceptance ratio   metric. The higher theacceptance ratio, the less pessimistic (i.e., more effective)the delay analysis.

    There is no baseline to compare the performance of ouranalysis which, to our knowledge, is the first delay analysis

    for real-time flows in WirelessHART networks. Hence, weevaluate the performance of our delay analysis by observingthe delays through simulations of the complete schedule of all flows released within the hyper-period. In the figures inthis section, “Simulation” denotes the fraction of test casesthat have no deadline misses in the simulations. This frac-tion indicates an upper bound of acceptance ratio for anydelay analysis method. The analyses evaluated in this sec-tion are named as follows.

    Analysis-PP   is the pseudo polynomial time analysiswithout considering the improved conflict delay bound of Section 5.3. Namely, it calculates the end-to-end delay

     bound using Equation (12) where the conflict delay is calcu-lated based on Equation (7).

    Analysis-PP+ is the pseudo polynomial time analysis byconsidering the tighter conflict delay bound of Section 5.3.

    That is, Analysis-PP+ calculates the end-to-end delay boundusing Equation (12) where the conflict delay is calculated based on Equation (8).

    Analysis-P+   is the polynomial time analysis derived inSection 6. It calculates the delay bounds using Equation (16) based on the tighter conflict delay bound.

    7.1 Simulation Setup

    A fraction of nodes is considered as sources and destina-tions. The sets of sources and destinations are disjoint. Thereliability of a link is represented by the  packet reception ratio(PRR) along it. The node with the highest number of neigh- bors is designated as the gateway. Since all flows passthrough the gateway, we determine routes between thesources and destinations that include the gateway. Routesare determined based on link reliabilities. The most reliableroute connecting a source to a destination is determined asthe primary route. For additional routes, we choose the nextmost reliable route that excludes the links of any existingroute between the same source and destination. Each flowis assigned a harmonic period of the form   2a time slots,where  a >   1. The deadline of each flow is set equal to itsperiod. The priorities of the flows are assigned based ondeadline monotonic policy that assigns priorities according torelative deadlines. The bandwidth is assumed to be suffi-cient to accommodate a transmission within a time slot.

    7.2 Simulations with Testbed Topologies

    Due to large impact of transmission conflicts on the end-to-end delay of a flow, the delay analysis largely depends onthe topology of the network since transmission conflicts

    depend on how the links or routes intersect (as seen in Sec-tions 5.2 and 5.3). Therefore, first we conduct simulationresults based on real network topologies. These are thetopologies of a wireless sensor network testbed, and aregenerated using various transmission power levels of itsnodes since the network connectivity (hence the topology)varies as we vary transmission powers. Our testbed consistsof   74  TelosB motes each equipped with Chipcon CC2420radios which are compliant with IEEE   802:15:4   (Wire-lessHART’s physical layer is also based on IEEE 802:15:4). Itis deployed in two buildings of Washington University [26].Setting the same transmission (Tx) power at every node,each node (in a round-robin fashion) broadcasts 50 packets

    while its neighbors record the sequence numbers of thepackets they receive. This cycle is repeated giving eachnode five rounds to transmit 50 packets in each round.Every link with a higher than 80 percent PRR is considereda reliable link to derive the topology of the testbed. We col-lected topologies at three different Tx power levels (1dBm,   3 dBm,   5 dBm). We generate different flows inthese topologies by randomly selecting the sources and des-tinations. Their periods are randomly generated in therange 2510 time slots. We generate 100 test cases consider-ing these topologies.

    Fig. 3 shows the acceptance ratios of our delay analysis

    methods without considering retransmission and withoutredundant routes. According to Fig. 3 a, when the numberof flows N <   25 in the topology with Tx power of  1 dBm,Analysis-PP+ has an acceptance ratio of 1.0, which means

    1370 IEEE TRANSACTIONS ON COMPUTERS, VOL. 64, NO. 5, MAY 2015

  • 8/19/2019 06812138

    11/14

  • 8/19/2019 06812138

    12/14

    + is always higher than that of Analysis-PP. For the same 8test cases selected in Fig. 4, we now draw the pessimismratios in Fig. 6 considering retransmissions. Fig. 6 indicatesthat the pessimism ratios increase in some cases but do notvary a lot compared to the case without retransmission.Since both the analytical delay (x) and the delay observed insimulations (y) increase under retransmissions, the pessi-mism ratios (x

    y) do not vary significantly compared to the

    case without retransmission.We now determine the schedulability considering both

    retransmissions and redundant routes. That is, for eachtransmission along the primary route between a sourcesand destination is scheduled on two time slots. In addition,each packet is also scheduled along each redundant route.Fig. 7 shows how the schedulability changes with theincrease of number of routes considering   25   flows in thetopology with  1 dBm Tx power. When there is no redun-dant route, the value of ”Simulation” is 0.96 while theacceptance ratio under Analysis-PP+ is 0.9. As the numberof redundant routes increases, the schedulable cases as wellas acceptance ratios decrease sharply. However, at least 50

    percent of the total schedulable cases are determined asschedulable by Analysis-PP+ as long as the number of redundant routes is no greater thantwoWhen there are threeredundant routes, the value of ”Simulation” is 0.15 and theacceptance ratio under Analysis-PP+ is 0.05. This decreasein acceptance ratio is because many redundant links need to be scheduled.

    These results demonstrate that the improved analysis(derived in Section 5.3) of transmission conflict delay ishighly effective in reducing the pessimism of the analysis. Italso shows that the polynomial-time analysis is reasonablytight when compared against the original pseudo polyno-

    mial time analysis.

    7.3 Simulations with Random Topologies

    We test the scalability of our algorithms in terms of num- ber of flows on random topologies of larger number of 

    nodes. Given the number of nodes and edge-density, wegenerate random networks. A network with  n  nodes andr% edge-density has a total of  ðnðn  1Þ  rÞ=ð2  100Þ bidi-rectional edges. The edges are chosen randomly andassigned PRR randomly in the range   ½0:80; 1:0. Then wegenerate different number of flows in  400-node networksof  40  percent edge-density. For every different number of flows, we generate 100  test cases. The periods are consid-ered harmonic and are randomly generated in the range2612 time slots. Larger periods (compared to the casewith testbed topologies) are used to accommodate largenetworks and a large number of flows.

    The acceptance ratios of our analyses in   400-node net-work are shown in Fig. 8. Fig. 8b shows that withoutretransmission the acceptance ratio of Analysis-PP+ is equalto the value of “Simulation” as long as the number of flowsis no greater than 60. As the number of flows increases, thedifference between the acceptance ratios of Analysis-PP+and the value of “Simulation” increases but always remainsless than 0.33. Fig. 8b shows the results considering retrans-missions along the primary route but no redundant routes.

    In this case acceptance ratios in all methods are lower sincethe total number of actual schedulable cases are lower.However, the acceptance ratio of Analysis-PP+ is alwayshigher than that of Analysis-PP, and Analysis-P+ is compet-itive against Analysis-PP.

    Fig. 9 shows the results for  80  flows in the 400-node net-work under retransmissions and varying number of redun-dant routes. Similar to our results with testbed topologyhere also we observe that both the value of ”Simulation”

    Fig. 6. Pessimism ratio with retransmission on testbed topology.

    Fig. 7. Schedulability with retransmission and redundant routes ontestbed topology. Fig. 8. Schedulability on random topology.

    1372 IEEE TRANSACTIONS ON COMPUTERS, VOL. 64, NO. 5, MAY 2015

  • 8/19/2019 06812138

    13/14

  • 8/19/2019 06812138

    14/14

    You Xu received the MSc degree in computer sci-ence from the Washington University in St. Louisin 2009 and he is working toward the PhD degreeof Computer Science at the Washington Universityin St. Louis. His research interests include nonlin-ear optimization, constrained search, planning,and scheduling. He is now working for Google.

    Chenyang Lu  received the BS degree from theUniversity of Science and Technology of China,the MS degree from the Chinese Academy of Sci-ences, and the PhD degree from the University ofVirginia, all in computer science, 1995, 1997, and,2001, respectively. He is a professor of computerscience and engineering at Washington Universityin St. Louis. He is an editor-in-chief of  ACM Trans- actions on Sensor Networks , an area editor ofIEEE Internet of Things Journal,  and an associateeditor of Real-Time Systems . He also serves as a

    program chair of premier conferences such as IEEE Real-Time SystemsSymposium (RTSS 2012), ACM/IEEE International Conference onCyber-Physical Systems (ICCPS 2012), and ACM Conference on

    Embedded Networked Sensor Systems (SenSys 2014). He is the authorand co-author of more than 100 research papers with more than 10,000citations and an h-index of 47. His research interests include real-timesystems, wireless sensor networks, and cyber-physical systems.

    Yixin Chen  received the PhD degree in comput-ing science from the University of Illinois atUrbana-Champaign in 2005. He is an associateprofessor of computer science at the WashingtonUniversity in St. Louis. His research interestsinclude data mining, machine learning, artificialintelligence, optimization, and cyber-physical sys-tems. He received the Best Paper Award at theAAAI Conference on Artificial Intelligence (2010)and International Conference on Tools for AI

    (2005), and best paper nomination at the ACMKDD Conference (2009). His work on planning has received First Prizesin the International Planning Competitions (2004 & 2006). He hasreceived an Early Career Principal Investigator Award from the Depart-ment of Energy (2006) and a Microsoft Research New Faculty Fellow-ship (2007). He is an associate editor for   ACM Transactions of Intelligent Systems and Technology  and  IEEE Transactions on Knowl- edge and Data Engineering , and serves on the editorial board of Journal of Artificial Intelligence Research .

    "   For more information on this or any other computing topic,please visit our Digital Library at www.computer.org/publications/dlib.

    1374 IEEE TRANSACTIONS ON COMPUTERS, VOL. 64, NO. 5, MAY 2015