AdaptiveHART: An Adaptive Real-Time MAC Protocol for Industrial Internet-of-Things

Wireless sensor–actuator networks (WSAN) for real-time reliable communications are being embraced in the Industrial Internet of Things. One key property required for WSAN is adaptability with respect to dynamic environments. Most existing studies assume that a network manager computes global schedules and disseminates schedule information to every node whenever the network parameters need to be updated. Such a centralized approach may degrade control performance due to nonreal-time response to dynamic environments. In this article, we introduce a novel time division multiple access MAC protocol, AdaptiveHART, which updates the network parameters in real-time without the dissemination intervals. AdaptiveHART achieves a reduction in adaptation latency up to 74%, maximum schedulable ratio, and control performance up to 75% than the conventional WirelessHART. We assess our protocol using a stochastic response time analysis, which provides an accurate end-to-end delay distribution and a schedulability condition that can guarantee real-time performance in WSAN.


I. INTRODUCTION
W IRELESS sensor-actuator networks (WSAN) have been increasingly adopted in the Industrial Internet of Things (IIoT) as a communication technology because of the advantages in reducing deployment and maintenance costs [1]- [3]. In the IIoT, WSAN typically connect sensors, actuators, and controllers as a part of feedback-control loops to continuously interact with the physical world in real-time. WSAN require timely data delivery to guarantee timing requirements of feedback control for system stability [4]. In addition, WSAN must deal with unexpected disturbances which can be categorized into internal disturbances within the wireless networks (e.g., link failure) and external disturbances from the physical environment (e.g., physical noise). Thus, two key requirements for WSAN are 1) providing reliable and real-time communications and 2) supporting adaptability to dynamic disturbances. A wireless standard, WirelessHART (WH) [5], has been introduced for IIoT to provide reliable and real-time communications. WH employs a centralized approach in network management. A network manager generates a global transmission schedule and disseminates it among all nodes in the network. All nodes are then time synchronized and communicate in their allotted time slots using a time division multiple access (TDMA) protocol. Time slots are grouped together into superframes, which are periodically repeated with schedule dissemination intervals. Such a centralized approach enables collision-free and deterministic communications.
Building upon the centralized approach, a vast amount of work, e.g., [6]- [10], has been developed for handling both internal and external disturbances. Typically, to cope with internal disturbances, a fixed number of retransmission slots for a packet is allocated when the global schedule is generated. Such redundant packet transmissions can provide reliable communications even in the presence of packet losses [6]- [8]. Meanwhile, to adapt to external disturbances, a typical approach is to change transmission periods [9], [10]. For example, for a physical plant in a transient state due to an external disturbance, a shorter period is assigned to its corresponding network flow.
Although the aforementioned centralized approaches allow reliable real-time communications under dynamic disturbances, all of them have at least one of the following limitations. First, they require a schedule dissemination interval for every superframe during which actual data transmission is delayed. Second, they assume that redundant transmission slots are assigned in a static manner. If no packet loss occurs on a particular link, all redundant time slots that were assigned to handle its failure remain unused, resulting in a considerable waste of time and bandwidth (33% more wasted resources than a flexible resource usage [8]). Third, when adjusting network parameters, i.e., transmission periods and the number of retransmission slots, the global schedule should be reconfigured and redisseminated. Thus, the reflection of the parameter adjustment is delayed until the next dissemination interval. Such limitations make it practically difficult to adapt to dynamic disturbances in a timely manner, resulting in degraded control performance or even system instability.
In this article, to overcome the above-mentioned limitations, we propose a new MAC protocol called AdaptiveHART (AH), which enables adaptive real-time communications in immediate response to both internal and external disturbances and efficient network resource management while guaranteeing stochastic real-time performance. AH is designed to completely change the way packets are scheduled, i.e., a shift from manager-driven This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ centralized scheduling to node-driven distributed approach. Main contributions of this article are as follows.
1) We develop a novel MAC protocol called AH, which enables adaptive real-time communications under dynamic disturbances in WSAN. To the best of our knowledge, AH is the first algorithm that provides on-demand network reconfiguration in a centralized wireless multihop network. In this process, network resource utilization is significantly improved by saving unused retransmission slots.
2) We develop a stochastic end-to-end communication delay analysis of AH, which gives accurate end-to-end communication delay distributions by taking into account the packet loss probability. This is the first try to apply the stochastic response time analysis (SRTA) in real-time system fields to WSAN. With this analysis, we can provide theoretical real-time performance of AH.
3) We empirically validate the effectiveness of AH by in-depth performance evaluation in terms of adaptation latency, real-time performance, and control performance.
AH adopts a piggyback mechanism to distribute the network parameter configuration of a flow over its path during a packet transmission in contrast to the centralized approach in which the global schedule should be broadcast to entire nodes in a dissemination interval. Furthermore, AH provides a node-driven scheduling mechanism under which each node determines its transmission slots and offsets online with no conflict based on radio events. Thus, AH enables prompt parameter adjustment and on-demand retransmission of a lost packet upon disturbances. Hence, AH not only provides high adaptability to disturbances, but also enables efficient network resource utilization, leading to better control and real-time performance.
Furthermore, we perform stochastic end-to-end communication delay analysis and schedulability testing of AH. We extend the traditional SRTA, which is originally designed for uniprocessor platforms, toward wireless multihop networks. In particular, we model the distribution of the number of packet transmissions for a flow by taking the packet loss probability into account. Then, we derive the end-to-end communication delay distribution of a flow and a probabilistic schedulability condition that guarantees the timing requirements of flows under AH, which can be used for admission control and network parameter adjustment at runtime.
AH achieves a significant improvement regarding adaptability. It achieves a reduction in adaptation latency up to 74% than the conventional WH. In a perspective of resource efficiency, AH shows maximum schedulable ratio and 75% improved control performance.

