2.1 Background

WirelessHART is based on a centralized network management and multi-channel Time Division Multiple Access (TDMA). These special features have attracted researchers’ attentions, and they have done some studies to improve the real-time performance of WirelessHART networks, e.g. [1,2,3,4]. However, all these studies focus on the single-criticality case. Advanced real applications come with mixed-criticality data communications, such as the case of the cement factory in Sect. 1.2.2.

The key difference between mixed- and single-criticality systems is that the criticality of data in mixed-criticality systems must be considered together with real-time performance [5]. This leads to the problem that directly using traditional priority-based scheduling algorithms of single-criticality systems to mixed-criticality systems is infeasible due to independence between criticality and traditional priorities [6,7,8,9,10,11,12]. Therefore, the traditional real-time theory needs a revision to support mixed-criticality networks.

There are a few related studies on mixed-criticality networks. The work in [13,14,15] designs Network-on-Chips for mixed-criticality multiprocessor systems. The work in [16] proposes mixed-criticality protocols for the Controller Area Network (CAN), and then a response-time analysis method and an optimal priority assignment scheme are provided. The work in [17] designs a virtual CAN controller to provide differentiated services for different criticality levels. The work in [18,19,20] focuses on the wired network—TTEthernet. They propose some scheduling algorithms to guarantee the performance of messages under real-time constraints. The work in [21] is about wireless networks. It introduces a mixed-criticality scheduling method to JPEG2000 video systems based on the IEEE 802.11 standard. However, WirelessHART networks are based on the IEEE 802.15.4 standard and are quite different from the wireless video system. Therefore, existing system models and solutions cannot be used in the WirelessHART model.

Since the end-to-end delay analysis is the foundation of the real-time theory, in this chapter, we present an end-to-end delay analysis method for fixed priority scheduling in mixed-criticality real-time WirelessHART networks. The analysis can be used to test whether the data flows can meet their special requirements when designing a WirelessHART network.

In the following, first, we introduce the concept of mixed criticality into real-time wireless sensor-actuator networks and propose a formulated system model; second, we propose an end-to-end delay analysis method, which is a fast feasible method to test the reliability of mixed-criticality systems; third, evaluation results show that the proposed method is very effective and only incurs little pessimism comparing with simulation results and a real testbed.

2.2 System Model

2.2.1 Mixed-Criticality Wireless Network Model

We consider a WirelessHART network characterized by G =< V, E, m > :

  • A WirelessHART network consists of sensor/actuator nodes and a gateway with a centralized network manager. We use n nodes V = {v 1, v 2, …, v n} to denote these devices, and the gateway is v 1. Each node is equipped with a transmitter, so it cannot send and receive in the same time slot.

  • E : V × V  is the set of links. Each element e ij in E represents existing reliable communication between v i and v j. Transmitting a packet through one link is called transmission.

  • We use m to denote the number of available channels. WirelessHART networks support 16 non-overlapping channels. However, since these channels may suffer from persistent external interference, not all of them can always be accessed. Hence, 0 < m ≤ 16. Each channel supports only one transmission in one time slot.

The data flow set is denoted by \(\mathbb {F}=\{F_1,F_2,\ldots \}\). Each flow F i is characterized by F i =< χ i, c i, t i(x), p i, ϕ i > . p i denotes the distinct fixed priority. ϕ i (ϕ i ⊆ E) is an ordered sequence of links and denotes the routing path of the flow F i. The centralized manager of the WirelessHART network collects sensing data and distributes actuator data, so the gateway is the source or destination for each flow. In the TDMA policy, each time slot allows a one-hop data transmission and its acknowledgement to be transmitted. We use c i to denote the number of time slots required to deliver a packet from the source to the destination, i.e., c i is equal to the number of hops of the flow F i.

