Next Article in Journal
Research on Power Price Forecasting Based on PSO-XGBoost
Previous Article in Journal
An Improved U-Net for Watermark Removal
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Hybrid Traffic Scheduling Strategy for Time-Sensitive Networking

Institute of Information Technology, PLA Strategic Support Force Information Engineering University, Zhengzhou 450002, China
*
Author to whom correspondence should be addressed.
Electronics 2022, 11(22), 3762; https://doi.org/10.3390/electronics11223762
Submission received: 25 October 2022 / Revised: 12 November 2022 / Accepted: 15 November 2022 / Published: 16 November 2022
(This article belongs to the Section Networks)

Abstract

:
The traffic scheduling mechanism in Time-Sensitive Networking (TSN) is the key to guaranteeing the deterministic transmission of traffic. However, when time-sensitive traffic and non-time-sensitive traffic are transmitted together, traffic scheduling conflicts are easy to occur in TSN. As a result, the deterministic transmission of time-sensitive traffic will be disrupted, and non-time-sensitive traffic may be preempted for a long time. To optimize the performance of multi-type hybrid traffic scheduling in TSN, we firstly establish a collaborative scheduling framework that incorporates Time Aware Shaping (TAS) and Cyclic Queuing and Forwarding (CQF) mechanisms. We then design a traffic shaping method in this framework based on Least Laxity First (LLF), which considers traffic characteristics to dynamically arrange the time slot injection sequence for different types of traffic. Finally, the traffic schedulability is evaluated based on the scheduling constraints of different types of traffic. Compared with the existing scheduling strategies, the proposed hybrid traffic scheduling strategy can schedule more non-time-sensitive traffic and achieve better delay performance of rate-constrained traffic in different hybrid traffic scenarios. When the number of flows is 100, the time slot injection ratio is increased by 24.3% compared with the LLF_TAS method.

1. Introduction

With the current rapid development of the Internet application industry, the emergence of new industries such as industrial Internet, telemedicine, and autonomous driving has accelerated the integration of Information Technology (IT) and Operational Technology (OT). Increasingly, the resulting need for low latency and highly reliable transmission of network data is becoming apparent [1]. For example, the end-to-end delay requirement for industrial automation scenarios is 250 µs–10 ms and the delay requirement for autonomous driving is 100–250 µs. Although the deterministic transmission requirement for audio and video traffic is slightly less stringent, it is also necessary to ensure that the end-to-end delay is in the range of 2–50 ms, and the jitter requirements for the above scenarios are all in the microsecond scale [2].
According to the communication requirements of application data in different network scenarios, the types of traffic can be classified as periodic time-sensitive traffic, periodic large bandwidth rate-constrained (RC) traffic, and best-effort (BE) traffic. Time-sensitive traffic, also known as time-triggered (TT) traffic, has real-time transmission requirements with deterministic bounded low latency. However, traditional Ethernet can only address non-real-time, best-effort data transmission, making it difficult to meet the diverse and hybrid traffic service transmission requirement of the emerging industry for communication networks, and even less able to converge the transmission of the three types of traffic mentioned above. Although industrial networks such as PROFINET [3], POWERLINK [4], and EtherCAT [5] are known to meet the corresponding real-time transmission performance requirements to varying degrees, these technologies are less compatible and interoperable due to the proprietary nature of their mechanisms.
Driven by the technical support of traditional Ethernet and the requirements of emerging industries, the IEEE 802.1 Working Group has proposed a series of standard specifications for TSN in recent years. At present, TSN is an actively promoted communication technology in the industrial field. Based on standard Ethernet, it achieves high and reliable quality assurance for specific types of data flows through mechanisms such as time synchronization [6], traffic shaping [7], and network configuration [8]. The most critical purpose of TSN is to enable deterministic data transmission in the same network, i.e., the convergence of periodic critical control communication data and acyclic data to be transmitted in the same network, and to provide deterministic bounded low-latency transmission guarantees for time-sensitive service traffic. Therefore, TSN can achieve converged transmission of multiple types of traffic based on compatibility with traditional Ethernet transmission, thus reducing network configuration costs and increasing flexibility by eliminating the need for operators to over-provide multiple sets of resources for the transmission requirements of different types of traffic.
The traffic scheduling mechanism in TSN is critical to guarantee the deterministic transport requirements of traffic. Traffic should be controlled as it flows through each node, and appropriate scheduling mechanisms are required to allow each type of traffic to be mixed in the TSN while ensuring their respective performance requirements such as latency and jitter. Due to limited scheduling resources such as time slots and bandwidth in the network, scheduling problems such as inter-flow interference and message preemption may arise when multiple types of traffic converge and coexist in the transmission process. However, the existing TSN traffic scheduling mechanism mainly focuses on periodic real-time TT traffic scheduling requirements. The research of periodic large-bandwidth RC traffic and BE traffic transmission also adopts the TAS mechanism, but the gating configuration is complex. When the transmission rules and sequences of each type of traffic are not well planned, scheduling conflicts are likely to occur between different types of traffic and may lead to the “starvation” of non-real-time service traffic such as RC and BE traffic when network resources are limited. To meet the requirements of multi-type hybrid traffic scheduling in TSN, this paper studies the mechanism of multi-type traffic cooperative transmission to improve the performance of hybrid traffic scheduling.
The main contributions of this paper can be summarized as:
  • We establish a hybrid traffic cooperative transmission framework, which combines TAS with the CQF mechanism. It can meet the mixed transmission requirements of different types of traffic in the same network and has strong flexibility and robustness.
  • We propose a traffic shaping method based on Least Laxity First, which considers traffic characteristics to adaptively determine and dynamically arrange the scheduling sequence of different types of traffic.
  • Based on the traffic scheduling sequence and the injected time slots, we design scheduling constraints for different types of traffic and evaluate the schedulability of the solved hybrid traffic scheduling scheme.
The rest of the paper is organized as follows. Section 2 discusses related work, while Section 3 details the system model and problem description. A hybrid traffic scheduling strategy is introduced in Section 4, while Section 5 evaluates the schedulability of the resulting configuration scheme. The results of the simulation experiments are shown and analyzed in Section 6. Finally, Section 7 summarizes this paper and looks at the prospects of subsequent work.

2. Related Work