A. Consideration of Dynamic Disturbances
Substantial studies have been conducted to adapt network parameters in dynamic environments. For centralized networks, optimal network parameter selection algorithms have been proposed in the presence of physical disturbance and wireless interference [6]- [10]. The approaches in [6]- [8] adaptively select the parameter of the retransmission attempts per link. Such adaptation can provide high reliability and resource efficiency than static scheduling. However, these studies do not consider the adaptability of the parameter of the transmission period of each flow, which can enhance the system resiliency. In contrast, the approaches in [9] and [10] can adaptively change only the transmission period parameter in dynamic environments. Thus, previous studies only consider the adaptation of one of two parameters. In addition, they assume the periodic generation and broadcasting of a new global schedule to change the parameters. Such approaches have limited real-time adaptability because the parameters cannot be changed immediately at the requested instant.
To overcome the clear drawbacks of a central network, parameter adaptation in a distributed network has been considered recently in [11] and [12]. Because local nodes determine their own parameters, they have the clear advantage of real-time parameter change in comparison with a central network. However, with these methods, it is difficult to obtain global optimal parameters because of nonreal-time monitoring for all systems and network status. To resolve these limitations, we propose a novel MAC protocol for a broadcasting-eliminated central network.

B. Guarantee of the End-to-End Transmission Time
To analyze the proposed protocols, several approaches have been proposed. A discrete-time Markov chain (DTMC) model was adopted in [13] and [14]. A DTMC can compute transmission delay distribution based on the mean, variance, and worst-case of the delay for flows. However, this analysis only targets single-hop networks and not TDMA-based multihop networks.
In [15], the end-to-end delay of flows in TDMA-based multihop networks was analyzed. This approach can calculate the end-to-end delay, reflecting the preemption delay caused by the conflict between adjacent nodes. However, it only considers the worst-case end-to-end delay, not the probabilistic end-to-end delay distribution. Considering the limitations of these analyses, we calculate the end-to-end delay distribution on TDMAbased multihop networks by taking into account the packet loss probability.

C. Comparison to Multihop Distributed TDMA Scheduling
Recently, there have been substantial research efforts on developing multihop distributed TDMA scheduling to resolve disadvantages of the centralized multihop network such as adaptability. GALLOP [16] proposes bidirectional sequential scheduling in a distributed network for a closed-loop control system. The article argues retransmission is an important factor in the reliability of the control system and proposes some retransmission approaches to improve it. Similarly, Holistic control design [11] also proposes a self-triggered control approach that transmits packets at demand time aperiodically and a flow rate adaptation algorithm to improve closed-loop control performance and network energy efficiency. It uses a static global schedule allocating a fixed transmission window to each node, and then transmits packets reliably based on glossy flooding [19] protocol, which allows nodes to flood their packets irrelevant to transmission conflicts.
Local voting [17] argues that minimizing nodal delay is to minimize an average end-to-end delay in a distributed multihop network. To do this, they balance the traffic load between neighbor nodes through local voting algorithm. Also, a dynamic distributed multichannel TDMA (DDMC-TDMA) [18] protocol proposes a spatial spectrum reuse approach that solves the exposed/hidden node problems, and it can operate independently to In Table I, we compare qualitatively AH and the distributed multihop TDMA scheduling studies in terms of several criteria (reliability, end-to-end real-time and sequential transmission and adaptability, and evaluation). GALLOP can provide reliable transmissions, but it requires a signaling frame overhead to build the retransmission schedule. Additionally, it requires the frame overhead on demand of a traffic pattern change, which results in the convergence time for adaptability. Holistic control can also provide reliable transmission through glossy flooding, but this flooding-based transmission allows only a single flow to take a whole network during a certain time duration, independent of the network topology. Also, in adaptability, the changeable transmission period is limited to an integer multiple. In local voting, DDMC-TDMA, and DH, it is difficult for a node to transmit sequentially according to a routing path because the node tries to schedule slots by considering only neighbor node conflicts. This increases the end-to-end transmission delay and may adversely affect control performance. Local voting and DDMC-TDMA cannot estimate a packet arrival probability within a given deadline because there is no end-to-end delay analysis. It is difficult to say that this guarantees real-time performance. Also, it requires the convergence time for adaptability due to exchanging the local knowledge to neighbor nodes.
On the other hand, AH uses a flexible retransmission approach that retransmits only in the case of actual packet loss (resource-efficient reliability), and transmits packets sequentially according to routing paths (low end-to-end delay). It is adaptable to the changed traffic pattern without the overhead (adaptability). Moreover, we can compute a probability satisfying a given deadline by analyzing end-to-end transmission delay (real-time performance).

A. Target System
A wireless networked control system (WNCS) consists of a holistic controller (HC), physical plants, and a WSAN, as shown in Fig. 1. The WSAN comprises field devices, such as sensors and actuators, which are equipped with half-duplex radio transceivers. Sensors are directly attached to plants and deliver their measurements periodically to the corresponding central controller over the multihop network. Control commands generated from the controller are also delivered to the corresponding actuator over the multihop network. Once the actuator receives a command, its plant is controlled by actuator actions based on the command. As a central server, the HC consists of a network manager and controllers for all existing plants [7]. It simultaneously controls all the plants while adjusting the network parameters by measuring the states of both the network and plants. In our system, we assume routing paths are defined statically beforehand.
It is noted that the proposed approach is a node-driven distributed scheduling, but our target system is not a distributed wireless network. Typically, servers in the centralized network can perform expensive computations such as learning-based control with a high-performance processor. However, in IIoT, it is difficult for all servers in the distributed network to have that processor. In this article, since we assume that the central server collects all sensor data and generates control commands by the high-performance processor, our target system is the centralized wireless network.

