{'fraction_non_alphanumeric': 0.024611449168636876, 'fraction_numerical': 0.00852680128677183, 'mean_word_length': 4.8415213946117275, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Time-Sensitive Networking for robotics

We argue that Time-Sensitive Networking (TSN) will become the de facto standard for real-time communications in robotics. We present a review and classification of the different communication standards which are relevant for the field and introduce the typical problems with traditional switched Ethernet networks. We discuss some of the TSN features relevant for deterministic communications and evaluate experimentally one of the shaping mechanisms in an exemplary robotic scenario. In particular, and based on our results, we claim that many of the existing real-time industrial solutions will slowly be replaced by TSN. And that this will lead towards a unified landscape of physically interoperable robot and robot components.

the integration time and costs.
Time-Sensitive Networking (TSN) is a set of standards defined by the Time-Sensitive Networking task group of the IEEE 802.1 working group designed to make Ethernet more deterministic. The TSN sub-standards were created to meet different communication requirements in the industry: automation, automotive, audio, video, etc. Most of the existing real-time Ethernet solutions were created for low data volume applications such as distributed motion control. These solutions are usually very limited in bandwidth and cannot reach the Ethernet bandwidth capabilities. With the growing integration in robotics of Artificial Intelligence (AI), computer vision or predictive maintenance to name a few, there is an increasing need of sensors and actuators streaming high bandwidth data in real-time. The information provided by these sensors is often integrated in the control system or needs to be monitored in realtime. The common solution is to use a specific bus for real-time control and a separate one for higher bandwidth communications. As more and more high bandwidth traffic is generated, the control process of having two separated communications is inefficient. Figure 1 shows the diversity of several robot components and their different networking requirements. Motors usually require simple data as parameters, such as set-points like position, velocity, torque; a camera system streams instead a considerably larger amount of data, which can go up to few megabytes per second. Adding real-time capabilities to Ethernet, TSN provides a common communication channel for high bandwidth traffic and real-time control traffic. TSN will also improve the access to the robot components which is especially interesting for predictive maintenance, re-configurability or adaptability [3]. Isolated real-time communications buses difficult the communication with with sensors and actuators inside the robot. In predictive maintenance the components need to be monitorized in real-time to detect possible faults or simply to know the condition of the components. A direct communication with the monitoring systems would enhance the integration of the robot components in monitoring systems.
In this work we aim to explore and characterize the use of Ethernet and particularly, TSN, in robotics. Section II will introduce an overview of the industrial communications available in the context of robotics and the corresponding related work. Section III will present an analysis of TSN standards and the Ethernet timing model. Section IV will discuss the experimental results obtained while evaluating the presented hypotheses. Section V presents our conclusions and future work.

A. A historical overview of industrial communications
In order to understand the great diversity of communications protocols used in robotics it is necessary to explain the history of industrial communication protocols. In fact, many robots in the manufacturing industry nowadays are based on Programmable Logic Controller (PLC) technology or they interface with PLCs.
A.1. Serial-based field-busses: Historically, field-busses substituted direct point to point digital and analog connections. They reduced the number of wires and provided a better communication platform to communicate PLCs with sensors, actuators and other low-level devices. The first industrial communications were serial-based fieldbus protocols such as DeviceNet [4], Modbus [5], PROFIBUS [6] and CC-Link [7]. These protocols are still very popular today, because they are simple, robust and fast enough for real-time communications. They typically use protocols such as Controller Area Network (CAN) or RS-485 as their physical and data link layers. However, as industry applications became increasingly complex, there was an growing demand for higher speed, higher bandwidth, connection distances and a higher number of connection nodes. Serial-based protocols could not meet these requirements and the industry saw Ethernet as a good candidate to substitute serial-based field-busses for certain applications.
A.2. Ethernet-based field-busses gain popularity: In the 90's Ethernet was widely used in industry, but just for high level applications. It was not possible to use the commercial off-the-shelf Ethernet for time-critical applications such as distributed motor control. The problem was the intrinsic lack of determinism of the TCP/IP layer and the non-deterministic CSMA/CD algorithm to deal with packet collisions. The consequence of this was that different manufacturers developed different solutions for the same problem. For applications with low real-time requirements, high level protocols were developed on top of the standard TCP/IP and UDP/IP layers (Ethernet/IP[8] or PROFINET [9]). For applications with higher real-time requirements, the TCP/IP or UDP/IP layers were substituted by a custom stack, to achieve higher determinism (POWERLINK [10], PROFINET RT). For high critical applications where hard-real time was required, for example field devices such as sensors and actuators, some manufacturers developed vendor specific protocols based on a modified Ethernet technology (EtherCAT [11], SERCOS III [12], PROFINET IRT). A survey by Felser [13] in 2005 presented a further classification of real-time Ethernet solutions based on the layer where modifications are introduced. This classification is illustrated in Figure 2. Each protocol has been specialized in certain tasks and their use depends highly on the application. Because of this specialization, one protocol is not capable to meet all the requirements of a complex application, and at the end, more than one protocol are usually combined. Communications scene is a complex collection of technologies which lead to a high number of interoperability problems and an increase of the integration efforts. Despite of some standardization efforts by the the International Electrotechnical Commission (IEC), these problems were not solved and remain today. As stated in [13], the International Electrotechnical Commission (IEC) failed to define one standard Real Time Ethernet (RTE) solution. Consequently, the set of standards finally defined more than a dozen of technical different solutions.
In robotics, the lack of a real standard protocol burdens the component integration or robot to robot communications. For example, end-effector manufacturers need to integrate different communication protocols in their products, depending on the protocols that a robot manufacturer supports. The list of industrial protocols used by the robot manufacturers is considerable. In many cases, and depending on the manufacturer, some industrial protocols are supported while some others not (see table I).
A.3. Bringing real-time determinism on standard Ethernet: As a result of an increasing need of real-time capabilities in standard Ethernet, the TSN task group was created. Previously named as Audio/Video Bridging Task Group, its main goal was to achieve time-synchronized low latency streaming services through IEEE 802 networks. Later, because of the interest of industry, the goal was extended to define mechanisms for the time-sensitive transmission of data over Ethernet networks. One of the main goals of TSN was to provide a unified layer 2 for real-time communications, so different vendors are compatible among them and allowing at the same time the convergence of traffic and real-time communications.
An important advantage of communications based on standard Ethernet is that these protocols will be automatically benefited by all the features and improvements that the standard provides. For example, it is possible to use higher link capacities such as 10 Gbps or higher as the technology improves. It also becomes easier to integrate communication frameworks and common tools, simply because most of the software has been developed on top of TCP and UDP protocols. In our experience, it can be challenging and time consuming to integrate robotics frameworks with field-busses such as CAN or EtherCAT. Another important advantage of standard Ethernet based communications is related to costs, because of the high number of vendors that offer Ethernet based devices, the technology cost is lower compared to vendor specific solutions.
A.4. Network protocols for robotics: We claim that TSN-based protocols are going to replace existing legacy protocols. However, in the short term, existing protocols will coexist and slowly converge towards TSN, which will provide better interoperability characteristics. Some of the existing industrial protocols based on Ethernet will be benefited by TSN. For example, Profinet and Ethernet/IP. But also, TSN will open the doors for other protocols and frameworks which were not originally destined for hard realtime communications, such as OPC Unified Architecture (OPC-UA) [14] and Data Distribute Service (DDS) [15]. The Internet Industrial Consortium (IIC) selected these frameworks as two out of four connectivity frameworks standards. As stated in 'The Industrial Internet of Things Volume G5: Connectivity Framework' [16], field-busses implement parts of the connectivity transport and framework functions, but none of them do satisfy all of the connectivity core standard criteria. Both OPC UA and DDS vendors are currently working to improve the performance and real-time capabilities by integrating TSN in their frameworks.
OPC UA and DDS are increasingly used in robotics. Their appliance depends highly on the industrial area. OPC UA has been selected as the backbone of Industry 4.0 and seems to be gaining traction in the industrial manufacturing robotics market. On the other hand, DDS is widely used in military and professional robotic industries (healthcare, warehouse automation, aerospace, etc.) More recently, DDS is also being applied in the automotive and consumer robotics markets. Besides the traditional manufacturing industry, our team observes that DDS is gaining presence in the overall robotics landscape. Related to this, DDS has been selected as the official communication middleware for the Robot Operating System 2 (ROS 2) [17], [18] framework, the de facto standard for robot application development. In the coming years, we can expect that both OPC UA and DDS will extend their usage in robotics helping roboticists achieve more hard real-time robotic applications thanks to TSN. In addition, we foresee a wider integration of these frameworks (or extensions of them) in resource constrained robotic components.

III. TIME SENSITIVE NETWORKING
A. Overview of the standards TSN is composed by a set of standards that aim to make Ethernet more deterministic. Several of these standards treat the problem of how to achieve bounded latencies. As we explained in a previous section (A), standard Ethernet did not meet the deterministic capabilities for real-time applications. In the past, Ethernet endpoints used to be half-duplex and used hubs for the connection. One of the first problems Ethernet faced was the collision domain problem. Data packets could collide with one another while being sent. To deal with this, an arbitration algorithm called Carrier Sense Multiple Access with Collision Detection (CSMA/CD) was used. With the introduction of full duplex Ethernet switches, the network communications were isolated in different domains, so they do not contend for the same wire. One of the major issues was solved, but the main source causing a lack of determinism got moved to congestion problems inside the switch queues.
The main source of indeterminacy in nowadays switches is due to traffic contention to access the media access control (MAC) level. To limit and control the congestion problems at the queues, the IEEE introduced quality of service (QoS) mechanisms, such as traffic prioritization.
Packet prioritization was introduced by the IEEE 802.1P task group in the 90's. This QoS technique, also known as class of service (CoS) consist in a 3-bit field called the Priority Code Point (PCP) within an Ethernet frame header when using VLAN tagged frames. This field allows to specify a priority value between 0 and 7 that can be used to prioritize traffic at the MAC layer.
The Ethernet switch may have one or more transmission queues for each bridge port. Each queue provides storage for frames that await to be transmitted. The frames will be assigned to each queue according their CoS. The switching transmission algorithm will then select the next packet of the queue with the highest priority. Frames stored with lower priority will be transmitted only if higher order queues are empty during the selection process.
Despite packet prioritization being an effective technique to decrease the traffic interference, it is still not enough to guarantee a deterministic latency. One of the problems is that lower priority traffic still interferes the higher priority traffic. That is, high priority frames will need to wait until lower priority ones finish their transmission. The delay will depend on the size of the packet being transmitted and on the number of switches along the frame path. In applications with low latency requirements and a high number of hops, the problem becomes very significant. Additionally, as Ethernet is asynchronous, the high priority frames sharing the same link can contend between them. To solve this problem, the 802.1 TSN task group developed time aware traffic scheduling, defined in 802.1Qbv [19].  Precision Time Protocol (PTP), which synchronizes the clocks by exchanging Ethernet frames with synchronization information. The IEEE 802.1 TSN task group is working on a revision of IEEE 802.1AS [20], a profile of IEEE 1588 for audio/video systems. The new revision will add some characteristics needed in other fields, such as industrial control. One of the main requirements of IEEE 802.1AS capable devices in the TSN network is a sub-microsecond synchronization among them.
Another standard developed for deterministic communications is the IEEE 802.1Qbu [21] which provides a frame preemption mechanism. This standard allows a high priority frame to interrupt a low priority frame in transmission. In order to decide if the frame can be preempted, the preemption mechanism needs a minimum necessary fragment of the frame. This fragment can be, in the worst case, 124 bytes. This means that using preemption solely does not guarantee an end-to-end deterministic latency. According to the standard, 802.1Qbu can be used in isolation to reduce latency and jitter or in combination with scheduling. When used with scheduling, it minimizes the protected window or guard band so the available bandwidth for preemptable traffic is optimized. Bandwidth optimization seems to be the main purpose of 802.1Qbu, which can be relevant for 100 Mbps.

B. Switched Ethernet timing model
In this section we analyze the delays involved in a switched Ethernet network. We will define an analytical model to determine the end-to-end latency in a linear topology compounded by bridged-endpoints in cut-trough mode. This model will help us to understand better the nondeterminism sources of the end-to-end latency, and we will use it to analyze the results of the experiments in section IV.
The proposed model for the end-to-end latency is based on the delays defined in [22] and [23]. First, we define some of the terms used to generalize an equation for the timing model:  The propagation delay depends on the distance d between two switches and the propagation speed of the link s. The transmission delay depends on the packet length L and the link capacity C.
In cut-trough the switch delay does not depend on the packet length and can be expressed as shows equation 2.
The end-to-end delay from the source endpoint A to the destination endpoint B can be expressed as the sum of the delays of all the switches and links in the path, being n the number of links and n − 1 the number of switches along the path.
The key idea is that all the terms of equation 3 are deterministic except the queuing delay, which depends on the switch queue occupancy when the frame arrives at time t. This delay is the main problem to bound the latency in switched Ethernet. There are different ways to bound this delay, for example QoS techniques such as Weighted Fair Queueing (QFQ) or Strict priority [24], but there is still certain delay and jitter which limits the real-time performance. Using a TSN time aware shaper and a appropriate schedule, this delay can be completely eliminated. Once this delay disappears, the end-to-end latency becomes deterministic and, combined with cuttrough, it is possible to achieve a very low latency.
In the context of robotics, for a simple robot manipulator, the worst case end-to-end latency from the actuators to the robot control will determine the minimum achievable control cycle time and the maximum number of actuators allowed for a fixed cycle time. This is why reducing the queuing delay is critical to achieve low cycle times.
The cycle time is an important metric to measure the performance of the communication protocol. It can be defined as the time necessary to exchange the input and output data between the controller and all the sensors and actuators. The TAS provides real-time performance, which makes Ethernet with TSN comparable in terms of real-time performance with other real-time communication protocols. Jasperneite et al. [25] introduced an analytic method to estimate input and output cycle times for Ethernet technologies. They used this method to compare EtherCAT with Profinet IRT.
Bernier [26] extended the method to Modbus/TCP solution and Ethernet/IP. In his work, he defines the cycle time as the time necessary to exchange the input and output data between the controller and all the sensors and actuators. Bruckner et al. [27] used this method to compare the most common communication technologies performance with the OPC UA over TSN. The conclusions drawn by this last work shows how a TSN based technology using 1 Gbit Ethernet and a frame aggregation approach can outperform other hard real-time industrial protocols. In the following section, we will challenge these results experimentally in the context of robotics.

IV. EXPERIMENTAL RESULTS
For the experimental setup, we have selected a typical robotic use case with mixed-critical traffic. In particular, we have chosen a modular robotic arm with a high bandwidth sensor attached at the end ( Figure 5). Such robot arm is an interesting use case for TSN because it gathers traffic with different characteristics. The actuators require hard real-time low latency traffic while sensors, such as high resolution camera or a laser scanner, generate high volume data. The proposed setup contains two actuators, A1 and A2, a sensor S and a robot controller RC.
For the experiment we will use two TSN capable bridged endpoints and two PCs, each one with an Intel i210 card ( figure 6). The TSN bridged endpoints simulate the actuators and the PCs the sensor S and the robot controller RC. The sensor S is connected to the last actuator and will send a high bandwidth to the robot controller. As the sensor is connected in a chain topology, the sensor traffic goes through each of the actuators switches. This traffic will contend with the time sensitive traffic from the actuators switch queues, which will produce a queuing delay.  We call F A1 to the traffic flow from A1 to RC, F A2 to the traffic flow from A2 to RC and F S to the traffic flow from S to RC, as shown in figure 7. The measurements are performed in RC using the hardware time-stamps capabilities of the i210 network card. For the transmission time, we take advantage of the TSN capabilities of the bridged endpoints. We set the transmission times t T X1 and t T X2 of the TSN bridged endpoints by configuring the TAS of each endpoint. For an actuator i = 1, 2, we calculate the delay d i from A i to RC by a simple subtraction.
As shown in figure 7, the hardware time-stamp of RC measures the arrival time of the Start of Frame Delimiter (SFD). This means that the frame transmission delay is not included in our measurements. As the switches are configured in cut-trough, the transmission delay is neither included in the switch delay and hence the measured delay does not depend on the frame length. From 7 we can relate the measurements with the delays expressed in equation 3.
Notice that in this particular case the sources are switched endpoints. The delays from the endpoint trough the switch d SEi are not the same of the switch delay d Si because it does not include the input port delay. Expressing the measured delay in terms of the switch delay, we arrive to the expressions 5 and 6 for d 1 and d 2 respectively.
To generate the F A1 and F A2 traffic, we have used UDP/IP with 256 Bytes payload at a 1 ms rate. For F S , we used the iperf tool to generate a network load using a 1500 Byte payload with a traffic bandwidth of 900 Mbps for 1 Gbps link capacity and 90 Mbps for 100 Mbps link capacity. For the calculations, we measured 10000 samples during over a 10 seconds period.

Experiment 1. Same priority blocking:
In this experiment, we measure the blocking effect of same priority traffic. All the traffic flows are sent trough lowest priority queue, which is the best-effort queue (BE). F A1 and F A2 will contend with F S in the port 1 BE queue of the A1 and A2 switches. The blocking delay depends on the implemented transmission selection mechanism of the switch. The switches used for this setup use a FIFO occupancy credit based arbitration, from now on referred as CBF. CBF prioritizes the traffic coming from a higher occupancy ingress port queue. This makes the blocking effect highly dependent on the sending rates of the contending sources of traffic.
The results (Figure 8a) show worst case delays in the order of milliseconds, which clearly shows that the latency is unbounded. Increasing F S bandwidth or decreasing F A1 sending rates, we get higher delays and even packet loss. Note that the purpose of this experiment is not to analyze the queuing delay of the CBF but only to illustrate the non-determinism of this arbitration policy due to the same priority blocking.

Experiment 2. Lower priority blocking:
In this experiment, we measure the blocking effect of lower priority traffic using a strict priority transmission. F A1 and F A2 are sent trough the highest priority queue of the switches, which is the scheduled traffic queue (ST). Previous work [28] analyzed the effect of lower priority blocking. The worst case delay added by each switch is given by the frame transmission time for the maximum frame size allowed by the switch (MTU). For a 1500 Byte MTU and a 100 Mbps link capacity, the worst case added delay would be 120 µs, for 1 Gbps 12 µs.
The experimental results are presented in Tables II and III  As F A1 and F A2 are sent asynchronously, F A1 and F A2 can contend between them. Therefore, in this scenario, apart from the lower priority blocking, the worst case must take into account the same priority blocking of F A1 and F A2 .
Experiment 3. Using a TSN Time-Aware Shaper: In this experiment we configure the TAS of A 1 and A 2 switches egress ports. As all the TAS are synchronized with submicrosecond accuracy, the scheduled traffic is perfectly isolated from lower priority traffic and from the same priority traffic. As shown in Figure 8d, the end-to-end latency is highly deterministic, the results with and without lower priority traffic are in the same order and sub-microsecond jitter is achieved.

V. CONCLUSION
In this work we have presented an experimental setup to show the suitability of TSN for real-time robotic applications. We have compared the delays experienced by the queuing delay in Ethernet switches for standard Ethernet, against the delays when using a TSN Time-Aware shaper. The results showed the indeterminacy of Ethernet and how these problems can limit the scalability and performance in real-time robotic applications such as the exemplary modular robot. When the TSN Time-Aware shaper was used, the results showed that the time sensitive traffic was perfectly isolated from lower priority traffic, maintaining low latency and jitter even in the presence of high bandwidth background traffic. These results suggest that it is possible to develop hard real-time motion control systems mixed with high bandwidth sensors, such as lidars and high resolution cameras.
Based on the presented results, we claim that Ethernet with TSN standards will become the de facto standard for communications on layers 1 and 2, in robotics. We argue that, within robotics, many of the existing real-time industrial solutions will slowly be replaced by TSN. For higher layers, we foresee a contending landscape where the integration of TSN in different middleware solutions focused on interoperability such as OPC-UA and DDS promise to deliver a bottom-up real-time communication solution.