2.1. Mechanism Combination
CBS is a transmission selection algorithm applicable to output ports in TSN. The core of the algorithm is to control queue sending using “credit”. Each CBS class independently maintains a credit value. When the queue is idle, the credit increases at an idleSlope rate, and when data is sent, it is deducted at a sendSlope rate, as shown in
Figure 1. Messages can only start to be sent when the credit value is non-negative. If the credit is negative, sending is paused and waits for the credit to recover, thus limiting traffic bursts and preventing other traffic from being blocked for a long time. Asynchronous Traffic Shaping (ATS) is another mechanism provided by TSN to limit traffic bandwidth. Combined with flow identification capabilities, it enables precise bandwidth control down to individual streams. However, this mechanism stipulates a maximum residence time, and packets exceeding this time will be discarded. It is not suitable for traffic with strict requirements on the frame packet loss rate [
18].
In the vehicular scenario, periodically bursting and massive sensor data may block lower-priority frames, as shown in
Figure 2a. With CBS, the transmission of burst traffic can be restricted, as shown in
Figure 2b. This type of traffic is subject to credit constraints, resulting in transmission intervals between frames. Frames with lower priority can commence transmission within these intervals. Among the sensor traffic, the message that experiences the greatest overall blocking is the last frame. When the idleSlope parameter of CBS is set to a higher value, this frame can experience less blocking from CBS shaping.
The proposed combined model, as shown in
Figure 3, prioritizes the use of TAS for the highest priority level 7, employs the CBS mechanism for the second-highest priority level, utilizes the MCQF scheduling for medium priority levels, and does not employ any mechanism to ensure transmission for priority levels 0–1.
For the highest priority TAS, there are two common application modes: stream-based TAS and class-based TAS [
19]. Stream-based TAS requires end stations to support TSN capabilities, including AS and TAS, which most current vehicle ECUs lack, as they typically operate as simple sensors [
20]. Abnormal conditions, such as frame loss and synchronization errors, may result in unreliable scheduling outcomes [
21]. Stream-based TAS also suffers from design complexity and high memory usage during scheduling. In contrast, class-based TAS offers simpler configuration and greater tolerance for flow jitter at the cost of additional bandwidth requirements [
19].
In summary, for the class-based TAS usage method, the timing model of TAMCQF plus CBS is shown in
Figure 4. The highest priority is ensured by reserving a TAS time window larger than the actual traffic bandwidth within each TAS cycle. The CBS mechanism is used to spread out periodic bursts of large data traffic. Two sets of CQF queues schedule medium and low priority traffic to achieve deterministic latency and acceptable jitter. Low priority levels 0 and 1 are BE traffic, which is transmitted using gaps in other traffic transmissions, without guaranteeing its latency and packet loss rate.
2.2. Schedulability Analysis
Previous research has derived schedulability expressions for class-based TAS streams and optimized them for multi-hop scenarios [
22].
The scenario of the combined use of TAS and CBS has been analyzed in Ref. [
17], and the congestion experienced by the CBS stream is given by Equation (7) of the same reference.
Variables used in the analysis of the CQF mechanism are listed in
Table 1.
The CQF mechanism divides time into equally sized, alternating odd and even time intervals. Frames received during an even time interval are scheduled for transmission in the next odd time interval, and vice versa. The transmission scheduling of a frame is determined solely by the time interval in which it arrives. If the transmission duration of pending frames exceeds the available time interval, transmission in this overloaded interval will continue and extend into the next time interval of the same parity.
The busy period of CQF traffic, as shown in
Figure 5, consists of the following components:
Blocking caused by the CQF cyclic queuing and forwarding mechanism, denoted as .
Blocking due to gate closure, including time windows exclusively opened for TAS stream and guard band, denoted as .
Blocking caused by TAS frames arriving at the end of a dedicated TAS time window, where the blocking equals the transmission time of the longest TAS frame. The maximum blocking from a TAS frame per TAS cycle is .
All traffic at the same priority level as stream i (including stream i itself) and high-priority non-TAS traffic. Among these, same-priority blocking is denoted as , high-priority CQF traffic blocking as , and high-priority CBS traffic blocking as .
Therefore, the queuing time expression for the target stream using CQF is given by Equation (1):
To ensure that CQF traffic arriving in the current odd (or even) time interval is transmitted in the next even (or odd) time interval, Equation (1) must also satisfy the condition given in Equation (2).
Low-priority traffic cannot cause the blocking of the target traffic employing the CQF mechanism. It can only block the busy period or queuing time if its transmission starts before the busy period. However, with CQF, any ongoing low-priority packet will complete transmission within the cycle in which the target traffic arrives (e.g., the even cycle in
Figure 5).
Blocking caused by gate closure includes blocking from guard band time and the time window exclusively allocated for the TAS stream. This blocking must be calculated once per TAS cycle. Meanwhile, the odd or even CQF time interval during which the target traffic arrives shall be subtracted from the queuing time before being used as the input variable, as shown in Equation (3).
When calculating blocking from the same priority, it is necessary to consider the first
q − 1 frames of the target stream, and follow the FIFO rule for the same priority. Any frames that arrive after the
q-th frame of stream
i will not cause blocking during busy time. The blocking from the same priority is shown in Equation (4).
The impact of blocking from the high-priority CQF stream is consistent with Ref. [
12]. As shown in
Figure 6, in the worst case, high-priority CQF stream
j is delayed by one CQF time interval
before interfering with frames of stream
i. The first purple frame of stream
j arriving at time
is delayed to the next CQF time interval and blocks the queuing time of target stream
i. By contrast, the second purple frame of stream
j arriving at time
cannot block the target frame, and must wait until its next even cycle to start transmission. The maximum number of CQF time intervals of stream
j within an arbitrary time interval
Δt can be calculated using the ceiling operation
. Multiplying this number by the duration of the CQF time interval of stream
j yields the cumulative time interval of interference from high-priority CQF stream
j. This time interval can be used as the input to the arrival function
to compute the high-priority blocking duration imposed on stream
i by each stream
j in the CQF class. The final high-priority CQF traffic blocking
is given by Equation (5).
Since the TAS mechanism does not add a guard band after the end of the TAS time window, a frame of highest-priority blocking needs to be considered after the end of each TAS time window. This blocking should be the time required for the transmission of the longest frame in the TAS traffic, namely
, resulting in the maximum highest-priority blocking
as shown in Equation (6):
The maximum number of frames of high-priority CBS traffic
j arriving within the queuing time of the target stream is
. Therefore, without considering credit constraints, the total blocking caused by all CBS traffic is
. Under CBS credit constraints, let
x denote the transmission time of CBS traffic within a time interval Δ
t. The consumed credit is then
, while the maximum accumulated credit during this interval is
. It follows that
. Since the credit of CBS does not increase during gate closure, this duration must be subtracted, yielding Equation (7).
In summary, the worst-case latency analysis for the CQF stream at a single egress port is completed. CQF needs to be combined with the AS protocol, and the odd-even cycle instants at the egress ports of nodes within the network are aligned. From a global data-link-layer perspective, when the stream satisfies Equation (2), the situation is as shown in
Figure 7. Assume ports A, B, and C are three egress ports of switches along the transmission path of stream
i. When the green target traffic frame is transmitted through the switch, the sum of the blocking from other frames plus its transmission time (indicated by red arrows in
Figure 7) and the blocking due to gate closure (indicated by blue arrows in
Figure 7), together with the delay caused by the CQF odd-even cycle at the next-hop switch (indicated by black arrows in
Figure 7), equals exactly one CQF cycle duration
. In this case, the end-to-end latency of the CQF frame is maximized when the transmission reaches the worst case at the source-node egress port, the first-hop switch, and the last-hop switch. Among these, the queuing time at the egress port of the last switch is denoted as
, which is the result of Equation (1) evaluated at that egress port instance. Since CQF cannot be used at end nodes, the queuing time of traffic at the source-node egress port
must be calculated separately, as the result of Equation (1) at the source-node egress port, where
and high-priority CQF blocking is computed according to the strict-priority Equation (6) in Ref. [
7]. The upper bound of the total end-to-end latency of the target frame
is given by Equation (8).
The significance of multi-hop optimization analysis for CQF lies in the fact that, as long as the CQF traffic at the output port of a link satisfies Equation (2), the key design goal of CQF can be achieved: the maximum end-to-end latency of traffic employing this mechanism across switches can be bounded within , where h denotes the number of hops and d represents the CQF cycle value.
After finishing the schedulability analysis of CQF traffic, BE traffic has lower priority than other traffic, yet it is necessary to briefly analyze how this combined mechanism affects BE [
23]. The dedicated TAS gates and guard bands for the highest-priority traffic may temporarily block BE traffic per cycle. The CBS mechanism avoids long-term channel occupation by large bursty streams and consequent blocking, while CQF introduces no constraints on BE traffic, enabling BE traffic to be delivered in idle slots between transmissions of other traffic within the CQF cycle.