1. Introduction
There is an urgent demand for high-speed and deterministic end-to-end communications to integrate several real-time applications. Missing latency deadlines may generate dangerous situations for humans or considerable economic waste in highly time-sensitive applications, such as autonomous vehicles and automation industries. Ethernet networking has sufficient bandwidth with reasonable costs for a wide range of application domains. It was used to build several relevant protocols, such as Audio/Video Bridging Ethernet (AVB-Ethernet) and time-triggered Ethernet (TT-Ethernet) networks. Although these technologies have provided several real-time functions, their capabilities are unable to manage the control flows in safety-critical systems (e.g., autonomous vehicles) and handle the continuous increase in such applications’ intelligence.
A time-sensitive network (TSN) is a set of sub-standards that introduce an attractive solution to support safety-critical applications based on several TT-Ethernet extensions [
1]. The amendments include timing and access control aspects to guarantee data transport with a deterministic low latency, extremely low delay variation, and zero congestion loss for urgent traffic. These features have attracted many researchers and companies to the TSN framework for their interests [
2].
Basically, the TSN framework serves mixed-criticality applications under three different traffic categories: time-triggered (TT), Audio/Video Bridging (AVB), and best effort (BE). The TT traffic represents the highest-priority class that requires a guaranteed zero jitter delay and a tightly bounded end-to-end latency. TT flows are configured by using the time-aware shaping (TAS) mechanism in the gate control list (GCL) schedule, as defined in IEEE 802.1Qbv [
3]. The AVB traffic represents the second-highest priority class that is configured by using the credit-based shaping (CBS) mechanism to meet the deterministic end-to-end latency requirement, as presented in IEEE 802.1Qav [
4]. The BE type represents the lowest-priority class, with no guaranteed timing requirements.
Implementing an appropriate GCL timing table for TT traffic in all selected switches while ensuring critical time streams’ latency requirements is a complex and crucial problem. The complexity arises not only from the difficulties to satisfy TT demands but also because the other critical time flows, i.e., the AVB, must be considered. Excluding the soft real-time traffic from the predefined schedule (GCL) and allowing the TT flows to preempt them (as defined in IEEE 802.1Qbu [
5]) may cause them to miss their latency deadlines, as many researchers have argued [
6,
7,
8,
9]. For these reasons, proper GCL designs are essential to guarantee safe latencies for all critical time flows.
Different scheduling solutions have been proposed to ensure latency requirements for hard real-time flows and enhance AVB latency performance at the same time. As the GCL implementation is window based, each priority class has to transmit related traffic through the assigned windows. Different window patterns have been proposed to enhance the overall system performance, as discussed in
Section 2. Most of the relevant researchers in the literature, e.g., in [
10,
11,
12,
13], have suggested allowing TT open windows to interfere with each other, leading to more available bandwidth for unscheduled transmissions. Although the researchers in [
11,
12] have improved the overall solution space, no one has optimized how much TT windows can be overlapped without missing TT requirements. Accordingly, this paper focuses on presenting an optimal formal solution for the scheduling problem based on TT open windows’ overlapping assumption.
In this paper, we present a complete end-to-end latency analysis for TT traffic based on the variable overlapping ratio () between TT open windows in the predefined GCL. The GCL schedule is designed for all selected nodes, considering the relative positional relationship between window offsets for adjacent nodes. The GCLs are implemented according to three overlapping metrics: the priority of the overlapped window, the position of overlapping, and the overlapping ratio (). Based on these parameters, the worst-case end-to-end delay () bounds are determined for a targeted TT queue, providing a complete view of performance under every expected . Thus, the critical contributions of the paper are summarized as follows:
We propose a flexible window-overlapping scheduling (FWOS) algorithm that allows TT windows to overlap each other and considers the relative positional relationships between window offsets for consecutive nodes. The network calculus (NC) approach is used to formulate the worst-case latency bounds. The FWOS algorithm is evaluated under a realistic vehicle use case considering three overlapping metrics: the priority of overlapping, the position of overlapping, and the overlapping ratio (). A critical discussion is introduced based on GCL design parameters.
Based on the latency performance evaluation under flexible overlapping scenarios, we create an additional TSN scheduling constraint, leading to more relaxed GCL implementations. For each particular latency deadline, the FWOS algorithm defines the maximum allowable that maximizes the solution space for unscheduled traffic, while guaranteeing TT latency requirements at the same time. Additionally, the FWOS algorithm presents an improvement in boundaries, even in a complete isolation scenario among TT windows compared with the latest related works.
The remainder of the paper is organized as follows.
Section 2 describes related works, and
Section 3 introduces a general background about the basic structure of the TSN system and a brief overview of the IEEE 802.1Qbv protocol. Our system model and the basics of the network calculus approach are described in
Section 4 and
Section 5, respectively.
Section 6 presents the worst-case latency analysis for the FWOS algorithm. Then, we evaluate the performance of the FWOS model, with a relevant discussion in
Section 7. Finally, the paper is concluded in
Section 7.
2. Related Work
The IEEE TSN standards define two different shaping approaches, namely time-aware shaping (TAS) in IEEE 802.1Qbv [
5] for scheduled streams and credit-based shaping (CBS) for unscheduled flows in IEEE 802.1Qav [
4]. Although other shapers can implement the traffic schedule in TT-Ethernet, such as the burst-limiting shaper (BLS) [
14,
15] and the peristaltic shaper (PS) [
16], the TSN task group has standardized the TAS to shape TT streams. The TAS mechanism is more applicable than the others to ensure a bounded latency for control traffic [
17].
As an alternative to the TAS technique, some researchers have proposed asynchronous time shaping (ATS) as it does not require the selected nodes to be fully synchronized. The ATS mechanism is presented in the ongoing IEEE P802.1Qcr project. ATS-aware nodes can temporally reshape incoming frames in a different queuing system using an urgency-based scheduler (UBS). Specht et al. [
18,
19] and Zhou et al. [
20,
21] proved that the ATS mechanism provides low and bounded worst-case latencies with high link use, low complexity, temporal reshaping, and complete synchronization independence. In [
22], the authors concluded that the flow control strategy in the ATS method provides a better real-time performance guarantee for aperiodic traffics than the CBS in a heavy network load. However, after comparing TAS and ATS performances, Nasrallah et al. [
23] confirmed that the TAS method with tight configurations achieves the related latency targets for both sporadic and periodic data streams. In contrast, the preferred use of the ATS approach is only in the case of light network loads.
Several scheduling models have been implemented based on the TAS mechanism and have examined the latency performance for TT traffic under the complete synchronization assumption. The targeted TT latency deadlines have been guaranteed using simulation-based algorithms, e.g., in [
24,
25], and analytically, e.g., in [
16,
26]. Besides, many researchers have suggested improving the GCL design to increase the scalability and adaptability that fit critical time applications.
Fixed-timing algorithms result in a fluctuated quality of service (QoS) for all traffic types, depending on the instantaneous loading condition and network size. Therefore, Nasrallah et al. [
23] proposed an adaptive duration for scheduled and unscheduled transmission intervals in the GCL design. The window duration is adjusted based on each traffic class’s latency threshold and the incoming flows’ specifications. OMNet++ results confirmed that queuing delay increases with decreasing window duration for related traffic and vice versa. Kim et al. [
27] added a protection interval to transmit the emergency event flows in each transmission cycle rapidly. The simulation results ensured the required services for emergency traffic, with minimal impact on the scheduled flows. Oliver et al. [
28] and Hellmanns et al. [
29] addressed the essential design compromises between scheduling efficiency and physical resources affecting the required scalability, adaptability, and self-configuration of the Industrial Internet of Things (IIoT) system. The authors also suggested adapting the hyper-period length and raster size according to the incoming traffic. In [
30], Farzaneh et al. proposed adjusting the GCL according to the network topology and loading conditions’ availability. Yu et al. [
31] presented a scheduling design with online updating to suitably integrate incoming data. Several other pieces of the research have proposed joint routing and scheduling algorithms, as in [
32,
33,
34]. Other interesting works have suggested using the software-defined network (SDN) protocol to manage TSN scheduling, as in [
1,
35,
36]. However, all the above algorithms are simulation based, which cannot express all pessimistic transmission cases and, then, leads to unsafe latency evaluations [
37].
As known, critical time applications have hard and soft real-time traffic. Implementing GCLs with strict timing constraints reduces the overall solution space, minimizing the bandwidth available for unscheduled traffic and increasing the possibility of mislaying the required determinism for AVB flows. Moreover, such strict timing scheduling methods complicate the GCL synthesis in large-scale use cases. For these reasons, several proposals have been introduced to support soft time traffic, while simultaneously ensuring the QoS requirements for hard real-time flows.
Gavrilut et al. [
9,
38] proposed a software algorithm based on the greedy randomized adaptive search procedure (GRASP), including the AVB traffic to be scheduled with the TT traffic. The results confirmed that feasible AVB scheduling was performed using the proposed method under a simple use case. However, AVB schedulability cannot be ensured under heavy loading or more complicated networks. Zhang et al. [
6] proposed combining hard and soft real-time flows simultaneously, leading to reduced computation complexity. The presented approach chooses a proper transmission cycle and scheduling unit to improve the selection process and reduce the higher-priority impact on the lower-priority flows. Others in [
7,
39,
40] have introduced formal latency analysis for AVB traffic based on predefined GCLs. However, all the above algorithms were implemented under the assumption of complete isolation between scheduled traffic windows, resulting in less overall solution space.
Many scheduling proposals have addressed traffic and window isolations in the GCL design. Here, we discuss studies most related to our work and compare their limitations, as briefly presented in
Table 1. Craciunas et al. [
41] presented a scheduling scheme under the assumption that scheduled and unscheduled flows are entirely isolated. Further, the proposed GCL synthesis separates scheduled flows against one another by implementing fully isolated transmission windows and fully synchronized nodes. In [
42], Craciunas et al. used the targeted bounds of end-to-end latencies and the duration of assigned windows for the scheduled traffic to measure the scalability and schedulability of the proposed algorithm. Oliver et al. [
43] presented relaxed GCL synthesis by allowing scheduled frames to interfere at the same-priority queue. However, the associated queue gates were still in a mutually exclusive fashion.
More relaxed schedules have been presented, in [
10,
11,
12,
44], under window-based implementation for each priority class. In [
10,
44], the algorithms have been designed without the need for end systems to be fully synchronized. However, synchronization is still required for all selected switches in the path. Zhao et al. [
11] proved that complete isolation between TT windows would reduce the available solution space for soft real-time streams. They analytically formulated the worst-case end-to-end latency for TT flows, resulting in an enhancement of the overall solution space compared with that in the full isolation scenario, while satisfying TT flow requirements. However, the authors just made the improvement based on a particular overlapping case without considering how to optimize the overlapping for every networking scenario and every targeted latency deadline. Zhang et al. [
12] examined the preemption technique’s effect on the latency bounds based on the algorithm [
11]. However, the proposed scheduling designs, in [
10,
11,
12,
44], were implemented under a single node design and did not consider the rational timing difference between the offsets for the same-priority queues in consecutive nodes [
13]. These models resulted in high-pessimistic end-to-end latency bounds.
Based on the above, Zhao et al. [
13] improved the worst-case latency bounds for TT traffic by considering the relative positional relationships between the same-priority windows. The introduced results realized in a dramatic enhancement of the latency bounds and reduced the degree of pessimism in [
11,
12]. However, the presented analysis did not include the overlapping situation among TT windows. Moreover, we observe that more latency correctness can be done on that model as the technical switching delay has been considered twice in the overall latency derivations. The first is included indirectly in the maximum waiting time calculation, and the second is added directly in the final end-to-end latency expression. Although this delay is considerably slight compared with other latency components, its impact is notable in large-scale network topologies. A summarized comparison between the above algorithms is illustrated in
Table 1.
For latency evaluation, analytical models are statically designed to cover all system corner cases, which are incredibly significant for real-time systems [
26], especially in strict automated designs and automotive driving systems. Although there are several analytical approaches used to implement latency models, network calculus (NC) theory [
45] is preferred in most studies as it induces less pessimistic and safe worst-case latencies compared to other approaches [
46,
47]. Accordingly, we used the NC approach to calculate
bounds.
4. FWOS System Model and Design Decisions
TSN switching considers two dependent traffic isolation mechanisms, i.e., spatial and temporal isolations, to differentiate between ingress flows. Spatial isolation is applied in each switch by selecting incoming frames to one of eight priority queues served by various forwarding constraints at the egress port. Temporal isolation is provided in the gate control list (GCL) schedules. The GCL is an off-line timetable specifying the open and close events for all associated gates. To protect TT flows from unscheduled traffic transmissions, the preemption technique is applied by allowing the TT flows to interrupt the transmission of non-expressed flows. Against other TT transmissions, complete isolation between TT windows in the GCL timings undoubtedly provides targeted deterministic latency behavior for scheduled (TT) traffic, as proposed in [
6]. Nevertheless, complete window isolation wastes the available bandwidth for unscheduled traffic and may not guarantee the determinism for soft critical time traffic (AVB).
There are two ways to process scheduled and unscheduled traffic in a TSN, back-to-back and porosity configurations, as depicted in
Figure 3, respectively. In both structures, flexible overlapping between scheduled open windows saves more available bandwidth for unscheduled flows. The overlapping can occur from either one edge or two window edges (opening and closing). The more the TT windows overlap, the more the available time intervals for unscheduled traffic increase. It cannot be neglected that flexible overlapping schedules negatively affect the performance of scheduled traffic. Thus, essential evaluations of timing are necessary to cover all overlapping situations.
In this work, we are interested in evaluating the performance of the time-aware shaping (TAS) technique under the flexible window-overlapping scheduling (FWOS) algorithm. This model allows TT windows to interfere with one another without missing the TT queues’ latency deadlines. Hence, only the hard real-time flows (TT flows) are considered here for latency calculations, assuming that the set of all TT flows is denoted as . Each TT flow (), where is the priority of the flow, consists of a set of frames ). Each node is designed to select the ingress frame to one of TT priority queues (), where and represent the highest- and lowest-priority queues, respectively. Each frame is selected to the egress port by its gate ) with the open-window length and the period . Note that the presented scheduling model is proposed assuming guaranteed synchronization for all selected switches.
For performance evaluation, we consider
as a targeted queue with an open-window duration of
, where
. The
window may overlap with any
window, as shown in
Figure 4, and the overlapping ratio (
) between them in the
-th cycle represents the length of the time interval
), when both windows are simultaneously open, divided by the total length of the
window,
, as
As presented in
Figure 4, the OR varies from 0 to 1, covering all the expected overlapping conditions. Note that zero overlapping means that when the gate of the targeted TT queue
) is open, all other TT gates are closed (complete isolation), and one means that in each moment when
is open, there is at least another TT gate open (complete overlapping), as clearly shown in
Figure 4.
Based on the above overlapping formula and the overlapping pattern in
Figure 4, we implement here the GCL schedule for all selected nodes and then calculate the worst-case end-to-end latency for the
frames using the network calculus (NC) approach. Note that our GCL implementation is off-line based for worst-case analysis and the dynamism is not considered. Related details for the NC basis and the worst-case analysis are presented below in
Section 5 and
Section 6, respectively.
5. Network Calculus Basics
The network calculus (NC) [
48] approach is a powerful tool to represent the flows’ timing properties in the domain of communication networks deterministically. These timing properties include strict upper- and lower-bound computations used for performance evaluations, such as end-to-end latencies, network use, and buffer requirements. In this paper, we use NC to determine the worst-case end-to-end latency for TT flows. Two appropriate curves have to be implemented, the arrival curve and the service curve, to describe the characteristics of flows and related nodes’ availability. The analysis is mainly provided based on the min-plus, which uses convolution operation, as defined in the following formulas [
48].
where
and
mean infimum and supremum, i.e., maximal lower bound and minimal upper bound, respectively. The notations
and
represent the convolution and deconvolution of min-plus operations, respectively.
The arrival curve
describes the arrival process
of a stream. This process represents the cumulative function, at the ingress switching port, by counting the bits that reach the node until
, as expressed in this inequality [
48]:
The arrival curve is modeled using the input traces and the traffic configuration, as combined in the triple
, where
represents the period of incoming streams,
denotes the jitter, and
is the lowest inter-arrival distance of traffic in the specified flow. Accordingly, the lower and upper arrival curves are formed as follows [
48]:
The above bounds mean that in any time interval (
), there arrive at least
and at most
stream events that are modeled by
. The arrival curve
can be represented in a simple schematic diagram presented in
Figure 5a. For the worst-case latency computations, the upper bound of the arrival curve is considered.
The service curve
describes the transmission availability of the network resources, as modeled in the departure process
of a stream. This process represents the cumulative function, at the egress switch port, by counting the bits that can be served in the related node up to time
, as expressed in the following inequality [
48]:
In a given time interval
, where the switch can serve the arrived streams by a rate
, the service curve’s lower and upper bounds are specified depending on network resource availability.
Figure 5b shows an example of service curve bounds for a periodic time division multiple access (TDMA) resource.
In each node, the traffic is expressed by the arrival curve at the ingress port and served by the egress port’s service curve. The worst-case latency boundaries are obtained by considering the maximum distance (
) between the upper-bound arrival curve
) and lower-bound service curve (
) [
48], as represented in
Figure 6.
6. Worst-Case Latency Analysis of the FWOS Model
To analyze the worst-case latency performance for a TT frame with a given priority class, the arrival and service curves must be defined. The arrival curve depends on the limitations described in the previous section, and the service curve has to be determined based on the predefined GCL schedule. For the worst-case analysis, the service curve requires one to find the duration of the guaranteed service (contention-free) intervals for the corresponding queue and the maximum waiting time needed to serve that frame using these intervals. This section presents these required calculations considering the proposed scheduling algorithm, which includes all overlapping scenarios between TT open windows. First, we compute the length of the contention-free interval based on all pessimistic cases. Then, the maximum waiting time is determined for every selected node. After that, these calculations are used to define the service curve and, then, analytically implement the worst-case end-to-end latency.
6.1. Length of the Contention-Free Interval
Servicing the arrived traffic in each node is based on the open-window interval for the associated priority queue. Under flexible overlapping between the open windows for TT queues, each open window serves the arrived traffic according to more stringent scheduling constraints. In particular, these windows are divided into three different intervals: block, contention-based, and contention-free intervals. (i) Block intervals represent guard band intervals, where the remaining time is not enough to transmit the whole frame. (ii) Contention-based intervals represent time slots’ aggregation, where the related window is overlapped with another TT window and the priority or the non-preemption technique may prevent the frame from being served. Although the targeted traffic may obtain the required service during contention-based intervals, safe latencies are formulated based only on contention-free intervals. (iii) Contention-free intervals represent the guaranteed service interval that has to be specified to determine the worst-case latency bounds. To define contention-free intervals, we have to specify all block and contention-based intervals. Block intervals are located at the end of each open window, but contention-based intervals depend on overlapping with other TT windows. Thus, the overlap must be comprehensively analyzed to specify these intervals.
As mentioned, three overlapping aspects have to be considered: priority, position, and the . Accordingly, the latency of TT traffic is evaluated and discussed below, under all these aspects to give a clearer view of system performance with a variety of relevant parameters.
6.1.1. Opening-Edge Overlapping
As mentioned, we consider
as a targeted TT queue for latency calculations in any node
. Then, to include the overlapping at the opening edge of the
window, we assume that when its gate (
) changes from closed to open in the
i-th gating cycle (at
), there is another TT gate open (
), as depicted in
Figure 7. The length of the overlapping interval between
and any other TT queue (
) open windows can be found easily as
The associated overlapping ratio is determined as
This overlapping may occur from higher- or/and lower-priority queues; the related latency effects are discussed separately.
Higher-priority overlapping at the opening edge: The overlapping ratio between the
window and the higher-priority
window (
) at the opening edge can be determined by using Equation (6) as
. Thus, the most decisive influence from the higher-priority overlapping at the opening edge, as shown in
Figure 7, is included by considering only the queue that has the largest overlapping ratio with the
window, as follows:
In the worst case, servicing
frames is not guaranteed in a time slot if there is any higher-priority window open at the same time slot. It contributes to reducing the contention-free interval, which starts at the closing time of the higher-priority window that has the largest overlapping. Thus, the starting time of the guaranteed service window can be given by
Lower-priority overlapping at the opening edge: Similarly, based on the window overlap, as shown in
Figure 7, the largest overlapping ratio between
and
windows (
) at the opening edge is defined as
Although the
frame has the priority to be transmitted before
frames, it has to wait until completing the transmission of
frames at the transmission status if the non-preemption technique is considered between TT transmissions. Accordingly, the
frame cannot be transmitted until passing the maximum size of lower-priority frames (
). Thus, the
i-th contention-free interval is reduced at the opening edge by the value (
), which can be given as
Under the worst case, the maximum delay is considered as
By just considering the maximum influence of lower-priority overlapping on the
i-th
open window
, we can define the starting time of the
i-th contention-free interval (
) as
6.1.2. Closing-Edge Overlapping
Similar to the opening-edge overlapping case and as depicted in
Figure 8, the length of the overlapping interval between
and any other TT queue (
), at the closing edge, can be found easily as
The relevant overlapping ratio between
and
windows is
Higher-priority overlapping at the closing edge: The strongest influence from higher-priority overlapping (
) (
) at the closing edge, as shown in
Figure 8, is included by considering the maximum overlapping ratio, as follows:
In the same manner as in the opening-edge consideration, as the
frame has the priority to be transmitted before the
frame, during the overlapping interval, the service is not guaranteed for
frames. Thus, the ending time of the
i-th
contention-free interval under the higher-priority overlapping at the closing edge can be given by
Lower-priority overlapping at the closing edge: Similarly, we can determine the largest OR between
and
windows (
) at the closing edge as
As has a higher priority than queues, the overlapping at the closing edge does not affect the contention-free interval (). However, in a particular case of frame arrival, the lower-priority overlapping can affect the maximum waiting time of the associated frame, as we discuss next.
6.1.3. Block Intervals
Servicing the
frame at the corresponding window cannot be guaranteed when the remaining time is insufficient to transmit the entire frame. Accordingly, at the end of each open window, there is a guard band interval (
), named here as block interval. This interval equals the time required to transmit the largest size of the
frame,
[
12], i.e.,
Then, under the effect of this guard band interval, the contention-free window ends with
6.1.4. Overall Effects
Based on the overlapping considerations discussed above, the starting and ending times of the contention-free
window are influenced by several parameters accordingly. By accumulating all these aspects together in worst-case computations, the starting and ending times are constrained by
Then, the length of the
contention-free window in the
i-th cycle is
By considering the
i-th open window as a benchmark, as shown in
Figure 9, the relative offset of the
i-th contention-free window from the opening edge can be given by
In addition, the relative offset of the
j-th contention-free window, considering the
i-th window as a benchmark, is
6.2. Maximum Waiting Time Consideration
The waiting time represents the time delay that the arrived frame experiences from the arrival instance to the first contention-free window’s starting time. The maximum waiting time for the
frame before getting the service considers the most pessimistic arrival instance. In general, the maximum waiting time until the chance to serve the frame is bounded by the earliest instance of the frame arrival in the selected node (
) and the starting time of the nearest contention-free interval for the associated queue (
), as follows:
As discussed in [
13], the earliest arrival instance depends on the selected node’s order. The arrival instance in the first node (source)
is arbitrary and can be at any moment during the
interval. On the other hand, in the non-first node (selected switch in the route), the frame arrival is bounded by the open-window interval for the corresponding queue in the previous node.
In the first node, the worst arrival instance happens when the first frame arrives at the end of the associated contention-free interval (
) and the remaining time is not enough to transmit it, as depicted in
Figure 10. Thus, this frame waits for the next contention-free window to be transmitted. A more pessimistic arrival case happens when the
frame arrives at the end of the contention-free interval, and there is a lower-priority frame in the transmission status. Even if there is enough time to transmit the
frame, it has to wait for that lower-priority frame, as shown in
Figure 10. The non-preemption technique prevents the
frame to interrupt that lower-priority frame. After the transmission of the
frame finishes, the remainder of the time is not enough to transmit
frame. Accordingly, the overlapping between
and
open windows maximizes the waiting time if the overlapping interval in the previous open window (
) is larger than (
). The waiting time is maximized by the term
, which is limited by the length of the highest lower-priority overlapping interval in the previous open window (
) and the time required to transmit the largest size of the lower-priority frame (
), as follows:
where
.
Then, by taking the contention-free window
as a benchmark, the maximum waiting time
at the beginning of the backlog time interval can be given by
For the non-first node
, the arrival instance is bounded by the starting time of the contention-free intervals in
and all preceding nodes connected to
input ports (
, as shown in
Figure 11, where
represents the number of input ports in
. In any case, the frame cannot arrive at
out of these boundaries. As depicted in
Figure 11, the earliest frame arrives at (
), which equals the starting time of the first
contention-free window in the preceding node (
)
scheduled after the previous
contention-free interval added to the selection and propagation delays. The frame selection delay is the time required to select the largest size of the
frame to the physical link (
). The propagation delay (
) is the time required for a
frame to transfer from
to
. Note that when the frame arrives at the node, a switch processing delay (
) is experienced through the switch input buffer, switching fabric, and priority filtering at node
. This delay is needed even if the frame arrives through the contention-free interval in
. Thus, it is worth noting that the lowest bound of the maximum waiting time should be limited by the propagation and switch processing delays, as follows:
where
.
Note that the switch processing delay is counted even if the maximum waiting time is greater. Thus, this delay should be removed from the overall latency expression. Although the authors in [
13] considered the frame arrival limitations in the non-first nodes, their latency calculation counted the switch processing delay twice, indirectly in the maximum waiting time calculations and overall latency expression. Even if this delay is a little small and constant, it can result in more pessimistic latencies when the maximum waiting time is larger.
6.3. Service Curve Determination
As discussed before, the targeted traffic obtains the required service according to its contention-free intervals in each node. The length of the contention-free interval varies from an open window to another, depending on their related overlapping situations, as shown in
Figure 10. However, their configurations are repeated after the hyper-period (
), which represents the least common multiple (LCM) of cycles for all TT queues, as follows [
13]:
Therefore, the number of
contention-free intervals in the hyper-period are given by
. By taking the
i-th cycle as a reference, the upper and lower bounds of the service curve for the
traffic can be given by [
12]
where
The terms
and
are determined using Equations (22), (27), and (28). Note that
is formulated for the TDMA protocol [
12] as
where
represents the data rate of the corresponding physical link. Depending on the arrival instance of the earliest frame, the service curve can be determined. As depicted in
Figure 12, the best servicing (upper service curve) is obtained if the first frame arrives at the node’s ingress port when the associated contention-free interval has instantaneously started. On the other hand, the frame faces the worst resource service (lower service curve) if it arrives at the end of the contention-free interval, i.e., there is no guaranteed service for the frame at that open window.
However, the aggregated bounds of the service curve obtained in Equations (29) and (30) can be slightly different if we change the reference window in the calculation. Therefore, the upper and lower bounds of the service curve for
traffic are the largest and lowest instantaneous values, respectively, from all possible service curves [
12], i.e.,
An example of the upper and lower service curves is depicted in
Figure 12.
6.4. Worst-Case End-to-End Latency for Traffic
The network calculus (NC) approach considers the upper bound of the arrival curve and the service curve’s lower bound to compute the upper bound end-to-end latency. For every node
in the selected networking path, the upper arrival curve
and the lower service curve
have to be defined to calculate the maximum experienced latency in each link. The upper arrival curve at the source node can be found using Equation (3). After that, in every node
from the selected path, the aggregate upper arrival curve at the ingress port for
traffic can be determined using the ingress arrival curve at the previous node, as follows:
where
is the maximum latency experienced by
traffic in
. This latency equals the largest horizontal distance between the upper arrival curve at the ingress port of node
and the lower service curve of the related resource, as follows [
13]:
Then, we can calculate the upper bound of the end-to-end latency as the summation of the maximum latencies experienced in all nodes through the selected path, as
where
is the number of nodes that the
k-th-priority traffic passed through. According to all mathematical analysis presented in
Section 6, the FWOS algorithm can be summarized as follows:
Algorithm 1. Flexible Window-Overlapping Scheduling (FWOS) Algorithm |
START |
Definition: Number of the selected nodes, and , |
Targeted TT-queue for latency calculation with priority , and , |
Relative offsets between kth windows in the adjacent nodes, |
End-to-end latency deadline for kth frames, |
Overlapping ratio with higher priority windows at the opening-edge, |
Overlapping ratio with higher priority windows at the closing-edge, |
Overlapping ratio with lower priority windows at the opening-edge, |
Overlapping ratio with lower priority windows at the closing-edge, |
Overlapping ratio with higher and lower priority windows, |
Overlapping ratio with lower and higher priority windows, |
Input:,,,,,,,, |
Let:, |
For |
For |
Calculate: (the length of contention-free window), |
(The relative offset between contention-free windows), |
(The maximum waiting time), |
Calculate: (The upper arrival curve), |
(The lower service curve), |
Calculate: (The worst-case latency at node ), |
End |
Calculate: (The worst-case end-to-end latency) |
End |
Output:,,,,, |
Output: Optimized , where |
Design GCL |
END |
8. Conclusions
Several mixed-criticality domains, such as automotive and automated industries, require deterministic latency performances. Missing latency deadlines in such applications may generate dangerous situations for humans or considerable economic waste in highly time-sensitive applications. To support such applications, TSN technology is defined based on several TT-Ethernet amendments. Most of these enhancements have been introduced mainly to serve time-triggered traffic targeting zero jitter delay and bounded end-to-end latency. However, there is a concern that soft real-time traffic could miss their requirements under strict timing constraints in GCL designs.
This paper proposed a flexible window-overlapping scheduling (FWOS) algorithm with complete timing analysis for the WCD using the network calculus approach considering relative window offsets between adjacent nodes. Our model expresses all overlapping situations between TT windows, leading to a more generic timing analysis. Based on a realistic vehicular use case, the numeric results confirm that the impact of higher-priority overlapping on the WCD is larger than that from lower-priority overlapping. Further, overlapping at the opening edge generates bigger WCDs than at the closing edge. Thus, under guaranteed latency deadlines, the overlapping ratio between TT windows must be bounded accordingly. Based on his, the FWOS model can be applied to optimize the maximum-allowable overlapping ratio (OR) that ensures TT latency requirements and maximizes the bandwidth available for unscheduled transmissions. For example, to meet the 400 µs latency deadline under specific timing assumptions, the highest-allowable OR is 38.62% with higher priority (opening edge), 54.62% with higher priority (closing edge), 54.31% with higher priority (opening and closing edges), 76.84% with higher priority (opening edge) and lower priority (closing edge), 85.2% with lower priority (opening edge) and higher priority (closing edge), and 100% with any case of lower priority. Accordingly, more relaxed GCLs can be implemented to fit the requirements of incoming data from vehicle-related devices, such as sensors, cameras, and actuators. Compared with the previous works, FWOS obtains less pessimistic WCDs, even under fully isolated window scheduling.