TechnologySeptember 10, 2018
EtherCAT & TSN: best practices for Industrial Ethernet networks
Integrating EtherCAT segments into a Time Sensitive Networking (TSN) network can combine the benefits of both technologies without requiring any changes to the EtherCAT slaves. The adaptation requires an upgrade at the master side and a moderate extension in terms of the switches that connect EtherCAT segments.
EtherCAT is a powerful solution in the area of fieldbus technology, while the IEEE 802.1Q standard combined with Ethernet is the preferred office network. The emerging Time Sensitive Networking (TSN) standards provide real-time capabilities in the IEEE 802 networks. Using EtherCAT at the machine level and interconnecting machines with switches creates a state-of-the-art industrial Ethernet network architecture.
However, some complex machines will still require an enhanced communication infrastructure inside. Integrating EtherCAT segments into a TSN network can combine the benefits of both technologies without requiring any changes to the EtherCAT slaves. The adaptation simply requires an upgrade at the master side and a moderate extension in terms of the switches that connect EtherCAT segments.
Objectives
Time Sensitive Networking (TSN) has been a well-known acronym in engineering circles since the task group was founded. The charter of the TSN task group is to provide deterministic services through IEEE 802 networks. TSN is a technology that can be used in a variety of applications, from industrial facilities to office buildings. The initial TSN design was meant for use in audio/video (A/V) streaming of larger amounts of data in a system with numerous end stations. TSN extended the IEEE 802 best effort networking model through the introduction of a new streaming concept. This concept supports a set of features that improve the real-time capability of streams.
Understanding TSN
The TSN task group is part of the IEEE 802.1 working group, which is responsible for bridged networks. Bridging is the term used in standards activities, but the more popular term is switching. TSN improves the latency of frame transmission for a part of the traffic in IEEE 802 networks without losses due to congestion.
This implies changes in the switching world. However, it does not change the basic shortcomings of Ethernet networks, such as their lack of efficiency with small data amounts per end node as well as their flexible, yet time-consuming and complex forwarding procedures.
The communication between end stations via bridges in TSN is done by “streams”. The IEEE 802.1 standards use the term “talker” for the sender of a stream, and “listener” for the receiver of a stream. A stream is a unidirectional flow of data from a talker to one or more listeners. A stream requires stream identification in order to function in an IEEE 802.1 network. The destination MAC address and the VLAN-identification of an Ethernet frame can be used for that purpose.
TSN Standards
The TSN task group has initiated several standardization projects that are relevant for enhanced industrial Ethernet solutions. These projects include:
Improved synchronization behavior (IEEE 802.1AS-REV): The previous version of IEEE 802.1AS had already specified a synchronization protocol for the timing of distributed clocks, based on the IEEE 1588 standard. It promoted integration into a standard Ethernet environment, but eventually lost compatibility with other 1588 Ethernet profiles. The new version will incorporate the accepted features of one-step transparent clocks. The main area for improvement right now is the response to errors. The new version can deal with different time domains in end stations.
Frame preemption (IEEE 802.1Qbu): A major problem for deterministic transfer of time-critical messages is legacy traffic on the same network segment, where an individual frame can be more than 1500 bytes long. A frame interruption mechanism reduces the delay caused by long frames (specified within the IEEE working groups in Ethernet project P802.3br).
Ultimately, this mechanism will require not only new network components, but also a new Ethernet MAC or Network Interface Controller (NIC) in end stations, as Ethernet changes are required for preemption support.
Enhancements for scheduled traffic (IEEE 802.1Qbv and IEEE 802.1Qch): The time control of send operations plays a key role in TSN. Just like in physical roadways, there may be traffic jams on information highways, and even with high-priority, real-time data and preemption, there may still be some variation in transmission times. Since the time-sensitive streams are transmitted cyclically, largely undisturbed communication can be accomplished by blocking less time-critical data just before cyclic communication starts. Cyclic Scheduling (IEEE 802.1Qch) forwards time-critical messages only to the immediate neighbor device during each cycle. This is advantageous if the cascading depth is low. It also requires no configuration during implementation.
Seamless redundancy (IEEE 802.1CB): Although international standards already provide specified protocols for seamless redundancy, such as High-Availability Seamless Redundancy (HSR) or Parallel Redundancy Protocol (PRP), they still require complete data exchange between stations to be designed for redundancy. The seamless redundancy in IEEE 802 networks applies only to individual critical data streams. This makes it possible to reduce administration overhead.
Stream reservation enhancements (IEEE 802.1Qcc): A stream reservation protocol was defined in IEEE 802.1 (MSRP) but with limitations in regards of scheduled traffic. IEEE 802.1Qcc was planned to be an extension of the existing reservation protocol. It has become clear, though, that it will not be feasible to meet all the extended requirements of TSN by merely expanding the existing reservation protocol. Different approaches are proposed in the draft standard to achieve a certain level of performance. This ranges from a distributed model, which does not provide optimized performance in all cases but allows a more flexible system, to a centralized configuration of the streams which may restrict changes of the stream configuration at runtime for a more optimized system and results in significantly higher configuration effort.
Per stream filtering and policing (IEEE 802.1Qci): An additional aspect that experts have discussed is how to limit the effects of nodes that behave incorrectly. To this end, the incoming side (ingress) of the nodes must monitor the link traffic on a per stream basis. If the bandwidth consumed exceeds a threshold, specific actions will be taken to delay or drop frames, for example.
TSN profile for industrial automation (Joint WG IEC/IEEE 60802): This industrial automation profile selects features, options, configurations, defaults, protocols and procedures for bridges, end stations and LANs to build industrial automation networks.
EtherCAT with IEEE 802 Networks
It is not appropriate to compare TSN with an optimized Ethernet fieldbus, such as EtherCAT, because TSN is an add-on to the best effort principle of the switching technology. TSN makes it possible to combine IT traffic and process data exchange with medium performance requirements. However, higher bandwidth demands and scalability of control systems may be reasons to use TSN as backbone technology in complex machines, in combination with EtherCAT segments.
The structure and performance of EtherCAT and TSN at the I/O level is quite different from a typical switched environment. The main characteristics of the I/O level are the low amount of real-time data per device, the daisy chain connection of the devices and the master-slave communication dynamic, which features a single master control unit and multiple low-cost field devices as slaves. Adding a network infrastructure between a master and a slave segment transforms a physically separated network into a logically separated network. This enables a higher level of flexibility but maintains a guaranteed latency as well as a predictable frame loss rate.
How it works
The EtherCAT-TSN integration approach does not mix both technologies, but defines a seamless adaptation to use both technologies and capitalize on their respective advantages. EtherCAT uses the stream concept of TSN with a one-to-one relationship between talker and listener. At least two streams are established between a master and an EtherCAT segment to exchange process data and other important information—from the master to the slave segment and vice-versa.
Another pair of streams may be used for control purposes in EtherCAT slaves to transfer service data. This kind of communication may have different traffic characteristics and can be put in a lower priority class. Further communication requirements, such as collecting data for condition monitoring, may use another pair of streams.
The EtherCAT-TSN profile describes how to use TSN streams to transmit complete EtherCAT frames within a bridged network. The configuration of the bridges and other bridge-related service functions can be used as specified in the TSN context. Having a virtual EtherCAT channel in the master requires a dedicated identifier of the related EtherCAT slave segment, the send interval and offset and the amount of data. These are the parameters defined for send streams at the master side. The maximum delay in the slave segment completes the schedule.
Concerning the system architecture, the identification of EtherCAT segments is unique within a logically isolated part of the IEEE 802.1 network, which can be a machine or a group of machines. An EtherCAT device within or next to a segment can be used to set up the 12-bit value for identification. Identification can occur at the switch port that connects to the EtherCAT segment. It is recommended to use VLAN identification as the segment identifier in the IEEE 802 context.
The stream adaptation uses the identification to set up the unique stream destination addresses needed for TSN. This addressing is deduced from the identification of the segment and the stream selector, combined with the EtherCAT-specific identifier.
The mapping principle is straightforward: The EtherCAT fields will not be changed by TSN, and the TSN fields are not used for EtherCAT processing.
Synchronized operation is possible in such networks by sending the frame with a fixed interval from the IEEE 802.1 network into the EtherCAT slave segment. The worst-case latency determines the send time into the EtherCAT segment. TSN allows synchronous operations distributed over multiple segments without specific additional efforts in the EtherCAT slaves.
The quality of synchronous operation depends upon the TSN clocks (IEEE 802.1AS). It is recommended to use bridges that provide a precise timing in the 100 ns range between the EtherCAT master and the first slave to maintain a high degree of precision in the network.
EtherCAT & TSN
Adding EtherCAT segments as structuring elements in TSN reduces the complexity in backbones by using shared frames for a group of slaves and enabling internal configuration for a machine. TSN will protect EtherCAT segments from unwanted traffic while increasing the efficiency of the combined EtherCAT-TSN system. EtherCAT and TSN combined can enhance the flexibility at the automation cell level while maintaining total control of the various automation tasks.
TSN positioning is that TSN does not provide an application layer and will not challenge the EtherCAT Device Protocol at the field level. TSN will make inroads in existing and upcoming solutions, e.g. EtherCAT Automation Protocol (EAP), OPC UA Publisher/Subscriber. In conclusion, EtherCAT integrates perfectly with TSN without fundamentally changing either technology.