Traffic scheduling is the core mechanism to guarantee the transmission of TSN traffic. Of the three types of traffic, TT traffic, RC traffic, and BE traffic, TT traffic has the highest priority and its deterministic transmission requirements need to be guaranteed. To optimize the scheduling performance of this critical class of traffic, time-sensitive traffic scheduling in TSN has been extensively researched in recent years.
In recent studies, some works [9,10] apply the TAS mechanism to off-line calculation and configuration of TT traffic. After setting the corresponding scheduling objective, the scheduling sequence configuration of the outgoing traffic port is calculated. The work in [9] selects the minimized transmission delay of TT traffic as the scheduling objective and maps the traffic scheduling of TSN to a no-wait job shop scheduling problem. It uses a heuristic tabu algorithm to search and compute the scheduling scheme, after which the number of guard bands is reduced by 24% using scheduling compression. To achieve the conflict-free scheduling of TT traffic, the key configuration parameters required for TT traffic in a multi-hop TSN environment are determined in [10]. According to the parameters of traffic load and period, the constraints of off-line scheduling, such as frame isolation, are designed and the scheduling scheme with a minimum queue number and schedulability is obtained by Satisfiability Modulus Theory (SMT)/Optimization Modulo Theories (OMT).
To further improve the schedulability of TT traffic, the TSN scheduling mechanism used in [11,12] not only considers the offline scheduling constraints but also further combines the traffic characteristics and relevant routing metrics to jointly schedule the traffic with routing. Falk et al. [11] provides a solution for path planning of TT traffic through the configuration method of searching independent vertex sets covering traffic in the conflict graph. Atallah et al. [12] calculates the conflict degree according to the transmission path, load, period, and other parameters to group the traffic. The routing and packet scheduling scheme with the minimum transmission conflict between flows is then calculated by greedy randomized adaptive search and integer linear programming, and the packet scheduling result of the previous packet is used as the prior constraint of the subsequent packet. Finally, the success ratio of packet scheduling was improved from 47% to 90%.
In addition, the transmission links used in TSN traffic scheduling are all full-duplex fiber links. In order to ensure the optimal delay of TT traffic transmission in the link, the work in [13,14,15,16] studied the path selection in TT traffic scheduling. A real-time routing scheduling algorithm is proposed in [13], which assigns priority according to the traffic period and determines the processing sequence of traffic routing. This enables all TT traffic to complete transmission within the deadline, which provides a schedulability guarantee for TT traffic. A reliability-aware scheduling and routing method is designed in [14]; at the same time, the reliability constraint and end-to-end deadline constraint of TT traffic are considered and solved using SMT, which effectively solves the transient failure scenario that may occur in TSN. Although the redundancy scheduling method of off-line calculation can improve the reliability of TT traffic scheduling, it will also increase the scheduling cost. A Time-Sensitive Software-Defined Network (TSSDN) architecture [15] is used to design a TT traffic incremental scheduling method, which reduces scheduling costs by setting a goal of minimizing the maximum link load occupation and dynamically calculating the routing and scheduling configuration for TT traffic. Kong et al. [16] solved alternative paths when the redundant scheduling was running and analyzed the impact of alternative paths on the reliability of TT traffic scheduling. Compared with static redundancy scheduling, it has better routing efficiency and less bandwidth redundancy. However, if the focus is only on the generation of the TT traffic scheduling table and RC traffic is ignored, it will lead to a large amount of RC traffic with transmission delay beyond its deadline, resulting in its non-schedulability.
The above traffic scheduling works studied TT traffic scheduling from different aspects but did not consider the impact of TT traffic on the transmission of RC and BE traffic. In addition, there are few studies on periodic non-real-time RC traffic and BE traffic in TSN. The following studies have analyzed the worst end-to-end delay of periodic non-real-time Audio Video Bridging (AVB) traffic with large bandwidth. The AVB traffic delay without using the TAS mechanism in TSN is analyzed in [17], and it establishes a credit-based shaping mechanism based on the size and burstiness of the traffic, to calculate the worst end-to-end delay of the traffic. The delay of the proposed methods increases linearly with an increase of the number of flows, but does not exceed 300 μs. Due to the preferential transmission of periodic real-time traffic under the TAS mechanism, AVB traffic has a transmission delay. The work in [18] gives a method for calculating the worst end-to-end delay of AVB traffic, with the optimal transmission delay reaching 165 μs in the case study. There, the traffic is transmitted in order strictly according to its priority scheduling and only the delay analysis of a single output port is performed, without considering the delay analysis in a multi-hop network environment. A method based on network calculus is used to determine the worst end-to-end delay of AVB traffic in two modes of preemption and non-preemption in TSN, and the case analysis is conducted in a multi-hop network [19].
There have been related works on multi-type mixed traffic scheduling. The work in [20] considers the lower priority AVB traffic while analyzing the TT traffic routing and scheduling. By corrupting and repairing the search solution, both TT traffic and AVB traffic can be scheduled before the deadline. A scheduling mechanism for joint traffic type assignment is proposed in [21]. It uses the meta-heuristic algorithm based on tabu search to exchange all types of traffic and search for feasible scheduling solutions, and then continuously updates the optimal scheduling scheme according to the defined traffic cost function, which improves the overall scheduling performance of non-TT traffic. On the premise of meeting the real-time requirements of TT traffic, the work in [22] proposes a bandwidth allocation method based on network calculus theory for periodic non-real-time traffic. The bandwidth allocation policy is formulated according to the credit value. However, it is proved that reserving too much bandwidth does not necessarily improve the scheduling bottleneck of periodic non-real-time traffic, and the bandwidth resource utilization of TSN still needs to be further optimized. To achieve cooperative transmission of heterogeneous hybrid traffic, Yuan et al. [23] analyzes the traffic response latency and then defines temporary priorities for different traffics, before adopting an adaptive priority adjustment scheduling method to further reduce the worst-case end-to-end delay. In the case of high network utilization, the total traffic scheduling delay and TT traffic scheduling delay are reduced by 21% and 11%, respectively.
However, as most of the above studies adopt the TAS mechanism and the gating configuration is complex, Yan et al. [24] chooses the CQF mechanism with coarse scheduling granularity to schedule TT traffic. Compared with the fine-grained TAS mechanism, the CQF mechanism relaxes the traffic scheduling constraints, and the solution of the scheduling scheme and the delay analysis are simpler, but it is not suitable for the transmission of large-scale TT traffic. Therefore, if the fine-grained TAS mechanism is combined with the CQF mechanism, multi-type hybrid traffic can coexist in the same network and be transmitted separately.
In summary, most of the existing TSN traffic scheduling methods are oriented to TT traffic. Even in studies considering other types of traffic, static scheduling is only performed in fixed priority order after analyzing traffic delay. However, in a real network environment, there is more than just TT traffic. Moreover, transmission conflicts are prone to occur when various types of traffic are aggregated, resulting in poor overall traffic scheduling performance. Therefore, we study the TSN hybrid traffic scheduling problem and propose a hybrid traffic scheduling mechanism combining the TAS and CQF mechanisms. Under the premise of meeting the schedulability of TT traffic, the overall scheduling sequence of hybrid traffic is arranged dynamically according to the traffic laxity, which ensures the efficient scheduling of multi-type hybrid traffic in TSN.

3. System Model and Problem Description

In this section, we present our system model and the problem that we focus on. The main notations that we use are listed in Table 1.

3.1. Topology and Traffic Model

We model TSN as an undirected graph G = ( V , E ) , where V = H S represents all node sets in TSN, H represents the two types of terminal nodes that send and receive, and S represents the time-sensitive switching node. E indicates the link set, where one of the links [ v i , v j ] E consisting of two node connections. v i and v j are the previous and successor nodes of the link [ v i , v j ] , respectively. All the links are full-duplex optical fibers with a transmission rate of 1 Gbps. For example, Figure 1 contains a total of nine nodes and nine links, and the route between two terminal nodes is represented as a collection of several different links, where r i = { [ H 1 , S 1 ] , [ S 1 , S 2 ] , [ S 2 , H 3 ] } represents a route from terminal H 1 to H 3 .
According to the traffic priority of the IEEE802.1Q standard and the practical application of TSN in the field of industrial control, the set of all types of flow in the network is defined as F = i = 1 n f i . There are three traffic types, namely, TT traffic, RC traffic, and BE traffic. TT traffic has the highest priority, which is set to 7, and has a strict period. It has deterministic constraints on response latency and jitter, and is used to transmit time-sensitive real-time data such as synchronization and control information with the highest quality of service guarantees; TT traffic is defined as tuple f i T T = < s r c , d e s t , S , T , ϕ , D m a x , J m a x , p r i > . RC traffic transmits large bandwidth periodic traffic with non-critical information in TSN, such as audio and video traffic, etc. Compared with TT traffic, RC traffic has low requirements on delay and jitter but it has a large load. It is represented by tuple f i R C = < s r c , d e s t , S , T , ϕ ,   D m a x ,   p r i > with priority 5 and 6. BE traffic has no QoS requirement for deterministic transmission, defining the tuple as f i B E = < s r c , d e s t , S , ϕ , p r i > , which has the lowest priority and is set to 0. When data traverse the network, f i [ v x , v y ] . ϕ denotes the transmission offset of f i at the outgoing port of the node v x on the transmission path [ v x , v y ] ; the link [ v x , v y ] connected by v x and v y only represents one link in the flow transmission path. As the application scenario of TSN is a local area network, the transmission offset time of traffic on v x is set to be the same as that of link [ v x , v y ] .

3.2. System Architecture

