A Modeling Method for TSN Network Time-Aware Shaper Based on Network Calculus
By using network calculation methods in the TSN network, dividing data flow and calculating the delay upper limit, the problem of heterogeneous service traffic management in TSN is solved, and network performance and communication quality are improved.
Patent Information
- Application Number
- CN202111168848.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2041-09-30
AI Technical Summary
In the existing time-sensitive network (TSN), it is difficult for the shaper to effectively manage heterogeneous service traffic with different service quality requirements, resulting in difficult to ensure network performance evaluation and communication quality.
Using a network calculation method, the data flow is divided on the central node server, the arrival curve and service curve are calculated, burst interference is limited through the protection band mechanism, the upper delay limit of the data flow is calculated, and the time-aware plasticizer model is established.
By calculating the delay upper limit, it reflects network performance, helps evaluate network quality, ensures communication quality, and improves data transmission capabilities.
Smart Images

Figure CN115879258B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network communications, and in particular to a TSN network time-aware shaper modeling method based on network calculus. Background Art
[0002] With the interconnection of distributed devices across diverse industrial automation networks, heterogeneous services with varying quality of service requirements are rapidly increasing. Shapers in Time-Sensitive Networking (TSN) enable diverse industrial traffic flows to coexist within a single network infrastructure. When data enters a TSN network, it is first queued. The shaper then determines how the data in the queue is transmitted. The IEEE 802.1Qbv subprotocol within the TSN protocol suite defines the basic rules for the Time Awareness Shaper (TAS). TAS optimizes the transmission of Ethernet frames by predicting and calculating transmission times, ensuring that data is forwarded and delivered within the specified timeframe. Summary of the Invention
[0003] The purpose of the present invention is to propose a TAS modeling method based on network calculation theory on the basis of fully considering the time criticality and shaping mechanism of traffic in different industries.
[0004] The technical solutions adopted to achieve the above objectives are:
[0005] A TSN network time-aware shaper modeling method based on network calculus sets a central node server among multiple network nodes in a network communication environment and performs the following steps on the central node to obtain the upper limit of the TAS network delay, including:
[0006] Step 1: Divide the data flows to be received according to their characteristics; calculate the arrival curve of each data flow to be received, which is used to model the accumulation of input traffic arriving at the central node;
[0007] Step 2: To address possible overlaps and conflicts in data stream transmission, a guard band delay is added to limit bursts and protect adjacent transmission time slots of other streams. Service curves for different data streams are calculated to model the data transmission service that the central node server can provide.
[0008] Step 3: Calculate the upper bound D of the delay of the data flow constrained by the arrival curve α(t) when it passes through the node with the service curve σ(t).
[0009] The data flow characteristics include: CT flow, AV flow, BE flow;
[0010] The division of the data streams to be processed includes: configuring the CT stream as a time departure class and loading it into a scheduled queue; configuring the AV and BE streams as priority classes and loading them into an unscheduled queue;
[0011] The calculation of the arrival curve of the data flow includes:
[0012] 1) Calculate the arrival curve α of the CT flow CT (t) = Ct, where C is the physical link transmission rate;
[0013] 2) Calculate the arrival curves of AV and BE flows:
[0014] α AV (t)=min(Ct,b AV +r AV t); α BE (t)=min(Ct,b BE +r BE t)
[0015] Among them, b AV 、b BE Respectively represents the maximum burst bit number of AV stream and BE stream; r AV 、r BE Represent the average bit rates of AV stream and BE stream respectively.
[0016] The guard band delay includes:
[0017] A blank period is set before the end time of the previous transmission time slot as a guard band to limit the burst interference to the next transmission time slot; the duration of the guard band corresponding to each data stream is:
[0018]
[0019] Among them, L CT 、L AV 、L BE Respectively represent the duration of the guard band of CT, AV, and BE data streams; Respectively represent the maximum length of frames in CT, AV, and BE data streams.
[0020] Calculating the service curves for different data flows involves:
[0021] 1) Since the CT stream has an independent time slot, the service curve of the CT stream is only affected by the guard band and the FIFO read and write order. The service curve provided by the CT stream is:
[0022]
[0023] 2) Considering the guard band of the AV stream, FIFO reading and writing, the overlap between the AV stream and the BE stream, and the transmission slot interference of the CT stream:
[0024] i. The service curve provided by the AV stream is:
[0025]
[0026] Among them, the maximum delay of AV data stream is at this time
[0027] ii. The service curve provided by TAS for BE flow is:
[0028]
[0029] The maximum delay of the BE data flow is:
[0030]
[0031] Calculating the upper bound on the delay D of a data stream includes:
[0032] It is expressed by the maximum horizontal deviation between the arrival curve and the service curve, and the formula is as follows:
[0033]
[0034] Among them, sup is the upper bound of the set, inf is the lower bound of the set, s is the horizontal coordinate of the curve, representing the difference between the arrival curve and the service curve calculated above; τ is the offset of the coordinates.
[0035] The advantages and beneficial effects of the present invention are:
[0036] This method models TAS by calculating the network's arrival curve and service curve, thereby obtaining the upper bound on the TAS network's latency. The smaller the latency, the better the data transmission capability of the time-aware shaper; conversely, the lower the latency. This method intuitively reflects network performance, helping users understand TSN network performance, assisting with network evaluation, and ensuring TSN network communication quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flow chart of model construction of the present invention.
[0038] Figure 2 It is a schematic diagram of the overlapping of AV stream and BE stream of the present invention.
[0039] Figure 3 Schematic diagram of the protection band of the present invention. DETAILED DESCRIPTION
[0040] The present invention will be further described below with reference to the accompanying drawings.
[0041] This patent applies to TSN switches. For general industrial scenarios, this patent only discusses modeling methods for the primary centralized data flow state. Regardless of the network's performance, the TSN switch, as the network's core, must aggregate data to TSN. The patent assumes that data has already been aggregated to TSN. In industrial automation networks, we primarily consider the following three types of services: CT traffic, representing periodic real-time traffic such as real-time control traffic; AV traffic, representing non-periodic real-time service flows such as audio and video; and BE traffic, representing non-periodic non-real-time traffic such as monitoring and configuration flows. In this patent, we use network calculus to model TAS.
[0042] The TAS model construction process based on network calculation is as follows: Figure 1 The specific steps are as follows:
[0043] 1. According to the characteristics of data flow, data flow is divided into planned data flow and unplanned data flow;
[0044] Among them, according to the data flow characteristics, the CT flow is configured as a time-triggered class and loaded into the scheduled queue; the AV and BE flows are configured as priority classes and loaded into the unscheduled queue.
[0045] 2. The arrival curve α(t) is a constraint on the data flow arrival process. It is used to represent the cumulative input flow arriving at this node up to time t. It is a typical data arrival curve.
[0046]
[0047] Where r represents the average flow rate over a long period of time, and b represents the maximum limit of node flow.
[0048] For data flows in different situations, the arrival curves are calculated as follows:
[0049] (1) According to data classification, the CT stream is allocated a separate transmission time slot. Therefore, the CT stream can utilize all network bandwidth during transmission. The arrival curve of the CT stream is obtained as follows:
[0050] α CT (t) = Ct
[0051] Where C is the physical link transmission rate.
[0052] (2) AV and BE streams are non-real-time streams and both belong to the T-SPEC type, so their arrival curves can be uniformly expressed as follows:
[0053] α AV,BE (t)=min(Ct,bAV,BE +r AV,BE t)
[0054] Among them, b AV,BE , the maximum burst bit number of AV or BE data stream; r AV,BE , the average bit rate of the AV or BE data stream.
[0055] At this point, a constraint model for input data has been established by calculating the arrival curve of the data flow.
[0056] 3. To address the possible overlap and conflict during data stream transmission, a guard band mechanism is added to limit bursts and protect adjacent transmission time slots of other streams.
[0057] We set a blank period, namely the guard band, before the deadline of the previous transmission time slot to limit the burst interference to the next transmission time slot.
[0058] The duration of the guard band is defined as follows:
[0059]
[0060] Among them, L CT,AV,BE The duration of the guard band corresponding to each data stream; It is the maximum length of the frames in CT, AV, and BE data.
[0061] 4. Calculate the service curves for different data, that is, model the data sending services that the system can provide.
[0062] (1) According to the network characteristics, CT flows have independent time slots, so the strict service curve of CT flows is only affected by the guard band and FIFO reading and writing order.
[0063] Assume that when the CT stream arrives, the AV or BE stream is already in transit. The guard band ensures that the unfinished frames of the AV or BE stream are sent before the CT stream starts transmitting, thus ensuring the integrity of the data stream. When the CT stream starts transmitting, the delay caused by the FIFO is
[0064] Therefore, the service curve provided by TAS for CT flow is expressed as follows:
[0065]
[0066] (2) AV streams and BE streams compete for the same time slots. Therefore, the AV data stream is taken as an example to calculate the service curve for this type of data.
[0067] The main factors causing AV stream delay include: AV stream guard band, FIFO reading and writing, overlap between AV stream and BE stream, and CT stream transmission slot interference. Among them, the interference of CT stream transmission slot is caused by the periodic transmission of CT data stream. If the AV stream just catches up with the CT stream transmission slot, the AV stream will be delayed by P CT Among them, P CT Indicates the period of the CT flow in TAS.
[0068] (3) The open periods of the AV and BE flow time slots may overlap, so the AV and BE flows will compete for network bandwidth.
[0069] It is generally believed that AV streams have higher priority and stricter real-time requirements than BE streams. The overlap between the time slots of AV streams and BE streams occurs in the following situations:
[0070] 1) If Figure 2 In (a), the BE data stream starts transmitting earlier than the AV stream, i.e. At the same time, the end time of BE stream is earlier than that of AV stream, that is, Without considering preemption, BE data stream transmission will not be interrupted. AV stream will be delayed by:
[0071]
[0072] in, is the maximum length of the BE frame;
[0073] 2) If Figure 2 In (b), contrary to the situation in 1), the AV stream starts and ends transmission earlier than the BE data stream, i.e. and At this time, the BE stream will be delayed, but the AV stream will not be delayed.
[0074]
[0075] 3) If Figure 2 In (c), if the transmission time of the BE data stream completely covers the transmission time of the AV, that is, and In this case, the AV stream will not be delayed and the BE stream will be lost directly.
[0076] 4) If Figure 2 (d) in the example is opposite to 3), the AV stream will be delayed.
[0077] Therefore, only The transmission of AV stream may be delayed only when . Considering the worst case of coexistence of multiple priority BE streams, the maximum delay of AV data stream is
[0078]
[0079] (4) Based on (2)-(4), we can derive the service curve provided by TAS for AV streams:
[0080]
[0081] The data delay caused by the FIFO mechanism, that is, the delay caused by the hardware data storage mechanism, has nothing to do with the data type and is only related to the length of the transmitted data stream.
[0082] When AV and BE streams conflict, the maximum delay of the AV stream is the time required to transmit one frame of BE data; for BE, it is also calculated in the same way.
[0083] Similarly, we can calculate the service curve for BE data:
[0084]
[0085] Among them, the maximum delay of BE data flow is
[0086] at this time At this point, by calculating the network's service curve, we have constructed an output model that the network can provide.
[0087] 5. When a data flow constrained by the arrival curve α(t) passes through a node with a service curve σ(t), the upper limit of the data flow delay D can be expressed as the maximum horizontal deviation between the arrival curve and the service curve. The calculation formula is as follows
[0088]
[0089] Among them, sup defines the upper bound of the set, inf defines the lower bound of the set, s is the horizontal coordinate of the curve, representing the difference between the arrival curve and the service curve calculated above; τ is the offset of the coordinates.
[0090] D represents the upper limit of latency for the "Time-Aware Shaper" in a TSN network when processing different types of data. A larger D value indicates a greater latency for the system when processing that type of data; conversely, it indicates the system's ability to quickly deliver that type of data. A smaller D value indicates a stronger and better data transmission capability for the Time-Aware Shaper; a smaller D value indicates a worse data transmission capability. Using the method described in this patent, calculating the maximum latency provides a visual representation of network performance. The arrival curve in the patent represents the shaper's ability to receive and process data, while the service curve represents the shaper's forwarding method.
[0091] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should be regarded as within the scope of protection of the present invention.
Claims
1. A TSN network time-aware shaper modeling method based on network calculus, characterized in that: A central node server is set up in multiple network nodes of a network communication environment, and the following steps are performed on the central node to obtain the upper limit of the delay of the TAS network, including: Step 1: Divide the data streams to be received according to data stream characteristics; calculate the arrival curve of each data stream to be received, which is used to model the accumulation of input traffic arriving at the central node; the calculation of the arrival curve of the data stream includes: 1) Calculate the arrival curve α of the CT flow CT (t) = Ct, where C is the physical link transmission rate; 2) Calculate the arrival curves of AV and BE flows: α AV (t)=min(Ct,b AV +r AV t);α BE (t)=min(Ct,b BE +r BE t) Among them, b AV 、b BE Respectively represents the maximum burst bit number of AV stream and BE stream; r AV 、r BE Represent the average bit rates of AV stream and BE stream respectively; Step 2: To address possible overlaps and conflicts in data stream transmission, a guard band delay is added to limit bursts and protect adjacent transmission time slots of other streams. Service curves for different data streams are calculated to model the data transmission service that the central node server can provide. The guard band delay includes: A blank period is set before the end time of the previous transmission time slot as a guard band to limit the burst interference to the next transmission time slot; the duration of the guard band corresponding to each data stream is: Among them, L CT 、L AV 、L BE Respectively represent the duration of the guard band of CT, AV, and BE data streams; Respectively represent the maximum length of the frame in the CT, AV, and BE data streams; Calculating the service curves of different data flows includes: 1) Since the CT stream has an independent time slot, the service curve of the CT stream is only affected by the guard band and the FIFO read and write order. The service curve provided by the CT stream is: 2) Considering the guard band of the AV stream, FIFO reading and writing, the overlap between the AV stream and the BE stream, and the transmission slot interference of the CT stream: i. The service curve provided by the AV stream is: Among them, the maximum delay of AV data stream is at this time ii. The service curve provided by TAS for BE flow is: The maximum delay of the BE data flow is: Step 3: Calculate the upper bound D of the delay of the data flow constrained by the arrival curve α(t) when it passes through the node with the service curve σ(t); including: It is expressed by the maximum horizontal deviation between the arrival curve and the service curve, and the formula is as follows: Among them, sup is the upper bound of the set, inf is the lower bound of the set, s is the horizontal coordinate of the curve, representing the difference between the arrival curve and the service curve calculated above; τ is the offset of the coordinates.
2. A TSN network time-aware shaper modeling method based on network calculus according to claim 1, characterized in that: The data flow characteristics include: CT flow, AV flow, BE flow; The division of the data streams to be processed includes: configuring the CT stream as a time-departure class and loading it into a scheduled queue; configuring the AV and BE streams as priority classes and loading them into an unscheduled queue.
Citation Information
Patent Citations
High-reliability clock synchronization system and method for time sensitive network
CN111585683A
Route scheduling method and device for time-sensitive flow, electronic equipment and medium
CN113032938A