B. Communication Model
We model a network with a directed graph G = (V, E), where V denotes a set of nodes and E denotes a set of links connected with nodes in V. A link e ∈ E is a link between its source e s and destination e d , e = (e s , e d ). We support a source routing policy to build routing paths, which has one routing path per flow from its source to destination. The source routing path φ i for flow i consists of n links, We adopt a TDMA MAC protocol on top of the IEEE 802.15.4 1 physical layer. All network nodes are time synchronized. The time slot size is 10 ms, and each slot can accommodate one data transmission and its acknowledgment [5].
In our system, a flow (task) τ i is characterized by where T i represents a period, C i represents probabilistic execution time (pET), and D i represents a relative deadline equal to T i . We design pET considering packet loss probability per link, which will be detailed in Section V-A. We focus on dual-priority systems {τ L , τ H }. The network parameters of a flow τ i are the transmission period T i and the maximum transmission attempts ε i . Here, T i is the period during which the source node generates a packet, and ε i is the maximum transmission attempts on link e k i ∈ φ i , where we assume that links ∀e k i ∈ φ i have the same value of ε i .

IV. PROPOSED ADAPTIVEHART PROTOCOL
In this section, we provide the details of AH. Our goal is to design a TDMA MAC protocol based on a node-driven scheduling approach. In order to convert from a manager-driven approach to node-driven scheduling, a key issue is how to enable conflict-free transmissions at the node level without using a global schedule. To design a conflict-free node-driven protocol, we propose Rx-Tx and TxOffset mechanisms. Rx-Tx allows each node to select its transmission slots based on radio events. TxOffset prevents transmission conflicts by utilizing the hardware characteristics of capture effects, which will be described in Section IV-C, even if adjacent transmission instants are unknown. Additionally, to support system adaptability, a piggyback mechanism is utilized for parameter delivery to particular nodes on a routing path, rather than entire network nodes, during the packet delivery process.

A. Piggyback Mechanism
Piggyback is a mechanism that stores network parameters in a packet to be sent. This approach is to deliver the changed parameter only to nodes on the flow routing path, in contrast to the typical centralized approach that broadcasts the information to all network nodes. The flow source node piggybacks the parameters, i.e., flow ID τ i , transmission period T i , deadline D i , and the number of retransmission per link ε i , with an actuation packet when a flow transmits a packet. The payload of the actuation packet is where D i means absolute deadline and u i is a control command for a plant corresponding to the flow. When nodes on φ i receive the packet, they operate according to the piggybacked parameters. For example, let us consider a case in which ε i is changed from 1 to 3 at time t. Before time t, transmission failure of one of the relay nodes on φ i leads to end-to-end delivery failure. After time t, two consecutive transmission failures on each node are acceptable because of ε i with 3. Parameter T i can be adaptive because of instant determination of the source in the Rx-Tx mechanism, which will be discussed in Section IV-B.
The piggybacked information is sufficient to be stored in IEEE 802.15.4 MAC payload (102 B), and a time slot of 10 ms is defined to be sufficient to transmit a maximum packet size. Thus, the piggyback mechanism has no effect on slot latency, and we validate it by performing experiments and simulations with the maximum packet size in Section VI.

B. Rx-Tx Mechanism
Rx-Tx allows each node to determine its own transmission time slots based on radio events. Basically, transmission of a relay node on link e k i ∈ φ i is triggered by completion of packet reception, which is transmitted on e k−1 i ∈ φ i . Specifically, the Rx-Tx mechanism is based on the state transition shown in Fig. 2, which can be described as follows.
1) A node u in an idle time is in the ready-to-receive (RRx) state, where u is made ready to receive a packet by turning on its radio at a predetermined channel.
2) If u receives a packet at time slot t, its state changes to receive (Rx); it stores some of the piggybacked parameters (τ i , D i , ε i ) and places the packet into a queue to be forwarded. The node checks the deadline miss comparing a current time and D i . If the deadline is missed, it drops the packet and returns to the RRx state.
3) At the next time slot t + 1, its state changes to ready-totransmit (RTx) during an interval of TxOffset, which is the time duration from the slot start instant to transmission instant of a packet within a time slot. Note that the value of TxOffset should be less than the size of a time slot (10 ms). During the interval, it checks whether packets have been received from other flows. The specific value of TxOffset is determined by the TxOffset mechanism, as described in Section IV-C. 4) If no packet is received in the RTx state, u enters the transmission (Tx) state, and it transmits the stored packet to its destination. The destination node for τ i is predetermined during the network initialization phase. If u has multiple types of packets at a certain time instant, it processes the packets in the order of the highest priority. In the Tx state, if transmission fails, it returns to the RTx state and tries to retransmit in the next time slot. Retransmission can be repeated up to ε i − 1. If transmission is successful in the Tx state, the state changes to RRx to be ready to receive the next packets. 5) In the RTx state, if packet reception from other flows (flow preemption) occurs at time slot t + 1, the state changes from RTx to the delay (De) state. In the De state, the transmission of the stored packet is deferred to the next slot because the node is occupied by receiving preemptive packets. At time slot t + 2, the De state becomes RTx and the node is ready to transmit the stored packet again.
Because relay transmissions are determined by the previouslink transmitter, parameter T i can be adaptively dependent on the source-select transmission period. In addition, it can save the wasted (unused) retransmission slots on typically fixed retransmission scheduling in a relay process.

