## 4 TSN for Industrial Communications
### TSN over Wireless
#### 4.1.1 TSN over WiFi  
WiFi is currently the most widely used wireless technology in the industrial domain, and the latest WiFi generations, IEEE 802.11 ax/IEEE 802.11 be, have several features that enable the integration of TSN mechanisms. Precise time synchronization among all the network elements is crucial in TSN. Time synchronization in 802.11 is achieved through the Fine Timing Measurement (FTM) protocol, an improvised version of the Timing Measurement (TM) protocol. In FTM, a station computes and adjusts its synchronization error and frequency drift with respect to its AP via repeated exchange of time-stamped FTM frames and their acknowledgments (ACKs). Previous research shows that hardware-based timestamp can achieve precise time synchronization (10-40 ns) compared to software-based time synchronization techniques (1 \(\upmu\)s) [58]. According to IEC/IEEE 60802 (the TSN profile for industrial automation), the maximum tolerable synchronization error is 0.1-1 \(\upmu\)s for factory automation networks (from the grandmaster). HW-based timestamp approaches using System-On-Chip solutions (e.g., FPGAs) are currently favored, as SW timestamping on current COTS wireless cards/modems cannot achieve the required time synchronization accuracy [63]. IEEE 802.1 AS-2020 specifies the use of FTM for TSN integration over 802.11. It is essential to note that FTM message exchanges should not affect TSN traffic flows or vice versa. In a hybrid TSN network, wireless TSN can be at the edge of the network (acting as the last mile) or act as a bridge between two wired TSN networks. Hence, it is essential to ensure smooth integration/translation of time synchronization across wired and wireless domains. _Traffic classification, shaping, and scheduling_ mechanisms are vital in extending TSN capabilities to the wireless domain. Industrial WiFi networks must manage hard real-time, soft real-time, and best-effort traffic through proper traffic classification methods. IEEE 802.11 (2016) [64] supports traffic classification using VLAN tags, employing traffic specification (TSPEC) and traffic classification elements (TCLAS), using the \"traffic ID (TID)\" field present in the IEEE 802.11 header. This is in accordance with the TSN traffic classifications specified in the IEEE 802.1Q standard and helps ensure seamless integration between wired and wireless networks. To support real-time traffic, efficient medium access control (MAC) is critical in 802.11, rather than relying on the default contention-based MAC approaches. Several enhancements in IEEE 802.11 ax and IEEE 802.11 be support time-critical traffic flows. The \"Trigger Frame\" (TF)-based medium access scheme seems promising compared to other MAC mechanisms such as EDCA, HCCA, TWT, etc. [58]. In addition, OFDMA and MU-MIMO capabilities help reduce contention and achieve low latency by enabling simultaneous transmissions to/from multiple users. Thus, the access point can deterministically schedule communications with the 802.11 devices in the network. As discussed earlier, a time-aware schedule (IEEE 802.1 Qbv) defines the coordinated opening/closing of gates to prevent best-effort traffic from interfering with time-sensitive frames. Time-aware traffic scheduling (IEEE 802.1 Qbv) can be achieved by reserving resources on top of efficient 802.11 MAC operation (e.g., TF-based access, EDCA). The multi-link operation capability in WiFi 7 (discussed in Section 3) can help end devices establish multiple links (thus, multiple channel access opportunities) with the access point (AP). The newer 6 GHz band will likely be preferred for time-critical traffic flows, while the congested 2.4/5 GHz band can handle other traffic. Using the Stream Classification Service, an AP can allocate resources to the stations with time-critical flows within the BSS, thus mapping TSN traffic scheduling requirements (from 802.1 Qbv) onto 802.11 be MAC.