This section focuses on the switching mechanisms for securing the transport of hybrid traffic in TSN. The TSN switching architecture is shown in Figure 2. The proposed hybrid traffic scheduling combines the TAS mechanism with the CQF mechanism, allowing multiple types of hybrid traffic to coexist and be transmitted in the same network. The TSN traffic scheduling architecture has eight switching queues, each of which corresponds to a different priority. Queue 7 has the highest priority and is used to transmit TT traffic. In the previous TSN switching mechanism, each queue transmitted its own traffic without any connection to each other. We improve the switching mechanism by taking queue 5 and queue 6 in the TAS mechanism as a set of parity ping-pong queues and using the CQF mechanism to transmit RC traffic, while the remaining queues transmit lower-priority BE traffic. The corresponding time-aware gate is set after each queue.
TAS adopts the idea of Time Division Multiple Access (TDMA) to divide the communication time of traffic transmission into some transmission periods, and each transmission period is divided into several time slots. After the transmission of all data frames in the network, the gating strategy is combined to control the offset of transmission. Each time-aware gate has two states, and its state determines whether the frame in the queue is transmitted. A state of “0” indicates that the gate is closed and does not allow the transmission of data, while a state of “1” indicates that the gate is open and the newly arriving data can be transmitted. The gate state corresponding to each time slot is specified by the gate control list, so the TAS mechanism can ensure the determined end-to-end transmission delay by providing the determined time slot for the high-priority TT traffic.
When the TAS mechanism is used, the traffic transmission delay and gating configuration scheme need to be accurately calculated. The CQF mechanism adopted by queue 5 and queue 6 uses a periodic cyclic alternation of ping-pong queues when receiving and transmitting traffic. It can reduce the control accuracy of transmission time and ensure the certainty of the upper bound of forwarding delay, which greatly reduces the difficulty of gating configuration. The enqueue and dequeue mechanism in the CQF is shown in Figure 3, and consists of a cyclic timer and two ping-pong transmission queues. In odd time slots, the time-aware gate of queue 5 is open to transmit packets only, while the time-aware gate of queue 6 is closed to receive packets only. In even time slots, the state of receiving and forwarding packets of the two queues switches. The CQF mechanism limits the delay value of data frames in a single node to 2 T s , in which the ping-pong queue transmits and receives packets alternately to avoid hungry blocking, and has a deterministic upper bound of scheduling delay. If the number of transmission hops of a certain RC flow is n , its maximum and minimum delay are ( n + 1 ) T s and ( n 1 ) T s , respectively.
Since RC traffic with periodic large bandwidth only needs to ensure the upper bound of deterministic delay, the CQF mechanism can be used to transmit RC traffic, which is co-configured with the TAS mechanism on queue and gating. In addition, the CQF mechanism transmits RC traffic following the policy of taking one step per time slot, which can limit the excessive bandwidth occupation of low-priority traffic, burst transmission load, and malicious endpoint demand.

3.3. Problem Description

This paper focuses on the hybrid scheduling problem of multi-type traffic in TSN, which can be divided into two parts. The first part is the design of the TSN switching mechanism in hybrid traffic scheduling, which combines two scheduling mechanisms of the TAS and CQF for mixed transmission of three types of traffic, and has been explained in the system architecture of Section 3.2. The second part is the traffic injection problem of the traffic to be scheduled and mapped to the time slot. It is necessary to design a hybrid traffic scheduling strategy in the above switching mechanism, in order to improve the success ratio of RC traffic and BE traffic scheduling on the premise of meeting the schedulability of TT traffic.
The traffic scheduling sequence has an important impact on its scheduling success ratio. The sequence of packets in the scheduling cycle and the location of time slot injection determines the delay and jitter. There are already some basic shaping methods to inject hybrid traffic into transmission time slots sequentially, such as time slot pre-allocation after arranging them in ascending or descending order according to traffic characteristics including period and load. However, the traffic characteristics considered when applying these methods for scheduling are relatively single and cannot weigh the scheduling urgency of global traffic, resulting in poor shaping performance. For example, the outgoing port of a switch accumulates six flows at time 0 in Figure 4. However, f 3 R C , with a load size of three transmission units, has been waiting in the queue for a long time before other flows arrive at this switch. At the time of the fourth transmission unit, f 3 R C reaches the scheduling deadline. If the sequential scheduling is determined only by traffic load, without considering traffic characteristics such as deadline and waiting time, the just-arrived low-load TT and BE flows will be transmitted first. As a result, f 3 R C , whose deadline is earlier, starts transmission at the eighth transmission unit, and its scheduling fails.
To solve the problem of time slot injection of traffic, the following definitions are given in this section:
(1) Hyper period: In order to reduce the complexity of hardware design, the hyper period of gating scheduling preferentially selects the integer multiple of all the flow periods in the network, so the hyper period is defined as the least common multiple of all the flow periods in the network.
f i F , h p = L C M ( f 1 . T , , f n . T )
(2) Time slots: The gating policy defined in IEEE802.1Qbv implements fine scheduling control through time slots. The time slot acts as the minimum scheduling unit of the gating control list, in which the traffic to be scheduled is injected. The scheduling hyper period of TSN consists of several scheduling time slots T s , i.e., h p = j = 1 m T s j . Since the driver of gated scheduling is periodic, the upper limit of scheduling time slots is selected as the greatest common divisor of all flow periods.
f i F , max ( T s ) = G C D ( f 1 . T , , f n . T )
(3) Time slot injection ratio: The time slot injection ratio is the ratio of the time slot size occupied by the injected traffic to the time slot size. A higher slot injection ratio indicates that the network bandwidth is more fully utilized and more non-TT traffic can be scheduled. Define the injection decision variable m a p i , if m a p i = 1 , it indicates that f i is successfully injected into the time slot and starts transmission; otherwise, m a p i = 0 . It is known that the traffic injection of the corresponding time slot is required at each switching node of the traffic on its path, so there is:
v x , v y p a t h ( f i ) , m a p i = j = 1 s p T s m a p i , j [ v x , v y ]
where m a p i , j [ v x , v x + 1 ] indicates whether f i can be successfully injected into the j -th scheduling time slot of the hyper period when flowing through link [ v x , v x + 1 ] . Thus, the global time slot injection ratio can be calculated as:
f i F , r a t i o = i = 1 n ( m a p i f i . L ) h p

4. Design of Scheduling Strategy for Hybrid Traffic

This section designs the multi-type hybrid traffic scheduling strategy in TSN. Hybrid traffic scheduling can be abstracted as a time slot injection problem in gating control strategy. In order to achieve good scheduling performance, we use the TAS+CQF hybrid scheduling mechanism to shape the hybrid traffic. After shaping the traffic according to the laxity, we can obtain the offset of traffic sending and the injection time slot.

4.1. The Objective of Traffic Shaping Objective

According to the IEEE802.1Q standard, the priority level of each traffic is specified by the priority Code Point field (PCP) in the Ethernet header, which is the priority parameter f i . p defined in Section 3.1. The inbound filtering module assigns flows to different queues based on their priorities. However, simply assigning queues according to preset traffic priorities will result in too-coarse-shaping granularity to achieve fine-grained scheduling of traffic by TSN and will not achieve the expected deterministic traffic delivery.
When scheduling traffic shaping, multiple traffic characteristics such as traffic load and deadline should be considered comprehensively, in order to flexibly determine the traffic scheduling sequence. If the fixed scheduling priority is used to determine the fixed scheduling sequence and time slot injection location of the traffic, the punctuality requirement of critical traffic cannot be guaranteed. In addition, it is easy to preempt non-critical traffic for a long time, resulting in the “starvation” phenomenon, and traffic shaping should maximize the periodic critical traffic injected into the time slot as much as possible, in order to reserve more time slots in the front for the coming traffic.
We dynamically arrange the traffic scheduling sequence according to the traffic laxity and allocate time slot resources for different types of traffic. Laxity is the slack degree to which traffic can be delayed before its required deadline. Traffic with low laxity is scheduled first in the queue. In the traffic shaping stage, the hybrid traffic scheduling strategy determines the feasible traffic scheduling sequence according to the traffic laxity and assigns different types of traffic to the corresponding queues, and then uses the TAS or CQF mechanism to inject the traffic into time slots. After the transmission time slots of TT traffic and RC traffic are well planned, more scheduling space can be reserved for cached BE traffic in low-priority queues. After the pre-injection of critical traffic such as TT traffic and RC traffic in each time slot, there may be unutilized remaining time slots of different sizes at the tail end of the time slot; the remaining available time slots are then searched in a sliding manner to inject BE traffic, thereby maximizing the throughput of BE traffic.
In hybrid traffic scheduling, different types of traffic have different scheduling objectives. On the premise of meeting the deadline of TT traffic, we try to improve the scheduling success ratio of RC traffic and minimize the sum of end-to-end response delay of global critical traffic. After TT traffic and RC traffic have been deployed to the network, the scheduling goal for BE traffic is to inject more BE frames to maximize the utilization of time slots. In this way, increasing the slot injection ratio can avoid more useless network bandwidth overhead caused by BE traffic retransmission.