χ i denotes the criticality level of the flow F i. For ease of presentation, we only focus on a dual-criticality system, in which there are only two criticality levels L (low) and H (high). However, it can be easily extended to systems with an arbitrary number of criticality levels. Correspondingly, the network also has dual-criticality modes {H, L}. If the criticality level of the flow F i is not less than the current network mode x, it can be delivered; otherwise, the flow is discarded. The network starts in the low-criticality mode (x = L), in which all flows are served. When an error or exception occurs in a node, the node will trigger the changing of the network mode from low criticality to high criticality (x = H). Then only the flows with high-criticality level can be delivered, and the low-criticality flows are discarded. Note that the mode change will introduce additional time to the delay of the high-criticality flow and the message of mode change should be broadcast to the entire network as soon as possible. There are some methods used to solve this problem. For example, one channel of each node can be reserved to serve the message. Therefore, we only model the duration of the mode change as C, which is used to calculate the delay of the packet delivered during the mode change.

When errors and exceptions occur, workers will handle problems and change the mode from high criticality to low criticality. We do not consider this process due to the unpredictability of workers’ behavior, i.e., we do not study the mode change from high criticality to low criticality. The assumption is also widely adopted in existing works (such as [22,23,24] etc.).

In mixed-criticality uniprocessor/multiprocessor systems, the execution time of a task is a function of the system mode. In wireless networks, the number of time slots required to deliver a packet is equal to the number of hops and fixed. However, the period t i is dependent on the network criticality mode. Since the important flow is more frequently delivered when the network mode is changed to high criticality, hence, t i(H) < t i(L).

According to the period t i(x), the flow F i periodically releases a packet, which is assigned the parameters specified in F i. Our system adopts the implicit-deadline, i.e., the packet’s relative deadline is equal to the flow’s period corresponding with the network mode of generating the packet. For example, if the packet is released in the network mode L, then its relative deadline is t i(L). Therefore, in a stable network, at most one packet of each flow is active at any time. However, when the network mode is changed from L to H, there may exist two active packets belonging to one flow because of the change of the flow’s period. In this case, the packet released in the network mode H has higher priority than another.

A packet is released at time slot s 1, and arrives at its destination at time slot s 2, then its end-to-end delay is (s 2 − s 1 + 1). The end-to-end delay of a flow is the maximum delay among all its packets. If a scheduling algorithm can schedule all flows such that all packets’ end-to-end delays are less than or equal to their deadlines, the flow set is called schedulable under the scheduling algorithm.

Note that not all of the above assumptions are supported by the original WirelessHART protocol. However, they can be implemented in the application layer [1,2,3]. In Sect. 2.4, our real testbed is introduced.

2.2.2 Fixed Priority Scheduling

We focus on the end-to-end delay analysis for fixed priority scheduling, which is the most commonly used real-time scheduling in real systems. In fixed priority scheduling, transmissions are scheduled within a hyper-period T, which is equal to the least common multiple of periods of all flows, since after that all schedules are cyclically repeated. The period supported by the WirelessHART protocol is 2i, where i is an integer greater than or equal to 0. Therefore, the hyper-period T is equal to the maximum period among all flows. At each time slot of T, if there exist unused channels, the transmission with the highest priority is scheduled. However, if the released transmission shares nodes with the transmissions that have been scheduled at this time slot, it cannot be scheduled since one node cannot serve more than one transmission at one time slot (as shown in Fig. 2.1). Therefore, there are two factors influencing the transmission scheduling: channel contention (there are no unused channels assigned to the transmission) and transmission conflicts (a transmission cannot be scheduled, if it shares a node with a transmission that has been scheduled in this time slot). In other words, the two factors introduce extra delays. In the following, we analyze delays introduced by two factors separately.

Fig. 2.1
2 diagrams. A node diagram on the left connects A, B, C, D, E, and F with each other. It has the labels, F subscript 1, F subscript 2, and p subscript 1 greater than p subscript 2. The diagram on the right has 2 horizontal lines of Channels 1 and 2 labeled time. Channel 1 has boxes of C D, D F, C E, and E F with a shaded box before C D. Channel 2 has boxes of A C and B C with a shaded box between them. The shaded boxes are labeled as B C shares node C with A C and C D, and cannot be scheduled.

Fixed priority scheduling

Problem Statement

Given the mixed-criticality WirelessHART network G, the flow set \(\mathbb {F}\) and the fixed priority scheduling algorithm, our objective is to analyze the end-to-end delay for each flow, such that the schedulability of the flow set can be determined.