C. TxOffset Mechanism
TxOffset is a mechanism to avoid possible transmission conflicts due to the absence of global schedules. The key idea of this mechanism is to artificially mismatch the instants of transmission between adjacent nodes utilizing a wireless device hardware characteristic of the capture effect [22]. The capture effect provides low-latency network flooding by eliminating neighborhood contention. It allows a common receiver to receive multiple packets within a time slot if their transmissions have only 3 ms difference. This is experimentally proved in [22]. Therefore, we need to determine how to create the time difference between adjacent transmissions.
TxConflict types: We first define wireless transmission conflict (TxConflict) types considering the flow routing path and priority. TxConflict is a packet loss and transmission delay generated by the neighbor-simultaneous transmission because a node with half-duplex radio cannot transmit and receive a packet at the same time [23]. We assume that there are two types of flows in the network, high-and low-priority flows (τ H and τ L ) with overlapped routing paths. There are four types of TxConflict, as shown in Fig. 3(a).
1) Common Receiver (CR) conflict: Parallel transmissions collide in a common receiver.
2) Low-flow Receiver (LR) conflict: The sender of τ L cannot transmit its packet to the receiver of τ L because the receiver is also a sender of τ H .
3) Low-flow Sender (LS) conflict: As in (ii), the sender of τ L cannot receive the packet of τ H while transmitting the packet to the receiver. 4) Common Sender (CS) conflict: A sender cannot transmit multiple flow packets at the same time. In a network topology as Fig. 3(b), each node n can prerecognize its possible transmission We define the time interval from the start of a slot to the start of transmission as TxOffset. Every node adaptively modifies this value for every slot according to the following three events.
1) Packet priority: If the priority of packets to be sent is τ H , then they set the value with Offset 1 .
2) As a case of {LS / ∈ TxConflict(n)} for a node n, when n transmits its own τ L packet, it does not occur that n receives packets from τ H , such as the s L node in Fig. 3(b). In this case, the transmissions of s L may conflict at its destination u with s H transmissions on e 1 H (CR conflict type), or u transmissions on e 2 H (LR conflict type). To avoid CR and LR conflicts, input node n sets the TxOffset value with Offset 2 .
3) As a case of {LS ∈ TxConflict(n)}, n may receive packets from τ H at their transmission slot when it transmits τ L packets, such as u or v nodes on e 2 L or e 3 L , respectively, in Fig. 3(b). To avoid LS conflict, they set the value with Offset 3 . Now, we address how to select the specific values of the offsets, i.e., Offset 1,2,3 . We determine the values based on empirical results.
1) Offset 1 is 0 ms. In event 1), when node n transmits τ H packets, transmission conflicts and delay of the packets should not occur. For example, in Fig. 3(b), when transmissions on e 1 H and e 2 L simultaneously occur, node u should receive packets of s H even if it cancels its own transmissions. To achieve this preemption, nodes sending τ H packets set Offset 1 to 0 ms, which is experimentally justified in Fig. 4.
2) Offset 2 is 3 ms. In event 2), a destination node (e.g., node u) may simultaneously receive two types of packets, τ H and τ L . Based on the capture effect, if the transmission instant of τ L has a 3 ms difference from that of τ H , the common receiver can receive the two packets in the same time slot. Because the transmitter of τ H has transmission with Offset 1 (0 ms), the transmitter of τ L , which satisfies {LS / ∈ TxConflict(n)}, has transmission with Offset 2 (3 ms).
3) Offset 3 is 5 ms. In event 3), before the nodes of τ L transmit their packets, they may receive packets from τ H . For τ H packets to preempt τ L packets, τ L nodes should wait for a minimum interval (5 ms) during which τ H packet reception can be recognized. According to the Rx-Tx mechanism, if there is no packet reception during that interval, the node of τ L transmits its packet. Otherwise, it defers τ L transmissions to complete receiving τ H packets. We refer to the delayed τ L transmission due to the preemption of τ H as the preemption effect. The value of 5 ms is derived from experiment results in Fig. 4.
We empirically demonstrate the rationality for Offset 3 to be 5 ms. The wireless device used in the experiments is TelosB mote that has a CC2420 radio and a MSP430 microcontroller. We need to verify the packet reception interval, from a slot start time point to a packet reception point, at the physical layer on a destination node. The source and destination nodes are 2 m apart and time synchronized. Fig. 4 presents a packet reception ratio with respect to the packet reception interval among 1 00 000 packets on a link. From the figure, 85% of the packets arrive at the receiver in a range of [3.9, 4.1] ms, and others are included in [3.7, 3.9] ms and [4.1, 4.3] ms. It shows that the node can recognize the packet reception before 5 ms within a time slot, thus it means that relay nodes can defer sending τ L packets in the preemption effect. We will demonstrate that this effect does not cause a packet collision in a real testbed in Secion VI-B.

V. PERFORMANCE ANALYSIS
In this section, we propose a SRTA tailored to wireless multihop networks. Using SRTA, we compute end-to-end transmission delay distributions for given network parameters and provide a stochastic real-time schedulability condition. Note that given routing paths and characters of flows, AH is a conflict-free transmission protocol that operates without a specific scheduling algorithm in multihop networks. Thus, our focus in this section is not a formal proof of optimal scheduling, but rather an analysis of the end-to-end delay distribution of flows so that we can estimate the probability of satisfying a given deadline (real-time performance).

A. Probabilistic Transmission Time
To reflect the packet loss probability, we newly model the probabilistic execution time (hereafter probabilistic transmission time). In wireless multihop networks, C i represents transmission attempts on time slots from source to destination on the routing path φ i . For example, if the number of end-to-end transmissions of τ i is 4, then C i = 4 because τ i uses four time slots. We split it by the transmission time C k i on each link e k i ∈ φ i , which represents the number of transmission until the first transmission success on a link. Because the number of transmissions on a link depends on the link quality, C k i is a discrete random variable expressed as where C k min is a non-negative integer value. Probability function f C k i (c) is the success probability with c attempts to deliver a packet on e k i . We calculate f C k i (c) as where q k i is the link quality on e k i , which is the success probability of a transmission. Here ε k i is the maximum number of transmissions on e k i . In this article, we assume that each link e k i ∈ φ i has the same ε k where ε i is determined by the required reliability level [6].
In AH, if a transmission success at a time slot, then the next transmission starts immediately at the next slot. Thus, end-to-end transmission time C i is the sum of link transmission times C k i , for ∀e k i ∈ φ i . This means a probability distribution of time duration taken from packet-released time on a source to packet-arrival time on a destination. Because the sum of discrete random variables is computed by convolution ⊗, the accumulation of transmission time C k i of all links on the routing path φ i is computed as follows