4.2. The Details of Shaping Implementation

Due to the limited port resources on the network, the injection time of the time slot needs to be properly scheduled based on gating control policies to ensure the priority scheduling of critical traffic and avoid the congestion of output ports. This section comprehensively considers the different characteristics of TSN hybrid traffic. We first propose a hybrid traffic shaping method based on least laxity, which determines the sequence of traffic injection and transmission slots in the queue according to the laxity. The shaping stage process is shown in Figure 5.
To meet the requirements of TSN for delay control and deterministic transmission, the TSN hybrid traffic scheduling strategy takes the initial priority of traffic as a reference, and shapes traffic according to traffic characteristics such as traffic period and load to determine the scheduling sequence. Traffic shaping can provide better deterministic real-time scheduling performance for critical flows and reserve more scheduling space for non-critical flows.
If the queue scheduling sequence is determined according to a single index such as traffic priority, traffic load, or traffic period, it is difficult to ensure the global schedulability of critical flows. The traffic laxity designed by the proposed method integrates the global information of the scheduled traffic and takes into account parameters such as the traffic deadline f i . D m a x , the waiting time f i . w , the traffic period f i . T , and the load size f i . S . The waiting time f i . w is the queuing time caused by the traffic not being injected into the slot and forwarded immediately when it arrives at a node. In the scheduling shaping stage, the time slot is mapped according to the laxity calculated during the traffic scheduling, and the traffic with the minimum laxity is selected to inject into the current link’s time slot. For TT traffic and RC traffic, traffic with a small load, earlier deadline, short period, and long waiting time should be prioritized. Therefore, the traffic laxity is defined as Equation (5):
f i F B E , l a x i t y ( f i ) = f i . D m a x f i . D m a x + f i . w + f i . S M T U + e f i . T
The goal of hybrid traffic scheduling is to ensure that TT traffic and RC traffic are successfully scheduled. According to traffic characteristics, periodic critical TT traffic and RC traffic and non-critical BE traffic are scheduled in strict priority during shaping. Therefore, the laxity of BE traffic is higher than that of TT traffic and RC traffic.
f i F B E , f j F B E , l a x i t y ( f i ) > l a x i t y ( f j )
Since BE traffic is not periodic and has no deadline requirement, its laxity is higher than other traffic. The maximum laxity of other traffic is max ( f j . S M T U + e f j . T ) + 1 . Therefore, according to the sum of the packet load size of BE traffic and the maximum laxity of non-BE traffic, its laxity can be determined as follows:
f i F B E , f j F B E , l a x i t y ( f i ) = f i . S M T U + max ( f j . S M T U + e f j . T ) + 1
We select the traffic with the least laxity degree to schedule first, and the waiting time f i . w of all traffic is 0 in the initial stage of shaping. When any traffic is injected into the time slot in each switching node of its transmission path, the waiting time f i . w of the remaining traffic will change node by node. Therefore, the laxity of any f i varies dynamically at different switching nodes. The core of this shaping method is to dynamically determine the l a x i t y ( f i [ v x , v y ] ) of the traffic flowing through each switching node and then inject scheduling slots sequentially. The smaller the traffic laxity in the same queue, the earlier the traffic is scheduled. The minimum laxity value is 0, in which case the priority of this traffic injected into the time slot is the highest.
The sequence of flow injection time slots can be determined after the traffic shaping, and the injection sequence of traffic in Figure 4 can be adjusted as shown in Figure 6 according to this method. Although f 2 T T delays two transmission units to start transmission, the adjusted scheduling sequence can ensure the successful scheduling of both TT traffic and RC traffic.
It should be noted that the hybrid traffic scheduling strategy proposed in this paper applies the CQF mechanism to RC traffic. The CQF mechanism uses both odd and even queues to receive and forward RC traffic cyclically. Although RC traffic also needs to be sorted by laxity, each traffic is required to be sequentially injected with a different time slot after sorting. If multiple RC flows reach the switch at the same time and queue, only one RC flow is injected into each time slot. In this way, RC traffic in the ping-pong queue is distributed to different time slots, which prevents traffic congestion. Compared with only using the TAS mechanism, the hybrid traffic scheduling strategy reduces the fine constraint discrimination for RC traffic. It uses the RC traffic transmission rules specified in the CQF mechanism for time slot injection, which can improve the success ratio of RC traffic scheduling on the premise of meeting the TT traffic requirements.
Through the above shaping stage, the sending offset of each flow can be calculated. The algorithm process of shaping according to laxity is shown in Algorithm 1. The input of the algorithm is a hybrid traffic set F , traffic path information p a t h ( f i ) , and switch slot setting T s . The output is the laxity of the traffic l a x i t y ( f i [ v x , v y ] ) at each node and the transmission offset of the traffic f i [ v x , v y ] . ϕ at the outgoing port of the switch on the transmission path.
Algorithm 1 Traffic shaping algorithm based on laxity
Input:  F ,   p a t h ( f i ) ,   T s
Output:  l a x i t y ( f i [ v x , v y ] ) ,   f i [ v x , v y ] . ϕ ,   m a p i , j [ v x , v y ]
1  Sort   p a t h ( f i )   in   ascending   order   of   hops   and   add   it   to   p a t h s e t
2 for   each   traffic   path [ v x , v y ]   in   p a t h s e t
3   Calculate   all   l a x i t y ( f i [ v x , v y ] )   in   F
4   Select   f m   with   the   minimum   value   of   l a x i t y ( f m [ v x , v y ] )
5   Tmp = f m . L
6  for f i in F do
7    If fi is not the traffic with the minimum value of l a x i t y ( f m [ v x , v y ] )
8    f i . w = f i . w Tmp
9   else
10   for T s j in   h p
11    If T s j . u n u s e d   >   f i . L  then
12     f i [ v x , v y ] . ϕ = k = 1 j T s k T s j . u n u s e d
13     T s j . u n u s e d = T s j . u n u s e d f i . L
14     m a p i , j [ v x , v y ] = 1
15    break
16    end if
17     end for
18  end if
19  end for
20 end for
At the beginning of scheduling shaping, the set of paths for all flows is sorted in ascending hop count order and added to the global p a t h s e t (line 1). Each link in the global traffic p a t h s e t is then traversed in order and the time slot injection is analyzed for each link one by one: firstly, the laxity of all traffic flowing through this link is calculated, and the traffic with the least laxity is selected for time slot injection of this link, and its transmission duration f m . L is recorded (lines 2–5). We traverse all traffic flowing through the link and update its waiting time if it does not have the least laxity (lines 7–8). If the traffic has the least laxity, the time slot injection operation starts to traverse the time slot resources of the current link. The transmission offset of this flow at this node can be calculated according to the packet length and the remaining available capacity of the time slot. If the remaining amount of the current time slot cannot accommodate the traffic with the least laxity, it will enter the next time slot for traffic injection. If the remaining amount of this time slot is sufficient to inject new incoming traffic, set the offset of this traffic on this node and update the remaining amount of this time slot (lines 9–15); After that, when the traffic arrives at a new switching link each time, all the laxity with the same number of hops passing through this link is recalculated and the above operation is repeated.

5. Evaluation of Schedulability

5.1. The Scheduling Constraints

Different scheduling mechanisms have different time slot injection rules and scheduling constraints. The deterministic transmission of the traffic to be scheduled can be completed only when it meets the transmission constraints of the corresponding scheduling mechanism. Therefore, this section determines whether the traffic transmission offset and injection time slot meet the scheduling constraints of the corresponding mechanism. According to the TAS mechanism in Figure 2, the TT traffic in TSN needs to have strict transmission offset and periodicity requirements, and the CQF mechanism shows that RC traffic has a hop-by-hop deterministic delay upper bound in the transmission process. Based on the TSN network and traffic model, this section designs the following constraints to ensure the deterministic scheduling delay of TT traffic and RC traffic according to traffic characteristics such as the frame transmission offset and occupied time slot.