Table 2.1 summarizes the key notations used in this chapter.

Table 2.1 Key notations

2.3 End-to-End Delay Analysis

Our analysis is based on the EDA (End-to-end Delay Analysis) method [1], which is the state-of-the-art end-to-end delay analysis for fixed priority scheduling in single-criticality real-time WirelessHART networks. To make this chapter self-contained, we first introduce EDA. Then we present our end-to-end delay analysis for mixed-criticality WirelessHART Networks.

2.3.1 Analysis for Single-Criticality Networks

The EDA analysis contains two steps. The first step calculates the delay due to channel contention, which is called pseudo upper bound of the worst case end-to-end delay and denoted by \(R^{ch}_k\). Then the second step incorporates the delay due to transmission conflicts into the result of the first step.

2.3.1.1 Pseudo Delay

The flow F k experiences the worst case delay when the level-k busy period occurs. The level-k busy period is the maximum continuous time interval during which all channels are occupied by flows of priority higher than the priority of F k, until F k finishes its active packet transmitting. The notation hp(F k) is used to denote the set of flows whose priorities are higher than F k. If the flow F i (F i ∈ hp(F k)) has a packet with release time earlier than the level-k busy period and deadline in the level-k busy period, it is said to have carry-in workload in the busy period. Then two types of workload are presented as follows:

  • \(W^{NC}_k(F_i,\alpha )\) denotes the workload upper bound in the level-k busy period of α slots, if F i has no carry-in workload:

    $$\displaystyle \begin{aligned} W_k^{NC}({F_i},\alpha ) = \left\lfloor {\frac{\alpha }{{{t_i}}}} \right\rfloor \cdot {c_i} + \min (\alpha \bmod {t_i},{c_i})\end{aligned}$$

    where t i denotes the period of F i in single-criticality networks.

  • \(W^{CI}_k(F_i,\alpha )\) denotes the workload upper bound in the level-k busy period of α slots, if F i has a carry-in workload:

    $$\displaystyle \begin{aligned} W_k^{CI}({F_i},\alpha ) = \left\lfloor {\frac{{\max (\alpha - {c_i},0)}}{{{t_i}}}} \right\rfloor \cdot {c_i} + {c_i} + {\mu _i}\end{aligned}$$

    where \({\mu _i} = \min (\max (\max (\alpha - {c_i},0) - ({t_i} - {R_i}),0),{c_i} - 1)\) and R i denotes the worst case end-to-end delay of F i in single-criticality networks.

Similarly, there are two types of interference between F i and F k during α slots:

$$\displaystyle \begin{aligned} {} I_k^{NC}({F_i},\alpha ) = \min (W_k^{NC}({F_i},\alpha ),\alpha - {c_k} + 1) \end{aligned} $$
(2.1)
$$\displaystyle \begin{aligned} {} I_k^{CI}({F_i},\alpha ) = \min (W_k^{CI}({F_i},\alpha ),\alpha - {c_k} + 1) \end{aligned} $$
(2.2)

At most m − 1 higher priority flows have carry-in workload in the network with m channels. Therefore, F k’s total delay due to channel contention is

$$\displaystyle \begin{aligned} {\Omega _k}(\alpha ) = \sum_{{F_i} \in hp({F_k})} {I_k^{NC}({F_i},\alpha )} + {U_k}(\alpha ) \end{aligned}$$

where U k(α) is the sum of the \(\min (\left | {hp({F_k})} \right |,m - 1)\) largest values of the differences \(I_k^{CI}({F_i},\alpha ) - I_k^{NC}({F_i},\alpha )\) among all F i ∈ hp(F k).

The WirelessHART network contains m channels, so Eq. (2.3) shows the delay due to channel contention. And the pseudo upper bound \(R^{ch}_k\) is the minimal value of α that solves Eq. (2.3). α can be found using the iterative fixed-point algorithm [25], which is widely used in the delay analysis of real time systems. The iterative calculation of α starts at α = c k. During the iterations, if α is larger than the deadline of the flow F k, the algorithm terminates and the flow set is unschedulable; if the value of α is fixed and less than the deadline, the fixed-point is \(R^{ch}_k\).