B. Stochastic Response Time Analysis (SRTA)
Existing SRTA regards a preemption unit imposed by a highpriority flow τ hi as a job (end-to-end communication delay), which is too pessimistic to apply to multihop networks. To extend it to multihop networks, we newly design the analysis considering the preemption unit as a link communication delay, not end-to-end communication delay.
The response time R cr (hereafter communication delay) of a flow τ cr indicates the end-to-end packet transmission delay distribution over its routing path φ cr . We first define the communication delay distribution on a link e k cr ∈ φ cr . The link communication delay R k cr denotes the number of time slots from the packet release instant λ k cr on link e k cr to the transmission success instant. It is computed as where k is the hop count on φ cr . Here, B k cr (λ k cr ) is the backlog of high-priority flows that is released before λ k cr and still not completed yet at λ k cr , and I k cr (λ k cr ) is the transmission time of high-priority flows that are released after λ k cr . Intuitively, R k cr (λ k cr ) is computed by the sum of the preemption time of high-priority flows that is imposed on e k cr and its transmission time C k cr . The equation refers to (3) in [24]. For example, there are two flows (τ hi , τ cr ) in a network topology, such as Fig. 3(b). We assume flow characters as follows: τ hi is a higher prioriy flow than τ cr . Routing paths of them are φ hi = [e (s H ,u) , e (u,v) ] and φ cr = [e (s L ,u) ], respectively. Transmission periods are T hi = 5 and T cr = 10. Packet release times on the first link are the same at slot 0, λ 1 hi = λ 1 cr = 0. The link quality of each link is q k i = 0.9∀q k i ∈ [φ hi , φ cr ], and the maximum transmission opportunity on each link is To help to understand (4), we assume node s H and s L cannot transmit it to a common destination simultaneously.
where the bold text λ i hi means a random variable and the normal text λ k cr means a single value. 1) Backlog: To compute R k cr (λ k cr , λ i hi ), we first introduce the computation of B k cr (λ k cr , λ i hi ). For the preemption on e k cr to occur at λ k cr , it must satisfy the following two preemption conditions. First, there should be flows with higher-priority τ hi than that of flow τ cr . Second, there should be preemptable candidate links to e k cr (Cand(e k cr )). Cand(e k cr ) denotes link set of τ hi directly connected to e k cr , e.g., e 1,2, H ∈ Cand(e 1 L ), e 1,2,3 H ∈ Cand(e 2 L ) and e 2,3 H ∈ Cand(e 3 L ) in Fig. 3(b). Thus, simultaneous transmission of e k cr and e i hi ∈ Cand(e k cr ) incurs transmission delay of e k cr due to the TxOffset mechanism.
Given λ k cr and λ i hi , B k cr depends on the accumulated transmission times of candidate links, where link e i hi satisfies the preemption conditions. For example, in Fig. 3(b), when two links e 2 cr (= e (u,v) ) and e 1 hi (= e (s H ,u) ) are released simultaneously, λ 2 cr = λ 1 hi , the transmission time on e 2 cr is preempted by that of {e 1 hi , e 2 hi (= e (u,v) ), e 3 hi (= e (v,d H ) )} ∈ Cand(e 2 cr ) until the entire transmissions on Cand(e 2 cr ) are finished due to TxOffset mechanism. However, if λ 1 hi is before λ 2 cr and its transmission is finished before λ 2 cr , then the transmission time on e 1 hi is not included in B 2 cr . Because the backlog means the residual transmission time after λ 2 cr , we need to compute B k cr considering both of the amount of preemption on e k cr from candidate links and its release distributions.
We first propose an equation for the amount of preemption of the candidate links.
Proposition 1: If links e k cr and e i hi ∈ Cand(e k cr ) are activated simultaneously at time t, then the preemption imposed to e k cr is computed as (6) where j is the maximum link index in Cand(e k cr ), where link indexes in the candidate set are sorted in ascending order.
Proof: By the definition of Cand(e k cr ), links in the set, {e z hi , . . ., e j hi } ∈ Cand(e k cr ), can preempt the link e k cr , where z ≤ i ≤ j. The candidate links are sorted in ascending order, z (j) is a minimum (maximum) link index in Cand(e k cr ), respectively. If e i hi is activated simultaneously with e k cr , the e k cr execution is delayed until the completion of e i hi due to the TxOffset mechanism. After the e i hi completion at a certain time slot, the next link transmissions (higher link index than i) are sequentially executed from the next time slot due to the Rx-Tx mechanism. Thus, because e k cr cannot be executed until the completion of candidate links {e i hi , . . ., e j hi } ∈ Cand(e k cr ), the preemption on e k cr is the sum of the transmission times of the candidate links. We introduce a backlog exist equation. Given λ k cr and release distribution λ i hi of e i hi ∈ Cand(e k cr ), the presence of a backlog on e k cr at λ k cr is computed as By the definition of a backlog, if e i hi ∈ Cand(e k cr ) releases before λ k cr and still executes after λ k cr , then a backlog exists. Here, λ i,≤λ k cr hi represents values and corresponding probabilities before λ k cr in a λ i hi distribution, and (λ i,≤λ k cr hi ⊗ C i pree,hi ) represents the distribution of finish instants of preemption links by Proposition 1. The notation (·) >λ k cr 2 , (λ i,≤λ k cr hi ⊗ C i pree,hi ) >λ k cr represents some part of the distribution that still executes after λ k cr . Equation (7) expresses the absolute finish instants of preemption links. To express the relative amount of backlog, we use the shrink() operation.
where shrink() shifts BE k cr to the left λ k cr units and accumulates the residual probability (1-prob(BE k cr )) in the origin [26]. 2) Interference: Interference I k cr is the amount of preemption on e k cr released after λ k cr . If there is no interference on e k cr at λ k cr , then a delay distribution is derived by accumulating the backlog and transmission time, cr . Otherwise, we accumulate I k cr with R k cr (λ k cr , λ i hi ). We define an interference exist condition. Interference imposed on e k cr depends on a flow period T hi of τ hi . The condition is that a new job of τ hi is released before the finish of transmission time C k cr . Interference starts from the first link of its candidate links e i=min hi ∈ Cand(e k cr ), so we need to identify that release instants λ i hi are earlier than the current communication delay. The release distribution λ i hi is calculated as where R k,head cr is the part of the delay distribution that is not affected by the current interference, whereas R k,tail cr is the part of the distribution that is affected by the current interference. Only the distribution of R k,tail cr includes interference I k cr , and it is then combined with R k,head cr using operator ⊕ 3 . The value of I k cr is the sum of the transmission times of all candidate links by Proposition 1, The specific computation algorithm for R k cr refers to the doPreemption() function in [24], where notations C and A are I k cr and λ i hi , respectively.