5.1.1. Frame Offset Constraint

The frame offset of the traffic transmission should not be earlier than the transmission start time, and the transmission should be completed within its flow period. We assume that the global earliest transmission start time is 0. In addition, the search space of the frame offset can be reduced by constraining the frame offset within the period range. The constraint of the frame offset is shown in Equation (8), where f i , j [ v a , v b ] . ϕ and f i , j [ v a , v b ] . L are the offset and transmission time of the j -th frame of f i sent by v a to the link [ v a , v b ] , respectively.
f i F T T , j { 1 , 2 , , f i . S M T U } : ( f i , j [ v a , v b ] . ϕ 0 ) ( f i , j [ v a , v b ] . ϕ f i , j [ v a , v b ] . T f i , j [ v a , v b ] . L )

5.1.2. End-to-End Delay Constraint

To ensure the QoS of traffic transmission, the time difference between receiving by the receiver and sending by the sender must be less than or equal to the maximum end-to-end response time, otherwise, the scheduling fails. For TT traffic, the following end-to-end delay constraints are introduced to specify the transmission delay between the sender and the receiver.
f i F T T , j { 1 , 2 , , f i . S M T U } : f i , j [ v n 1 , v n ] . ϕ + f i , j [ v n 1 , v n ] . L f i , j [ v 1 , v 2 ] . ϕ f i . D m a x

5.1.3. Flow Jitter Constraint

TSN should ensure low jitter transmission of critical traffic. Since it is sensitive to the low-jitter service quality of TT traffic transmission at the receiver, the perception of transmission jitter at intermediate nodes is weak. Therefore, the flow jitter constraint only applies to the sending node of the last hop before the receiver. As shown in Equation (10), W i , j is the arrival time of the data frame at the last hop minus the sending time of the first hop, which is the frame transmission time. It takes the difference between the transmission time of any two frames of the same flow to determine whether it is less than the maximum value of the flow jitter constraint.
This constraint controls the upper bound of the delay jitter by calculating the time difference between the last hop and the first hop during the flow transmission. Moreover, this constraint can be further extended to intermediate nodes if users have customized service requirements for the delay jitter of intermediate nodes during traffic transmission.
W i , j = f i , j [ v n 1 , v n ] . ϕ + f i , j [ v n 1 , v n ] . L f i , j [ v 1 , v 2 ] . ϕ f i , x , f i , y f T T : W i , x W i , y f i . j m a x

5.1.4. Periodic Constraints

According to the periodic characteristics of TT traffic in TSN, all time-sensitive data of the same terminal device need to be sent periodically. In addition, a fixed period is required between every two flows, that is, after the injection time slot of the first packet of the TT flow is determined, the injection time slot of the subsequent packets of the flow can also be determined.
f i F T T , j { 1 , 2 , , f i . S M T U } : f i , j [ v a , v b ] . ϕ = f i , j + f i . S M T U [ v a , v b ] . ϕ

5.1.5. CQF Time Slot Transmission Constraints

In the hybrid traffic scheduling strategy, CQF queues with priority 5 and priority 6 are used to transmit RC traffic. According to the traffic characteristics of RC traffic, we design a coarse-grained forwarding delay upper bound constraint, that is, when the CQF mechanism is used to transmit RC traffic, its forwarding delay upper bound value in a single switch can be determined. Therefore, the end-to-end delay of RC traffic is distributed to each switching node to ensure the successful scheduling of RC traffic. The CQF mechanism must follow the following two rules when transmitting RC traffic.
  • Rule 1:
For different switching nodes, the time slot in which the previous switching node sends the packet and the time slot in which the next switching node receives this packet are required to be in the same time slot. As shown in constraint (12) below, if the CQF queue of the (n − 1)-th switching node sends a message at the m-th time slot, then the time slot in the CQF queue of the n-th node that receives and forwards this message is also in T s m .
f i F R C , j { 1 , 2 , , f i . S M T U } : ( k = 1 m 1 T s k f i , j [ v n 1 , v n ] . ϕ k = 1 m T s k ) ( k = 1 m 1 T s k f i , j [ v n 1 , v n ] . ϕ + f i , j [ v n 1 , v n ] . L k = 1 m T s k )
  • Rule 2:
For the same switching node, when the CQF mechanism is used to transmit RC traffic, the packets received in the last time slot must be forwarded in the next time slot. Therefore, there are the following constraints (13):
f i F S T , j { 1 , 2 , , f i . S M T U } : ( k = 1 m 1 T s k f i , j [ v n 1 , v n ] . ϕ + f i , j [ v n 1 , v n ] . L k = 1 m T s k ) ( k = 1 m T s k f i , j [ v n , v n + 1 ] . ϕ k = 1 m + 1 T s k )
Combining the above two rules of transmitting RC traffic by applying the CQF mechanism, the CQF time slot transmission constraint can be obtained as:
f i F S T , j { 1 , 2 , , f i . S M T U } : ( k = 1 m 1 T s k f i , j [ v n 1 , v n ] . ϕ k = 1 m T s k ) ( k = 1 m 1 T s k f i , j [ v n 1 , v n ] . ϕ + f i , j [ v n 1 , v n ] . L k = 1 m T s k ) ( k = 1 m T s k f i , j [ v n , v n + 1 ] . ϕ k = 1 m + 1 T s k )
Specifically, if the packet sent by the previous node is in the previous time slot T s m , the latter node receives the packet in the same time slot T s m , and the latter node forwards the packet in the later time slot T s m + 1 .

5.2. Schedulability Evaluation Algorithm

Schedulability is an important index to evaluate the performance of the hybrid traffic scheduling mechanism. Periodic traffic such as TT traffic and RC traffic is scheduled successfully when it is successfully injected into the time slot and meets the corresponding TSN constraints, while BE traffic is scheduled successfully as long as it is injected into the transmission time slot. Meeting schedulability means that the scheduling performance requirements of different types of traffic in TSN can be guaranteed. After the flow shaping and being injected into the time slot, whether the flow sending offset meets the constraints is the key to schedulability evaluation. Therefore, we apply the flow sending offset and injection decision variables obtained by Algorithm 1 to design the schedulability evaluation algorithm.
We need to focus on the relationship between the time slot injection and schedulability of TT and RC traffic. Successful time slot injection is a necessary condition for successful traffic scheduling. If m a p i = 0 , the necessary condition for schedulability is not satisfied and this traffic cannot be scheduled. Scheduling constraints are sufficient conditions for successful traffic transmission. After a flow is injected into the time slot, it is still necessary to check that the flow satisfies m a p i = 1 . When the above constraints of Section 5.1 are satisfied, the traffic of the scheduling configuration in TSN can be judged to be successfully scheduled.
If the traffic to be scheduled is TT traffic, then determine whether f i [ v x , v y ] . ϕ satisfies constraints (8)–(11). If it is RC traffic, since the proposed hybrid traffic scheduling strategy combines the CQF mechanism and traffic shaping, so that the offset time of RC traffic after pre-shaping that is mapped into the time slot can meet the CQF constraint (14), that is, the scheduling is successful. In this way, the strictness of traffic scheduling constraints is reduced while meeting scheduling requirements. If it is BE traffic, there is no constraint requirement and the scheduling is successful as long as m a p i = 1 . We define the schedulability indicator variable s c h e d i , with   s c h e d i = 1 indicating that f i can be successfully scheduled. The detailed schedulability evaluation algorithm is shown in Algorithm 2.
Algorithm 2 Schedulability evaluation algorithm
Input:  f i [ v x , v y ] . ϕ , m a p i , j [ v x , v y ] , T s , F
Output:  s c h e d i
1 for f i   in   F  do
2   m a p i = 1
3   for each traffic path [ v x , v y ] in p a t h ( f i )
4    m a p i = m a p i m a p i , j [ v x , v y ]
5   end for
6   if m a p i = = 0
7     return   s c h e d i = 0
8   end if
9   if m a p i = = 1
10    if f i F T T and doesn’t satisfy constraint (8)–(11)
11     return   s c h e d i = 0
12   else if f i F R C and doesn’t satisfy constraint (14)
13    return s c h e d i = 0
14   else return s c h e d i = 1
15   end if
16  end if
17 end for

