# Development of Traffic Scheduling Based on TSN in Smart Substation Devices
## 2 Smart Substation Delay Analysis and TSN Technology Analysis
### TSN QBV Technical Analysis  
Among the traffic-shaping technologies employed by TSN, only Qbv technology can achieve fine-grained scheduling for each time-sensitive flow. However, its traffic scheduling is particularly complicated, especially during peak traffic. In 2016, the TSN working group released the IEEE 802.1 Qbv standard, which introduced the time-aware shaper (TAS) as a means to schedule time-sensitive and non-time-sensitive flows. The fundamental concept of TAS is the time-aware gating mechanism, shown in Figure 2. Within this mechanism, TAS sets up a transmission gate at the egress of each sending queue. Different types of flows are then mapped onto the corresponding sending queues according to the VLAN priority of the Ethernet frames. The switching state of the gate determines whether the packets in the transmit queue are used for transmission or not. If the gate state is set to \"on\", the packets can be transmitted, whereas if the gate state is set to \"off\", the packets are still cached in the queue. The switching state of the transmission gate is controlled by a time-based Gate Control List (GCL), which consists of multiple time slot table entries. The duration of all the time slots combines to form a cycle, and the GCL operates cyclically within this cycle to set the switching state of all the transmission gates within each time slot window. Therefore, by programing all the time slots, all time-sensitive flows can leave the switch sequentially at their scheduled time without being blocked by unscheduled traffic. This implies that the latency of time-sensitive packets passing through the switch at each hop is deterministic. The TAS provides a \"proprietary fast channel\" for the time-sensitive traffic and ensures a deterministic transmission delay. Because the scheduling mechanism of TAS is time-triggered, it is imperative to establish clock synchronization among all bridges from the sender to the \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Message** & **Signal Source** & **Low Real-Time Latency Requirement** & **High Real-Time Latency Requirement** \\ \hline fast:trip & trip signal & 10 ms & 3 ms \\ fast:tether & other signal & 100 ms & 20 ms \\ medium speed & measured signal & 100 ms & 100 ms \\ low speed & parametric signal & 500 ms & 500 ms \\ Sampled value & transformer transmission & 10 ms & 3 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Message transmission delay requirements. Figure 2: TAS gating mechanism. receiver for the scheduling mechanism to function properly, and IEEE 802.1 AS is responsible for offering a shared global clock across all devices within a specific time domain. Nevertheless, in order to establish a TSN network that encompasses complete domain connectivity and fully exploits the performance of TSN, it is crucial for the end-side device of TSN to be configured in conjunction with the TSN switch. The end-side device of TSN needs to possess the time-aware capability to send messages at precise hardware times. Taking into account the immense size of the grid and the considerable traffic it handles, the GCL gating table configured in each TSN switch will contain a substantial number of table entries, probably exceeding 2000 entries. Furthermore, the scheduling granularity is exceptionally fine, resulting in very short time slots corresponding to time-sensitive streams. If the end-side device of TSN fails to precisely control the timing of the message reaching the first-hop TSN switch and the message misses the corresponding time slot, the message will remain in the first-hop switch for an additional period, potentially up to one GCL cycle. This, in turn, will result in increasing delay and jitter throughout the end-to-end transmission. Smart substations need to transmit data not only horizontally across various layers, but also vertically between layers. This is especially essential for devices situated in the interval layer, which consists of a smart electronic device IED.