3) Putting Together:
We now explain the overall process to compute communication delay distributions R cr of a flow τ cr . We compute R cr recursively from the first link R 1 cr to the last one R |φ cr | cr using the SRTA algorithm (Algorithm 1). Given Specifically, in lines 5-11, it computes the current communication delay distribution R k cr (λ k cr , λ i hi ) on link e k cr . Line 5 identifies λ i hi preemtable on e k cr , λ i hi = λ 1 hi ⊗ m−1 n=1 C n hi if i < m, otherwise, it maintains the input λ i hi . C k cr , B k cr , and I k cr are computed by using (1), (8), and I k cr = ⊗ j n=m C n hi , respectively. In lines 9-11, it computes R k cr that includes I k cr using the do-Preemption() function in [24] if the interference exist condition is satisfied. Here, G m hi in line 8 is the release distribution of e m hi of the newly generated job. Computation of the next link R k+1 cr is triggered in lines 12-18. The input λ i hi on the next SRTA() is i = j + 1 due to Proposition 1 if preemption occurs in computing current R k cr , otherwise, i = i because of the possibility for e i hi to preempt on e k+1 cr . Another input λ k+1 cr is an instant elapsed from the release instant λ k cr to a communication delay R ∈ R k cr , λ k+1 cr = λ k cr ⊗ R. In lines 16-17, all possible R k+1 cr are accumulated on R k cr . 4) Schedulability Condition: The probability that a flow τ i misses its deadline, denoted by DMP i , can be derived from the probability function f X as follows where R i is a random variable, as computed using Algorithm 1.
If the deadline miss probability for a flow is less than or equal 3 Coalescion operator (⊕) represents the combination of the two random variables into a single random variable [24]. to the probability threshold of 1%, and the condition is satisfied for all flows, then the system is considered schedulable.

VI. PERFORMANCE EVALUATION
Based on the proposed three mechanisms (Piggyback, Rx-Tx, and TxOffset), AH delivers packets with minimal end-to-end delay, and provides resource-efficient reliable transmissions by flexible retransmission approach, which only works when an actual packet loss occurs. Although it is a centralized multihop network, it has the adaptability of changing flow characters immediately without global schedule dissemination due to piggybacked information-centric operation. Moreover, using SRTA, we compute end-to-end delay distribution in applying our protocol, which can guarantee real-time performance stochastically.