6. Experiments and Evaluation

To verify the TSN hybrid traffic scheduling policy design proposed in Section 4, we present the experimental results in this section. We give the experimental parameter settings and then the performance of the proposed scheduling strategy is evaluated, including RC traffic scheduling success ratio, time slot injection ratio, and scheduling delay.

6.1. Experiment Setup

In this section, we design the experiment of the hybrid traffic scheduling strategy and verify its performance. Simulation experiments were conducted using MATLAB2018b, running on a Windows computer with Intel(R) Core(TM) i7-10700 2.90 GHz CPU and 32GB RAM.
Assuming that global clock synchronization has been completed on the devices in TSN and the link transmission rate is set to 1 Gbps, the transmission delay of the Maximum Transmission Unit (MTU) is 12.336 μs and the processing delay of the switch for all three types of traffic is 1 μs. We used the Orion Crew Exploration Vehicle (CEV) topology [21] for the simulation, which is shown in Figure 7.
According to the guidance of industrial interconnection communication traffic characteristics in the DetNet use case standard [25], the traffic parameters in the experiment are set as Table 2. To ensure the effectiveness of TT traffic and RC traffic scheduling, we set f i . D m a x of TT traffic and RC traffic to be less than the sending period of the traffic.
The experiment can be divided into two parts. The first part is to select a traffic shaping method. It includes Least Laxity First (LLF), Earliest Deadline First (EDF), Shortest Period First (SPF), and Shortest Data packet First (SDF). The second part is to select the traffic scheduling mechanism, including the hybrid scheduling mechanism using TAS+CQF and the direct scheduling mechanism using only TAS. To verify the performance of the hybrid traffic scheduling strategy, the methods in the above two parts are sequentially arranged and combined under the same experimental scenario, which is used as the method of the comparative experiment in this paper. In addition, we also use the Simulated Annealing Multi-CQF (SA_MCQF) method proposed by Alexandris et al. [26] as a comparison method. The MCQF mechanism uses queue 7-1 as three groups of CQF queues to transmit periodic traffic, with queue 0 used to transmit BE traffic.

6.2. Evaluation Results

6.2.1. RC Traffic Scheduling Success Ratio

  • Hybrid Traffic Scheduling Mechanism
To verify the influence of the proposed scheduling mechanism on the scheduling success ratio of RC traffic, this experiment compares the scheduling strategy of SA_MCQF, LLF_TAS using the TAS mechanism, and LLF_TC combining the TAS and CQF mechanisms. The LLF_TAS and LLF_TC scheduling strategies both adopt traffic shaping based on traffic laxity.
The hybrid traffic scheduling mechanism adopted in the LLF_TC strategy combines the CQF mechanism. For RC traffic, the CQF mechanism adopts the time slot injection rule of parity cyclic injection. When there is an RC flow, each time slot will reserve a transmission space for RC traffic. However, when multiple RC flows converge in the same time slot of the same switching node, only one can be injected at most, in order to avoid preempting the transmission space of TT traffic. Therefore, the hybrid traffic scheduling mechanism reserves scheduling space for RC traffic on the premise that TT traffic is scheduled before the deadline, in order to improve its scheduling success ratio.
In this experiment, we selected 20 TT flows and 20–120 RC flows to ensure that all TT flows scheduling is successful. From the experimental results in Figure 8, it can be seen that the scheduling success ratio of RC traffic under the three scheduling strategies decreases to different degrees as the number of RC traffic increases. In the experiment using the LLF_TAS strategy, the scheduling success ratio is 95% when there are 20 RC flows, but this decreases to 54.17% when the number of flows is 120.
Since the SA_MCQF method also uses the CQF queue to transmit RC traffic, the performance of parity queue to transmit RC traffic is better than that of the TAS mechanism, so the RC traffic scheduling success rate of SA_MCQF is slightly higher than that of LLF_TAS. However, the simulated annealing method fails to dynamically arrange the scheduling sequence according to the traffic characteristics, and with the increase in the traffic scale, the CQF queue cannot schedule TT traffic well. In order to ensure the scheduling delay of TT traffic, the RC traffic scheduling success rate of SA_MCQF is inferior to that of LLF_TC. In the experiment of the LLF_TC strategy, when the number of RC flows is 120, the scheduling success ratio can still reach 79.17%, and all of them can be scheduled successfully when the number of RC flows is less than 40. Therefore, the hybrid scheduling mechanism proposed in this paper can better improve the scheduling success ratio of RC traffic without affecting the scheduling success ratio of TT traffic.
2.
Different flow shaping methods
In the shaping process of TSN hybrid traffic scheduling, we should comprehensively consider the traffic characteristics. Based on ensuring the deterministic transmission of TT traffic, this experiment analyzes the method of injected traffic in the shaping stage to verify the performance of the proposed shaping method based on traffic laxity. The four shaping methods are Earliest Deadline First (EDF), Shortest Period First (SPF), Shortest Data packet First (SDF), and Least Laxity First (LLF). In this experiment, we select a total of 20 TT flows and 20–120 RC flows, and the selected scheduling mechanisms are all hybrid scheduling mechanisms that integrate the TAS and CQF mechanisms.
According to the RC flow scheduling success ratio shown in Figure 9, the proposed LLF shaping method has the optimal performance, and the performance ranking of the other three methods is EDF, SPF, and SDF. The LLF shaping method can comprehensively consider the characteristics of traffic period, load, deadline, and waiting time, in order to reserve more advanced time slot resources for RC flows to be scheduled. As the number of RC flows increases, the success ratio of RC traffic scheduled by the EDF, SPF, and SDF shaping methods decreases significantly. However, the LLF shaping method can schedule all RC traffic successfully when there are 40 RC flows in the network. When the number of RC flows grows to 120, the success ratio of the LLF shaping method can still reach 79.17%, while the success ratio of the sub-optimal shaping method EDF is only 53.33%. Therefore, the experimental results show that the shaping method LLF adopted by the strategy in this paper can schedule more RC traffic.

6.2.2. Adaptability of the Hybrid Scheduling Mechanism to Different Traffic Proportions

To verify the adaptability of the hybrid scheduling mechanism to different traffic ratios in the hybrid traffic set, four traffic ratio scenarios are designed in this experiment. The hybrid traffic set in each scenario contains 100 flows. On the premise that all TT traffic can be successfully scheduled, the RC traffic proportion in scenarios with different proportions increases gradually. The proportion of three types of traffic in each scenario is shown in Table 3. RC traffic does not require ultra-low latency during transmission, but needs to meet its deadline requirements. To analyze the adaptability of the hybrid scheduling mechanism to different traffic ratios and the scheduling delay performance of RC traffic under this mechanism, we compare the ratio of the average end-to-end delay of RC traffic to the average deadline under different mechanisms. If the ratio is greater than 1, it indicates that the overall scheduling performance of RC traffic in this scenario is poor.
The experimental results are shown in Figure 10. The LLF_TAS method using only the TAS mechanism has strict fine-grained gating constraints on RC traffic, which cannot guarantee that RC traffic can be injected in every time slot. Therefore, in four traffic ratio scenarios, the ratio of average end-to-end delay to average deadline of RC traffic using the LLF_TC method is lower than that using the LLF_TAS method. However, the SA_MCQF method fails to dynamically arrange the scheduling sequence according to the traffic characteristics, and the CQF queue has poor TT traffic scheduling performance due to its peristaltic plastic property, which results in the delayed scheduling of some low-priority RC traffic. Therefore, the RC traffic scheduling delay ratio is higher than that of the LLF_TC method. Moreover, in the P2 and P4 scenarios, the LLF_TC method can keep the global delay ratio lower than 1 while the LLF_TAS method performs poorly. Especially in the P4 scenario with a high RC flow ratio, the LLF_TC method can reduce the ratio by 17.8%. Therefore, it can be seen from the experimental results that the LLF_TC method can achieve good RC traffic scheduling performance under different traffic ratios, and has good adaptability to the dynamic TSN hybrid traffic set.