$$\displaystyle \begin{aligned} {} \alpha = \left\lfloor {\frac{{{\Omega _k}(\alpha )}}{m}} \right\rfloor + {c_k} \end{aligned} $$
(2.3)

2.3.1.2 Worst Case Delay

This step incorporates the delay due to transmission conflicts into \(R^{ch}_k\) to calculate the actual end-to-end delay R k. First, we introduce some definitions.

  • Q(k, i): the total number of F i’s transmissions that share nodes with F k’s transmissions.

  • δ j(k, i): the number of nodes along the jth maximal common path between F k and F i. \(\delta {{ }^{\prime }_j}(k,i)\) is the length of the maximal common path with a length of at least 4. The delay caused by a maximal common path is at most 3, so the extra length is specially marked using \(\delta {{ }^{\prime }_j}(k,i)\).

  • Δ(k, i): the upper bound of end-to-end delay due to transmission conflicts that F i contributes to F k,

    $$\displaystyle \begin{aligned} \Delta (k,i) = Q(k,i) - \sum_{j = 1}^\sigma {(\delta {{}^{\prime}_j}(k,i) - 3)}\end{aligned}$$

    where σ is the number of maximal common paths between F k and F i.

Thus the upper bound of the actual delay R k is the minimal solution of Eq. (2.4) by running the iterative fixed point algorithm starting at \(\beta = R^{ch}_k\).

$$\displaystyle \begin{aligned} {} \beta = R_k^{ch} + \sum_{{F_i} \in hp({F_k})} {\left\lceil {\frac{\beta }{{{t_i}}}} \right\rceil } \cdot \Delta (k,i) \end{aligned} $$
(2.4)

2.3.2 Analysis for Mixed-Criticality Networks