A. Accuracy of the Stochastic Response Time Analysis
We evaluate the theoretical analysis accuracy by comparing the end-to-end communication delay distribution results of SRTA with those of our protocol implemented on TOSSIM [27], which is a state-of-the-art wireless sensor network simulator. Comparing end-to-end delay distribution results of theoretical SRTA and that of AH implemented in the simulator is intended to verify the accuracy of the SRTA. For validation in dynamic environments, we perform the evaluations both in normal and harsh channel conditions. Evaluation setting: There are two types of flows (τ H and τ L ) in the networks, and the evaluations are performed by varying the end-to-end distance of each flow from 2 to 5 hops. A 3-hop network topology is the same as that in Fig. 3(b). A 2-hop topology has no links between node u and v (u = v). Likewise, a 5-hop topology has 3 hops between them. We employ packet delivery rates (PDRs) per link of 90% and 52% under the normal and harsh conditions, respectively. To provide a sufficient end-to-end PDR of 99% of each flow in both conditions, the number of transmission attempts per link (#Tx) is 3 under normal and 9 under harsh conditions. These values are determined according to [6]. We employ flow periods of 150 ms for normal conditions and 300 ms for harsh conditions; these values satisfy the schedulability condition (10) sufficiently. Fig. 6(a) and (b) represent the cumulative density function (CDF) of end-to-end delay distributions for τ L with variation of the end-to-end distance under normal and harsh channel conditions, respectively. The blue line is delay distributions from the simulator, and the red line is results computed from the proposed theoretical SRTA. For a quantitative comparison, we need to verify 99% instant of each CDF as Fig. 6(c) (normal) and 6(d) (harsh), because we determine stochastic real-time performance baseline with 99%. These results show that the proposed SRTA finds the accurate stochastic real-time deadline under the given parameters, except for 4-hop and 5-hop under harsh condition. One reason for these slight errors is that a real network and wireless simulator are unavailable to have 0% packet loss probability even if a sufficient #Tx is allocated. However, in modeling the link transmission time in (1), we assume the loss probability with zero for simplicity of analysis. Nevertheless, since 10 ms represents only one time slot difference, the error can be regarded as insignificant.

B. Performance of AdaptiveHART
In this section, we evaluate the performance of AH MAC in terms of the following aspects. 1) Protocol operation. 2) Network apatability. 3) Real-time performance. 4) Control performance.
We evaluate 1), 2), and 3) by using our WNCS testbed, and 4) by using a wireless cyber-physical simulator (WCPS) [28] that integrates MATLAB-Simulink with TOSSIM simulator. This  WCPS supports cosimulation of control systems implemented in Simulink and the AH protocol implemented in TOSSIM. Fig. 7 shows the motes deployment of our testbed in our campus building. The system comprises a network manager on a central server and multiple TelosB motes [29] with TinyOS 2.1.2. Each mote can become either an access point or a field device that forms a multihop wireless network. The central server floods synchronization packets periodically, and the nodes that receive them step a unit slot of 10 ms. We allocate each node its destination according to the given network topology. The node operates every time slot based on AH protocol. 1) Protocol Operation: We verify whether the proposed 3 mechanisms of AH cause packet loss and delay with real devices. We place 6 motes within a diameter of 2 m to minimize channel loss and only measure the impact of the protocols. The routing paths of two flows (τ H and τ L ) overlap on two relay nodes and have their own destinations, as shown in Fig. 3(b). To consider various environments of packet delivery, we intentionally mismatch transmission slots of the sources of the two flows, and verify packet delays and loss probabilities per hop. Fig. 8(a) presents the result when the two flows start sending their packets at the same slot. A common destination on the first hop receives all the packets of two flows at the same slot, which validates that Offset 2 with 3 ms in the TxOffset mechanism is reasonable. In Fig. 8(b) and (c), HI-flow (τ H ) starts sending one slot and two slots later than LO-flow (τ L ), respectively. Even though the HI-flow τ H transmits its packets later than LO-flow, they arrive at the destination earlier than those of τ L and there are no transmission conflicts. This indicates that selecting Offset 3 with 5 ms does not cause packet loss from the conflicts and the intended preemption effect works properly. On the contrary, in Fig. 8(d) and (e), τ L begins sending packets at 1 and 2 slots late, respectively. No packet loss occurs in various environment settings, thus AH can provide the proper operation of end-to-end delivery.
Additionally, these experiments show that the piggyback mechanism does not impose an overhead on the protocol operation because we conduct the experiments with maximum payload size packets. Especially, in Fig. 8(b), when the source s H of τ H transmits a packet to node u at which u of τ L is ready to send its packet to node v. Before u transmits τ L 's packet, it can recognize τ H 's packet thanks to TxOffset mechanism even though s H uses the maximum packet size.
2) Network Adaptability: The advantage of AH is that the network parameters can be updated in real-time, independent of the dissemination interval in global schedule broadcasting. We evaluate the real-time adaptability of the AH protocol in comparison with the WH protocol, where WH uses a deadline monotonic (DM) scheduling policy. Once we change a transmission period parameter at a certain time instant, we evaluate how quickly the changed values can be applied to the system. We use a metric of the adaptation latency, which is the interval between the time instant of the parameter changed and the time instant that a packet reception interval at a destination node follows the changed period for the first time.
We randomly select six devices in our testbed. As an initial setting for two flows, a transmission period is T {H,L} = 150 ms and a transmission opportunity per link is ε {H,L} = 2. The central server changes a period parameter of τ L to the predetermined values (T L = 100, 200, or 250 ms) at a random time instant. To consider practical environments on the centralized network, we show the adaptation latency of τ L by changing the superframe length (1000 and 2000 ms). These values can occur in a real network because the length is generally determined by the least common multiple of all flows [8], [10]. The reason that we analyze τ L 's performance instead of τ H is toF verify the worst-case real-time adaptability because τ L has a relatively large end-to-end delay. Fig. 9(a) shows CDF of the adaptation latency with respect to 1000 results with the frame length of 1000 ms. The red and blue lines are about AH and WH, respectively. The solid, dashed, and dotted lines are periods to be changed at a certain time, from 150 to 100 ms and 200 and 250 ms, respectively. From this figure, we can verify that the AH's intervals on all of the changed periods are shorter than that of WH. WH can only adopt the changed period by broadcasting a new global schedule after finishing the superframe. On the other hand, since AH is built to relay packets regardless of the global schedule, it can adopt the changed period at any time, thereby guaranteeing real-time adaptability. In addition, as Fig. 9(b), AH can provide performance independent of the frame length, which shows 74% (from 1950 to 510 ms) improved adaptability performance compared with that of WH at the worst-case results. The finding from this  experiment is that AH can provide improved adaptability for the period parameter change, and it is independent of the frame length change.
3) Real-Time Performance: To compare the real-time performance of two protocols (AH and WH), we consider the end-toend delay and the schedulable ratio as performance metrics. We assume that packets of flows are generated at the same time and have the same transmission periods on each protocol. Fig. 10 shows CDF of the end-to-end packet delay of the two protocols with respect to the transmission opportunity. In Fig. 10(a), two flows (τ H and τ L ) have the transmission opportunity with 2 per link. In the perspective of τ H , WH has to schedule redundant slots per link in accordance with the transmission opportunity, which may result in a long end-to-end delay.
On the other hand, AH can allocate flexible retransmission slots per link in case of packet loss, providing a relatively short delay. In the perspective of τ L , WH allows τ L to transmit its packets after finishing τ H 's delivery due to DM scheduling. This results in a more accumulated delay. However, since τ L of AH tries to send packets quickly unless it does not cause transmission conflicts with τ H , the delay difference between the protocols becomes greater. In Fig. 10(b) and (c), the more opportunities are assigned, the longer delay WH experiences due to the increased number of redundant slots. AH can maintain the delay performance unless the channel condition deteriorates. In the results of the transmission opportunity of 2, τ H and τ L of AH achieve at most 40% (from 50 ms on WH to 30 ms on AH) and 55% (from 110 ms to 50 ms) reduced end-to-end delay performance compared to those of WH, respectively. Moreover, 67% (from 90 ms to 30 ms) and 76% (from 210 ms to 50 ms) are reduced in the transmission opportunity of 4, respectively.
In a traditional central network, the end-to-end delay results change whenever global scheduling is regenerated (e.g., increasing retransmission parameters). However, we show that the end-to-end delay performance of AH is independent of the retransmission parameter change. This implies that the real-time performance of AH is not significantly affected by parameter changes.
We evaluate the schedulable ratios between AH, WH, and DH [12] by using WCPS, where DH allows each node to select its own time slot by exchanging local knowledge to neighbor nodes in distributed multihop networks. The schedulable ratio is a ratio of schedulable flows for given flow sets. We implement a network topology where the routing paths of two flows (τ H and τ L ) overlap each other and consist of end-to-end distance with four hops. We identify a set of schedulable flows on a specific network utilization U . Here, U is a sum of the utilization of flows, U = i={H,L} U i , where U i = C i /T i . The flow set is a combination of possible periods of flows. We set a fixed transmission opportunity (fixed C i ) and generate 100 random T i sets, satisfying a given U 4 . An unschedulable flow set is defined as a deadline miss ratio exceeds 1%, where the miss ratio is obtained from an average of 100 simulation runs on a given flow set. The flow deadline is the same as its period.
In Fig. 11, both of them achieve 100% ratios when U = 0.5, but when U = 1, AH maintains the performance of 100%, while WH and DH decrease to 14% and 11%, respectively. WH results in poor performance because there is no room to schedule the fixed retransmission slots per link within the given deadline. DH makes it difficult to build end-to-end sequential scheduling considering the routing path through only local knowledge exchange. As a result, as utilization increases, the deadline missing more occurs. Meanwhile, AH is capable of sequential delivery to the routing path and flexible retransmissions, so that it tries to save unused time slots, which maintain 100% schedulable ratio even in high utilization. AH can meet the deadlines as long as 4 One hundred flow sets on a particular utilization are generated using the UUnifast algorithm [30]. there is no severe packet loss that causes transmission delays. The finding from this experiment is that AH can have more flexible flow characters even in high-utilization environments due to resource efficiency.