6.2.3. Influence of Hybrid Scheduling Mechanism on Slot Injection Ratio

To verify the influence of different scheduling mechanisms on the time slot injection performance, this experiment analyzes the global time slot injection situation when the traffic ratio scenario is P4. In the process of slot injection, the strategy that only adopts the TAS scheduling mechanism does not reserve transmission space for RC traffic in each slot, with the result that some RC traffic with large bandwidth cannot be injected. The CQF queue in the SA_MCQF method provides a transmission guarantee for RC traffic. However, due to its poor scheduling effect on TT traffic and unreasonable scheduling sequence, it will lead to the occurrence of time slot waste. The LLF_TC method integrates the CQF and TAS mechanisms, and injects as much RC and BE traffic as possible based on successful TT traffic injection.
According to the experimental results shown in Figure 11, with the increase in the number of flows in the network, the slot injection ratio of LLF_TAS is lower than that of LLF_TC; the slot injection ratio grows slowly, except that the slot injection ratio of the two scheduling mechanisms is the same when the number of flows is 20. When the number of flows is 100, the time slot injection ratio of LLF_TAS is 24.3% less than that of LLF_TC.
Therefore, the hybrid scheduling mechanism proposed in this paper can achieve a higher global slot injection ratio. Compared with the LLF_TAS method, which only uses the TAS mechanism, the LLF_TC method has higher network resource utilization, that is, more non-TT traffic can be scheduled.

6.2.4. Influence of Different Scheduling Strategies on Average End-to-End Delay of TT Traffic

Although the hybrid traffic scheduling strategy proposed in this paper can improve the success ratio of RC traffic scheduling, it still needs to ensure that the deterministic transmission of TT traffic is not affected. Therefore, to verify the overall scheduling performance of TSN hybrid traffic, we select a total of 100 flows when the traffic ratio scenario is P4. The comparison methods are the LLF_TAS method using the TAS mechanism, the SA_MCQF method, and four scheduling strategies using different shaping methods under the hybrid traffic scheduling mechanism.
As the LLF_TC method uses the CQF mechanism to transmit RC traffic, the ping-pong queue in the CQF mechanism alternately transmits and receives RC packets to avoid starvation blocking, and the transmission space is reserved for RC traffic in each transmission time slot. When there is RC traffic transmission in the network, each time slot will reserve the transmission space of one RC flow. Therefore, some TT traffic may be delayed on the premise of successful scheduling, with the LLF_TC method having a larger delay than the LLF_TAS method which does not reserve scheduling space for RC traffic.
According to the experimental results in Figure 12, the average end-to-end delay of TT traffic is the lowest when the LLF_TAS method is adopted. The average end-to-end delay of the TT traffic of the proposed LLF_TC method is slightly higher than that of the LLF_TAS method using only the TAS mechanism, but the gap between them is very small. When the number of flows is 100, the maximum delay difference is only 5.2 μs, which does not significantly degrade the delay performance of TT traffic. Moreover, the end-to-end delay of TT traffic generated by the LLF method is lower than that of the EDF, SA_MCQF, SPF, and SDF methods.

7. Conclusions

This paper aims to solve the scheduling problem of multi-type traffic including periodic and aperiodic coexistence in TSN. By combining the TAS and CQF scheduling mechanisms, we reserve scheduling space for RC traffic. In addition, a shaping method based on traffic laxity is proposed. Based on traffic characteristics, we dynamically arrange the scheduling sequence of different types of traffic and design a schedulability evaluation algorithm to achieve efficient scheduling of hybrid traffic.
The experimental results show that although the average end-to-end delay performance of TT traffic is slightly lower than that of LLF_TAS using only the TAS mechanism, the proposed LLF_TC method can still ensure the deterministic transmission of TT traffic, and the global traffic scheduling performance is significantly improved. When the number of RC traffic is 120, the scheduling success ratio can reach 79.17%.
In the process of hybrid traffic scheduling, we have not considered the optimization and adjustment of the traffic that fails to be scheduled. In our future work, the scheduling mechanism of a software-defined network can be adopted to arrange the control plane and forwarding plane jointly. After traffic shaping and schedulability analysis, we can adjust the injection slot offset of the failed traffic and reduce the queue scheduling delay globally, in order to further improve the global scheduling performance.

Author Contributions

