Introduction to Real-Time Ethernet I
Total Page:16
File Type:pdf, Size:1020Kb
Volume5•Issue3 MAY-JUNE © 2004 Contemporary Control Systems, Inc. Introduction to Real-Time Ethernet I By Paula Doyle, a doctoral researcher with the Circuits and Systems Research Centre at the University of Limerick in Ireland INTRODUCTION far as its timely execution is concerned. RT systems are Real-time electronic distributed control systems are generally broken into two main sub-categories: hard an important development of the technological and soft. evolution. Electronics are employed to control and Node with RT Clock monitor most safety-critical applications from flight Controller Station 3 decks to hospital operating rooms. As these real-time systems become increasingly prevalent and advanced, RT Network so does the demand to physically distribute the control in strict real-time. Thus, there is a need for control network protocols to support stringent real-time Station 1 Station 2 requirements. Real-time networks must provide a guarantee of service so they will consistently operate deterministically and correctly. Figure 1—Distributed Real-Time Processing Ethernet, as defined in IEEE 802.3, is non-deterministic and thus, is unsuitable for hard real-time applications. Hard Real-Time (HRT) systems are those in which The media access control protocol, CSMA/CD with its incorrect operation can lead to catastrophic events. backoff algorithm, prevents the network from supporting Errors in HRT systems can cause accidents or even hard real-time communication due to its random delays death, such as in flight control or train control. and potential transmission failures. Soft Real-Time (SRT) systems, on the other hand, Decreasing costs and increasing demand for a single are not as brittle. An error in a SRT system, while not network type, from boardroom to plant-floor, have led encouraged, will not cause loss of property or life. SRT to the development of Industrial Ethernet. The desire to systems are not as safety-critical as HRT systems, and incorporate a real-time element into this increasingly should not be employed in a safety-critical situation. popular single-network solution has led to the Examples of SRT systems are online reservation development of different real-time Industrial Ethernet systems and streaming multimedia applications where strategies. Fieldbus networking standards have failed to occasional delays are inconvenient but not serious. deliver an integrated solution. Typically, emerging real- Jobs are the RT system’s building blocks. Each RT job time Industrial Ethernet solutions complement the has certain temporal quantities (Figure 2): fieldbus standards — for example, by using common 1. Release Time, user layers. This article covers an introduction to real- 2. Ready Time, time systems and a study of Ethernet’s potential as a 3. Execution Time, real-time network. Part 2 provides a study of the 4. Response Time, real-time Industrial Ethernet solutions available today. 5. Deadline. Real-Time Introduction Release Time of a job is when a job becomes Real-Time (RT) systems are becoming increasingly available to the system. Execution Time is the time important, as industries focus on distributed computing for a job to be completely processed. Response Time in automation, see Figure 1. As computing costs is the interval between release time and completion of decrease, and computing power increases, industry has the execution. Ready Time is the earliest time a job relied more on distributed computers to deliver can start executing (never less than the Release Time). efficiency and increased yield to production lines. RT The Deadline is the time by which execution must be does not automatically mean faster execution, but rather finished, beyond which the job is late. A deadline can that a process is dependent on the progression of time for be either hard or soft, indicating the job’s temporal valid execution. dependence. As mentioned earlier, a missed hard dead- RT systems are those that depend not solely on the line can have serious consequences. All RT systems validity of data but also on its timeliness. A correct RT have a certain level of jitter (a variance on actual system will guarantee successful system operation—so timing). In a RT system, jitter should be measurable so system performance can be guaranteed. For textbook information on RT systems, refer to [1]. (No part of the Extension may be reproduced without the written consent of Contemporary Controls.) 1 Release Ready introduce overhead through its minimum message data Time Time Deadline size (46 bytes), which is large in comparison to existing control network standards, its increased bandwidth, Respon se Time standardization and integration with existing plant technology should generate good reasons to consider Ethernet as a control network solution. Execution Time Ethernet and CSMA/CD Ethernet, as defined in IEEE 802.3, is unsuitable for time strict RT industrial applications because its communication Figure 2 is non-deterministic. This is due to the definition of its To develop a RT distributed system of interconnected media access control (MAC) protocol, based on Carrier computers, it is vital to provide communication among Sense Multiple Access/ Collision Detection (CSMA/CD). the various computers in a reliable and timely fashion. The implementation described in the standard uses a Distributed processors running RT applications must be truncated binary exponential backoff algorithm. able to intercommunicate via a RT protocol, otherwise With CSMA/CD, each node can detect if another the temporal quality of work is lost. Real-Time node is transmitting on the medium (Carrier Sense). Communication networks are like any RT system. When a node detects a carrier, its Carrier Sense is They can be hard or soft, depending on requirements turned on and it will defer transmission until determining and their ‘jobs’ include message transmission, the medium is free. If two nodes transmit simultaneously propagation, and reception. A number of RT control (Multiple Access), a collision occurs and all frames are networks are employed in industry, but none have the destroyed. Nodes detect collisions (Collision Detection) popularity or bandwidth of Ethernet. by monitoring the collisionDetect signal provided by the physical layer. When a collision occurs, the node The Demand for Real-Time Ethernet transmits a jam sequence. Demand for Ethernet as a RT control network is When a node begins transmission there is a time increasing as manufacturers realize the benefits of interval, called the Collision Window, during which a employing a single network technology from collision can occur. This window is large enough to boardroom to plant floor. Decreased product costs allow the signal to propagate around the entire plus the possibility of overlapping training and network/segment. When this window is over, all maintenance costs for information, field level, control (functioning) nodes should have their Carrier Sense on, and possibly device networks would greatly reduce and so would not attempt to commence transmission. manufacturers’ expense. When a collision occurs, the truncated binary At the RT control level, Ethernet offers many exponential backoff algorithm is employed at each benefits over existing solutions. As a control network, ‘colliding’ node. The algorithm works as follows: 10 Gbps Ethernet offers bandwidth almost 1000x faster Initially: n:=0, k:=0, r:=0. than today’s comparable fieldbus networks (such as the When a collision occurs, the node enters the 12 Mbps of ProfiBus) and can also support RT algorithm which states: communication. Distributed applications in control • It increments n, the Transmit Counter, which environments require tight synchronization so to tracks the number of sequential collisions guarantee the delivery of control messages within experienced by a node. defined message cycle times (typical times appear in •Ifn > 16, (16 unsuccessful successive transmission Table 1). Traditional Ethernet and fieldbus systems attempts), transmission fails and the higher layers cannot meet cycle time requirements below a few should be informed. milliseconds, but emerging RT Industrial Ethernet •Ifn <= 16, select a number from the set k = min solutions allow cycle times of a few microseconds. (n, 10) (Truncation). Along with the increased bandwidth and tight • A random number, r, is selected from the set synchronization, RT Ethernet gives manufacturers the (0,1,2,4...2 k) (Exponential and Binary). security of using a physical and data-link layer technology • The node then waits r x slot_time before that has been standardized by both the IEEE and the recommencing a transmission attempt. ISO. Ethernet can provide reduced complexity with all the attributes required of a field, control or device One advantage of this backoff algorithm is that it network — in operations having up to 30 different controls the medium load. If the medium is heavily networks installed at this level [2]. Furthermore, loaded, the likelihood of collisions increases, and the Ethernet devices can also support TCP/IP stacks so that algorithm increases the interval from which the random Ethernet can easily gate to the Internet. This feature is delay time is chosen. This should lighten the load and attractive to users since it allows remote diagnostics, reduce further collisions. control, and observation of their plant network from Ethernet introduces the possibility of complete any Internet-connected device around the world with a transmission failure and the possibility of random license-free web browser. Although Ethernet does transmission time, hence IEEE 802.3’s non-determinism 2 and unsuitability for RT communications—especially on Since full duplex links have a maximum of two heavily-loaded networks. Re-definition of the media nodes per link, such technology is not viable as an access protocol could solve the problem but would industrial RT solution without the use of fast, intelligent leave the new nodes unable to interoperate with legacy switches that can form a network with single collision Ethernet nodes. domains for each node — i.e., Switched Ethernet. Ethernet is non-deterministic only if collisions can Full Duplex, Switched Ethernet occur.