4) Control Performance:
The proposed protocol can save wasted time resources in dissemination intervals and retransmission slots. In this experiment, we investigate the impact of resource efficiency on control performance.
We run simulations of a linear time-invariant system. The physical system is a double integrator system, which is a typical example of networked control systems [10]. We simulate two control loops sharing a wireless network. On each loop, a physical system P H (P L ) is controlled by its corresponding controller via its actuating flow τ H (τ L ), respectively. The actuating flows have end-to-end overlapped 5-hop distances.
We measure the performance for P H and P L applying each of the AH, WH, and DH protocols. The metric of control performance is a mean absolute error (MAE) in our simulations, in which the error is the difference between the optimal state trajectory controlled by wired networks and the trajectory controlled by each protocol. We carry out two experiments as follows: a) two protocols have the same network utilization (SameUtil); b) two protocols use their maximum utilization (MaxUtil) while guaranteeing the schedulability condition.
We adopt a particular utilization adapting flow periods under fixed retransmission parameters (ε H,L = 2). In experiment a), two protocols use the same periods as 300 ms. In experiment b), WH with DM policy sets the minimum periods satisfying the sufficient condition for a schedulability condition from [31]. DH sets minimum periods of two flows as long as end-to-end scheduling is possible within its deadline when it applies vertex coloring algorithm in a given routing path. AH sets the minimum periods satisfying 99% of condition (10).
In Fig. 12(a), P H and P L of AH achieve 74% and 87% better control performance than those of WH on SameUtil, respectively. Also, compared with DH, the average control performance of P H on AH is 38% better than DH, because AH can reduce the end-to-end transmission delay by saving the wasted retransmission slots. When we compare the control performance improvement of MaxUtil, in Fig. 12(b), against SameUtil, AH achieves 75% and 63% improvement for P H and P L , respectively, while WH (DH) achieves only 53% (37%) and 52% (12%) improvements, respectively. WH (DH) has a limitation of available minimum flow periods to 250 ms (240 ms), respectively, due to the fixed redundant slots (wasted time resource). On the other hand, since AH does not have the wasted slots, it can select more flexible flow periods of 110 ms, which results in greater improvement of control performance than those achieved with other protocols. Consequently, the proposed protocol can provide more frequent controls in dynamic environments.

VII. CONCLUSION
In this article, we have proposed the AH MAC protocol, which can adapt network parameters in real-time. Our protocol has significantly improved network resource efficiency by saving the wasted resources of dissemination intervals and unused retransmission slots. We have also proposed a SRTA to guarantee stochastic real-time performance in wireless multihop networks. Our performance evaluation has shown that the proposed SRTA can compute accurate end-to-end delay distributions for given parameters.
Through evaluations, we have found that AH is capable of real-time adaptability to the period parameter change and end-toend delay performance is independent of the retransmission parameter change. In addition, due to efficient resource consumption, we have found that it is possible to improve the schedulable ratio and control performance in a significant manner. AH has multiple advantages over existing approaches as described above, but it still has a limitation that only 2 types (high and low priority) of flow can be overlapped on their routing paths. Because transmission conflicts can be avoided by splitting the time slot duration. A possible line of future work is to upgrade it so that more than 2 flows can coexist on the overlapped routing path.