Conceptualization, L.T. and Y.H.; methodology, J.P. and Y.H.; validation, J.P., L.T. and Y.H.; formal analysis, Z.L.; investigation, J.P. and Z.L.; data curation, J.P. and M.L.; writing—original draft preparation, J.P.; writing—review and editing, J.P., L.T., Y.H., M.L. and Z.L.; supervision, Y.H.; funding acquisition, L.T. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Key R&D Program of China (No. 2020YFB1804803, No. 2020YFB1806402), and was funded by Innovation Scientists and Technicians Troop Construction Projects of Henan Province (224000510002).

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Finn, N. Introduction to time-sensitive networking. IEEE Commun. Stand. Mag. 2018, 2, 22–28. [Google Scholar] [CrossRef]
  2. Gardiner, E. The Avnu alliance theory of operation for TSN-enabled industrial systems. IEEE Commun. Stand. Mag. 2018, 2, 5. [Google Scholar] [CrossRef]
  3. Dias, A.L.; Sestito, G.S.; Turcato, A.C.; Brandão, D. Panorama, challenges and opportunities in PROFINET protocol research. In Proceedings of the 13th IEEE International Conference on Industry Applications (INDUSCON), Sao Paulo, Brazil, 12–14 November 2018; pp. 186–193. [Google Scholar]
  4. Cena, G.; Seno, L.; Valenzano, A.; Vitturi, S. Performance analysis of Ethernet Powerlink networks for distributed control and automation systems. Comput. Stand. Interfaces 2009, 31, 566–572. [Google Scholar] [CrossRef]
  5. Nguyen, V.Q.; Jeon, J.W. EtherCAT network latency analysis. In Proceedings of the International Conference on Computing, Greater Noida, India, 29–30 April 2016; pp. 432–436. [Google Scholar]
  6. IEEE 802.1AS2020; Timing and Synchronization for Time-Sensitive Applications. IEEE Standard for Local and Metropolitan Area Networks: Piscataway, NJ, USA, 2020; pp. 1–421.
  7. IEEE Std 802.1Qbv-2015; Bridges and Bridged Networks—Amendment 25: Enhancements for Scheduled Traffic. IEEE Standard for Local and Metropolitan Area Networks: Piscataway, NJ, USA, 2016; pp. 1–57.
  8. IEEE Std 802.1Qcc-2018 (Amendment to IEEE Std 802.1Q-2018 as Amended by IEEE Std 802.1Qcp-2018); Bridges and Bridged Networks—Amendment 31: Stream Reservation Protocol (SRP) Enhancements and Performance Improvements. IEEE Standard for Local and Metropolitan Area Networks: Piscataway, NJ, USA, 2018; pp. 1–208.
  9. Dürr, F.; Nayak, N.G. No-wait packet scheduling for IEEE time-sensitive networks (TSN). In Proceedings of the 24th International Conference on Real-Time Networks and Systems, Brest, France, 19–21 October 2016; pp. 203–212. [Google Scholar]
  10. Craciunas, S.S.; Oliver, R.S.; Chmelík, M.; Steiner, W. Scheduling real-time communication in IEEE 802.1 Qbv time sensitive networks. In Proceedings of the 24th International Conference on Real-Time Networks and Systems, Brest, France, 19–21 October 2016; pp. 183–192. [Google Scholar]
  11. Falk, J.; Dürr, F.; Rothermel, K. Time-Triggered Traffic Planning for Data Networks with Conflict Graphs. In Proceedings of the 2020 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), Sydney, Australia, 21–24 April 2020; pp. 124–136. [Google Scholar]
  12. Atallah, A.A.; Hamad, G.B.; Mohamed, O.A. Routing and Scheduling of Time-Triggered Traffic in Time-Sensitive Networks. IEEE Trans. Ind. Inf. 2019, 16, 4525–4534. [Google Scholar] [CrossRef]
  13. Chang, S.H.; Chen, H.; Cheng, B.C. Time-predictable routing algorithm for Time-Sensitive Networking: Schedulable guarantee of Time-Triggered streams. Comput. Commun. 2021, 172, 183–195. [Google Scholar] [CrossRef]
  14. Zhou, Y.; Samii, S.; Eles, P.; Peng, Z. Reliability-aware scheduling and routing for messages in time-sensitive networking. ACM Trans. Embed. Comput. Syst. 2021, 20, 1–24. [Google Scholar] [CrossRef]
  15. Nayak, N.G.; Durr, F.; Rothermel, K. Incremental flow scheduling and routing in time-sensitive software-defined networks. IEEE Trans. Ind. Inform. 2018, 14, 2066–2075. [Google Scholar] [CrossRef]
  16. Kong, W.; Nabi, M.; Goossens, K. Run-time recovery and failure analysis of time-triggered traffic in time sensitive networks. IEEE Access 2021, 9, 91710–91722. [Google Scholar] [CrossRef]
  17. Cao, J.; Cuijpers, P.J.; Bril, R.J.; Lukkien, J.J. Independent yet tight WCRT analysis for individual priority classes in ethernet AVB. In Proceedings of the 24th International Conference on Real-Time Networks and Systems (RTNS), Brest, France, 19–21 October 2016; pp. 55–64. [Google Scholar]
  18. Maxim, D.; Song, Y.Q. Delay analysis of AVB traffic in time-sensitive networks (TSN). In Proceedings of the 25th International Conference on Real-Time Networks and Systems (RTNS), Grenoble, France, 4–6 October 2017; pp. 18–27. [Google Scholar]
  19. Zhao, L.; Pop, P.; Zheng, Z.; Li, Q. Timing analysis of AVB traffic in TSN networks using network calculus. In Proceedings of the 2018 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), Porto, Portugal, 11–13 April 2018; pp. 25–36. [Google Scholar]
  20. Gavrilut, V.; Zhao, L.; Raagaard, M.L.; Pop, P. AVB-Aware routing and scheduling of time-triggered traffic for TSN. IEEE Access 2018, 6, 75229–75243. [Google Scholar] [CrossRef]
  21. Gavriluţ, V.; Pop, P. Traffic-type Assignment for TSN-based Mixed-criticality Cyber-physical Systems. ACM Trans. Cyber-Phys. Syst. 2020, 4, 1–27. [Google Scholar] [CrossRef] [Green Version]
  22. Li, E.; He, F.; Li, Q.; Xiong, H. Bandwidth allocation of stream-reservation traffic in TSN. IEEE Trans. Netw. Serv. Manag. 2021, 19, 741–755. [Google Scholar] [CrossRef]
  23. Yuan, Y.; Cao, X.; Liu, Z.; Chen, C.; Guan, X. Adaptive Priority Adjustment Scheduling Approach with Response Time Analysis in Time-Sensitive Networks. IEEE Trans. Ind. Inform. 2022, 18, 8714–8723. [Google Scholar] [CrossRef]
  24. Yan, J.; Quan, W.; Jiang, X.; Sun, Z. Injection time planning: Making CQF practical in time-sensitive networking. In Proceedings of the IEEE Conference on Computer Communications and Networking (INFOCOM), Toronto, ON, Canada, 6–9 July 2020; pp. 616–625. [Google Scholar]
  25. Nasrallah, A.; Thyagaturu, A.S.; Alharbi, Z.; Wang, C.; Shao, X.; Reisslein, M.; ElBakoury, H. Ultra-low latency (ULL) networks: The IEEE TSN and IETF DetNet standards and related 5G ULL research. IEEE Commun. Surv. Tutor. 2018, 21, 88–145. [Google Scholar] [CrossRef] [Green Version]
  26. Alexandris, K.; Pop, P.; Wang, T. Configuration and Evaluation of Multi-CQF shapers in IEEE 802.1 Time-Sensitive Networking (TSN). IEEE Access 2022, 10, 109068–109081. [Google Scholar] [CrossRef]
Figure 1. Example of Time-Sensitive Networking (TSN) network topology model.
Figure 1. Example of Time-Sensitive Networking (TSN) network topology model.
Electronics 11 03762 g001
Figure 2. Hybrid traffic scheduling mechanism.
Figure 2. Hybrid traffic scheduling mechanism.
Electronics 11 03762 g002
Figure 3. The implementation of the CQF mechanism: (a) odd time slot; (b) even time slot.
Figure 3. The implementation of the CQF mechanism: (a) odd time slot; (b) even time slot.
Electronics 11 03762 g003
Figure 4. Example of shaping in ascending order of traffic load.
Figure 4. Example of shaping in ascending order of traffic load.
Electronics 11 03762 g004
Figure 5. Workflow of traffic shaping stage.
Figure 5. Workflow of traffic shaping stage.
Electronics 11 03762 g005
Figure 6. Example of shaping in ascending order of traffic laxity.
Figure 6. Example of shaping in ascending order of traffic laxity.
Electronics 11 03762 g006
Figure 7. Network topology of the Orion CEV.
Figure 7. Network topology of the Orion CEV.
Electronics 11 03762 g007
Figure 8. Success ratio of RC traffic scheduling under different scheduling mechanisms.
Figure 8. Success ratio of RC traffic scheduling under different scheduling mechanisms.
Electronics 11 03762 g008
Figure 9. Success ratio of RC traffic scheduling with different shaping methods.
Figure 9. Success ratio of RC traffic scheduling with different shaping methods.
Electronics 11 03762 g009
Figure 10. Ratio of average end-to-end delay to average deadline of RC traffic in different traffic scenarios.
Figure 10. Ratio of average end-to-end delay to average deadline of RC traffic in different traffic scenarios.
Electronics 11 03762 g010
Figure 11. Time slot injection ratio under different scheduling mechanisms.
Figure 11. Time slot injection ratio under different scheduling mechanisms.
Electronics 11 03762 g011
Figure 12. Average end-to-end delay of TT flows with different scheduling methods.
Figure 12. Average end-to-end delay of TT flows with different scheduling methods.
Electronics 11 03762 g012
Table 1. The main notations used in the system model and problem description.
Table 1. The main notations used in the system model and problem description.
NotationExplanation
G = ( V , E ) Physical network topology
F = i = 1 n f i Hybrid traffic set in TSN
f i . s r c The source node of f i
f i . d e s t The destination node of f i
f i . S The load size of f i
f i . T The sending period of f i
f i . ϕ The offset time relative to the initial sending time
in the sending period of f i
f i . D m a x The deadline of f i
f i . J m a x The jitter limit of f i
f i . p r i The priority of f i
h p The hyper period
T s j The j-th scheduling slot unit in the hyper period
m a p i The time slot injection decision variable
p a t h ( f i ) The set of switch node paths traversed by f i
Table 2. The parameter setting of three types of traffic.
Table 2. The parameter setting of three types of traffic.
Traffic TypePriorityLoad SizeSending Period
TT764~1500 bytes80~300 μs
RC6 or 51500~4500 bytes100~1000 μs
BEbelow 464~4500 bytesnone
Table 3. The proportion of three types of traffic in different scenarios.
Table 3. The proportion of three types of traffic in different scenarios.
Traffic Set ScenarioTT Traffic RatioRC Traffic RatioBE Traffic Ratio
P110%20%70%
P210%40%50%
P320%30%50%
P420%50%30%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Pei, J.; Hu, Y.; Tian, L.; Li, M.; Li, Z. A Hybrid Traffic Scheduling Strategy for Time-Sensitive Networking. Electronics 2022, 11, 3762. https://doi.org/10.3390/electronics11223762

AMA Style

Pei J, Hu Y, Tian L, Li M, Li Z. A Hybrid Traffic Scheduling Strategy for Time-Sensitive Networking. Electronics. 2022; 11(22):3762. https://doi.org/10.3390/electronics11223762

Chicago/Turabian Style

Pei, Jinchuan, Yuxiang Hu, Le Tian, Menglong Li, and Ziyong Li. 2022. "A Hybrid Traffic Scheduling Strategy for Time-Sensitive Networking" Electronics 11, no. 22: 3762. https://doi.org/10.3390/electronics11223762

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop