Recent Posts
Industrial Ethernet Guide - Ethernet TCP/IP Is Not Deterministic
Posted by
on
The following is part of A Comprehensible Guide to Industrial Ethernet by Wilfried Voss.
As the term Ethernet TCP/IP (Transmission Control Protocol / Internet Protocol) indicates, Ethernet TCP/IP is not a single protocol. It comprises of a full suite of protocols or, in other words,
Ethernet TCP/IP is a layered protocol, where each layer builds upon its lower layer, adding new functionality.
Specifically, the Data Link Layer of Ethernet TCP/IP, represented by the media access control protocol CSMA/CD with its back-off algorithm, prevents Ethernet TCP/IP from being deterministic due to its unpredictable delays and potential transmission failures.
In review, CSMA/CD describes the bus arbitration process, i.e., the process that assures proper data exchange and prevents data damage or loss.
If several transmitting nodes in the network detect their transmission in a distorted form, they assume that a collision occurred, in which case they will cease the transmission, and wait a random amount of time before they attempt to transmit again. The amount of time before re-transmission will vary between the nodes, and the node with the shortest dwell time will access the bus first.
However, the random dwell time before re-transmission is in direct conflict with the definition of determinism and constant cycle time, and, in all consequence, leaves Ethernet TCP/IP useless for hard real-time control.
Also, as the number of nodes grows and, consequently, the volume of traffic increases, opportunities to gain access to the network decrease. The number of collisions will increase exponentially, and the probability of getting access within a given length of time decreases dramatically. In the worst-case scenario, when message collisions occur continuously, nodes (i.e., Ethernet network adapters) will dump the message frame and will not attempt a re-transmission.
In addition to the CSMA/CD issue, the communications protocol UDP and the Internet Protocol (IP) add jitter and non-determinism.
Note: Industrial Ethernet protocols using UDP and IP for real-time communication can still be assumed to support real-time if the jitter is quantifiable, but they will be questionable for hard real-time control, specifically for fast motion control applications (e.g., robotics).
Last, but not least, there is the issue of unpredictable data frame length, i.e., what happens if one node sends out a data frame that is multiple times longer than the preferred cycle time? According to CSMA/CD, only one node can send data, and the transmission cannot be interrupted, not even by higher priority (emergency) data.
All these issues make Ethernet a probabilistic network, as opposed to a deterministic network, in which access time can be reliably predicted.
They are, however, being addressed by the various Industrial Ethernet technologies in one way or the other. The solutions, as described in the following chapters, require either add-on software, or additional hardware, or a combination of both.
Note: Depending on the network design, the occurrence of CSMA/CD can be eliminated by utilizing full duplex Ethernet Switches, which brings pure Ethernet TCP/IP closer to real-time performance. However, these switches have no control in regard to constant cycle times.
TCP/IP Illustrated, Volume 1: The Protocols
TCP/IP Illustrated, Volume 1, Second Edition, is a detailed and visual guide to today’s TCP/IP protocol suite. Fully updated for the newest innovations, it demonstrates each protocol in action through realistic examples from modern Linux, Windows, and Mac OS environments. There’s no better way to discover why TCP/IP works as it does, how it reacts to standard conditions, and how to apply it in your applications and networks.
Building on the late W. Richard Stevens’ classic first edition, author Kevin R. Fall adds his cutting-edge experience as a leader in TCP/IP protocol research, updating the book to reflect the latest protocols and best practices fully. He first introduces TCP/IP’s core goals and architectural concepts, showing how they can robustly connect diverse networks and support multiple services running concurrently. Next, he carefully explains Internet addressing in both IPv4 and IPv6 networks. Then, he walks through TCP/IP’s structure and function from the bottom up: from link layer protocols–such as Ethernet and Wi-Fi–through the network, transport, and application layers.