Mixed-criticality networks dynamically change the network mode, which results in three types of packets transmitted in the network:

  • The release time and deadline of a packet are all in the network mode L. The end-to-end delay of this packet is denoted by R k(L).

  • The release time and deadline of a packet are all in the network mode H. The notation R k(H) is used to present the upper bound of its delay.

  • When the network mode is changed, the packet, which is released by high-criticality flow in the network mode L, cannot be dropped. In this situation, the packet’s release time is in the network mode L, but its deadline is in the H mode. Flows formed by these packets are delivered only once. The notation \(\mathbb {F}'\) presents the set of these flows and R k(L2H) denotes the upper bound of the delay.

R k(L) is unaffected by the mode change and is equal to the delay R k calculated in single-criticality networks. Therefore, we only analyze R k(H) and R k(L2H).

2.3.2.1 Analyzing R k(H)

In the network mode H, packets belonging to the high-criticality flow are delivered, no matter when they are released. Therefore, R k(H) is interfered by the following two flow sets

$$\displaystyle \begin{aligned} hpL({F_k}) = \{ {F_i}|{F_i} \in \mathbb{F}',{p_i} < {p_k},{\chi_i}=H\},\end{aligned}$$
$$\displaystyle \begin{aligned} hpH({F_k}) = \{ {F_i}|{F_i} \in \mathbb{F},{p_i} > {p_k},{\chi _i} = H\}.\end{aligned}$$

From these, we can derive that the delay due to channel contention is

$$\displaystyle \begin{aligned} {\Omega _k}(\alpha ) = \sum_{{F_i} \in hpH({F_k}) \cap hpL({F_k})} {I_k^{NC}({F_i},\alpha )} + {U_k}(\alpha ) \end{aligned}$$

where U k(α) is also for the interferences of hpH(F k) and hpL(F k). Note that the interferences of flows in hpH(F k) are the same with Eqs. (2.1) and (2.2), since the flows release packets periodically. However, the flow F i (F i ∈ hpL(F k)) is delivered only once. In the worst case, its workload in the level-k busy period is min{α, c i}. Therefore,

$$\displaystyle \begin{aligned} \forall {F_i} \in hpL({F_k}): I_k^{CI}({F_i},\alpha ) = I_k^{NC}({F_i},\alpha ) = \min (\min (\alpha ,{c_i}),\alpha - {c_k} + 1) \end{aligned}$$

Then the pseudo upper bound \(R^{ch}_k(H)\) can be derived based on Eq. (2.3).

For the delay due to transmission conflicts, similarly, besides the periodic flows in hpH(F k), the flows in hpL(F k) delivered only once will introduce Δ(k, i) to R k(H). Therefore,

$$\displaystyle \begin{aligned} {} \beta = R_k^{ch}(H) +\sum_{{F_i} \in hpH({F_k})} {\left\lceil {\frac{\beta }{{{t_i}(H)}}} \right\rceil \cdot \Delta (k,i)} + \sum_{{F_i} \in hpL({F_k})} {\Delta (k,i)} \end{aligned} $$
(2.5)

According to Eq. (2.5), the iterative algorithm can be used to find the fixed β, i.e., R k(H).

2.3.2.2 Analyzing R k(L2H)

The flow F k (\(F_k \in \mathbb {F}'\)) is divided into two flows. The first flow F kL is delivered in the L mode, and the second flow F kH is in the H mode. We use \(R^r_k(L)\) and \(R^r_k(H)\) to denote the delays of F kL and F kH, respectively, where r means that the packet has passed through r hops before the mode change, and r ∈ [0, c k − 1]. Correspondingly, c kL = r and c kH = c k − r. And priorities of F kL and F kH are assigned as p k.

The calculation of \(R^r_k(L)\) is the same as that of R k(L), since they are all in the stable network. However, \(R^r_k(H)\) is different from R k(H). According to our system model, packets released by F k in the network mode H have higher priority than the packets of F kH. Therefore, the delay contributed by these higher priority packets must be added to \(R^r_k(H)\), i.e., F kH is interfered by hpL(F k), hpH(F k) and {F k} in the network mode H. From these, we can derive

$$\displaystyle \begin{aligned} {\Omega _{kH}}(\alpha ) =\sum_{{F_i} \in hpH({F_k}) \cap hpL({F_k}) \cap \{ {F_k}\} }{I_{kH}^{NC}({F_i},\alpha )} + {U_{kH}}(\alpha ) \end{aligned}$$

where U kH is for hpL(F k), hpH(F k) and {F k}. For the flow F kH, F k releases higher priority packets periodically. The interference introduced by F k is the same as that by hpH(F k). Therefore, Eqs. (2.1) and (2.2) also can be used to calculate it.

For the delay due to transmission conflicts, the packets released by {F k} must be considered. Then the actual end-to-end delay is shown as follows:

$$\displaystyle \begin{aligned} \beta = R_{kH}^{ch}(H) + \sum_{{F_i} \in hpH({F_k}) \cap \{ {F_k}\} } {\left\lceil {\frac{\beta }{{{t_i}(H)}}} \right\rceil \cdot \Delta (kH,i)} + \sum_{{F_i} \in hpL({F_k})} {\Delta (kH,i)} \end{aligned}$$

And \(R^r_k(H)\) is also solved by the iterative algorithm.

The range of r is from 0 to c k − 1. If r = 0, it means that the packet has been released but not been delivered before the network mode is changed to H. Thus, c kL = 0. This will cause the failure of the iterative algorithm. Therefore, if ∃F i and p i > p k, α starts with 1; otherwise, there is no interference for F k and \(R_k^r(L)=0\). If r = c k, it means that the packet has been delivered to its destination in the L network mode. Hence, the delay of the packet is R k(L).

The delay of F k is the sum of \(R^r_k(L)\) and \(R^r_k(H)\). However, different values of r lead to different \(R^r_k(L)\) and \(R^r_k(H)\). Therefore, the upper bound of F k’s delay is

$$\displaystyle \begin{aligned} {R_k}(L2H) = {\max _{r \in [0,{c_k} - 1]}}\{ R_k^r(L) + R_k^r(H)\} + C \end{aligned}$$

where C is the additional time introduced by the mode change (shown in Sect. 2.2).

To sum up, if the flow F k satisfies R k(L) ≤ t k(L), R k(H) ≤ t k(H) and R k(L2H) ≤ t k(L), then it is schedulable. In a flow set, if all the flows are schedulable, the flow set is schedulable. The calculation of our analysis is in pseudo polynomial time because our analysis is based on the iterative fixed-point algorithm.

2.4 Performance Evaluations

In this section, we will compare our analysis method with simulations and a real testbed.

2.4.1 Simulations

In order to illustrate the applicability of our method, for each parameter configuration, 100 test cases are generated randomly. For each test case, the gateway is placed at the center and other nodes are placed randomly in the playground area A. According to the suggestion in [26], the number of nodes n and the playground area A should satisfy

$$\displaystyle \begin{aligned} \frac{n}{A} = \frac{{2\pi }}{{{d^2}\sqrt {27} }}\end{aligned}$$

where the transmitting range d is set as 40 m. Then, each node connects to the nearest node, which must be in its transmitting range and has been connected to the gateway. If some nodes cannot connect to the gateway, their locations are generated randomly again.

The flow set \(\mathbb {F}\) contains 0.8 ⋅ n flows. Other parameters are set as follows. We use the utilization u (\(u = \sum\limits _{\forall {F_i} \in \mathbb {F}}\) c i /t i) to control the workload of the entire network, and UUniFast algorithm [27] is used to generate each flow’s utilization u i (u i = c i /t i). The result generated by UUniFast algorithm follows a uniform distribution and is neither pessimistic, nor optimistic for the analysis. For the flow F i, its criticality level is assigned randomly. If χ i = H, then \({t_i}(L) = {2^{\left \lceil {\log _2^{ti}} \right \rceil }}\) and \({t_i}(H) = {2^{\left \lfloor {\log _2^{ti}} \right \rfloor }}\); otherwise, \({t_i}(L) = {2^{\left \lceil {\log _2^{ti}} \right \rceil }}\) and t i(H) = +∞. The mode change duration C is set as the maximum number of hops between any two nodes of the network. If one channel and one transmitter of each node are reserved to serve the mode change, the change command can be broadcast to all the nodes in the duration C. The fixed priority assignment follows the two classical algorithms [28]: (1) Deadline Monotonic (DM), in which the flow with the shorter deadline is assigned the higher priority; (2) Proportional Deadline monotonic (PD), in which the flow with the shorter subdeadline is assigned the higher priority. Subdeadline is defined for its deadline divided by the total number of its transmissions.

The mode change can occur at any time slot. Hence, the simulation should list all cases. However, for the complex state space, the execution time of simulations is unacceptable. Therefore, if the execution time exceeds 30 minutes, the simulation is suspended and the maximum delay is chosen as the worst case end-to-end delay. We use pessimism ratio (the proportion of our analyzed delay to the maximum delay observed in simulations) and acceptance ratio (the percentage of flow sets that are schedulable) as the performance metrics.

Figure 2.2 plots the pessimism ratios with different numbers of nodes. We set that m = 12 and u = 1. In order to make test cases simulated in an acceptable time, the number of nodes is only up to 110. From the figures, we can see that the 75th percentile of the pessimism ratios is less than 2.1 and 2.2 for DM and PD, respectively. In [1], the result of the state-of-the-art analysis EDA for single-criticality networks is 1.5 and 1.6, respectively. Compared with them, our analysis only introduces a small degree of pessimism, even though the mode change increases the complexity of the end-to-end delay analysis. Therefore, our analysis is highly effective.

Fig. 2.2
2 box plots of the pessimism ratio versus the number of nodes n labeled A and B. A has the most and least deflection of the box in 110 and 40 nodes. And B has the most and least deflection of the box in 110 and 60.

Pessimism ratio under varying network sizes with m = 12. (a) The priority assignment policy DM. (b) The priority assignment policy PD

In order to evaluate the performance of our analysis method for the larger scale networks in an acceptable time, we set m = 6 and u = 1. Figure 2.3 shows the boxplots of the pessimism ratios under varying network sizes. From the evaluation results, we know that our analysis method is stable under different network sizes. Comparing with Fig. 2.2, Fig. 2.3 is more pessimistic. The less number of channels introduces more contentions, and the delay analysis is to consider the worst case scenario. Thus, all of additional contentions are considered in the delay analysis, but not all of them appear in simulations. Therefore, the analysis with fewer channels is more pessimistic.

Fig. 2.3
2 box plots of the pessimism ratio versus the number of nodes n labeled A and B. Both have the most and least deflection of the box in 250 and 50 nodes.

Pessimism ratio under varying network sizes with m = 6. (a) The priority assignment policy DM. (b) The priority assignment policy PD

We compare the acceptance ratios of our analysis and simulations, and the utilization u is increased to 3.2. Figure 2.4 shows the comparison, in which AMC is our Analysis for Mixed-Criticality networks and SIM is the result of simulations. We observe that our results are close to those of simulations. Therefore, our analysis method can be used to verify whether flows can meet their deadlines or not before implementing the real system.

Fig. 2.4
2 multi-line graphs labeled A and B of acceptance ratio versus utilization u plots A M C and S I M twice where n = 90 and 70 respectively. Both graphs overlap at the start and the end and follow a decreasing trend.

Acceptance ratio under varying utilizations with m = 6. (a) The priority assignment policy DM. (b) The priority assignment policy PD

Comparing Fig. 2.4a and b, we observe that the acceptance ratio of the policy PD is less than that of the policy DM. It is because that, compared with the policy DM, the policy PD introduces more interferences to the flows with short paths, which leads to a longer delay. Similarly, all the interferences are considered in the delay analysis, but not all of them appear in simulations. Therefore, in Figs. 2.2 and 2.3, the result of PD is more pessimistic than that of DM.

2.4.2 Real Testbed

We implement a real testbed that contains three types of physical devices: the gateway device, routing devices and field devices. The gateway device manages the network and adopts a low power SoC (System of Chip) AT91RM9200 and a CC2420 transceiver chip. The routing device is implemented on an MSP430 and a CC2420. The field device is equipped with a temperature and humidity sensor SHT15 besides an MSP430 and a CC2420. Our testbed supports the IEEE 802.15.4 protocol, which is the physical and MAC (Medium Access Control) layers of WirelessHART networks, and an improved WirelessHART network according to our requirements. The improved WirelessHART implements the specific requirements in the application layer, and it is compatible with the original WirelessHART. Channel 23 is used to broadcast mode change messages and configuration messages. Six schedulable channels are 15–20. Additionally, six devices are configured as sniffers to monitor packets transmitted on the six channels. Then the sniffed packet with a timestamp is sent to a PC via an 8-port RS-232 PCI Express serial board.

Figure 2.5 shows our testbed. The network is deployed in a building. For each parameter configuration, 100 test cases are implemented. The generation of configurations is the same as in simulations. The configuration message is sent to devices via the gateway. Figure 2.6 shows pessimism ratios in a certain scope under different parameters. The point of the pessimism ratio 1.4 reports the number of test cases, whose pessimism ratios are between 1.4 and 1.6. When the utilization is set as 1 and the number of channels is 12, compared with PD and DM, our average pessimism ratio of 100 test cases is about 2.5 and 2.4, respectively. The result is more pessimistic than the simulations. It is because that real cases only cover a little state space. The delay observed in the real testbed is not the worst case delay, while our analysis focuses on the worst case. Therefore, for the end-to-end delay, our analysis method is more reliable than real tests.

Fig. 2.5
A network diagram on top illustrates a rectangular box with 20-meter width and 50-meter length with gateways numbered from 1 through 10, routing devices, field devices, and sniffers. And 2 photographs below have various devices labeled sniffer, field device, and routing device.

Our testbed

Fig. 2.6
2 multi-line graphs labeled A and B of count versus pessimism ratio plots P D and D M twice, where u = 1 and 1.2 for each. All the curves overlap and follow a fluctuating trend with peaks and dips.

Pessimism ratio on the testbed. (a) The number of channel m = 12. (b) The number of channel m = 6

2.5 Summary

Multiple criticality levels co-exist in real-life wireless networks. However, previous works only focus on the single-criticality network. We present an end-to-end delay analysis method for fixed priority scheduling in mixed-criticality WirelessHART networks, which can be used to determine whether all flows can be delivered to their destinations within their deadlines. In evaluations, we compare our analysis results with simulations and a testbed. The results show that the pessimism of our analysis is acceptable and reliable.